[GRASS-SVN] r41503 - in grass/trunk/raster: r.gwflow r.solute.transport

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 20 20:55:29 EDT 2010


Author: huhabla
Date: 2010-03-20 20:55:27 -0400 (Sat, 20 Mar 2010)
New Revision: 41503

Modified:
   grass/trunk/raster/r.gwflow/main.c
   grass/trunk/raster/r.solute.transport/main.c
Log:
Modified gui section support


Modified: grass/trunk/raster/r.gwflow/main.c
===================================================================
--- grass/trunk/raster/r.gwflow/main.c	2010-03-21 00:37:47 UTC (rev 41502)
+++ grass/trunk/raster/r.gwflow/main.c	2010-03-21 00:55:27 UTC (rev 41503)
@@ -203,13 +203,9 @@
 	_("The leakage coefficient of the drainage bed in [1/s]");
 
     param.dt = N_define_standard_option(N_OPT_CALC_TIME);
-    param.dt->guisection = _("solver");
     param.maxit = N_define_standard_option(N_OPT_MAX_ITERATIONS);
-    param.maxit->guisection = _("solver");
     param.error = N_define_standard_option(N_OPT_ITERATION_ERROR);
-    param.error->guisection = _("solver");
     param.solver = N_define_standard_option(N_OPT_SOLVER_SYMM);
-    param.solver->guisection = _("solver");
     param.solver->options = "cg,pcg,cholesky";
 
     param.full_les = G_define_flag();
@@ -258,6 +254,10 @@
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
+    /* Make sure that the current projection is not lat/long */
+    if ((G_projection() == PROJECTION_LL))
+	G_fatal_error(_("Lat/Long location is not supported by %s. Please reproject map first."),
+		      G_program_name());
 
     /*Check the river  parameters */
     if (param.river_leak->answer == NULL && param.river_bed->answer == NULL &&

Modified: grass/trunk/raster/r.solute.transport/main.c
===================================================================
--- grass/trunk/raster/r.solute.transport/main.c	2010-03-21 00:37:47 UTC (rev 41502)
+++ grass/trunk/raster/r.solute.transport/main.c	2010-03-21 00:55:27 UTC (rev 41503)
@@ -33,7 +33,7 @@
 {
     struct Option *output, *phead, *hc_x, *hc_y,
 	*c, *status, *diff_x, *diff_y, *q, *cs, *r, *top, *nf, *cin,
-	*bottom, *vector_x, *vector_y, *bugded, *type, *dt, *maxit, *error, *solver, *sor,
+	*bottom, *vector_x, *vector_y, *type, *dt, *maxit, *error, *solver, *sor,
 	*al, *at, *loops, *stab;
     struct Flag *full_les;
     struct Flag *cfl;
@@ -91,6 +91,7 @@
 
     param.q = G_define_standard_option(G_OPT_R_INPUT);
     param.q->key = "q";
+    param.q->guisection = _("water flow");
     param.q->required = NO;
     param.q->description = _("Groundwater sources and sinks in [m^3/s]");
 
@@ -98,7 +99,8 @@
     param.cin->key = "cin";
     param.cin->required = NO;
     param.cin->gisprompt = "old,raster,raster";
-    param.cin->description = _("concentration sources and sinks bounded to a "
+    param.cin->guisection = _("water flow");
+    param.cin->description = _("Concentration sources and sinks bounded to a "
             "water source or sink in [kg/s]");
 
 
@@ -107,7 +109,7 @@
     param.cs->type = TYPE_STRING;
     param.cs->required = YES;
     param.cs->gisprompt = "old,raster,raster";
-    param.cs->description = _("concentration of inner sources and inner sinks in [kg/s] "
+    param.cs->description = _("Concentration of inner sources and inner sinks in [kg/s] "
             "(i.e. a chemical reaction)");
 
     param.r = G_define_standard_option(G_OPT_R_INPUT);
@@ -130,12 +132,12 @@
     param.output->description =	_("The resulting concentration of the numerical solute "
             "transport calculation will be written to this map. [kg/m^3]");
 
-
     param.vector_x = G_define_option();
     param.vector_x->key = "vx";
     param.vector_x->type = TYPE_STRING;
     param.vector_x->required = NO;
     param.vector_x->gisprompt = "new,raster,raster";
+    param.vector_x->guisection = _("water flow");
     param.vector_x->description =
 	_("Calculate and store the groundwater filter velocity vector part in x direction [m/s]\n");
 
@@ -144,6 +146,7 @@
     param.vector_y->type = TYPE_STRING;
     param.vector_y->required = NO;
     param.vector_y->gisprompt = "new,raster,raster";
+    param.vector_y->guisection = _("water flow");
     param.vector_y->description =
 	_("Calculate and store the groundwater filter velocity vector part in y direction [m/s]\n");
 
@@ -183,16 +186,19 @@
     param.stab->required = NO;
     param.stab->answer = "full";
     param.stab->options = "full,exp";
+    param.stab->guisection = _("stabelization");
     param.stab->description =
 	_("Set the flow stabilizing scheme (full or exponential upwinding).");
 
     param.full_les = G_define_flag();
     param.full_les->key = 'f';
+    param.full_les->guisection = _("solver");
     param.full_les->description = _("Use a full filled quadratic linear equation system,"
             " default is a sparse linear equation system.");
 
     param.cfl = G_define_flag();
     param.cfl->key = 'c';
+    param.cfl->guisection = _("stabelization");
     param.cfl->description =
 	_("Use the Courant-Friedrichs-Lewy criteria for time step calculation");
 }
@@ -236,6 +242,11 @@
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
+    /* Make sure that the current projection is not lat/long */
+    if ((G_projection() == PROJECTION_LL))
+	G_fatal_error(_("Lat/Long location is not supported by %s. Please reproject map first."),
+		      G_program_name());
+    
     /*Set the maximum iterations */
     sscanf(param.maxit->answer, "%i", &(maxit));
     /*Set the calculation error break criteria */



More information about the grass-commit mailing list