Mercurial > dive4elements > river
changeset 6500:f3b3742fbdad
SedimentLoadCalculation: Handle boring cases in total sed load calculation.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 28 Jun 2013 14:00:15 +0200 |
parents | 857f4d51d859 |
children | 7cb247824ed1 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Fri Jun 28 13:59:45 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Fri Jun 28 14:00:15 2013 +0200 @@ -465,6 +465,20 @@ else { // Some values are missing or no intersection with former values. // Stay as we are. + if (hasButSuspValues(fraction)) { + double total = fraction.getCoarse() + + fraction.getFineMiddle() + + fraction.getSand() + + fraction.getSuspSand(); + lastOtherRange = fraction.getCoarseRange(); + lastOtherValue = total; + lastSuspRange = null; + } + else if (hasOnlySuspValues(fraction)) { + lastSuspRange = fraction.getSuspSedimentRange(); + lastSuspValue = fraction.getSuspSediment(); + lastOtherRange = null; + } } } return fairLoad;