diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation3.java @ 1669:0296684a5553

Bugfix: #330 Add problem if no data was found for duration curves. flys-artifacts/trunk@2881 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 04 Oct 2011 13:38:21 +0000
parents 3b7e9ddf6bb1
children 2898b1ff6013
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation3.java	Tue Oct 04 11:28:37 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation3.java	Tue Oct 04 13:38:21 2011 +0000
@@ -24,6 +24,18 @@
 
         double [] ws = wst.interpolateW(km, qs, new double[qs.length], this);
 
+        if (days == null || days.length == 0) {
+            addProblem(km, "cannot find Ds");
+        }
+
+        if (logger.isDebugEnabled()) {
+            logger.debug("Calculate duration curve data:");
+            logger.debug("    km       : " + km);
+            logger.debug("    num Days : " + (days != null ? days.length : 0));
+            logger.debug("    num Qs   : " + (qs != null ? qs.length : 0));
+            logger.debug("    result Ws: " + (ws != null ? ws.length : 0));
+        }
+
         WQDay wqday = new WQDay(days, ws, qs);
 
         if (hasProblems()) {

http://dive4elements.wald.intevation.org