49 use constants_mod
, only: rdgas, cp_air, grav
60 real,
parameter::
r3 = 1./3.
65 subroutine riem_solver3(ms, dt, is, ie, js, je, km, ng, &
66 isd, ied, jsd, jed, akap, cappa, cp, &
70 ptop, zs, q_con, w, delz, pt, &
71 delp, zh, pe, ppe, pk3, pk, peln, &
72 ws, scale_m, p_fac, a_imp, &
73 use_logp, last_call, fp_out)
80 integer,
intent(in):: ms, is, ie, js, je, km, ng
81 integer,
intent(in):: isd, ied, jsd, jed
83 real,
intent(in):: akap, cp, ptop, p_fac, a_imp, scale_m
84 real,
intent(in):: zs(isd:ied,jsd:jed)
85 logical,
intent(in):: last_call, use_logp, fp_out
86 real,
intent(in):: ws(is:ie,js:je)
87 real,
intent(in),
dimension(isd:,jsd:,1:):: q_con, cappa
89 real,
intent(in),
dimension(isd:ied,jsd:jed,km):: kapad
91 real,
intent(in),
dimension(isd:ied,jsd:jed,km):: delp, pt
92 real,
intent(inout),
dimension(isd:ied,jsd:jed,km+1):: zh
93 real,
intent(inout),
dimension(isd:ied,jsd:jed,km):: w
94 real,
intent(inout):: pe(is-1:ie+1,km+1,js-1:je+1)
95 real,
intent(out):: peln(is:ie,km+1,js:je)
96 real,
intent(out),
dimension(isd:ied,jsd:jed,km+1):: ppe
97 real,
intent(out):: delz(is-ng:ie+ng,js-ng:je+ng,km)
98 real,
intent(out):: pk(is:ie,js:je,km+1)
99 real,
intent(out):: pk3(isd:ied,jsd:jed,km+1)
101 real,
dimension(is:ie,km):: dm, dz2, pm2, w2, gm2, cp2
102 real,
dimension(is:ie,km+1)::pem, pe2, peln2, peg, pelng
104 real,
dimension(is:ie,km):: kapad2
106 real gama, rgrav, ptk, peln1
112 ptk = exp(akap*peln1)
127 dm(i,k) = delp(i,j,k)
129 cp2(i,k) = cappa(i,j,k)
132 kapad2(i,k) = kapad(i,j,k)
148 pem(i,k) = pem(i,k-1) + dm(i,k-1)
149 peln2(i,k) = log(pem(i,k))
153 peg(i,k) = peg(i,k-1) + dm(i,k-1)*(1.-q_con(i,j,k-1))
154 pelng(i,k) = log(peg(i,k))
157 pk3(i,j,k) = exp(akap*peln2(i,k))
164 pm2(i,k) = (peg(i,k+1)-peg(i,k))/(pelng(i,k+1)-pelng(i,k))
167 gm2(i,k) = 1. / (1.-cp2(i,k))
171 pm2(i,k) = dm(i,k)/(peln2(i,k+1)-peln2(i,k))
173 dm(i,k) = dm(i,k) * rgrav
174 dz2(i,k) = zh(i,j,k+1) - zh(i,j,k)
180 if ( a_imp < -0.999 )
then 181 call sim3p0_solver(dt, is, ie, km, rdgas, gama, akap, &
186 pem, w2, dz2, pt(is:ie,j,1:km), ws(is,j), p_fac, scale_m )
187 elseif ( a_imp < -0.5 )
then 188 call sim3_solver(dt, is, ie, km, rdgas, gama, akap, &
193 pem, w2, dz2, pt(is:ie,j,1:km), ws(is,j), abs(a_imp), p_fac, scale_m)
194 elseif ( a_imp <= 0.5 )
then 195 call rim_2d(ms, dt, is, ie, km, rdgas, gama, gm2, &
200 dm, pm2, w2, dz2, pt(is:ie,j,1:km), ws(is,j), .false.)
201 elseif ( a_imp > 0.999 )
then 202 call sim1_solver(dt, is, ie, km, rdgas, gama, gm2, cp2, akap, &
207 pm2, pem, w2, dz2, pt(is:ie,j,1:km), ws(is,j), p_fac)
209 call sim_solver(dt, is, ie, km, rdgas, gama, gm2, cp2, akap, &
214 pm2, pem, w2, dz2, pt(is:ie,j,1:km), ws(is,j), &
215 a_imp, p_fac, scale_m)
222 delz(i,j,k) = dz2(i,k)
226 if ( last_call )
then 229 peln(i,k,j) = peln2(i,k)
230 pk(i,j,k) = pk3(i,j,k)
239 ppe(i,j,k) = pe2(i,k) + pem(i,k)
245 ppe(i,j,k) = pe2(i,k)
253 pk3(i,j,k) = peln2(i,k)
259 zh(i,j,km+1) = zs(i,j)
263 zh(i,j,k) = zh(i,j,k+1) - dz2(i,k)
subroutine, public sim_solver(dt, is, ie, km, rgas, gama, gm2, cp2, kappa, pe2, dm2, pm2, pem, w2, dz2, pt2, ws, alpha, p_fac, scale_m)
subroutine, public sim3_solver(dt, is, ie, km, rgas, gama, kappa, pe2, dm, pem, w2, dz2, pt2, ws, alpha, p_fac, scale_m)
The module 'nh_utils' peforms non-hydrostatic computations.
The module 'tp_core' is a collection of routines to support FV transport.
subroutine, public update_dz_c(is, ie, js, je, km, ng, dt, dp0, zs, area, ut, vt, gz, ws, npx, npy, sw_corner, se_corner, ne_corner, nw_corner, bd, grid_type)
subroutine, public riem_solver3(ms, dt, is, ie, js, je, km, ng, isd, ied, jsd, jed, akap, cappa, cp, ptop, zs, q_con, w, delz, pt, delp, zh, pe, ppe, pk3, pk, peln, ws, scale_m, p_fac, a_imp, use_logp, last_call, fp_out)
subroutine, public sim1_solver(dt, is, ie, km, rgas, gama, gm2, cp2, kappa, pe, dm2, pm2, pem, w2, dz2, pt2, ws, p_fac)
subroutine, public sim3p0_solver(dt, is, ie, km, rgas, gama, kappa, pe2, dm, pem, w2, dz2, pt2, ws, p_fac, scale_m)
subroutine, public nest_halo_nh(ptop, grav, kappa, cp, delp, delz, pt, phis, pkc, gz, pk3, npx, npy, npz, nested, pkc_pertn, computepk3, fullhalo, bd, regional)
subroutine, public fv_tp_2d(q, crx, cry, npx, npy, hord, fx, fy, xfx, yfx, gridstruct, bd, ra_x, ra_y, lim_fac, regional, mfx, mfy, mass, nord, damp_c)
The subroutine 'fv_tp_2d' contains the FV advection scheme .
subroutine, public rim_2d(ms, bdt, is, ie, km, rgas, gama, gm2, pe2, dm2, pm2, w2, dz2, pt2, ws, c_core)
subroutine, public update_dz_d(ndif, damp, hord, is, ie, js, je, km, ng, npx, npy, area, rarea, dp0, zs, zh, crx, cry, xfx, yfx, delz, ws, rdt, gridstruct, bd, lim_fac, regional)
The module 'nh_core' peforms non-hydrostatic computations.
subroutine, public riem_solver_c(ms, dt, is, ie, js, je, km, ng, akap, cappa, cp, ptop, hs, w3, pt, q_con, delp, gz, pef, ws, p_fac, a_imp, scale_m)