c$Author: fredfox $ c$Date: 2001-07-09 23:02:37 $ c$Revision: 1.1.2.2 $ c$Source: /weru/cvs/weps/weps.src/hydro/soilrelhum.for,v $ real*4 function soilrelhum(theta, thetaw, theta80rh, soiltemp, & matricpot) c returns the soil relative humidity using approximation of water c adsorption isotherms on clay minerals by Berge, H.F.M. ten, 1990 c*** Argument declarations *** real*4 theta, thetaw, theta80rh, soiltemp, matricpot c theta - present volumetric water content c thetaw - volumetric water content at wilt (15 bar or 1.5 MPa) c theta80rh - volumetric water content at %80 relative humidity (300 bar or 30 MPa) c soiltemp - soil temperature (C) c matricpot - matric potential (meters of water) corresponding to theta c only used if theta greater than thetaw c*** Include files *** include 'hydro/vapprop.inc' c*** local declarations *** real*4 relhumwilt, mintheta parameter(mintheta = 1.0e-37) if( theta .le. mintheta ) then soilrelhum = 0.8*mintheta/theta80rh else if( theta .lt. theta80rh ) then soilrelhum = 0.8*theta/theta80rh else if( theta .le. thetaw ) then c find the relative humidity corresponding to thetaw (15 bar) relhumwilt = exp( (potwilt * molewater * gravconst) & / (rgas * (soiltemp + zerokelvin)) ) soilrelhum = 0.8+(relhumwilt - 0.8) & * ( (theta-theta80rh)/(thetaw-theta80rh) ) else if( matricpot.le.0.0) then soilrelhum = exp( (matricpot * molewater * gravconst) & / (rgas * (soiltemp + zerokelvin)) ) else soilrelhum = 1.0 endif return end