[GRASS-SVN] r45674 - in grass/trunk/raster/simwe: r.sim.water simlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 15 17:48:37 EDT 2011
Author: huhabla
Date: 2011-03-15 14:48:37 -0700 (Tue, 15 Mar 2011)
New Revision: 45674
Modified:
grass/trunk/raster/simwe/r.sim.water/main.c
grass/trunk/raster/simwe/simlib/input.c
Log:
Fixed wrong manin_val computation. Added verbose outputs.
Modified: grass/trunk/raster/simwe/r.sim.water/main.c
===================================================================
--- grass/trunk/raster/simwe/r.sim.water/main.c 2011-03-15 17:49:40 UTC (rev 45673)
+++ grass/trunk/raster/simwe/r.sim.water/main.c 2011-03-15 21:48:37 UTC (rev 45674)
@@ -394,7 +394,7 @@
}
}
/* Report the final value of manin_val */
- G_debug(3, "manin_val is set to: %f\n", manin_val);
+ G_debug(1, "manin_val is set to: %f\n", manin_val);
/* if no infiltration map, then: */
if (parm.infil->answer == NULL) {
@@ -423,7 +423,7 @@
}
}
/* Report the final value of infil_val */
- G_debug(3, "infil_val is set to: %f\n", infil_val);
+ G_debug(1, "infil_val is set to: %f\n", infil_val);
/* Recompute timesec from user input in minutes
* to real timesec in seconds */
@@ -457,14 +457,14 @@
/* memory allocation for output grids */
- G_debug(2, "beginning memory allocation for output grids");
+ G_debug(1, "beginning memory allocation for output grids");
gama = G_alloc_matrix(my, mx);
if (err != NULL)
gammas = G_alloc_matrix(my, mx);
dif = G_alloc_fmatrix(my, mx);
- G_debug(2, "seeding randoms");
+ G_debug(1, "seeding randoms");
seeds(rand1, rand2);
grad_check();
main_loop();
Modified: grass/trunk/raster/simwe/simlib/input.c
===================================================================
--- grass/trunk/raster/simwe/simlib/input.c 2011-03-15 17:49:40 UTC (rev 45673)
+++ grass/trunk/raster/simwe/simlib/input.c 2011-03-15 21:48:37 UTC (rev 45674)
@@ -38,6 +38,7 @@
int if_rain = 0;
G_debug(1, "Running MAR 2011 version, started modifications on 20080211");
+ G_debug(1, "Reading input data");
/* Elevation and gradients are mandatory */
zz = read_float_raster_map(rows, cols, elevin, 1.0);
@@ -52,7 +53,7 @@
if(manin != NULL) {
cchez = read_float_raster_map(rows, cols, manin, 1.0);
} else if(manin_val >= 0.0) { /* If no value set its set to -999.99 */
- cchez = create_float_matrix(rows, cols, manin_val * unitconv);
+ cchez = create_float_matrix(rows, cols, manin_val);
}else{
G_fatal_error(_("Raster map <%s> not found, and manin_val undefined, choose one to be allowed to process"), manin);
}
@@ -374,6 +375,8 @@
int col = 0, row = 0;
float **matrix = NULL;
+ G_verbose_message("Creating float matrix with value %g", fill_value);
+
/* Allocate the float marix */
matrix = G_alloc_fmatrix(rows, cols);
@@ -393,6 +396,8 @@
int col = 0, row = 0;
double **matrix = NULL;
+ G_verbose_message("Creating double matrix with value %g", fill_value);
+
/* Allocate the float marix */
matrix = G_alloc_matrix(rows, cols);
@@ -414,7 +419,7 @@
int col = 0, row = 0, row_rev = 0;
float **matrix = NULL;
- G_message("Reading float map %s into memory", name);
+ G_verbose_message("Reading float map %s into memory", name);
/* Open raster map */
fd = Rast_open_old(name, "");
@@ -457,7 +462,7 @@
int col = 0, row = 0, row_rev;
double **matrix = NULL;
- G_message("Reading double map %s into memory", name);
+ G_verbose_message("Reading double map %s into memory", name);
/* Open raster map */
fd = Rast_open_old(name, "");
@@ -489,4 +494,4 @@
Rast_close(fd);
return matrix;
-}
\ No newline at end of file
+}
More information about the grass-commit
mailing list