Sfoglia il codice sorgente

misspelled budged replaced with budget

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40305 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 15 anni fa
parent
commit
7ecfc1abef

+ 9 - 9
lib/gpde/N_gwflow.c

@@ -538,25 +538,25 @@ N_data_star *N_callback_gwflow_2d(void *gwdata, N_geom_data * geom, int col,
 
 
 /* *************************************************************** */
-/* ****************** 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 @@ N_gwflow_2d_calc_water_budged(N_gwflow_data2d * data, N_geom_data * geom, N_arra
 	    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;
 }

+ 1 - 1
lib/gpde/N_gwflow.h

@@ -100,7 +100,7 @@ extern N_data_star *N_callback_gwflow_3d(void *gwdata, N_geom_data * geom,
 					 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);

+ 15 - 15
raster/r.gwflow/main.c

@@ -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 @@ void set_params(void)
 	_("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 @@ int main(int argc, char *argv[])
     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 @@ int main(int argc, char *argv[])
 	    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)

+ 2 - 2
raster/r.gwflow/r.gwflow.html

@@ -17,7 +17,7 @@ raster maps.
 <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 @@ to a large number (billions of seconds) or set the
 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.
 

+ 2 - 2
raster/r.gwflow/valid_calc_7x7.py

@@ -31,13 +31,13 @@ grass.run_command("r.mapcalc", expression="null=0.0")
 #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
 

+ 1 - 1
raster/r.gwflow/valid_calc_excavation.py

@@ -36,4 +36,4 @@ grass.run_command("r.mapcalc", expression="null=0.0")
 #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")