[GRASS-SVN] r32358 - grass-addons/gipe/i.eb.h_SEBAL95

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 29 09:06:05 EDT 2008


Author: ychemin
Date: 2008-07-29 09:06:05 -0400 (Tue, 29 Jul 2008)
New Revision: 32358

Modified:
   grass-addons/gipe/i.eb.h_SEBAL95/rah1.c
   grass-addons/gipe/i.eb.h_SEBAL95/rah_0.c
   grass-addons/gipe/i.eb.h_SEBAL95/sensi_h_noz0m.c
   grass-addons/gipe/i.eb.h_SEBAL95/sensi_h_z0m.c
   grass-addons/gipe/i.eb.h_SEBAL95/zom_0.c
Log:
bug fixing

Modified: grass-addons/gipe/i.eb.h_SEBAL95/rah1.c
===================================================================
--- grass-addons/gipe/i.eb.h_SEBAL95/rah1.c	2008-07-29 12:12:46 UTC (rev 32357)
+++ grass-addons/gipe/i.eb.h_SEBAL95/rah1.c	2008-07-29 13:06:05 UTC (rev 32358)
@@ -6,7 +6,7 @@
 {
 	double  u5, result;
 	u5 = (ustar/0.41)*log(5/zom_0);
-	result = (1/(pow(u5*0.41,2))) * (log(5/zom_0)-psim) * (log(5/(zom_0*0.1))-psih);
+	result = (1.0/(u5*pow(0.41,2)))*(log(5/zom_0)-psim)*(log(5/(zom_0*0.1))-psih);
 	return result;
 }
 

Modified: grass-addons/gipe/i.eb.h_SEBAL95/rah_0.c
===================================================================
--- grass-addons/gipe/i.eb.h_SEBAL95/rah_0.c	2008-07-29 12:12:46 UTC (rev 32357)
+++ grass-addons/gipe/i.eb.h_SEBAL95/rah_0.c	2008-07-29 13:06:05 UTC (rev 32358)
@@ -7,7 +7,7 @@
 	double ustar, u5, result;
 	ustar = (u_hu*0.41)/(log(hu/zom_0));
 	u5 = (ustar/0.41)*log(5/zom_0);
-	result = (1/(pow(u5*0.41,2))) * log(5/zom_0) * log(5/(zom_0*0.1));
+	result = (1/(u5*pow(0.41,2))) * log(5/zom_0) * log(5/(zom_0*0.1));
 	return result;
 }
 

Modified: grass-addons/gipe/i.eb.h_SEBAL95/sensi_h_noz0m.c
===================================================================
--- grass-addons/gipe/i.eb.h_SEBAL95/sensi_h_noz0m.c	2008-07-29 12:12:46 UTC (rev 32357)
+++ grass-addons/gipe/i.eb.h_SEBAL95/sensi_h_noz0m.c	2008-07-29 13:06:05 UTC (rev 32358)
@@ -49,20 +49,14 @@
  	//printf("*****************************rah = %5.3f\n",rah[0]);
 	h_desert= rnet_desert - g0_desert;
  	//printf("*****************************h_desert = %5.3f\n",h_desert);
+	zom_desert= 0.002;
+ 	//printf("*****************************zom_desert = %5.3f\n",zom_desert);
+	ustar_desert=u_star(t0_dem_desert,h_desert,u_0,roh_air_desert,zom_desert,u_hu,hu);
+	rah_desert= rah_0(zom_desert,u_hu,hu);
+ 	//printf("*****************************rah_desert = %5.3f\n",rah_desert);
 	if(dtair_desert < 0.0){
-		zom_desert= 0.002;
- 		//printf("*****************************zom_desert = %5.3f\n",zom_desert);
-		ustar_desert= u_star(t0_dem_desert,h_desert,u_0,roh_air_desert,zom_desert,u_hu,hu);
-
-		//psih_desert= psi_h(t0_dem_desert,h_desert,ustar_desert,roh_air_desert,hu);
- 		//printf("*****************************psih_desert = %5.3f\n",psih_desert);
-		//psim_desert= psi_m(t0_dem_desert,h_desert,ustar_desert,roh_air_desert,hu);
- 		//printf("*****************************psim_desert = %5.3f\n",psim_desert);
-		//rah_desert= rah1(zom_desert,psih_desert,psim_desert,ustar_desert);
-		rah_desert= rah_0(zom_desert,u_hu,hu);
- 		//printf("*****************************rah_desert = %5.3f\n",rah_desert);
 		dtair_desert = dt_air_desert(h_desert, roh_air_desert, rah_desert);
- 		//printf("*****************************dtair_desert = %5.3f\n",dtair_desert);
+ 		//printf("*******************dtair_desert = %5.3f\n",dtair_desert);
 	}
 	if(dtair0 < 0.0){
 		dtair[0] = dt_air(t0_dem,tempk_water,tempk_desert,dtair_desert);

Modified: grass-addons/gipe/i.eb.h_SEBAL95/sensi_h_z0m.c
===================================================================
--- grass-addons/gipe/i.eb.h_SEBAL95/sensi_h_z0m.c	2008-07-29 12:12:46 UTC (rev 32357)
+++ grass-addons/gipe/i.eb.h_SEBAL95/sensi_h_z0m.c	2008-07-29 13:06:05 UTC (rev 32358)
@@ -46,13 +46,11 @@
 // 	printf("*****************************u0\n");
 	rah[0] 		= rah_0(zom0, u_hu, hu);
 // 	printf("*****************************rah = %5.3f\n",rah[0]);
+	h_desert= rnet_desert - g0_desert;
+	zom_desert= 0.002;
+	ustar_desert= u_star(t0_dem_desert,h_desert,u_0,roh_air_desert,zom_desert,u_hu,hu);
+	rah_desert= rah_0(zom0,u_hu,hu);
  	if(dtair_desert < 0.0){
-		h_desert= rnet_desert - g0_desert;
-		zom_desert= 0.002;
-		ustar_desert= u_star(t0_dem_desert,h_desert,u_0,roh_air_desert,zom_desert,u_hu,hu);
-		psih_desert= psi_h(t0_dem_desert,h_desert,ustar_desert,roh_air_desert,hu);
-		psim_desert= psi_m(t0_dem_desert,h_desert,ustar_desert,roh_air_desert,hu);
-		rah_desert= rah1(zom0,psih_desert,psim_desert,ustar_desert);
 		dtair_desert= dt_air_desert(h_desert, roh_air_desert, rah_desert);
 	}
 	if(dtair0 < 0.0){

Modified: grass-addons/gipe/i.eb.h_SEBAL95/zom_0.c
===================================================================
--- grass-addons/gipe/i.eb.h_SEBAL95/zom_0.c	2008-07-29 12:12:46 UTC (rev 32357)
+++ grass-addons/gipe/i.eb.h_SEBAL95/zom_0.c	2008-07-29 13:06:05 UTC (rev 32358)
@@ -5,7 +5,7 @@
 double zom_0(double ndvi, double ndvi_max)
 {
 	double a, b, zom;
-	double hv_ndvimax=1.2; /* crop vegetation height (m) */
+	double hv_ndvimax=1.5; /* crop vegetation height (m) */
 	double hv_desert=0.002; /* desert base vegetation height (m) */
 
 	a = (log(hv_desert)-((log(hv_ndvimax/7)-log(hv_desert))/(ndvi_max-0.02)*0.02));



More information about the grass-commit mailing list