Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
1668:6566c7868456 | 1669:0296684a5553 |
---|---|
22 | 22 |
23 public CalculationResult calculate(WstValueTable wst) { | 23 public CalculationResult calculate(WstValueTable wst) { |
24 | 24 |
25 double [] ws = wst.interpolateW(km, qs, new double[qs.length], this); | 25 double [] ws = wst.interpolateW(km, qs, new double[qs.length], this); |
26 | 26 |
27 if (days == null || days.length == 0) { | |
28 addProblem(km, "cannot find Ds"); | |
29 } | |
30 | |
31 if (logger.isDebugEnabled()) { | |
32 logger.debug("Calculate duration curve data:"); | |
33 logger.debug(" km : " + km); | |
34 logger.debug(" num Days : " + (days != null ? days.length : 0)); | |
35 logger.debug(" num Qs : " + (qs != null ? qs.length : 0)); | |
36 logger.debug(" result Ws: " + (ws != null ? ws.length : 0)); | |
37 } | |
38 | |
27 WQDay wqday = new WQDay(days, ws, qs); | 39 WQDay wqday = new WQDay(days, ws, qs); |
28 | 40 |
29 if (hasProblems()) { | 41 if (hasProblems()) { |
30 logger.debug("calculation caused "+numProblems()+" problem(s)."); | 42 logger.debug("calculation caused "+numProblems()+" problem(s)."); |
31 wqday.removeNaNs(); | 43 wqday.removeNaNs(); |