comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation4.java @ 2418:899ca89f497e

Another partial fix for flys/issue499: Do the W to Q conversions needed for 'W am Pegel' correctly. flys-artifacts/trunk@4052 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 14 Feb 2012 16:48:13 +0000
parents 2898b1ff6013
children 44dc117aa2b7
comparison
equal deleted inserted replaced
2417:e5fa3cbbe3ae 2418:899ca89f497e
82 82
83 // need the original values for naming 83 // need the original values for naming
84 segment.backup(); 84 segment.backup();
85 85
86 for (int i = 0; i < values.length; ++i) { 86 for (int i = 0; i < values.length; ++i) {
87 values[i] = DischargeTables.getQForW(table, values[i]); 87 double w = values[i] * 100;
88 double [] qs = DischargeTables.getQsForW(table, w);
89 if (qs.length == 0) {
90 logger.warn("No Qs found for W = " + values[i]);
91 values[i] = Double.NaN;
92 }
93 else {
94 values[i] = qs[0];
95 if (qs.length > 1) {
96 logger.warn(
97 "More than one Q found for W = " + values[i]);
98 }
99 }
88 } 100 }
89 } 101 }
90 } // for all segments 102 } // for all segments
91 103
92 Collections.sort(segments, REF_CMP); 104 Collections.sort(segments, REF_CMP);

http://dive4elements.wald.intevation.org