[GRASS-SVN] r44989 - grass/trunk/imagery/i.evapo.pt

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 12 10:59:43 EST 2011


Author: martinl
Date: 2011-01-12 07:59:43 -0800 (Wed, 12 Jan 2011)
New Revision: 44989

Added:
   grass/trunk/imagery/i.evapo.pt/i.evapo.pt.html
Removed:
   grass/trunk/imagery/i.evapo.pt/i.evapo.PT.html
Modified:
   grass/trunk/imagery/i.evapo.pt/Makefile
   grass/trunk/imagery/i.evapo.pt/main.c
Log:
i.evapo.pt: renamed from i.evapo.PT & clean up


Modified: grass/trunk/imagery/i.evapo.pt/Makefile
===================================================================
--- grass/trunk/imagery/i.evapo.pt/Makefile	2011-01-12 15:53:15 UTC (rev 44988)
+++ grass/trunk/imagery/i.evapo.pt/Makefile	2011-01-12 15:59:43 UTC (rev 44989)
@@ -1,6 +1,6 @@
 MODULE_TOPDIR = ../..
 
-PGM = i.evapo.PT
+PGM = i.evapo.pt
 
 LIBES = $(VECTLIB) $(RASTERLIB) $(GISLIB)
 DEPENDENCIES= $(VECTDEP) $(GISDEP) $(DISPLAYDEP) $(RASTERDEP)

Deleted: grass/trunk/imagery/i.evapo.pt/i.evapo.PT.html
===================================================================
--- grass/trunk/imagery/i.evapo.pt/i.evapo.PT.html	2011-01-12 15:53:15 UTC (rev 44988)
+++ grass/trunk/imagery/i.evapo.pt/i.evapo.PT.html	2011-01-12 15:59:43 UTC (rev 44989)
@@ -1,36 +0,0 @@
-<H2>DESCRIPTION</H2>
-
-<EM>i.evapo.PT</EM> Calculates the diurnal evapotranspiration after Prestley and Taylor (1972). 
-The Priestley-Taylor model (Priestley and Taylor, 1972) is a modification of Penman’s more theoretical equation.
-
-<H2>NOTES</H2>
-RNETD optional output from i.evapo.potrad is giving good results as input for net radiation in this module.
-
-Alpha values:
-1.32 for estimates from vegetated areas as a result of the increase in surface roughness (Morton, 1983; Brutsaert and Stricker, 1979)
-1.26 is applicable in humid climates (De Bruin and Keijman, 1979; Stewart and Rouse, 1976; Shuttleworth and Calder, 1979), and temperate hardwood swamps (Munro, 1979)
-1.74 has been recommended for estimating potential evapotranspiration in more arid regions (ASCE, 1990). This Worked well in Greece with University of Thessaloniki.
-
-Alpha values extracted from:
-http://www.civil.uwaterloo.ca/Watflood/Manual/02_03_1.htm
-
-<H2>TODO</H2>
-
-
-<H2>SEE ALSO</H2>
-
-<em>
-<A HREF="i.evapo.PM.html">i.evapo.PM</A><br>
-<A HREF="i.evapo.potrad.html">i.evapo.potrad</A><br>
-<A HREF="i.eb.netrad.html">i.eb.netrad</A><br>
-<A HREF="i.eb.g0.html">i.eb.g0</A><br>
-</em>
-
-
-<H2>AUTHORS</H2>
-
-Yann Chemin, GRASS Development team, 2007-08<BR>
-
-
-<p>
-<i>Last changed: $Date$</i>

Copied: grass/trunk/imagery/i.evapo.pt/i.evapo.pt.html (from rev 44987, grass/trunk/imagery/i.evapo.pt/i.evapo.PT.html)
===================================================================
--- grass/trunk/imagery/i.evapo.pt/i.evapo.pt.html	                        (rev 0)
+++ grass/trunk/imagery/i.evapo.pt/i.evapo.pt.html	2011-01-12 15:59:43 UTC (rev 44989)
@@ -0,0 +1,36 @@
+<H2>DESCRIPTION</H2>
+
+<EM>i.evapo.PT</EM> Calculates the diurnal evapotranspiration after Prestley and Taylor (1972). 
+The Priestley-Taylor model (Priestley and Taylor, 1972) is a modification of Penman’s more theoretical equation.
+
+<H2>NOTES</H2>
+RNETD optional output from i.evapo.potrad is giving good results as input for net radiation in this module.
+
+Alpha values:
+1.32 for estimates from vegetated areas as a result of the increase in surface roughness (Morton, 1983; Brutsaert and Stricker, 1979)
+1.26 is applicable in humid climates (De Bruin and Keijman, 1979; Stewart and Rouse, 1976; Shuttleworth and Calder, 1979), and temperate hardwood swamps (Munro, 1979)
+1.74 has been recommended for estimating potential evapotranspiration in more arid regions (ASCE, 1990). This Worked well in Greece with University of Thessaloniki.
+
+Alpha values extracted from:
+http://www.civil.uwaterloo.ca/Watflood/Manual/02_03_1.htm
+
+<H2>TODO</H2>
+
+
+<H2>SEE ALSO</H2>
+
+<em>
+<A HREF="i.evapo.PM.html">i.evapo.PM</A><br>
+<A HREF="i.evapo.potrad.html">i.evapo.potrad</A><br>
+<A HREF="i.eb.netrad.html">i.eb.netrad</A><br>
+<A HREF="i.eb.g0.html">i.eb.g0</A><br>
+</em>
+
+
+<H2>AUTHORS</H2>
+
+Yann Chemin, GRASS Development team, 2007-08<BR>
+
+
+<p>
+<i>Last changed: $Date$</i>

