Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhcalculation/BedQualityD50KmValueFinder.java @ 9086:b5dbcbaed42b
Avoid too many regular exceptions
author | gernotbelger |
---|---|
date | Fri, 25 May 2018 10:47:18 +0200 |
parents | a0feac6ea1ba |
children | e07a2b4606c1 |
rev | line source |
---|---|
8898 | 1 /* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 | |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
11 package org.dive4elements.river.artifacts.sinfo.tkhcalculation; |
8898 | 12 |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
13 import java.util.Calendar; |
8898 | 14 import java.util.Date; |
15 import java.util.List; | |
16 | |
17 import org.apache.commons.lang.math.DoubleRange; | |
18 import org.apache.commons.math.ArgumentOutsideDomainException; | |
19 import org.apache.commons.math.analysis.interpolation.LinearInterpolator; | |
20 import org.apache.commons.math.analysis.polynomials.PolynomialSplineFunction; | |
21 import org.apache.log4j.Logger; | |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
22 import org.dive4elements.river.artifacts.math.Utils; |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
23 import org.dive4elements.river.artifacts.model.Calculation; |
8898 | 24 import org.dive4elements.river.backend.SedDBSessionHolder; |
25 import org.dive4elements.river.model.River; | |
26 import org.hibernate.SQLQuery; | |
27 import org.hibernate.Session; | |
28 import org.hibernate.type.StandardBasicTypes; | |
29 | |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
30 import gnu.trove.TDoubleArrayList; |
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
31 |
8898 | 32 /** |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
33 * Searchable sorted km array with parallel bed measurements value array and linear interpolation for km and d50 between |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
34 * the array elements.<br /> |
8901 | 35 * <br /> |
36 * See comment of SQL command on how the values are filtered and aggregated. | |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
37 * |
8898 | 38 * @author Matthias Schäfer |
39 * | |
40 */ | |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
41 public class BedQualityD50KmValueFinder { |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
42 |
8898 | 43 /***** FIELDS *****/ |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
44 |
8898 | 45 /** |
46 * Private log to use here. | |
47 */ | |
48 private static Logger log = Logger.getLogger(BedQualityD50KmValueFinder.class); | |
49 | |
50 /** | |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
51 * Query selecting all sub layer bed measurements with their d50 for a km range and a time period<br /> |
8898 | 52 * <br /> |
53 * A km may have bed measurements for multiple dates, multiple distances from the river bank, and multiple depth layers. | |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
54 * The query filters by km range, time period and layer (sub layer: below bed to max. 50 cm depth).<br /> |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
55 * |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
56 * If PostgreSQL would support a median aggregate function like Oracle does, the aggregation could be placed into this |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
57 * query. |
8898 | 58 */ |
9017 | 59 private static final String SQL_BED_D50_SUBLAYER_MEASUREMENT = // |
9081 | 60 "SELECT s.km, t.datum, p.tiefevon, p.tiefebis, a.d50" // |
9017 | 61 + " FROM sohltest t INNER JOIN station s ON t.stationid = s.stationid" // |
62 + " INNER JOIN gewaesser g ON s.gewaesserid = g.gewaesserid" // | |
63 + " INNER JOIN sohlprobe p ON t.sohltestid = p.sohltestid" // | |
64 + " INNER JOIN siebanalyse a ON p.sohlprobeid = a.sohlprobeid" // | |
65 + " WHERE (g.name = :name) AND (s.km BETWEEN :fromkm - 0.0001 AND :tokm + 0.0001)" // | |
66 + " AND (p.tiefevon > 0.0) AND (p.tiefebis <= 0.5)" // | |
67 + " AND (t.datum BETWEEN :fromdate AND :todate)" // | |
68 + " ORDER BY t.km ASC, a.d50 ASC"; | |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
69 |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
70 private Calculation problems; |
8898 | 71 |
72 /** | |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
73 * Real linear interpolator for kms and d50 values (m) |
8898 | 74 */ |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
75 private final PolynomialSplineFunction interpolator; |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
76 |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
77 /***** CONSTRUCTORS *****/ |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
78 |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
79 private BedQualityD50KmValueFinder(final Calculation problems, final double[] kms, final double[] values) { |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
80 this.problems = problems; |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
81 |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
82 this.interpolator = new LinearInterpolator().interpolate(kms, values); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
83 } |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
84 |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
85 /***** METHODS *****/ |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
86 |
8898 | 87 /** |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
88 * Sohlbeschaffenheit (D50 Korndurchmesser aus Seddb) |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
89 * Abhängig von Peiljahr |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
90 * |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
91 * @param problems |
8898 | 92 */ |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
93 public static BedQualityD50KmValueFinder loadBedMeasurements(final Calculation problems, final River river, final DoubleRange kmRange, |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
94 final int soundingYear, final int validYears) { |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
95 |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
96 /* construct valid measurement time range */ |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
97 final Calendar cal = Calendar.getInstance(); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
98 cal.clear(); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
99 |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
100 cal.set(soundingYear - validYears, 0, 1); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
101 final Date startTime = cal.getTime(); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
102 |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
103 cal.set(soundingYear + validYears, 11, 31); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
104 final Date endTime = cal.getTime(); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
105 |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
106 log.debug(String.format("loadValues km %.3f - %.3f %tF - %tF", kmRange.getMinimumDouble(), kmRange.getMaximumDouble(), startTime, endTime)); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
107 final Session session = SedDBSessionHolder.HOLDER.get(); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
108 final SQLQuery sqlQuery = session.createSQLQuery(SQL_BED_D50_SUBLAYER_MEASUREMENT).addScalar("km", StandardBasicTypes.DOUBLE) |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
109 .addScalar("datum", StandardBasicTypes.DATE).addScalar("tiefevon", StandardBasicTypes.DOUBLE).addScalar("tiefebis", StandardBasicTypes.DOUBLE) |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
110 .addScalar("d50", StandardBasicTypes.DOUBLE); |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
111 final String seddbRiver = river.nameForSeddb(); |
8898 | 112 sqlQuery.setString("name", seddbRiver); |
113 sqlQuery.setDouble("fromkm", kmRange.getMinimumDouble()); | |
114 sqlQuery.setDouble("tokm", kmRange.getMaximumDouble()); | |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
115 sqlQuery.setDate("fromdate", startTime); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
116 sqlQuery.setDate("todate", endTime); |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
117 |
8898 | 118 final List<Object[]> rows = sqlQuery.list(); |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
119 final TDoubleArrayList kms = new TDoubleArrayList(); |
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
120 final TDoubleArrayList values = new TDoubleArrayList(); |
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
121 final TDoubleArrayList kmd50s = new TDoubleArrayList(); |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
122 |
9017 | 123 // Median aggregate d50 values for each km |
9081 | 124 if (rows != null) { |
125 for (int i = 0; i <= rows.size() - 1; i++) { | |
126 log.trace("loadValues rows(" + i + ") " + rows.get(i)[0] + " " + rows.get(i)[1] + " " + rows.get(i)[2] + " " + rows.get(i)[3] + " " | |
127 + rows.get(i)[4]); | |
128 kmd50s.add((double) rows.get(i)[4]); | |
129 if (((i == rows.size() - 1) || !Utils.epsilonEquals((double) rows.get(i)[0], (double) rows.get(i + 1)[0], 0.0001))) { | |
130 final int k = kmd50s.size() / 2; | |
131 values.add(((k + k < kmd50s.size()) ? kmd50s.get(k) : (kmd50s.get(k - 1) + kmd50s.get(k)) / 2) / 1000); | |
132 kms.add((double) rows.get(i)[0]); | |
133 log.debug(String.format("loadValues km %.3f d50(mm) %.1f count %d", kms.get(kms.size() - 1), values.get(values.size() - 1) * 1000, | |
134 kmd50s.size())); | |
135 kmd50s.clear(); | |
136 } | |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
137 } |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
138 } |
9017 | 139 if (kms.size() >= 1) |
140 log.debug(String.format("loadValues: %d kms found from %.3f to %.3f", kms.size(), kms.get(0), kms.get(kms.size() - 1))); | |
141 else | |
142 log.debug("loadValues: no kms found"); | |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
143 |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
144 if (kms.size() < 2 || values.size() < 2) { |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
145 problems.addProblem("bedqualityd50kmvaluefinder.empty", soundingYear); |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
146 return null; |
8898 | 147 } |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
148 |
8911
37ff7f435912
SINFO Flowdepth: more error checks, d50 interpolation, avoid negative tkh
mschaefer
parents:
8901
diff
changeset
|
149 try { |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
150 return new BedQualityD50KmValueFinder(problems, kms.toNativeArray(), values.toNativeArray()); |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
151 } |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
152 catch (final Exception e) { |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
153 e.printStackTrace(); |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
154 problems.addProblem("bedqualityd50kmvaluefinder.error", e.getLocalizedMessage()); |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
155 return null; |
8911
37ff7f435912
SINFO Flowdepth: more error checks, d50 interpolation, avoid negative tkh
mschaefer
parents:
8901
diff
changeset
|
156 } |
8898 | 157 } |
158 | |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
159 /** |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
160 * Returns the d50 value interpolated according to a km |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
161 * |
8920
29442c03c6e3
d50 aggregation by median instead of arithmetic mean,
mschaefer
parents:
8915
diff
changeset
|
162 * @return d50 (m) of the km, or NaN |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
163 */ |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
164 public double findD50(final double km) { |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
165 try { |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
166 return this.interpolator.value(km); |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
167 } |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
168 catch (final ArgumentOutsideDomainException e) { |
9086 | 169 // e.printStackTrace(); |
8964
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
170 |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
171 if (this.problems != null) { |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
172 this.problems.addProblem(km, "bedqualityd50kmvaluefinder.missing"); |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
173 // Report only once |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
174 this.problems = null; |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
175 } |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
176 |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
177 return Double.NaN; |
45f1ad66560e
Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
gernotbelger
parents:
8921
diff
changeset
|
178 } |
8915
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
179 } |
d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
gernotbelger
parents:
8911
diff
changeset
|
180 } |