[PATCH] We well want to average NaNs but want to know the cause of the result being NaN

Wald Commits scm-commit at wald.intevation.org
Tue Sep 9 13:49:40 CEST 2014


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1410263368 -7200
# Node ID 0a03c1921cfed3157bf174784a083bce618186d8
# Parent  0a994bbe645ec9288b6355de573ba65ea22f2511
We well want to average NaNs but want to know the cause of the result being NaN.

diff -r 0a994bbe645e -r 0a03c1921cfe artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java	Tue Sep 09 12:03:46 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java	Tue Sep 09 13:49:28 2014 +0200
@@ -308,7 +308,8 @@
                         filter, sum);
 
                     if (result[0].length == 0 || DoubleUtil.isNaN(result[1])) {
-                        continue;
+                        addProblem("sedimentload.missing.fraction." +
+                            ls.getDescription(), ((Integer)year).toString());
                     }
 
                     transformT2M3(sd, year, result);


More information about the Dive4Elements-commits mailing list