40 public riem_solver3, riem_solver_c, update_dz_c, update_dz_d, nest_halo_nh
42 real,
parameter::
r3 = 1./3.
49 SUBROUTINE riem_solver3_tlm(ms, dt, is, ie, js, je, km, ng, isd, ied, &
50 & jsd, jed, akap, cappa, cp, ptop, zs, q_con, w, w_tl, delz, delz_tl, &
51 & pt, pt_tl, delp, delp_tl, zh, zh_tl, pe, pe_tl, ppe, ppe_tl, pk3, &
52 & pk3_tl, pk, pk_tl, peln, peln_tl, ws, ws_tl, scale_m, p_fac, a_imp, &
53 & use_logp, last_call, fp_out)
61 INTEGER,
INTENT(IN) :: ms, is, ie, js, je, km, ng
62 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed
64 REAL,
INTENT(IN) :: dt
65 REAL,
INTENT(IN) :: akap, cp, ptop, p_fac, a_imp, scale_m
66 REAL,
INTENT(IN) :: zs(isd:ied, jsd:jed)
67 LOGICAL,
INTENT(IN) :: last_call, use_logp, fp_out
68 REAL,
INTENT(IN) :: ws(is:ie, js:je)
69 REAL,
INTENT(IN) :: ws_tl(is:ie, js:je)
70 REAL,
DIMENSION(isd:, jsd:, :),
INTENT(IN) :: q_con, cappa
71 REAL,
DIMENSION(isd:ied, jsd:jed, km),
INTENT(IN) :: delp, pt
72 REAL,
DIMENSION(isd:ied, jsd:jed, km),
INTENT(IN) :: delp_tl, pt_tl
73 REAL,
DIMENSION(isd:ied, jsd:jed, km+1),
INTENT(INOUT) :: zh
74 REAL,
DIMENSION(isd:ied, jsd:jed, km+1),
INTENT(INOUT) :: zh_tl
75 REAL,
DIMENSION(isd:ied, jsd:jed, km),
INTENT(INOUT) :: w
76 REAL,
DIMENSION(isd:ied, jsd:jed, km),
INTENT(INOUT) :: w_tl
77 REAL,
INTENT(INOUT) :: pe(is-1:ie+1, km+1, js-1:je+1)
78 REAL,
INTENT(INOUT) :: pe_tl(is-1:ie+1, km+1, js-1:je+1)
80 REAL,
INTENT(OUT) :: peln(is:ie, km+1, js:je)
81 REAL,
INTENT(OUT) :: peln_tl(is:ie, km+1, js:je)
82 REAL,
DIMENSION(isd:ied, jsd:jed, km+1),
INTENT(OUT) :: ppe
83 REAL,
DIMENSION(isd:ied, jsd:jed, km+1),
INTENT(OUT) :: ppe_tl
84 REAL,
INTENT(OUT) :: delz(is-ng:ie+ng, js-ng:je+ng, km)
85 REAL,
INTENT(OUT) :: delz_tl(is-ng:ie+ng, js-ng:je+ng, km)
86 REAL,
INTENT(OUT) :: pk(is:ie, js:je, km+1)
87 REAL,
INTENT(OUT) :: pk_tl(is:ie, js:je, km+1)
88 REAL,
INTENT(OUT) :: pk3(isd:ied, jsd:jed, km+1)
89 REAL,
INTENT(OUT) :: pk3_tl(isd:ied, jsd:jed, km+1)
91 REAL,
DIMENSION(is:ie, km) :: dm, dz2, pm2, w2, gm2, cp2
92 REAL,
DIMENSION(is:ie, km) :: dm_tl, dz2_tl, pm2_tl, w2_tl
93 REAL,
DIMENSION(is:ie, km+1) :: pem, pe2, peln2, peg, pelng
94 REAL,
DIMENSION(is:ie, km+1) :: pem_tl, pe2_tl, peln2_tl
95 REAL :: gama, rgrav, ptk, peln1
104 ptk = exp(akap*peln1)
119 dm_tl(i, k) = delp_tl(i, j, k)
120 dm(i, k) = delp(i, j, k)
128 pk3_tl(i, j, 1) = 0.0
133 pem_tl(i, k) = pem_tl(i, k-1) + dm_tl(i, k-1)
134 pem(i, k) = pem(i, k-1) + dm(i, k-1)
135 peln2_tl(i, k) = pem_tl(i, k)/pem(i, k)
136 peln2(i, k) = log(pem(i, k))
137 pk3_tl(i, j, k) = akap*peln2_tl(i, k)*exp(akap*peln2(i, k))
138 pk3(i, j, k) = exp(akap*peln2(i, k))
143 pm2_tl(i, k) = (dm_tl(i, k)*(peln2(i, k+1)-peln2(i, k))-dm(i, &
144 & k)*(peln2_tl(i, k+1)-peln2_tl(i, k)))/(peln2(i, k+1)-peln2(i&
146 pm2(i, k) = dm(i, k)/(peln2(i, k+1)-peln2(i, k))
147 dm_tl(i, k) = rgrav*dm_tl(i, k)
148 dm(i, k) = dm(i, k)*rgrav
149 dz2_tl(i, k) = zh_tl(i, j, k+1) - zh_tl(i, j, k)
150 dz2(i, k) = zh(i, j, k+1) - zh(i, j, k)
151 w2_tl(i, k) = w_tl(i, j, k)
152 w2(i, k) = w(i, j, k)
155 IF (a_imp .LT. -0.999)
THEN 156 CALL sim3p0_solver_tlm(dt, is, ie, km,
rdgas, gama, akap, pe2, &
157 & pe2_tl, dm, dm_tl, pem, pem_tl, w2, w2_tl, dz2&
158 & , dz2_tl, pt(is:ie, j, 1:km), pt_tl(is:ie, j, 1&
159 & :km), ws(is:ie, j), ws_tl(is:ie, j), p_fac, &
161 ELSE IF (a_imp .LT. -0.5)
THEN 162 IF (a_imp .GE. 0.)
THEN 167 CALL sim3_solver_tlm(dt, is, ie, km,
rdgas, gama, akap, pe2, &
168 & pe2_tl, dm, dm_tl, pem, pem_tl, w2, w2_tl, dz2, &
169 & dz2_tl, pt(is:ie, j, 1:km), pt_tl(is:ie, j, 1:km)&
170 & , ws(is:ie, j), ws_tl(is:ie, j), abs0, p_fac, &
172 ELSE IF (a_imp .LE. 0.5)
THEN 173 CALL rim_2d_tlm(ms, dt, is, ie, km,
rdgas, gama, gm2, pe2, &
174 & pe2_tl, dm, dm_tl, pm2, pm2_tl, w2, w2_tl, dz2, dz2_tl&
175 & , pt(is:ie, j, 1:km), pt_tl(is:ie, j, 1:km), ws(is:ie&
176 & , j), ws_tl(is:ie, j), .false.)
177 ELSE IF (a_imp .GT. 0.999)
THEN 178 CALL sim1_solver_tlm(dt, is, ie, km,
rdgas, gama, gm2, cp2, akap&
179 & , pe2, pe2_tl, dm, dm_tl, pm2, pm2_tl, pem, &
180 & pem_tl, w2, w2_tl, dz2, dz2_tl, pt(is:ie, j, 1:km&
181 & ), pt_tl(is:ie, j, 1:km), ws(is:ie, j), ws_tl(is:&
184 CALL sim_solver_tlm(dt, is, ie, km,
rdgas, gama, gm2, cp2, akap&
185 & , pe2, pe2_tl, dm, dm_tl, pm2, pm2_tl, pem, pem_tl&
186 & , w2, w2_tl, dz2, dz2_tl, pt(is:ie, j, 1:km), &
187 & pt_tl(is:ie, j, 1:km), ws(is:ie, j), ws_tl(is:ie, &
188 & j), a_imp, p_fac, scale_m)
192 w_tl(i, j, k) = w2_tl(i, k)
193 w(i, j, k) = w2(i, k)
194 delz_tl(i, j, k) = dz2_tl(i, k)
195 delz(i, j, k) = dz2(i, k)
201 peln_tl(i, k, j) = peln2_tl(i, k)
202 peln(i, k, j) = peln2(i, k)
203 pk_tl(i, j, k) = pk3_tl(i, j, k)
204 pk(i, j, k) = pk3(i, j, k)
205 pe_tl(i, k, j) = pem_tl(i, k)
206 pe(i, k, j) = pem(i, k)
213 ppe_tl(i, j, k) = pe2_tl(i, k) + pem_tl(i, k)
214 ppe(i, j, k) = pe2(i, k) + pem(i, k)
220 ppe_tl(i, j, k) = pe2_tl(i, k)
221 ppe(i, j, k) = pe2(i, k)
228 pk3_tl(i, j, k) = peln2_tl(i, k)
229 pk3(i, j, k) = peln2(i, k)
234 zh_tl(i, j, km+1) = 0.0
235 zh(i, j, km+1) = zs(i, j)
239 zh_tl(i, j, k) = zh_tl(i, j, k+1) - dz2_tl(i, k)
240 zh(i, j, k) = zh(i, j, k+1) - dz2(i, k)
245 SUBROUTINE riem_solver3(ms, dt, is, ie, js, je, km, ng, isd, ied, jsd&
246 & , jed, akap, cappa, cp, ptop, zs, q_con, w, delz, pt, delp, zh, pe, &
247 & ppe, pk3, pk, peln, ws, scale_m, p_fac, a_imp, use_logp, last_call, &
256 INTEGER,
INTENT(IN) :: ms, is, ie, js, je, km, ng
257 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed
259 REAL,
INTENT(IN) :: dt
260 REAL,
INTENT(IN) :: akap, cp, ptop, p_fac, a_imp, scale_m
261 REAL,
INTENT(IN) :: zs(isd:ied, jsd:jed)
262 LOGICAL,
INTENT(IN) :: last_call, use_logp, fp_out
263 REAL,
INTENT(IN) :: ws(is:ie, js:je)
264 REAL,
DIMENSION(isd:, jsd:, :),
INTENT(IN) :: q_con, cappa
265 REAL,
DIMENSION(isd:ied, jsd:jed, km),
INTENT(IN) :: delp, pt
266 REAL,
DIMENSION(isd:ied, jsd:jed, km+1),
INTENT(INOUT) :: zh
267 REAL,
DIMENSION(isd:ied, jsd:jed, km),
INTENT(INOUT) :: w
268 REAL,
INTENT(INOUT) :: pe(is-1:ie+1, km+1, js-1:je+1)
270 REAL,
INTENT(OUT) :: peln(is:ie, km+1, js:je)
271 REAL,
DIMENSION(isd:ied, jsd:jed, km+1),
INTENT(OUT) :: ppe
272 REAL,
INTENT(OUT) :: delz(is-ng:ie+ng, js-ng:je+ng, km)
273 REAL,
INTENT(OUT) :: pk(is:ie, js:je, km+1)
274 REAL,
INTENT(OUT) :: pk3(isd:ied, jsd:jed, km+1)
276 REAL,
DIMENSION(is:ie, km) :: dm, dz2, pm2, w2, gm2, cp2
277 REAL,
DIMENSION(is:ie, km+1) :: pem, pe2, peln2, peg, pelng
278 REAL :: gama, rgrav, ptk, peln1
287 ptk = exp(akap*peln1)
295 dm(i, k) = delp(i, j, k)
305 pem(i, k) = pem(i, k-1) + dm(i, k-1)
306 peln2(i, k) = log(pem(i, k))
307 pk3(i, j, k) = exp(akap*peln2(i, k))
312 pm2(i, k) = dm(i, k)/(peln2(i, k+1)-peln2(i, k))
313 dm(i, k) = dm(i, k)*rgrav
314 dz2(i, k) = zh(i, j, k+1) - zh(i, j, k)
315 w2(i, k) = w(i, j, k)
318 IF (a_imp .LT. -0.999)
THEN 319 CALL sim3p0_solver(dt, is, ie, km,
rdgas, gama, akap, pe2, dm, &
320 & pem, w2, dz2, pt(is:ie, j, 1:km), ws(is:ie, j), &
322 ELSE IF (a_imp .LT. -0.5)
THEN 323 IF (a_imp .GE. 0.)
THEN 328 CALL sim3_solver(dt, is, ie, km,
rdgas, gama, akap, pe2, dm, pem&
329 & , w2, dz2, pt(is:ie, j, 1:km), ws(is:ie, j), abs0, &
331 ELSE IF (a_imp .LE. 0.5)
THEN 332 CALL rim_2d(ms, dt, is, ie, km,
rdgas, gama, gm2, pe2, dm, pm2, &
333 & w2, dz2, pt(is:ie, j, 1:km), ws(is:ie, j), .false.)
334 ELSE IF (a_imp .GT. 0.999)
THEN 335 CALL sim1_solver(dt, is, ie, km,
rdgas, gama, gm2, cp2, akap, &
336 & pe2, dm, pm2, pem, w2, dz2, pt(is:ie, j, 1:km), ws(is&
339 CALL sim_solver(dt, is, ie, km,
rdgas, gama, gm2, cp2, akap, pe2&
340 & , dm, pm2, pem, w2, dz2, pt(is:ie, j, 1:km), ws(is:ie&
341 & , j), a_imp, p_fac, scale_m)
345 w(i, j, k) = w2(i, k)
346 delz(i, j, k) = dz2(i, k)
352 peln(i, k, j) = peln2(i, k)
353 pk(i, j, k) = pk3(i, j, k)
354 pe(i, k, j) = pem(i, k)
361 ppe(i, j, k) = pe2(i, k) + pem(i, k)
367 ppe(i, j, k) = pe2(i, k)
374 pk3(i, j, k) = peln2(i, k)
379 zh(i, j, km+1) = zs(i, j)
383 zh(i, j, k) = zh(i, j, k+1) - dz2(i, k)
subroutine, public nest_halo_nh_tlm(ptop, grav, kappa, cp, delp, delp_tl, delz, delz_tl, pt, pt_tl, phis, pkc, pkc_tl, gz, gz_tl, pk3, pk3_tl, npx, npy, npz, nested, pkc_pertn, computepk3, fullhalo, bd)
subroutine, public fv_tp_2d_tlm(q, q_tl, crx, crx_tl, cry, cry_tl, npx, npy, hord, fx, fx_tl, fy, fy_tl, xfx, xfx_tl, yfx, yfx_tl, gridstruct, bd, ra_x, ra_x_tl, ra_y, ra_y_tl, mfx, mfx_tl, mfy, mfy_tl, mass, mass_tl, nord, damp_c)
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 sim1_solver_tlm(dt, is, ie, km, rgas, gama, gm2, cp2, kappa, pe, pe_tl, dm2, dm2_tl, pm2, pm2_tl, pem, pem_tl, w2, w2_tl, dz2, dz2_tl, pt2, pt2_tl, ws, ws_tl, p_fac)
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, hord_pert)
real, parameter, public rdgas
Gas constant for dry air [J/kg/deg].
subroutine, public sim3_solver(dt, is, ie, km, rgas, gama, kappa, pe2, dm, pem, w2, dz2, pt2, ws, alpha, p_fac, scale_m)
subroutine, public sim3p0_solver(dt, is, ie, km, rgas, gama, kappa, pe2, dm, pem, w2, dz2, pt2, ws, p_fac, scale_m)
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 update_dz_d_tlm(ndif, damp, hord, is, ie, js, je, km, ng, npx, npy, area, rarea, dp0, zs, zh, zh_tl, crx, crx_tl, cry, cry_tl, xfx, xfx_tl, yfx, yfx_tl, delz, ws, ws_tl, rdt, gridstruct, bd, hord_pert)
real, parameter, public cp_air
Specific heat capacity of dry air at constant pressure [J/kg/deg].
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 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 riem_solver_c_tlm(ms, dt, is, ie, js, je, km, ng, akap, cappa, cp, ptop, hs, w3, w3_tl, pt, pt_tl, q_con, delp, delp_tl, gz, gz_tl, pef, pef_tl, ws, ws_tl, p_fac, a_imp, scale_m)
subroutine, public sim3_solver_tlm(dt, is, ie, km, rgas, gama, kappa, pe2, pe2_tl, dm, dm_tl, pem, pem_tl, w2, w2_tl, dz2, dz2_tl, pt2, pt2_tl, ws, ws_tl, alpha, p_fac, scale_m)
real, parameter, public grav
Acceleration due to gravity [m/s^2].
subroutine, public rim_2d_tlm(ms, bdt, is, ie, km, rgas, gama, gm2, pe2, pe2_tl, dm2, dm2_tl, pm2, pm2_tl, w2, w2_tl, dz2, dz2_tl, pt2, pt2_tl, ws, ws_tl, c_core)
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)
subroutine, public riem_solver3_tlm(ms, dt, is, ie, js, je, km, ng, isd, ied, jsd, jed, akap, cappa, cp, ptop, zs, q_con, w, w_tl, delz, delz_tl, pt, pt_tl, delp, delp_tl, zh, zh_tl, pe, pe_tl, ppe, ppe_tl, pk3, pk3_tl, pk, pk_tl, peln, peln_tl, ws, ws_tl, scale_m, p_fac, a_imp, use_logp, last_call, fp_out)
subroutine, public update_dz_c_tlm(is, ie, js, je, km, ng, dt, dp0, zs, area, ut, ut_tl, vt, vt_tl, gz, gz_tl, ws, ws_tl, npx, npy, sw_corner, se_corner, ne_corner, nw_corner, bd, grid_type)
subroutine, public rim_2d(ms, bdt, is, ie, km, rgas, gama, gm2, pe2, dm2, pm2, w2, dz2, pt2, ws, c_core)
subroutine, public sim_solver_tlm(dt, is, ie, km, rgas, gama, gm2, cp2, kappa, pe2, pe2_tl, dm2, dm2_tl, pm2, pm2_tl, pem, pem_tl, w2, w2_tl, dz2, dz2_tl, pt2, pt2_tl, ws, ws_tl, alpha, p_fac, scale_m)
subroutine, public sim3p0_solver_tlm(dt, is, ie, km, rgas, gama, kappa, pe2, pe2_tl, dm, dm_tl, pem, pem_tl, w2, w2_tl, dz2, dz2_tl, pt2, pt2_tl, ws, ws_tl, 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)