[GRASS-SVN] r44992 - grass/trunk/imagery/i.evapo.mh

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 12 11:16:10 EST 2011


Author: martinl
Date: 2011-01-12 08:16:10 -0800 (Wed, 12 Jan 2011)
New Revision: 44992

Added:
   grass/trunk/imagery/i.evapo.mh/i.evapo.mh.html
Removed:
   grass/trunk/imagery/i.evapo.mh/i.evapo.MH.html
Modified:
   grass/trunk/imagery/i.evapo.mh/Makefile
   grass/trunk/imagery/i.evapo.mh/main.c
Log:
i.evapo.mh (renamed from i.evapo.MH) & clean up


Modified: grass/trunk/imagery/i.evapo.mh/Makefile
===================================================================
--- grass/trunk/imagery/i.evapo.mh/Makefile	2011-01-12 16:09:05 UTC (rev 44991)
+++ grass/trunk/imagery/i.evapo.mh/Makefile	2011-01-12 16:16:10 UTC (rev 44992)
@@ -1,6 +1,6 @@
 MODULE_TOPDIR = ../..
 
-PGM = i.evapo.MH
+PGM = i.evapo.mh
 
 LIBES = $(VECTLIB) $(RASTERLIB) $(GISLIB)
 DEPENDENCIES= $(VECTDEP) $(GISDEP) $(DISPLAYDEP) $(RASTERDEP)

Deleted: grass/trunk/imagery/i.evapo.mh/i.evapo.MH.html
===================================================================
--- grass/trunk/imagery/i.evapo.mh/i.evapo.MH.html	2011-01-12 16:09:05 UTC (rev 44991)
+++ grass/trunk/imagery/i.evapo.mh/i.evapo.MH.html	2011-01-12 16:16:10 UTC (rev 44992)
@@ -1,33 +0,0 @@
-<H2>DESCRIPTION</H2>
-
-<EM>i.evapo.MH</EM> Calculates the reference ET after Hargreaves (1985) and Modified Hargreaves (2001). 
-
-<H2>NOTES</H2>
-Hargreaves GL, Hargreaves GH, Riley JP, 1985. Agricultural benefits for Senegal River Basin. Journal of Irrigation and Drainange Engineering, ASCE, 111(2):113-124.
-
-Droogers P, Allen RG, 2002. Towards a simplified global reference evapotranspiration equation. Irrigation Science.
-Droogers, P., and R.G. Allen. 2002. Estimating reference evapotranspiration under inaccurate data conditions. Irrigation and Drainage Systems 16: 33-45.
-
-Hargreaves and Samani, 1985.
-
-<H2>TODO</H2>
-
-
-<H2>SEE ALSO</H2>
-
-<em>
-<A HREF="i.evapo.PT.html">i.evapo.PT</A><br>
-<A HREF="i.evapo.PM.html">i.evapo.PM</A><br>
-<A HREF="i.evapo.potrad.html">i.evapo.potrad</A><br>
-<A HREF="r.sun.html">r.sun</A><br>
-
-</em>
-
-
-<H2>AUTHORS</H2>
-
-Yann Chemin, GRASS Development team, 2007-2011<BR>
-
-
-<p>
-<i>Last changed: $Date$</i>

Copied: grass/trunk/imagery/i.evapo.mh/i.evapo.mh.html (from rev 44987, grass/trunk/imagery/i.evapo.mh/i.evapo.MH.html)
===================================================================
--- grass/trunk/imagery/i.evapo.mh/i.evapo.mh.html	                        (rev 0)
+++ grass/trunk/imagery/i.evapo.mh/i.evapo.mh.html	2011-01-12 16:16:10 UTC (rev 44992)
@@ -0,0 +1,33 @@
+<H2>DESCRIPTION</H2>
+
+<EM>i.evapo.MH</EM> Calculates the reference ET after Hargreaves (1985) and Modified Hargreaves (2001). 
+
+<H2>NOTES</H2>
+Hargreaves GL, Hargreaves GH, Riley JP, 1985. Agricultural benefits for Senegal River Basin. Journal of Irrigation and Drainange Engineering, ASCE, 111(2):113-124.
+
+Droogers P, Allen RG, 2002. Towards a simplified global reference evapotranspiration equation. Irrigation Science.
+Droogers, P., and R.G. Allen. 2002. Estimating reference evapotranspiration under inaccurate data conditions. Irrigation and Drainage Systems 16: 33-45.
+
+Hargreaves and Samani, 1985.
+
+<H2>TODO</H2>
+
+
+<H2>SEE ALSO</H2>
+
+<em>
+<A HREF="i.evapo.PT.html">i.evapo.PT</A><br>
+<A HREF="i.evapo.PM.html">i.evapo.PM</A><br>
+<A HREF="i.evapo.potrad.html">i.evapo.potrad</A><br>
+<A HREF="r.sun.html">r.sun</A><br>
+
+</em>
+
+
+<H2>AUTHORS</H2>
+
+Yann Chemin, GRASS Development team, 2007-2011<BR>
+
+
+<p>
+<i>Last changed: $Date$</i>

