[GRASS-SVN] r68573 - in grass/trunk/imagery: i.eb.eta i.evapo.pt

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 2 02:04:38 PDT 2016


Author: ychemin
Date: 2016-06-02 02:04:38 -0700 (Thu, 02 Jun 2016)
New Revision: 68573

Modified:
   grass/trunk/imagery/i.eb.eta/eta.c
   grass/trunk/imagery/i.evapo.pt/pt_daily_et.c
Log:
expanded actual seconds per day computation instead of magic number

Modified: grass/trunk/imagery/i.eb.eta/eta.c
===================================================================
--- grass/trunk/imagery/i.eb.eta/eta.c	2016-06-02 07:20:31 UTC (rev 68572)
+++ grass/trunk/imagery/i.eb.eta/eta.c	2016-06-02 09:04:38 UTC (rev 68573)
@@ -6,7 +6,7 @@
     double latent, t_celsius, result;
 
     t_celsius = tempk - 273.15;
-    latent = 86400 / ((2.501 - 0.002361 * t_celsius) * pow(10, 6));
+    latent = (24.0*60.0*60.0) / ((2.501 - 0.002361 * t_celsius) * pow(10, 6));
 
     result = r_net_day * evap_fr * latent;
 

Modified: grass/trunk/imagery/i.evapo.pt/pt_daily_et.c
===================================================================
--- grass/trunk/imagery/i.evapo.pt/pt_daily_et.c	2016-06-02 07:20:31 UTC (rev 68572)
+++ grass/trunk/imagery/i.evapo.pt/pt_daily_et.c	2016-06-02 09:04:38 UTC (rev 68573)
@@ -12,7 +12,7 @@
 
     /*Latent Heat of vaporization (W/m2/d) */
     t_celsius = tempka - 273.15;
-    latentHv = 86400 / ((2.501 - 0.002361 * t_celsius) * pow(10, 6));
+    latentHv = (24.0*60.0*60.0) / ((2.501 - 0.002361 * t_celsius) * pow(10, 6));
 
     /* Ratio of slope of saturation-vapour pressure Vs Temperature */
     /* ghamma_pt = psychrometric constant */



More information about the grass-commit mailing list