[PATCH] (issue1550) Fix writing parameter -GEL to parameter file

Wald Commits scm-commit at wald.intevation.org
Thu May 21 13:46:41 CEST 2015


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1432208797 -7200
# Node ID 1d46e388fe2b6030526fdd1181f2419a7d26817b
# Parent  f39c080b3903d912ddbad4a74a1f9fb51df1bb4d
(issue1550) Fix writing parameter -GEL to parameter file.

diff -r f39c080b3903 -r 1d46e388fe2b artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java	Fri May 08 13:02:33 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java	Thu May 21 13:46:37 2015 +0200
@@ -271,6 +271,8 @@
                 "reference gauge: " + gauge.getName() + " (km " + refKm + ")");
         }
 
+        log.debug("TG: km=" + kms[0] + ", q=" + qs[0] + ", refKm=" + refKm);
+
         return computeWaterlevelData(kms, qs, ws, wst, refKm, report);
     }
 
@@ -786,6 +788,7 @@
      * for a range calculation, otherwise dependent on flow direction.
      */
     public Gauge determineRefGauge(double[] range, River river) {
+        log.debug("TG: range is " + range[0] + " - " + range[1]);
         if (isRange()) {
             return river.determineGaugeByPosition(
                 range[0],
diff -r f39c080b3903 -r 1d46e388fe2b artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation1.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation1.java	Fri May 08 13:02:33 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation1.java	Thu May 21 13:46:37 2015 +0200
@@ -56,6 +56,7 @@
 
             boolean success =
                 wst.interpolate(qs[i], refKm, kms, ows, oqs, this) != null;
+            log.debug("TG: input q=" + qs[i] + ", output q=" + oqs[0]);
 
             int newNumProblems = numProblems();
 
diff -r f39c080b3903 -r 1d46e388fe2b artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java	Fri May 08 13:02:33 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java	Thu May 21 13:46:37 2015 +0200
@@ -377,8 +377,10 @@
     protected void writeGel(PrintWriter writer)
     throws IllegalArgumentException
     {
-        if (area != null && area.length() > 0) {
-            writer.println("-GEL=" + getGel());
+        String gel = getGel();
+
+        if (gel != null && gel.length() > 0) {
+            writer.println("-GEL=" + gel);
         }
     }
 


More information about the Dive4Elements-commits mailing list