[GRASS-SVN] r40305 - in grass/trunk: lib/gpde raster/r.gwflow

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 7 12:25:08 EST 2010


Author: huhabla
Date: 2010-01-07 12:25:07 -0500 (Thu, 07 Jan 2010)
New Revision: 40305

Modified:
   grass/trunk/lib/gpde/N_gwflow.c
   grass/trunk/lib/gpde/N_gwflow.h
   grass/trunk/raster/r.gwflow/main.c
   grass/trunk/raster/r.gwflow/r.gwflow.html
   grass/trunk/raster/r.gwflow/valid_calc_7x7.py
   grass/trunk/raster/r.gwflow/valid_calc_excavation.py
Log:
misspelled budged replaced with budget


Modified: grass/trunk/lib/gpde/N_gwflow.c
===================================================================
--- grass/trunk/lib/gpde/N_gwflow.c	2010-01-07 16:54:22 UTC (rev 40304)
+++ grass/trunk/lib/gpde/N_gwflow.c	2010-01-07 17:25:07 UTC (rev 40305)
@@ -538,25 +538,25 @@
 
 
 /* *************************************************************** */
-/* ****************** N_gwflow_2d_calc_water_budged ************** */
+/* ****************** N_gwflow_2d_calc_water_budget ************** */
 /* *************************************************************** */
 /*!
- * \brief This function computes the water budged of the entire groundwater
+ * \brief This function computes the water budget of the entire groundwater
  *
- * The water budged is calculated for each active and dirichlet cell from
+ * The water budget is calculated for each active and dirichlet cell from
  * its surrounding neighbours. This is based on the 5 star mass balance computation
  * of N_callback_gwflow_2d and the gradient of the water heights in the cells.
- * The sum of the water budged of each active/dirichlet cell must be near zero
+ * The sum of the water budget of each active/dirichlet cell must be near zero
  * due the effect of numerical inaccuracy of cpu's.
  *
  * \param gwdata N_gwflow_data2d *
  * \param geom N_geom_data *
- * \param budged N_array_2d
+ * \param budget N_array_2d
  * \returnvoid
  *
  * */
 void
-N_gwflow_2d_calc_water_budged(N_gwflow_data2d * data, N_geom_data * geom, N_array_2d * budged)
+N_gwflow_2d_calc_water_budget(N_gwflow_data2d * data, N_geom_data * geom, N_array_2d * budget)
 {
     int y, x, stat;
     double h, hc;
@@ -607,14 +607,14 @@
 	    else {
 		Rast_set_null_value(&val, 1, DCELL_TYPE);
 	    }
-	    N_put_array_2d_d_value(budged, x, y, val);
+	    N_put_array_2d_d_value(budget, x, y, val);
 	}
     }
 
     if(fabs(sum) < 0.0000000001)
-        G_message("The total sum of the water budged: %g\n", sum);
+        G_message("The total sum of the water budget: %g\n", sum);
     else
-        G_warning("The total sum of the water budged is significant larger then 0: %g\n", sum);
+        G_warning("The total sum of the water budget is significant larger then 0: %g\n", sum);
 
     return;
 }

Modified: grass/trunk/lib/gpde/N_gwflow.h
===================================================================
--- grass/trunk/lib/gpde/N_gwflow.h	2010-01-07 16:54:22 UTC (rev 40304)
+++ grass/trunk/lib/gpde/N_gwflow.h	2010-01-07 17:25:07 UTC (rev 40305)
@@ -100,7 +100,7 @@
 					 int col, int row, int depth);
 extern N_data_star *N_callback_gwflow_2d(void *gwdata, N_geom_data * geom,
 					 int col, int row);
