16 function etfunc_lin(efflndsrf, extdp, resid_pet, deriv_et, trhs, thcof, &
21 real(dp),
intent(in) :: efflndsrf
22 real(dp),
intent(in) :: extdp
23 real(dp),
intent(in) :: resid_pet
24 real(dp),
intent(inout) :: deriv_et
25 real(dp),
intent(inout) :: trhs
26 real(dp),
intent(inout) :: thcof
27 real(dp),
intent(in) :: hgwf
28 real(dp),
intent(in) :: celtop
29 real(dp),
intent(in) :: celbot
33 real(dp) :: depth, scale, thick, lin_scaling_fac
41 if (hgwf > (efflndsrf - extdp) .and. hgwf < efflndsrf)
THEN
43 etgw = resid_pet * lin_scaling_fac
45 trhs = resid_pet - resid_pet * efflndsrf / extdp
46 thcof = -resid_pet / extdp
47 etgw = trhs - (thcof * hgwf)
50 else if (hgwf >= efflndsrf)
then
61 depth = hgwf - (efflndsrf - extdp)
62 thick = celtop - celbot
63 if (depth > thick) depth = thick
66 call scubic(depth, range, deriv_et, scale)
69 etgw = trhs - (thcof * hgwf)
70 deriv_et = -deriv_et * etgw
78 function etfunc_nlin(efflndsrf, extdp, resid_pet, deriv_et, trhs, thcof, hgwf)
82 real(dp),
intent(in) :: efflndsrf
83 real(dp),
intent(in) :: extdp
84 real(dp),
intent(in) :: resid_pet
85 real(dp),
intent(inout) :: deriv_et
86 real(dp),
intent(inout) :: trhs
87 real(dp),
intent(inout) :: thcof
88 real(dp),
intent(in) :: hgwf
92 real(dp) :: depth, scale
94 depth = hgwf - (efflndsrf - extdp)
98 call scubic(depth, range, deriv_et, scale)
101 deriv_et = -deriv_et * etgw
109 real(dp),
intent(in) :: hgwf
110 real(dp),
intent(in) :: lndsrf
111 real(dp),
intent(in) :: extdp
115 sclfac = (hgwf - (lndsrf - extdp)) / extdp
This module contains simulation constants.
real(dp), parameter dem3
real constant 1e-3
real(dp), parameter dem4
real constant 1e-4
real(dp), parameter dzero
real constant zero
real(dp), parameter done
real constant 1
This module defines variable data types.
subroutine scubic(x, range, dydx, y)
@ brief sCubic
real(dp) function, public etfunc_lin(efflndsrf, extdp, resid_pet, deriv_et, trhs, thcof, hgwf, celtop, celbot)
Calculate gwf ET using linear decay ET function from mf-2005.
pure real(dp) function, public calc_lin_scaling_fac(hgwf, lndsrf, extdp)
Calculate the linear scaling factor.
real(dp) function, public etfunc_nlin(efflndsrf, extdp, resid_pet, deriv_et, trhs, thcof, hgwf)
Calculate gwf ET using a square decay ET function with smoothing at the specified extinction depth.