[PATCH 1 of 5] Softwaretests...20181219 6.1: overflow day compute with 365.25 instead of 365.0

Wald Commits scm-commit at wald.intevation.org
Tue Feb 5 15:52:16 CET 2019


# HG changeset patch
# User mschaefer
# Date 1549376662 -3600
# Node ID 225e48df608cdab830ca2aeabf53e4d4b1508186
# Parent  8f4e300b5f798ac2e389c6955c58a3f9e9cff42f
Softwaretests...20181219 6.1: overflow day compute with 365.25 instead of 365.0

diff -r 8f4e300b5f79 -r 225e48df608c artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java	Fri Jan 11 17:44:25 2019 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java	Tue Feb 05 15:24:22 2019 +0100
@@ -144,7 +144,7 @@
 
         final int[] odays = new int[wqday.size()];
         for (int i = 0; i <= odays.length - 1; i++)
-            odays[i] = 365 - wqday.getDay(i);
+            odays[i] = 365 - wqday.getDay(i); // TODO Eigentlich 365.25, ist aber mit getDay als int sinnlos
         return new WQDay(odays, wqday.getWs(), wqday.getQs());
     }
 
@@ -466,6 +466,6 @@
      * Translates underflow duration into overflow duration
      */
     private double underflowDaysToOverflowDays(final double underflowDays) {
-        return 365 - underflowDays;
+        return 365.25 - underflowDays;
     }
 }
\ No newline at end of file


More information about the Dive4Elements-commits mailing list