comparison artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java @ 9573:b9c87bbff6a4

mean bed height -> mean bed LEVEL
author gernotbelger
date Tue, 06 Nov 2018 10:56:22 +0100
parents 3fa8551c3d1b
children c57caff9b00b
comparison
equal deleted inserted replaced
9572:0d0c8fd1b8c8 9573:b9c87bbff6a4
105 final boolean showAllGauges = true; 105 final boolean showAllGauges = true;
106 final WaterlevelData waterlevel = new WaterlevelData(wqkms, wspYear, showAllGauges, true); 106 final WaterlevelData waterlevel = new WaterlevelData(wqkms, wspYear, showAllGauges, true);
107 final RiverInfoProvider riverInfoProvider2 = riverInfoProvider.forWaterlevel(waterlevel); 107 final RiverInfoProvider riverInfoProvider2 = riverInfoProvider.forWaterlevel(waterlevel);
108 final WstInfo wstInfo = new WstInfo(wqkms.getName(), 0, riverInfoProvider2.getReferenceGauge(), true); 108 final WstInfo wstInfo = new WstInfo(wqkms.getName(), 0, riverInfoProvider2.getReferenceGauge(), true);
109 109
110 // Fetch the bed heights of the selected sounding 110 // Fetch the bed levels of the selected sounding
111 final Integer bedHeightId = access.getBedHeightID(); 111 final Integer bedHeightId = access.getBedHeightID();
112 final BedHeightsFinder bedHeightsFinder = (bedHeightId != null) ? BedHeightsFinder.forId(problems, bedHeightId, access.getRange()) 112 final BedHeightsFinder bedHeightsFinder = (bedHeightId != null) ? BedHeightsFinder.forId(problems, bedHeightId, access.getRange())
113 : BedHeightsFinder.NullFinder(); 113 : BedHeightsFinder.NullFinder();
114 114
115 // Fetch the river channel data 115 // Fetch the river channel data
352 else 352 else
353 return 0.0; 353 return 0.0;
354 } 354 }
355 355
356 /** 356 /**
357 * Computes the missing area and volume of the mean bed height of a km row 357 * Computes the missing area and volume of the mean bed level of a km row
358 */ 358 */
359 private double[] computeMeanBedMissingAreaAndVolume(final int current, final int first, final int last) { 359 private double[] computeMeanBedMissingAreaAndVolume(final int current, final int first, final int last) {
360 360
361 final double areaCurr = meanBedMissingArea(current, first, last); 361 final double areaCurr = meanBedMissingArea(current, first, last);
362 if (areaCurr < 0.0001) 362 if (areaCurr < 0.0001)
372 final double area = Double.isNaN(volume) ? Double.NaN : Double.valueOf(area1 + area2); 372 final double area = Double.isNaN(volume) ? Double.NaN : Double.valueOf(area1 + area2);
373 return new double[] { volume, area }; 373 return new double[] { volume, area };
374 } 374 }
375 375
376 /** 376 /**
377 * Gets the missing area of the mean bed height and a row if in range, otherwise 0.0 377 * Gets the missing area of the mean bed level and a row if in range, otherwise 0.0
378 */ 378 */
379 private double meanBedMissingArea(final int rowIndex, final int first, final int last) { 379 private double meanBedMissingArea(final int rowIndex, final int first, final int last) {
380 if ((first <= rowIndex) && (rowIndex <= last)) { 380 if ((first <= rowIndex) && (rowIndex <= last)) {
381 final double dh = this.rows.get(rowIndex).getDoubleValue(BunduResultType.channelDepth) 381 final double dh = this.rows.get(rowIndex).getDoubleValue(BunduResultType.channelDepth)
382 - this.rows.get(rowIndex).getDoubleValue(BunduResultType.flowdepthMeanBed); 382 - this.rows.get(rowIndex).getDoubleValue(BunduResultType.flowdepthMeanBed);

http://dive4elements.wald.intevation.org