MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
UzfEtUtil.f90
Go to the documentation of this file.
2 use kindmodule, only: dp
4 use smoothingmodule, only: scubic
5
6 implicit none
7 private
8 public :: etfunc_lin
9 public :: etfunc_nlin
10 public :: calc_lin_scaling_fac
11
12contains
13
14 !> @brief Calculate gwf ET using linear decay ET function from mf-2005
15 !<
16 function etfunc_lin(efflndsrf, extdp, resid_pet, deriv_et, trhs, thcof, &
17 hgwf, celtop, celbot)
18 ! return
19 real(dp) :: etfunc_lin
20 ! dummy
21 real(dp), intent(in) :: efflndsrf !< effective land surface elevation after subtracting off 0.5*surfdep
22 real(dp), intent(in) :: extdp !< extinction depth
23 real(dp), intent(in) :: resid_pet !< residual pET remaining after subtracting simulated ET in the unsaturated zone
24 real(dp), intent(inout) :: deriv_et !< derivative of gw ET for Newton addition to equations in _fn()
25 real(dp), intent(inout) :: trhs !< total uzf rhs contribution to GWF model
26 real(dp), intent(inout) :: thcof !< total uzf hcof contribution to GWF model
27 real(dp), intent(in) :: hgwf !< calculated groundwater head
28 real(dp), intent(in) :: celtop !< elevation of the top of the cell
29 real(dp), intent(in) :: celbot !< elevation of the bottom of the cell
30 ! local
31 real(dp) :: etgw
32 real(dp) :: range
33 real(dp) :: depth, scale, thick, lin_scaling_fac
34 !
35 ! initialize
36 etgw = dzero
37 !
38 ! if water table between ET surface and extinction depth
39 ! (extdp starts at the bottom of the effective land surface elevation,
40 ! where the effective land surface elevation accounts for surfdep)
41 if (hgwf > (efflndsrf - extdp) .and. hgwf < efflndsrf) THEN
42 lin_scaling_fac = calc_lin_scaling_fac(hgwf, efflndsrf, extdp)
43 etgw = resid_pet * lin_scaling_fac
44 !
45 trhs = resid_pet - resid_pet * efflndsrf / extdp
46 thcof = -resid_pet / extdp
47 etgw = trhs - (thcof * hgwf)
48 !
49 ! water table above land surface
50 else if (hgwf >= efflndsrf) then
51 trhs = resid_pet
52 etgw = resid_pet
53 !
54 ! water table below extinction depth
55 else
57 return
58 end if
59 !
60 ! calculate rate
61 depth = hgwf - (efflndsrf - extdp)
62 thick = celtop - celbot
63 if (depth > thick) depth = thick
64 if (depth < dzero) depth = dzero
65 range = dem4 * extdp
66 call scubic(depth, range, deriv_et, scale)
67 trhs = scale * trhs
68 thcof = scale * thcof
69 etgw = trhs - (thcof * hgwf)
70 deriv_et = -deriv_et * etgw
71 etfunc_lin = etgw
72 !
73 end function etfunc_lin
74
75 !> @brief Calculate gwf ET using a square decay ET function with smoothing
76 !! at the specified extinction depth
77 !<
78 function etfunc_nlin(efflndsrf, extdp, resid_pet, deriv_et, trhs, thcof, hgwf)
79 ! -- return
80 real(dp) :: etfunc_nlin
81 ! -- dummy
82 real(dp), intent(in) :: efflndsrf !< effective land surface elevation after subtracting off 0.5*surfdep
83 real(dp), intent(in) :: extdp !< extinction depth
84 real(dp), intent(in) :: resid_pet !< residual pET remaining after subtracting simulated ET in the unsaturated zone
85 real(dp), intent(inout) :: deriv_et !< derivative of gw ET for Newton addition to equations in _fn()
86 real(dp), intent(inout) :: trhs !< total uzf rhs contribution to GWF model
87 real(dp), intent(inout) :: thcof !< total uzf hcof contribution to GWF model
88 real(dp), intent(in) :: hgwf !< calculated groundwater head
89 ! -- local
90 real(dp) :: etgw
91 real(dp) :: range
92 real(dp) :: depth, scale
93 !
94 depth = hgwf - (efflndsrf - extdp)
95 if (depth < dzero) depth = dzero
96 etgw = resid_pet
97 range = dem3 * extdp
98 call scubic(depth, range, deriv_et, scale)
99 etgw = etgw * scale
100 trhs = etgw
101 deriv_et = -deriv_et * etgw
102 etfunc_nlin = etgw
103 end function etfunc_nlin
104
105 !> @brief Calculate the linear scaling factor
106 !<
107 pure function calc_lin_scaling_fac(hgwf, lndsrf, extdp) result(sclfac)
108 ! dummy
109 real(dp), intent(in) :: hgwf !< groundwater head
110 real(dp), intent(in) :: lndsrf !< effective land surface (after applying surfdep to land surface)
111 real(dp), intent(in) :: extdp !< extinction depth
112 ! return
113 real(dp) :: sclfac
114 !
115 sclfac = (hgwf - (lndsrf - extdp)) / extdp
116 ! the calculated scaling factor cannot exceed 1.0
117 if (sclfac > done) sclfac = done
118 end function calc_lin_scaling_fac
119
120end module uzfetutilmodule
This module contains simulation constants.
Definition Constants.f90:9
real(dp), parameter dem3
real constant 1e-3
real(dp), parameter dem4
real constant 1e-4
real(dp), parameter dzero
real constant zero
Definition Constants.f90:65
real(dp), parameter done
real constant 1
Definition Constants.f90:76
This module defines variable data types.
Definition kind.f90:8
subroutine scubic(x, range, dydx, y)
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.
Definition UzfEtUtil.f90:18
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.
Definition UzfEtUtil.f90:79