[PATCH 2 of 2] Fixed: Sinfo flood duration duration curves with km specific Q
Wald Commits
scm-commit at wald.intevation.org
Tue Sep 18 17:28:41 CEST 2018
# HG changeset patch
# User mschaefer
# Date 1537284502 -7200
# Node ID 8562c60371b867c8d62586d37806d8f0f66a887f
# Parent c347512a07bd2ef9b50bfc3ed121edf4ae927432
Fixed: Sinfo flood duration duration curves with km specific Q
diff -r c347512a07bd -r 8562c60371b8 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java Tue Sep 18 17:27:09 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java Tue Sep 18 17:28:22 2018 +0200
@@ -141,12 +141,15 @@
final double[] ows = new double[udays.length];
for (int i = 0, j = udays.length - 1; i <= udays.length - 1; i++, j--) {
odays[j] = 365 - udays[i];
- oqs[j] = qs[i];
final QPosition qpos = wst.getQPosition(gauge.getStation().doubleValue(), qs[i]);
- if (qpos != null)
+ if (qpos != null) {
ows[j] = wst.interpolateW(station, qpos, problems);
- else
+ oqs[j] = wst.getQ(qpos, station);
+ }
+ else {
ows[j] = Double.NaN;
+ oqs[j] = qs[i];
+ }
}
return new WQDay(odays, ows, oqs);
}
More information about the Dive4Elements-commits
mailing list