C *************************************************************** real function calctht0 (bszlyd, thetes, thetar, i theta, thetaw,awct, ephc, eahc) c + + + PURPOSE + + + c calctht0 - calculate relative amount of surface water c + + + ARGUMENT DECLARATIONS + + + real bszlyd(*) real thetes(*) real thetar(*) real thetaw(*) real theta(0:*) real awct real*8 eahc, ephc c + + + ARGUMENT DEFINITIONS + + + c bszlyd - depth of layers c theta - water content (m^3/m^3) c thetes - reduced saturation content (m^3/m^3) c thetar - reduced wilting point content (m^3/m^3) c thetaw - wilting point (m^3/m^3) c awct - available water content (m^3/m^3) c ephc - potential soil surface evaporation (mm) c eahc - actual soil surface evaporation (mm) c + + + LOCAL VARIABLES c thetax - extrapolated surface soil water content c eratio - Ratio of actual to potential bare soil evaporation c thetae - Equivalent surface soil water content (m^3/m^3) c theter - Surface soil water content based on relationship c between evaporation ratio & equivalent soil water c content (m^3/m^3) real thetax real eratio real thetae real theter c + + + CALLED FUNCTIONS + + + real extra c + + + END SPECIFICATIONS + + + thetax = extra(bszlyd, thetes(1), thetar(1), theta) !h-64,65,66 if ( theta(1).gt.(thetaw(1)+awct*.70) ) then calctht0 = max(thetax, theta(0)) else if ( ephc.le.0.0 ) then calctht0 = max(thetax,theta(0)) else eratio = eahc/ephc !text after h-85 c This function estimates soil wetness at the soil-atmosphere c interface based on a sigmoid curve that describes the relationship c between evaporation ratio and surface soil wetness expressed as c equivalent water content. thetae = 0.24308+1.37918/ * (1.0+EXP(-(eratio-0.44882)/0.081)) !h-85 theter = thetae*thetaw(1) calctht0 = min(theter,thetax,theta(0)) c *** write(*,*) 'calctht0:thetae,eratio,theta(0)',thetae,eratio, c *** * theta(0) endif endif C *** if (theta(1) .gt. ( thetaw(1) + awct*.70 )) then C *** if ( ephc .eq. 0.0 ) then C *** theta(0)= max(thetax , theta(0)) C *** go to 290 C *** else C *** theta(0)= thetax C *** go to 290 C *** end if C *** end if C *** C *** if ( ephc .gt. 0.0 ) then C *** eratio = eahc/ephc !text after h-85 C *** C ***c This function estimates soil wetness at the soil-atmosphere C ***c interface based on a sigmoid curve that describes the relationship C ***c between evaporation ratio and surface soil wetness expressed as C ***c equivalent water content. C *** C *** thetae = 0.24308+1.37918/ C *** * (1.0+EXP(-(eratio-0.44882)/0.081)) !h-85 C *** theter = thetae*thetaw(1) C *** theta(0) = min(theter,thetax,theta(0)) C *** else C *** theta(0) = max(thetax/2.0,theta(0)) C *** end if C *** return end