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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 1 11:39:00 PDT 2016


Author: ychemin
Date: 2016-06-01 11:39:00 -0700 (Wed, 01 Jun 2016)
New Revision: 68564

Modified:
   grass/trunk/imagery/i.evapo.mh/mh_eto.c
   grass/trunk/imagery/i.evapo.mh/mh_original.c
   grass/trunk/imagery/i.evapo.mh/mh_samani.c
Log:
ticket 3052 fix conversion W to MJ/d

Modified: grass/trunk/imagery/i.evapo.mh/mh_eto.c
===================================================================
--- grass/trunk/imagery/i.evapo.mh/mh_eto.c	2016-06-01 18:15:17 UTC (rev 68563)
+++ grass/trunk/imagery/i.evapo.mh/mh_eto.c	2016-06-01 18:39:00 UTC (rev 68564)
@@ -12,7 +12,7 @@
     if (tavg > 100.0) {
 	tavg = tavg - 273.15;	/*in case temperature is in Kelvin */
     }
-    ra = ra * (84600.0 * 1000.0);	/*convert W -> MJ/d */
+    ra = ra * (84600.0 / 1000.0);	/*convert W -> MJ/d */
     result =
 	0.0013 * 0.408 * ra * (tavg + 17.0) * pow((td - 0.0123 * p), 0.76);
     return result;

Modified: grass/trunk/imagery/i.evapo.mh/mh_original.c
===================================================================
--- grass/trunk/imagery/i.evapo.mh/mh_original.c	2016-06-01 18:15:17 UTC (rev 68563)
+++ grass/trunk/imagery/i.evapo.mh/mh_original.c	2016-06-01 18:39:00 UTC (rev 68564)
@@ -11,7 +11,7 @@
     if (tavg > 100.0) {
 	tavg = tavg - 273.15;	/*in case Temperature is in Kelvin */
     }
-    ra = ra * (84600.0 * 1000.0);	/*convert W -> MJ/d */
+    ra = ra * (84600.0 / 1000.0);	/*convert W -> MJ/d */
     result = 0.0023 * 0.408 * ra * (tavg + 17.8) * pow(td, 0.5);
     return result;
 }

Modified: grass/trunk/imagery/i.evapo.mh/mh_samani.c
===================================================================
--- grass/trunk/imagery/i.evapo.mh/mh_samani.c	2016-06-01 18:15:17 UTC (rev 68563)
+++ grass/trunk/imagery/i.evapo.mh/mh_samani.c	2016-06-01 18:39:00 UTC (rev 68564)
@@ -11,7 +11,7 @@
     if (tavg > 100.0) {
 	tavg = tavg - 273.15;	/*in case Temperature is in Kelvin */
     }
-    ra = ra * (84600.0 * 1000.0);	/* convert W -> MJ/d */
+    ra = ra * (84600.0 / 1000.0);	/* convert W -> MJ/d */
     result =
 	0.0023 * 0.408 * ra * pow(td,
 				  0.5) * ((tmax + tmin) / 2 + 17.8) / 2.45;



More information about the grass-commit mailing list