[GRASS-SVN] r38699 - grass/trunk/raster/r.sun

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 12 08:31:36 EDT 2009


Author: hamish
Date: 2009-08-12 08:31:35 -0400 (Wed, 12 Aug 2009)
New Revision: 38699

Modified:
   grass/trunk/raster/r.sun/main.c
Log:
sanity check time= option; propset mime-type (merge from devbr6)

Modified: grass/trunk/raster/r.sun/main.c
===================================================================
--- grass/trunk/raster/r.sun/main.c	2009-08-12 12:30:03 UTC (rev 38698)
+++ grass/trunk/raster/r.sun/main.c	2009-08-12 12:31:35 UTC (rev 38699)
@@ -467,6 +467,7 @@
     parm.ltime->required = NO;
     parm.ltime->description =
 	_("Local (solar) time (to be set for mode 1 only) [decimal hours]");
+    parm.ltime->options = "0-24";
 
     /*
      * parm.startTime = G_define_option();
@@ -613,17 +614,18 @@
 	G_fatal_error(_("If you use the horizon option you must also set the 'horizonstep' parameter."));
     }
 
-
     tt = parm.ltime->answer;
     if (parm.ltime->answer != NULL) {
 	if (insol_time != NULL)
 	    G_fatal_error(_("Time and insol_time are incompatible options"));
+
 	G_message(_("Mode 1: instantaneous solar incidence angle & irradiance using a set local time"));
 	sscanf(parm.ltime->answer, "%lf", &timo);
     }
     else {
 	if (incidout != NULL)
 	    G_fatal_error(_("incidout requires time parameter to be set"));
+
 	G_message(_("Mode 2: integrated daily irradiation for a given day of the year"));
     }
 


Property changes on: grass/trunk/raster/r.sun/main.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc



More information about the grass-commit mailing list