36 real,
parameter::
r3 = 1./3.
40 subroutine riem_solver3(ms, dt, is, ie, js, je, km, ng, &
41 isd, ied, jsd, jed, akap, cappa, cp, &
42 ptop, zs, q_con, w, delz, pt, &
43 delp, zh, pe, ppe, pk3, pk, peln, &
44 ws, scale_m, p_fac, a_imp, &
45 use_logp, last_call, fp_out)
52 integer,
intent(in):: ms, is, ie, js, je, km, ng
53 integer,
intent(in):: isd, ied, jsd, jed
55 real,
intent(in):: akap, cp, ptop, p_fac, a_imp, scale_m
56 real,
intent(in):: zs(isd:ied,jsd:jed)
57 logical,
intent(in):: last_call, use_logp, fp_out
58 real,
intent(in):: ws(is:ie,js:je)
59 real,
intent(in),
dimension(isd:,jsd:,1:):: q_con, cappa
60 real,
intent(in),
dimension(isd:ied,jsd:jed,km):: delp, pt
61 real,
intent(inout),
dimension(isd:ied,jsd:jed,km+1):: zh
62 real,
intent(inout),
dimension(isd:ied,jsd:jed,km):: w
63 real,
intent(inout):: pe(is-1:ie+1,km+1,js-1:je+1)
64 real,
intent(out):: peln(is:ie,km+1,js:je)
65 real,
intent(out),
dimension(isd:ied,jsd:jed,km+1):: ppe
66 real,
intent(out):: delz(is-ng:ie+ng,js-ng:je+ng,km)
67 real,
intent(out):: pk(is:ie,js:je,km+1)
68 real,
intent(out):: pk3(isd:ied,jsd:jed,km+1)
70 real,
dimension(is:ie,km):: dm, dz2, pm2, w2, gm2, cp2
71 real,
dimension(is:ie,km+1)::pem, pe2, peln2, peg, pelng
72 real gama, rgrav, ptk, peln1
90 cp2(i,k) = cappa(i,j,k)
106 pem(i,k) = pem(i,k-1) + dm(i,k-1)
107 peln2(i,k) = log(pem(i,k))
111 peg(i,k) = peg(i,k-1) + dm(i,k-1)*(1.-q_con(i,j,k-1))
112 pelng(i,k) = log(peg(i,k))
114 pk3(i,j,k) = exp(akap*peln2(i,k))
121 pm2(i,k) = (peg(i,k+1)-peg(i,k))/(pelng(i,k+1)-pelng(i,k))
124 gm2(i,k) = 1. / (1.-cp2(i,k))
128 pm2(i,k) = dm(i,k)/(peln2(i,k+1)-peln2(i,k))
130 dm(i,k) = dm(i,k) * rgrav
131 dz2(i,k) = zh(i,j,k+1) - zh(i,j,k)
136 if ( a_imp < -0.999 )
then 137 call sim3p0_solver(dt, is, ie, km,
rdgas, gama, akap, pe2, dm, &
138 pem, w2, dz2, pt(is:ie,j,1:km), ws(is,j), p_fac, scale_m )
139 elseif ( a_imp < -0.5 )
then 140 call sim3_solver(dt, is, ie, km,
rdgas, gama, akap, pe2, dm, &
141 pem, w2, dz2, pt(is:ie,j,1:km), ws(is,j), abs(a_imp), p_fac, scale_m)
142 elseif ( a_imp <= 0.5 )
then 143 call rim_2d(ms, dt, is, ie, km,
rdgas, gama, gm2, pe2, &
144 dm, pm2, w2, dz2, pt(is:ie,j,1:km), ws(is,j), .false.)
145 elseif ( a_imp > 0.999 )
then 146 call sim1_solver(dt, is, ie, km,
rdgas, gama, gm2, cp2, akap, pe2, dm, &
147 pm2, pem, w2, dz2, pt(is:ie,j,1:km), ws(is,j), p_fac)
149 call sim_solver(dt, is, ie, km,
rdgas, gama, gm2, cp2, akap, pe2, dm, &
150 pm2, pem, w2, dz2, pt(is:ie,j,1:km), ws(is,j), &
151 a_imp, p_fac, scale_m)
157 delz(i,j,k) = dz2(i,k)
161 if ( last_call )
then 164 peln(i,k,j) = peln2(i,k)
165 pk(i,j,k) = pk3(i,j,k)
174 ppe(i,j,k) = pe2(i,k) + pem(i,k)
180 ppe(i,j,k) = pe2(i,k)
188 pk3(i,j,k) = peln2(i,k)
194 zh(i,j,km+1) = zs(i,j)
198 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 nest_halo_nh(ptop, grav, kappa, cp, delp, delz, pt, phis, pkc, gz, pk3, npx, npy, npz, nested, pkc_pertn, computepk3, fullhalo, bd)
subroutine, public sim1_solver(dt, is, ie, km, rgas, gama, gm2, cp2, kappa, pe, dm2, pm2, pem, w2, dz2, pt2, ws, p_fac)
real, parameter, public rdgas
Gas constant for dry air [J/kg/deg].
subroutine, public rim_2d(ms, bdt, is, ie, km, rgas, gama, gm2, pe2, dm2, pm2, w2, dz2, pt2, ws, c_core)
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)
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)
real, parameter, public cp_air
Specific heat capacity of dry air at constant pressure [J/kg/deg].
subroutine, public sim3p0_solver(dt, is, ie, km, rgas, gama, kappa, pe2, dm, pem, w2, dz2, pt2, ws, 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)
real, parameter, public grav
Acceleration due to gravity [m/s^2].
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)
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 fv_tp_2d(q, crx, cry, npx, npy, hord, fx, fy, xfx, yfx, gridstruct, bd, ra_x, ra_y, mfx, mfy, mass, nord, damp_c)