C *************************************************************** real function availwc ( m theta, i thetaw, i thetaf) c + + + PURPOSE + + + c availwc - Available water content ratio (mm/mm) c returns a linear function from thetaw=0 to thetaf=1 c + + + ARGUMENT DECLARATIONS + + + real theta, thetaw, thetaf c + + + ARGUMENT DEFINITIONS + + + c theta - actual water content (mm/mm) c thetaw - water content at wilting point (mm/mm) c thetaf - water content at field capacity (mm/mm) c + + + END SPECIFICATIONS + + + if (theta .lt. thetaw) then ! can't be negative value availwc = 0.0 else availwc = (theta - thetaw) / (thetaf - thetaw) endif if (theta .gt. thetaf) then ! can't be greater than 1 availwc = 1.0 endif end