Browse Source

expanded actual seconds per day computation instead of magic number

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68573 15284696-431f-4ddb-bdfa-cd5b030d7da7
Yann Chemin 9 năm trước cách đây
mục cha
commit
ddca77692b
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      imagery/i.eb.eta/eta.c
  2. 1 1
      imagery/i.evapo.pt/pt_daily_et.c

+ 1 - 1
imagery/i.eb.eta/eta.c

@@ -6,7 +6,7 @@ double et_a(double r_net_day, double evap_fr, double tempk)
     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;
 

+ 1 - 1
imagery/i.evapo.pt/pt_daily_et.c

@@ -12,7 +12,7 @@ double pt_daily_et(double alpha_pt, double delta_pt, double ghamma_pt,
 
     /*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 */