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
101 pure subroutine syterms(top, bot, rho2, rho2old, snnew, snold, &
102 aterm, rhsterm, rate)
104 real(dp),
intent(in) :: top
105 real(dp),
intent(in) :: bot
106 real(dp),
intent(in) :: rho2
107 real(dp),
intent(in) :: rho2old
108 real(dp),
intent(in) :: snnew
109 real(dp),
intent(in) :: snold
110 real(dp),
intent(inout) :: aterm
111 real(dp),
intent(inout) :: rhsterm
112 real(dp),
intent(inout),
optional :: rate
121 if (snnew <
done)
then
122 if (snnew >
dzero)
then
124 rhsterm = -rho2old * tthk * snold - rho2 * bot
126 rhsterm = tthk * (
dzero - rho2old * snold)
130 rhsterm = tthk * (rho2 * snnew - rho2old * snold)
134 if (
present(rate))
then
135 rate = rho2old * tthk * snold - rho2 * tthk * snnew
149 pure function sscapacity(istor_coef, top, bot, area, ss)
result(sc1)
151 integer(I4B),
intent(in) :: istor_coef
152 real(dp),
intent(in) :: top
153 real(dp),
intent(in) :: bot
154 real(dp),
intent(in) :: area
155 real(dp),
intent(in) :: ss
160 if (istor_coef == 0)
then
165 sc1 = ss * thick * area
180 real(dp),
intent(in) :: area
181 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.