Mercurial > dive4elements > river
changeset 8744:1d46e388fe2b
(issue1550) Fix writing parameter -GEL to parameter file.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 21 May 2015 13:46:37 +0200 |
parents | f39c080b3903 |
children | 787dff3fd634 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation1.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java |
diffstat | 3 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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],
--- 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();
--- 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); } }