-extern void N_gwflow_2d_calc_water_budged(N_gwflow_data2d * data,
+extern void N_gwflow_2d_calc_water_budget(N_gwflow_data2d * data,
         N_geom_data * geom, N_array_2d * balance);
 extern N_gwflow_data3d *N_alloc_gwflow_data3d(int cols, int rows, int depths,
 					      int river, int drain);

Modified: grass/trunk/raster/r.gwflow/main.c
===================================================================
--- grass/trunk/raster/r.gwflow/main.c	2010-01-07 16:54:22 UTC (rev 40304)
+++ grass/trunk/raster/r.gwflow/main.c	2010-01-07 17:25:07 UTC (rev 40305)
@@ -31,7 +31,7 @@
 typedef struct
 {
     struct Option *output, *phead, *status, *hc_x, *hc_y, *q, *s, *r, *top,
-	*bottom, *vector_x, *vector_y, *budged, *type, *dt, *maxit, *error, *solver, *sor,
+	*bottom, *vector_x, *vector_y, *budget, *type, *dt, *maxit, *error, *solver, *sor,
 	*river_head, *river_bed, *river_leak, *drain_bed, *drain_leak;
     struct Flag *sparse;
 } paramType;
@@ -142,13 +142,13 @@
 	_("Calculate and store the groundwater filter velocity vector part in y direction [m/s]\n");
 
 
-    param.budged = G_define_option();
-    param.budged->key = "budged";
-    param.budged->type = TYPE_STRING;
-    param.budged->required = NO;
-    param.budged->gisprompt = "new,raster,raster";
-    param.budged->description =
-	_("Store the groundwater budged for each cell\n");
+    param.budget = G_define_option();
+    param.budget->key = "budget";
+    param.budget->type = TYPE_STRING;
+    param.budget->required = NO;
+    param.budget->gisprompt = "new,raster,raster";
+    param.budget->description =
+	_("Store the groundwater budget for each cell\n");
 
     param.type = G_define_option();
     param.type->key = "type";
@@ -444,17 +444,17 @@
     if (les)
 	N_free_les(les);
 
-    /* Compute the water budged for each cell */
-    N_array_2d *budged = N_alloc_array_2d(geom->cols, geom->rows, 1, DCELL_TYPE);
-    N_gwflow_2d_calc_water_budged(data, geom, budged);
+    /* Compute the water budget for each cell */
+    N_array_2d *budget = N_alloc_array_2d(geom->cols, geom->rows, 1, DCELL_TYPE);
+    N_gwflow_2d_calc_water_budget(data, geom, budget);
 
     /*write the result to the output file */
     N_write_array_2d_to_rast(data->phead, param.output->answer);
 
     /*Write the water balance */
-    if(param.budged->answer)
+    if(param.budget->answer)
     {
-	N_write_array_2d_to_rast(budged, param.budged->answer);
+	N_write_array_2d_to_rast(budget, param.budget->answer);
     }
 
     /*Compute the the velocity field if required and write the result into three rast maps */
@@ -481,8 +481,8 @@
 	    N_free_gradient_field_2d(field);
     }
 
-    if(budged)
-        N_free_array_2d(budged);
+    if(budget)
+        N_free_array_2d(budget);
     if (data)
 	N_free_gwflow_data2d(data);
     if (geom)

Modified: grass/trunk/raster/r.gwflow/r.gwflow.html
===================================================================
--- grass/trunk/raster/r.gwflow/r.gwflow.html	2010-01-07 16:54:22 UTC (rev 40304)
+++ grass/trunk/raster/r.gwflow/r.gwflow.html	2010-01-07 17:25:07 UTC (rev 40305)
@@ -17,7 +17,7 @@
 <p>
 
 <em>r.gwflow</em> calculates the piezometric head and optionally 
-the water budged and the filter velocity field,
+the water budget and the filter velocity field,
 based on the hydraulic conductivity and the piezometric head. 
 The vector components can be visualized with paraview if they are exported
 with <em>r.out.vtk</em>.
@@ -29,7 +29,7 @@
 specific yield/ effective porosity raster maps to zero.
 <br>
 <br>
-The water budged is calculated for each non inactive cell. The
+The water budget is calculated for each non inactive cell. The
 sum of the budget for each non inactive cell must be near zero.
 This is an indicator of the quality of the numerical result.
 

Modified: grass/trunk/raster/r.gwflow/valid_calc_7x7.py
===================================================================
--- grass/trunk/raster/r.gwflow/valid_calc_7x7.py	2010-01-07 16:54:22 UTC (rev 40304)
+++ grass/trunk/raster/r.gwflow/valid_calc_7x7.py	2010-01-07 17:25:07 UTC (rev 40305)
@@ -31,13 +31,13 @@
 #First compute the initial groundwater flow
 grass.run_command("r.gwflow", solver="cg", top="top_conf", bottom="bottom", phead="phead",\
  status="status", hc_x="hydcond", hc_y="hydcond", q="well", s="syield",\
- r="recharge", output="gwresult_conf", dt=5, type="confined", budged="water_budged")
+ r="recharge", output="gwresult_conf", dt=5, type="confined", budget="water_budget")
 
 count=0
 # loop over the timesteps
 for i in range(20):
     grass.run_command("r.gwflow", solver="cg", top="top_conf", bottom="bottom", phead="phead",\
      status="status", hc_x="hydcond", hc_y="hydcond", q="well", s="syield",\
-     r="recharge", output="gwresult_conf_" + str(count), dt=5, type="confined", budged="water_budged")
+     r="recharge", output="gwresult_conf_" + str(count), dt=5, type="confined", budget="water_budget")
     count += 500
 

Modified: grass/trunk/raster/r.gwflow/valid_calc_excavation.py
===================================================================
--- grass/trunk/raster/r.gwflow/valid_calc_excavation.py	2010-01-07 16:54:22 UTC (rev 40304)
+++ grass/trunk/raster/r.gwflow/valid_calc_excavation.py	2010-01-07 17:25:07 UTC (rev 40305)
@@ -36,4 +36,4 @@
 #compute a steady state groundwater flow
 grass.run_command("r.gwflow", solver="cholesky", top="top", bottom="bottom", phead="phead", \
  status="status", hc_x="hydcond", hc_y="hydcond", q="well", s="syield", \
- r="recharge", output="gwresult", dt=864000000000, type="unconfined", budged="water_budged")
+ r="recharge", output="gwresult", dt=864000000000, type="unconfined", budget="water_budget")



More information about the grass-commit mailing list