32 pure subroutine ssterms(iconvert, iorig_ss, iconf_ss, top, bot, &
33 rho1, rho1old, snnew, snold, hnew, hold, &
36 integer(I4B),
intent(in) :: iconvert
37 integer(I4B),
intent(in) :: iorig_ss
38 integer(I4B),
intent(in) :: iconf_ss
39 real(dp),
intent(in) :: top
40 real(dp),
intent(in) :: bot
41 real(dp),
intent(in) :: rho1
42 real(dp),
intent(in) :: rho1old
43 real(dp),
intent(in) :: snnew
44 real(dp),
intent(in) :: snold
45 real(dp),
intent(in) :: hnew
46 real(dp),
intent(in) :: hold
47 real(dp),
intent(inout) :: aterm
48 real(dp),
intent(inout) :: rhsterm
49 real(dp),
intent(inout),
optional :: rate
60 if (iconvert /= 0)
then
61 if (iorig_ss == 0)
then
62 if (iconf_ss == 0)
then
64 zold = bot +
dhalf * tthk * snold
65 znew = bot +
dhalf * tthk * snnew
66 rhsterm = -rho1old * snold * (hold - zold) - rho1 * snnew * znew
68 if (snold ==
done)
then
69 rhsterm = rhsterm - rho1old * (hold - top)
71 if (snnew ==
done)
then
72 rhsterm = rhsterm - rho1 * top
78 rhsterm = -rho1old * snold * hold
81 rhsterm = -rho1old * snold * hold
85 if (
present(rate))
then
86 rate = aterm * hnew - rhsterm
98 pure subroutine syterms(top, bot, rho2, rho2old, snnew, snold, &
101 real(dp),
intent(in) :: top
102 real(dp),
intent(in) :: bot
103 real(dp),
intent(in) :: rho2
104 real(dp),
intent(in) :: rho2old
105 real(dp),
intent(in) :: snnew
106 real(dp),
intent(in) :: snold
107 real(dp),
intent(inout) :: aterm
108 real(dp),
intent(inout) :: rhsterm
109 real(dp),
intent(inout),
optional :: rate
118 if (snnew <
done)
then
119 if (snnew >
dzero)
then
121 rhsterm = -rho2old * tthk * snold - rho2 * bot
123 rhsterm = tthk * (
dzero - rho2old * snold)
127 rhsterm = tthk * (rho2 * snnew - rho2old * snold)
131 if (
present(rate))
then
132 rate = rho2old * tthk * snold - rho2 * tthk * snnew
143 pure function sscapacity(istor_coef, top, bot, area, ss)
result(sc1)
145 integer(I4B),
intent(in) :: istor_coef
146 real(dp),
intent(in) :: top
147 real(dp),
intent(in) :: bot
148 real(dp),
intent(in) :: area
149 real(dp),
intent(in) :: ss
154 if (istor_coef == 0)
then
159 sc1 = ss * thick * area
171 real(dp),
intent(in) :: area
172 real(dp),
intent(in) :: sy
This module contains simulation constants.
real(dp), parameter dhalf
real constant 1/2
real(dp), parameter dzero
real constant zero
real(dp), parameter done
real constant 1
This module contains stateless storage subroutines and functions.
pure real(dp) function, public sycapacity(area, sy)
Calculate the specific yield capacity.
pure subroutine, public syterms(top, bot, rho2, rho2old, snnew, snold, aterm, rhsterm, rate)
Calculate the specific yield storage terms.
pure subroutine, public ssterms(iconvert, iorig_ss, iconf_ss, top, bot, rho1, rho1old, snnew, snold, hnew, hold, aterm, rhsterm, rate)
Calculate the specific storage terms.
pure real(dp) function, public sscapacity(istor_coef, top, bot, area, ss)
Calculate the specific storage capacity.
This module defines variable data types.