comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java @ 9489:8562c60371b8

Fixed: Sinfo flood duration duration curves with km specific Q
author mschaefer
date Tue, 18 Sep 2018 17:28:22 +0200
parents 929d645691ae
children 10530f1d7dd5
comparison
equal deleted inserted replaced
9488:c347512a07bd 9489:8562c60371b8
139 final int[] odays = new int[udays.length]; 139 final int[] odays = new int[udays.length];
140 final double[] oqs = new double[udays.length]; 140 final double[] oqs = new double[udays.length];
141 final double[] ows = new double[udays.length]; 141 final double[] ows = new double[udays.length];
142 for (int i = 0, j = udays.length - 1; i <= udays.length - 1; i++, j--) { 142 for (int i = 0, j = udays.length - 1; i <= udays.length - 1; i++, j--) {
143 odays[j] = 365 - udays[i]; 143 odays[j] = 365 - udays[i];
144 oqs[j] = qs[i];
145 final QPosition qpos = wst.getQPosition(gauge.getStation().doubleValue(), qs[i]); 144 final QPosition qpos = wst.getQPosition(gauge.getStation().doubleValue(), qs[i]);
146 if (qpos != null) 145 if (qpos != null) {
147 ows[j] = wst.interpolateW(station, qpos, problems); 146 ows[j] = wst.interpolateW(station, qpos, problems);
148 else 147 oqs[j] = wst.getQ(qpos, station);
148 }
149 else {
149 ows[j] = Double.NaN; 150 ows[j] = Double.NaN;
151 oqs[j] = qs[i];
152 }
150 } 153 }
151 return new WQDay(odays, ows, oqs); 154 return new WQDay(odays, ows, oqs);
152 } 155 }
153 156
154 /** 157 /**

http://dive4elements.wald.intevation.org