[GRASS-SVN] r70773 - grass/branches/releasebranch_7_2/raster/r.topmodel

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 20 21:42:26 PDT 2017


Author: hcho
Date: 2017-03-20 21:42:26 -0700 (Mon, 20 Mar 2017)
New Revision: 70773

Modified:
   grass/branches/releasebranch_7_2/raster/r.topmodel/infiltration.c
Log:
r.topmodel: Fix cumulative infiltration

Modified: grass/branches/releasebranch_7_2/raster/r.topmodel/infiltration.c
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.topmodel/infiltration.c	2017-03-21 04:39:37 UTC (rev 70772)
+++ grass/branches/releasebranch_7_2/raster/r.topmodel/infiltration.c	2017-03-21 04:42:26 UTC (rev 70773)
@@ -6,9 +6,9 @@
 /* The Green-and-Ampt Model */
 double calculate_infiltration(int timestep, double R)
 {
-    static double cumf = 0.0, f = 0.0;
+    static double cumf = 0.0, f = 0.0, cnst = 0.0, pt = 0.0;
     static char ponding = 0;
-    double t, df, f1, f2, fc, R2, cnst, pt, psi_dtheta, sum;
+    double t, df, f1, f2, fc, R2, psi_dtheta, sum;
     int factorial;
     int i, j;
 
@@ -21,7 +21,7 @@
     }
 
     t = timestep * input.dt;
-    f1 = cnst = pt = 0.0;
+    f1 = 0.0;
     psi_dtheta = params.psi * params.dtheta;
     if (!ponding) {
 	if (cumf) {



More information about the grass-commit mailing list