Mercurial > dive4elements > river
changeset 8358:011e2290e801
Deliver historical discharge curves in meter, not centimeter over datum.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 01 Oct 2014 14:13:41 +0200 |
parents | 24d044866c2a |
children | b37cd2db9659 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java Wed Oct 01 13:42:19 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java Wed Oct 01 14:13:41 2014 +0200 @@ -208,11 +208,16 @@ } protected WQKms prepareWQ(DischargeTable dt, double[][] values) { + double datum = dt.getGauge().getDatum().doubleValue(); double km = dt.getGauge().getStation().doubleValue(); - double[] kms = new double[values[0].length]; + double[] kms = new double[values[1].length]; Arrays.fill(kms, km); + for (int i = 0 ; i < values[1].length; i++) { + values[1][i] = values[1][i]/100d + datum; + } + return new HistoricalWQKms(kms, values[0], values[1], String.valueOf(km), dt.getTimeInterval()); }