Modified: grass/trunk/imagery/i.evapo.pt/main.c
===================================================================
--- grass/trunk/imagery/i.evapo.pt/main.c	2011-01-12 15:53:15 UTC (rev 44988)
+++ grass/trunk/imagery/i.evapo.pt/main.c	2011-01-12 15:59:43 UTC (rev 44989)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* MODULE:	i.evapo.PT
+* MODULE:	i.evapo.pt
 * AUTHOR:	Yann Chemin yann.chemin at gmail.com 
 *
 * PURPOSE:	To estimate the daily evapotranspiration by means
@@ -37,9 +37,6 @@
     int infd_TEMPKA, infd_PATM, infd_RNET, infd_G0;
     int outfd;
 
-    /* mapsets for input raster files */
-    char *mapset_TEMPKA, *mapset_PATM, *mapset_RNET, *mapset_G0;
-
     /* names of input-output raster files */
     char *RNET, *TEMPKA, *PATM, *G0;
     char *ETa;
@@ -58,7 +55,7 @@
     struct Option *input_RNET, *input_TEMPKA, *input_PATM, *input_G0,
 	*input_PT;
     struct Option *output;
-    struct Flag *flag1, *zero;
+    struct Flag *zero;
     struct Colors color;
     struct History history;
 
@@ -66,48 +63,43 @@
     G_gisinit(argv[0]);
 
     module = G_define_module();
+    G_add_keyword(_("imagery"));
+    G_add_keyword(_("evapotranspiration"));
     module->description =
-	_("Evapotranspiration Calculation "
+	_("Computes evapotranspiration calculation "
 	  "Prestley and Taylor formulation, 1972.");
-
+    
     /* Define different options */
     input_RNET = G_define_standard_option(G_OPT_R_INPUT);
-    input_RNET->key = "RNET";
-    input_RNET->key_desc = "[W/m2]";
-    input_RNET->description = _("Name of Net Radiation raster map");
+    input_RNET->key = "rnet";
+    input_RNET->description = _("Name of input net radiation raster map [W/m2]");
 
     input_G0 = G_define_standard_option(G_OPT_R_INPUT);
-    input_G0->key = "G0";
-    input_G0->key_desc = "[W/m2]";
-    input_G0->description = _("Name of Soil Heat Flux raster map");
+    input_G0->key = "go";
+    input_G0->description = _("Name of input soil heat flux raster map [W/m2]");
 
     input_TEMPKA = G_define_standard_option(G_OPT_R_INPUT);
-    input_TEMPKA->key = "TEMPKA";
-    input_TEMPKA->key_desc = "[K]";
-    input_TEMPKA->description = _("Name of air temperature raster map");
+    input_TEMPKA->key = "tempka";
+    input_TEMPKA->description = _("Name of input air temperature raster map [K]");
 
     input_PATM = G_define_standard_option(G_OPT_R_INPUT);
-    input_PATM->key = "PATM";
-    input_PATM->key_desc = "[millibars]";
-    input_PATM->description = _("Name of Atmospheric Pressure raster map");
+    input_PATM->key = "patm";
+    input_PATM->description = _("Name of input atmospheric pressure raster map [millibars]");
 
     input_PT = G_define_option();
-    input_PT->key = "PT";
-    input_PT->key_desc = "[-]";
+    input_PT->key = "pt";
     input_PT->type = TYPE_DOUBLE;
     input_PT->required = YES;
-    input_PT->gisprompt = "old,cell,raster";
     input_PT->description = _("Prestley-Taylor Coefficient");
     input_PT->answer = "1.26";
 
     output = G_define_standard_option(G_OPT_R_OUTPUT);
-    output->key_desc = "[mm/d]";
-    output->description = _("Name of output Evapotranspiration layer");
+    output->description = _("Name of output evapotranspiration 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");
 
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
@@ -121,10 +113,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_TEMPKA = Rast_open_old(TEMPKA, "");



More information about the grass-commit mailing list