Modified: grass/trunk/imagery/i.evapo.mh/main.c
===================================================================
--- grass/trunk/imagery/i.evapo.mh/main.c	2011-01-12 16:09:05 UTC (rev 44991)
+++ grass/trunk/imagery/i.evapo.mh/main.c	2011-01-12 16:16:10 UTC (rev 44992)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* MODULE:	i.evapo.MH
+* MODULE:	i.evapo.mh
 * AUTHOR:	Yann Chemin yann.chemin at gmail.com 
 *
 * PURPOSE:	To estimate the reference evapotranspiration by means
@@ -40,10 +40,6 @@
     int infd_TEMPKAVG, infd_TEMPKMIN, infd_TEMPKMAX, infd_RNET, infd_P;
     int outfd;
 
-    /* mapsets for input raster files */
-    char *mapset_TEMPKAVG, *mapset_TEMPKMIN, *mapset_TEMPKMAX, *mapset_RNET,
-	*mapset_P;
-
     /* names of input-output raster files */
     char *RNET, *TEMPKAVG, *TEMPKMIN, *TEMPKMAX, *P;
     char *ETa;
@@ -70,54 +66,50 @@
     G_gisinit(argv[0]);
 
     module = G_define_module();
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("evapotranspiration"));
     module->description =
-	_("Evapotranspiration Calculation "
-	  "Modified Hargreaves formulation, 2001."
-	  "Flag for Original Hargreaves (1985).");
+	_("Computes evapotranspiration calculation "
+	  "modified or original Hargreaves formulation, 2001.");
 
     /* Define different options */
     input_RNET = G_define_standard_option(G_OPT_R_INPUT);
     input_RNET->key = "rnetd";
-    input_RNET->key_desc = "[W/m2/d]";
-    input_RNET->description = _("Name of Diurnal Net Radiation raster map");
+    input_RNET->description = _("Name of input diurnal net radiation raster map [W/m2/d]");
 
     input_TEMPKAVG = G_define_standard_option(G_OPT_R_INPUT);
     input_TEMPKAVG->key = "tempkavg";
-    input_TEMPKAVG->key_desc = "[C]";
-    input_TEMPKAVG->description = _("Name of avg air temperature raster map");
+    input_TEMPKAVG->description = _("Name of input average air temperature raster map [C]");
 
     input_TEMPKMIN = G_define_standard_option(G_OPT_R_INPUT);
     input_TEMPKMIN->key = "tempkmin";
-    input_TEMPKMIN->key_desc = "[C]";
-    input_TEMPKMIN->description = _("Name of min air temperature raster map");
+    input_TEMPKMIN->description = _("Name of input minimum air temperature raster map [C]");
 
     input_TEMPKMAX = G_define_standard_option(G_OPT_R_INPUT);
-    input_TEMPKMAX->key = "TEMPKMAX";
-    input_TEMPKMAX->key_desc = "[C]";
-    input_TEMPKMAX->description = _("Name of max air temperature raster map");
+    input_TEMPKMAX->key = "tempkmax";
+    input_TEMPKMAX->description = _("Name of input maximum air temperature raster map [C]");
 
     input_P = G_define_standard_option(G_OPT_R_INPUT);
-    input_P->key = "p";
-    input_P->key_desc = "[mm/month]";
-    input_P->description =
-	_("Name of precipitation raster map, disabled if original Hargreaves (1985) is enabled.");
-
+    input_P->key = "prec";
+    input_P->label =
+	_("Name of precipitation raster map [mm/month]");
+    input_P->description = _("Disabled for original Hargreaves (1985)");
+    
     output = G_define_standard_option(G_OPT_R_OUTPUT);
-    output->key_desc = "[mm/d]";
-    output->description = _("Name of output Ref Evapotranspiration layer");
+    output->description = _("Name for output raster map [mm/d]");
 
     /* Define the different flags */
     zero = G_define_flag();
     zero->key = 'z';
-    zero->description = _("set negative ETa to zero");
+    zero->description = _("Set negative ETa to zero");
 
     original = G_define_flag();
     original->key = 'h';
-    original->description = _("set to original Hargreaves (1985)");
+    original->description = _("Use original Hargreaves (1985)");
 
     samani = G_define_flag();
     samani->key = 's';
-    samani->description = _("set to Hargreaves-Samani (1985)");
+    samani->description = _("Use Hargreaves-Samani (1985)");
 
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
@@ -131,10 +123,6 @@
 
     ETa = output->answer;
 
-    /* check legal output name */
-    if (G_legal_filename(ETa) < 0)
-	G_fatal_error(_("[%s] is an illegal name"), ETa);
-
     /* open pointers to input raster files */
     infd_RNET = Rast_open_old(RNET, "");
     infd_TEMPKAVG = Rast_open_old(TEMPKAVG, "");



More information about the grass-commit mailing list