[GRASS-SVN] r73274 - grass-addons/grass7/imagery/i.rh

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 5 06:14:16 PDT 2018


Author: ychemin
Date: 2018-09-05 06:14:16 -0700 (Wed, 05 Sep 2018)
New Revision: 73274

Modified:
   grass-addons/grass7/imagery/i.rh/rh.c
Log:
fixed typos

Modified: grass-addons/grass7/imagery/i.rh/rh.c
===================================================================
--- grass-addons/grass7/imagery/i.rh/rh.c	2018-09-05 13:13:34 UTC (rev 73273)
+++ grass-addons/grass7/imagery/i.rh/rh.c	2018-09-05 13:14:16 UTC (rev 73274)
@@ -1,32 +1,14 @@
 #include<stdio.h>
 #include<math.h>
 
-double rh(double PW,double Pa,double Ta,double dem){
-	/*
-	https{//www.researchgate.net/publication/227247013_High-resolution_Surface_Relative_Humidity_Computation_Using_MODIS_Image_in_Peninsular_Malaysia/
-	PW <- MOD05_L2 product
-	Pa <- MOD07 product
-	Pa <- 1013.3-0.1038*dem
-	Ta <- MOD07 product
-	Ta <- -0.0065*dem+TaMOD07 (if dem>400m)
-	
-	https{//ladsweb.modaps.eosdis.nasa.gov/archive/allData/61/MOD05_L2/
-	https{//ladsweb.modaps.eosdis.nasa.gov/archive/allData/61/MOD07_L2/
-	*/
-	/*Specific Humidity*/
-	double q=0.001*(-0.0762*PW*PW+1.753*PW+12.405);
-	double ta=-0.0065*dem+Ta;
-	double a=17.2694*ta/(ta+238.3);
-	return(q*Pa/(380*exp(a)));
-}
-
 double esat(double tamean){
 	/*
 	esat{ saturated vapour pressure
 	tamean{ air temperature daily mean
 	*/
-	return(610.78*exp(17.2694*tamean/(tamean+238.3)));
+	return(0.61078*exp(17.2694*tamean/(tamean+237.3)));
 }
+
 double eact(double esat,double rh){
 	/*
 	eact{ actual vapour pressure
@@ -35,6 +17,7 @@
 	*/
 	return(0.01*esat*rh);
 }
+
 double eatm(double eact){
 	/*
 	eatm: atmospheric emissivity
@@ -42,3 +25,23 @@
 	*/
 	return(1.34-0.14*sqrt(eact));
 }
+
+double rh(double PW,double Pa,double Ta,double dem){
+	/*
+	https{//www.researchgate.net/publication/227247013_High-resolution_Surface_Relative_Humidity_Computation_Using_MODIS_Image_in_Peninsular_Malaysia/
+	PW <- MOD05_L2 product [mm]
+	Pa <- MOD07 product [kPa]
+	Pa <- 1013.3-0.1038*dem [kPa]
+	Ta <- MOD07 product [Celsius]
+	Ta <- -0.0065*dem+TaMOD07 (if dem>400m) [Celsius]
+	
+	https{//ladsweb.modaps.eosdis.nasa.gov/archive/allData/61/MOD05_L2/
+	https{//ladsweb.modaps.eosdis.nasa.gov/archive/allData/61/MOD07_L2/
+	*/
+	/*Specific Humidity*/
+	double q=0.001*(-0.0762*PW*PW+1.753*PW+12.405);
+	double ta=-0.0065*dem+Ta;
+	double a=17.2694*ta/(ta+237.3);
+	return(2.63224*q*Pa/exp(a));
+}
+



More information about the grass-commit mailing list