65 real,
allocatable ::
rf(:)
70 real,
allocatable:: u00(:,:,:), v00(:,:,:)
88 & fill, reproduce_sum, kappa, cp_air, zvir, ptop, ks, ncnst, n_split, &
89 & q_split, u, u_tl, v, v_tl, w, w_tl, delz, delz_tl, hydrostatic, pt, &
90 & pt_tl, delp, delp_tl, q, q_tl, ps, ps_tl, pe, pe_tl, pk, pk_tl, peln&
91 & , peln_tl, pkz, pkz_tl, phis, q_con, omga, omga_tl, ua, ua_tl, va, &
92 & va_tl, uc, uc_tl, vc, vc_tl, ak, bk, mfx, mfx_tl, mfy, mfy_tl, cx, &
93 & cx_tl, cy, cy_tl, ze0, hybrid_z, gridstruct, flagstruct, flagstructp&
94 & , neststruct, idiag, bd, parent_grid, domain, time_total)
97 REAL,
INTENT(IN) :: bdt
98 REAL,
INTENT(IN) :: consv_te
99 REAL,
INTENT(IN) :: kappa, cp_air
100 REAL,
INTENT(IN) :: zvir, ptop
101 REAL,
INTENT(IN),
OPTIONAL :: time_total
102 INTEGER,
INTENT(IN) :: npx
103 INTEGER,
INTENT(IN) :: npy
104 INTEGER,
INTENT(IN) :: npz
106 INTEGER,
INTENT(IN) :: nq_tot
107 INTEGER,
INTENT(IN) :: ng
108 INTEGER,
INTENT(IN) :: ks
109 INTEGER,
INTENT(IN) :: ncnst
111 INTEGER,
INTENT(IN) :: n_split
113 INTEGER,
INTENT(IN) :: q_split
114 LOGICAL,
INTENT(IN) :: fill
115 LOGICAL,
INTENT(IN) :: reproduce_sum
116 LOGICAL,
INTENT(IN) :: hydrostatic
118 LOGICAL,
INTENT(IN) :: hybrid_z
121 REAL,
DIMENSION(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz),
INTENT(INOUT) &
123 REAL,
DIMENSION(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz),
INTENT(INOUT) &
126 REAL,
DIMENSION(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz),
INTENT(INOUT) &
128 REAL,
DIMENSION(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz),
INTENT(INOUT) &
131 REAL,
INTENT(INOUT) :: w(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
132 REAL,
INTENT(INOUT) :: w_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
134 REAL,
INTENT(INOUT) :: pt(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
135 REAL,
INTENT(INOUT) :: pt_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
137 REAL,
INTENT(INOUT) :: delp(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
138 REAL,
INTENT(INOUT) :: delp_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
140 REAL,
INTENT(INOUT) :: q(bd%isd:bd%ied, bd%jsd:bd%jed, npz, ncnst)
141 REAL,
INTENT(INOUT) :: q_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz, ncnst&
144 REAL,
INTENT(INOUT) :: delz(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
145 REAL,
INTENT(INOUT) :: delz_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
147 REAL,
INTENT(INOUT) :: ze0(bd%is:bd%is, bd%js:bd%js, 1)
155 REAL,
INTENT(INOUT) :: ps(bd%isd:bd%ied, bd%jsd:bd%jed)
156 REAL,
INTENT(INOUT) :: ps_tl(bd%isd:bd%ied, bd%jsd:bd%jed)
158 REAL,
INTENT(INOUT) :: pe(bd%is-1:bd%ie+1, npz+1, bd%js-1:bd%je+1)
159 REAL,
INTENT(INOUT) :: pe_tl(bd%is-1:bd%ie+1, npz+1, bd%js-1:bd%je+1&
162 REAL,
INTENT(INOUT) :: pk(bd%is:bd%ie, bd%js:bd%je, npz+1)
163 REAL,
INTENT(INOUT) :: pk_tl(bd%is:bd%ie, bd%js:bd%je, npz+1)
165 REAL,
INTENT(INOUT) :: peln(bd%is:bd%ie, npz+1, bd%js:bd%je)
166 REAL,
INTENT(INOUT) :: peln_tl(bd%is:bd%ie, npz+1, bd%js:bd%je)
168 REAL,
INTENT(INOUT) :: pkz(bd%is:bd%ie, bd%js:bd%je, npz)
169 REAL,
INTENT(INOUT) :: pkz_tl(bd%is:bd%ie, bd%js:bd%je, npz)
170 REAL,
INTENT(INOUT) :: q_con(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
175 REAL,
INTENT(INOUT) :: phis(bd%isd:bd%ied, bd%jsd:bd%jed)
177 REAL,
INTENT(INOUT) :: omga(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
178 REAL,
INTENT(INOUT) :: omga_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
180 REAL,
INTENT(INOUT) :: uc(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
181 REAL,
INTENT(INOUT) :: uc_tl(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
182 REAL,
INTENT(INOUT) :: vc(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
183 REAL,
INTENT(INOUT) :: vc_tl(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
184 REAL,
DIMENSION(bd%isd:bd%ied, bd%jsd:bd%jed, npz),
INTENT(INOUT) ::&
186 REAL,
DIMENSION(bd%isd:bd%ied, bd%jsd:bd%jed, npz),
INTENT(INOUT) ::&
188 REAL,
DIMENSION(npz+1),
INTENT(IN) :: ak, bk
190 REAL,
INTENT(INOUT) :: mfx(bd%is:bd%ie+1, bd%js:bd%je, npz)
191 REAL,
INTENT(INOUT) :: mfx_tl(bd%is:bd%ie+1, bd%js:bd%je, npz)
192 REAL,
INTENT(INOUT) :: mfy(bd%is:bd%ie, bd%js:bd%je+1, npz)
193 REAL,
INTENT(INOUT) :: mfy_tl(bd%is:bd%ie, bd%js:bd%je+1, npz)
195 REAL,
INTENT(INOUT) :: cx(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
196 REAL,
INTENT(INOUT) :: cx_tl(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
197 REAL,
INTENT(INOUT) :: cy(bd%isd:bd%ied, bd%js:bd%je+1, npz)
198 REAL,
INTENT(INOUT) :: cy_tl(bd%isd:bd%ied, bd%js:bd%je+1, npz)
203 TYPE(
domain2d),
INTENT(INOUT) :: domain
207 REAL :: ws(bd%is:bd%ie, bd%js:bd%je)
208 REAL :: ws_tl(bd%is:bd%ie, bd%js:bd%je)
209 REAL :: te_2d(bd%is:bd%ie, bd%js:bd%je)
210 REAL :: te_2d_tl(bd%is:bd%ie, bd%js:bd%je)
211 REAL :: teq(bd%is:bd%ie, bd%js:bd%je)
212 REAL :: teq_tl(bd%is:bd%ie, bd%js:bd%je)
213 REAL :: ps2(bd%isd:bd%ied, bd%jsd:bd%jed)
214 REAL :: ps2_tl(bd%isd:bd%ied, bd%jsd:bd%jed)
215 REAL :: m_fac(bd%is:bd%ie, bd%js:bd%je)
216 REAL :: m_fac_tl(bd%is:bd%ie, bd%js:bd%je)
218 REAL,
DIMENSION(bd%is:bd%ie) :: cvm
219 REAL :: dp1(bd%isd:bd%ied, bd%jsd:bd%jed, npz), dtdt_m(bd%is:bd%ie, &
220 & bd%js:bd%je, npz), cappa(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
221 REAL :: dp1_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
222 REAL(kind=8) :: psx(bd%isd:bd%ied, bd%jsd:bd%jed)
223 REAL(kind=8) :: psx_tl(bd%isd:bd%ied, bd%jsd:bd%jed)
224 REAL(kind=8) :: dpx(bd%is:bd%ie, bd%js:bd%je)
225 REAL(kind=8) :: dpx_tl(bd%is:bd%ie, bd%js:bd%je)
226 REAL :: akap, rdg, ph1, ph2, mdt, gam, amdt, u0
227 REAL :: amdt_tl, u0_tl
228 INTEGER :: kord_tracer(ncnst), kord_mt, kord_wz, kord_tm
229 INTEGER :: kord_tracer_pert(ncnst), kord_mt_pert, kord_wz_pert, &
231 INTEGER :: i, j, k, n, iq, n_map, nq, nwat, k_split
234 INTEGER,
SAVE :: liq_wat=-999
235 INTEGER,
SAVE :: ice_wat=-999
236 INTEGER,
SAVE :: rainwat=-999
237 INTEGER,
SAVE :: snowwat=-999
238 INTEGER,
SAVE :: graupel=-999
239 INTEGER,
SAVE :: cld_amt=-999
240 INTEGER,
SAVE :: theta_d=-999
241 LOGICAL :: used, last_step, do_omega
242 INTEGER,
PARAMETER :: max_packs=12
243 TYPE(group_halo_update_type),
SAVE :: i_pack(max_packs)
244 INTEGER :: is, ie, js, je
245 INTEGER :: isd, ied, jsd, jed
247 REAL(kind=8) :: t1, t2
250 REAL :: gz(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
251 REAL :: gz_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
252 REAL :: pkc(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
253 REAL :: pkc_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
254 REAL :: ptc(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
255 REAL :: ptc_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
256 REAL :: crx(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
257 REAL :: crx_tl(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
258 REAL :: xfx(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
259 REAL :: xfx_tl(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
260 REAL :: cry(bd%isd:bd%ied, bd%js:bd%je+1, npz)
261 REAL :: cry_tl(bd%isd:bd%ied, bd%js:bd%je+1, npz)
262 REAL :: yfx(bd%isd:bd%ied, bd%js:bd%je+1, npz)
263 REAL :: yfx_tl(bd%isd:bd%ied, bd%js:bd%je+1, npz)
264 REAL :: divgd(bd%isd:bd%ied+1, bd%jsd:bd%jed+1, npz)
265 REAL :: divgd_tl(bd%isd:bd%ied+1, bd%jsd:bd%jed+1, npz)
266 REAL :: delpc(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
267 REAL :: delpc_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
268 REAL :: ut(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
269 REAL :: ut_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
270 REAL :: vt(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
271 REAL :: vt_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
272 REAL :: zh(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
273 REAL :: zh_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
274 REAL :: pk3(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
275 REAL :: pk3_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
276 REAL :: du(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
277 REAL :: du_tl(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
278 REAL :: dv(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
279 REAL :: dv_tl(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
322 k_split = flagstruct%k_split
323 nwat = flagstruct%nwat
324 nq = nq_tot - flagstruct%dnats
335 IF (gridstruct%nested .OR. any(neststruct%child_grids))
THEN 338 & , v, v_tl, w, pt, delp, delz, q, uc, &
339 & uc_tl, vc, vc_tl, pkz, neststruct%nested&
340 & , flagstruct%inline_q, flagstruct%make_nh&
341 & , ng, gridstruct, flagstruct, neststruct&
342 & , neststruct%nest_timestep, neststruct%&
343 & tracer_nest_timestep, domain, bd, nwat)
358 IF (flagstruct%no_dycore)
THEN 363 IF (
fpp%fpp_mapl_mode)
THEN 401 IF (nwat .EQ. 0)
THEN 420 ph1 = ak(k) + bk(k)*flagstruct%p_ref
421 ph2 = ak(k+1) + bk(k+1)*flagstruct%p_ref
422 pfull(k) = (ph2-ph1)/log(ph2/ph1)
424 IF (hydrostatic)
THEN 431 dp1_tl(i, j, k) = zvir*q_tl(i, j, k, sphum)
432 dp1(i, j, k) = zvir*q(i, j, k, sphum)
443 IF (flagstruct%moist_phys)
THEN 446 dp1_tl(i, j, k) = zvir*q_tl(i, j, k, sphum)
447 dp1(i, j, k) = zvir*q(i, j, k, sphum)
448 arg1_tl = (rdg*((delp_tl(i, j, k)*pt(i, j, k)+delp(i, j, k&
449 & )*pt_tl(i, j, k))*(1.+dp1(i, j, k))+delp(i, j, k)*pt(i, &
450 & j, k)*dp1_tl(i, j, k))*delz(i, j, k)-rdg*delp(i, j, k)*&
451 & pt(i, j, k)*(1.+dp1(i, j, k))*delz_tl(i, j, k))/delz(i, &
453 arg1 = rdg*delp(i, j, k)*pt(i, j, k)*(1.+dp1(i, j, k))/&
455 arg2_tl = kappa*arg1_tl/arg1
456 arg2 = kappa*log(arg1)
457 pkz_tl(i, j, k) = arg2_tl*exp(arg2)
458 pkz(i, j, k) = exp(arg2)
467 dp1_tl(i, j, k) = 0.0
469 arg1_tl = (rdg*(delp_tl(i, j, k)*pt(i, j, k)+delp(i, j, k)&
470 & *pt_tl(i, j, k))*delz(i, j, k)-rdg*delp(i, j, k)*pt(i, j&
471 & , k)*delz_tl(i, j, k))/delz(i, j, k)**2
472 arg1 = rdg*delp(i, j, k)*pt(i, j, k)/delz(i, j, k)
473 arg2_tl = kappa*arg1_tl/arg1
474 arg2 = kappa*log(arg1)
475 pkz_tl(i, j, k) = arg2_tl*exp(arg2)
476 pkz(i, j, k) = exp(arg2)
482 IF (flagstruct%fv_debug)
THEN 483 CALL prt_mxm(
'PS', ps, is, ie, js, je, ng, 1, 0.01, gridstruct%&
485 CALL prt_mxm(
'T_dyn_b', pt, is, ie, js, je, ng, npz, 1., &
486 & gridstruct%area_64, domain)
487 IF (.NOT.hydrostatic)
CALL prt_mxm(
'delz', delz, is, ie, js, je, &
488 & ng, npz, 1., gridstruct%area_64, &
490 CALL prt_mxm(
'delp_b ', delp, is, ie, js, je, ng, npz, 0.01, &
491 & gridstruct%area_64, domain)
492 CALL prt_mxm(
'pk_b', pk, is, ie, js, je, 0, npz + 1, 1., &
493 & gridstruct%area_64, domain)
494 CALL prt_mxm(
'pkz_b', pkz, is, ie, js, je, 0, npz, 1., gridstruct%&
502 & npz, u, u_tl, v, v_tl, w, w_tl, delz, &
503 & delz_tl, pt, pt_tl, delp, delp_tl, q, q_tl&
504 & , dp1, dp1_tl, pe, pe_tl, peln, peln_tl, &
505 & phis, gridstruct%rsin2, gridstruct%cosa_s&
506 & , zvir, cp_air,
rdgas,
hlv, te_2d, &
507 & te_2d_tl, ua, va, teq, teq_tl, flagstruct%&
508 & moist_phys, nwat, sphum, liq_wat, rainwat&
509 & , ice_wat, snowwat, graupel, hydrostatic, &
519 IF ((flagstruct%consv_am .OR. idiag%id_amdt .GT. 0) .AND. (.NOT.&
526 & gridstruct, bd, ptop, ua, ua_tl, va, va_tl, u, u_tl&
527 & , v, v_tl, delp, delp_tl, teq, teq_tl, ps2, ps2_tl&
535 IF (flagstruct%tau .GT. 0.)
THEN 536 IF (gridstruct%grid_type .LT. 4)
THEN 537 IF (bdt .GE. 0.)
THEN 543 & flagstruct%tau, u, u_tl, v, v_tl, w, w_tl, pt&
544 & , pt_tl, ua, ua_tl, va, va_tl, delz, &
545 & gridstruct%agrid, cp_air,
rdgas, ptop, &
546 & hydrostatic, .NOT.neststruct%nested, &
547 & flagstruct%rf_cutoff,
rf, gridstruct, domain, &
550 IF (bdt .GE. 0.)
THEN 556 & flagstruct%tau, u, u_tl, v, v_tl, w, w_tl, &
557 & pt, pt_tl, ua, ua_tl, va, va_tl, delz, &
558 & delz_tl, cp_air,
rdgas, ptop, hydrostatic, &
559 & .true., flagstruct%rf_cutoff,
rf, &
560 & gridstruct, domain, bd)
564 IF (flagstruct%adiabatic)
THEN 569 pt_tl(i, j, k) = (pt_tl(i, j, k)*pkz(i, j, k)-pt(i, j, k)*&
570 & pkz_tl(i, j, k))/pkz(i, j, k)**2
571 pt(i, j, k) = pt(i, j, k)/pkz(i, j, k)
574 IF (theta_d .GT. 0)
THEN 577 q_tl(i, j, k, theta_d) = pt_tl(i, j, k)
578 q(i, j, k, theta_d) = pt(i, j, k)
588 pt_tl(i, j, k) = ((pt_tl(i, j, k)*(1.+dp1(i, j, k))+pt(i, j&
589 & , k)*dp1_tl(i, j, k))*pkz(i, j, k)-pt(i, j, k)*(1.+dp1(i, &
590 & j, k))*pkz_tl(i, j, k))/pkz(i, j, k)**2
591 pt(i, j, k) = pt(i, j, k)*(1.+dp1(i, j, k))/pkz(i, j, k)
597 mdt = bdt/
REAL(k_split)
611 IF (
fpp%fpp_overload_r4)
THEN 615 psx_tl(i, j) = pe_tl(i, npz+1, j)
616 psx(i, j) = pe(i, npz+1, j)
651 & domain, gridtype=dgrid_ne)
657 dp1_tl(i, j, k) = delp_tl(i, j, k)
658 dp1(i, j, k) = delp(i, j, k)
662 IF (n_map .EQ. k_split) last_step = .true.
664 CALL dyn_core_tlm(npx, npy, npz, ng, sphum, nq, mdt, n_split, zvir&
665 & , cp_air, akap, cappa,
grav, hydrostatic, u, u_tl, v, &
666 & v_tl, w, w_tl, delz, delz_tl, pt, pt_tl, q, q_tl, delp&
667 & , delp_tl, pe, pe_tl, pk, pk_tl, phis, ws, ws_tl, omga&
668 & , omga_tl, ptop, pfull, ua, ua_tl, va, va_tl, uc, &
669 & uc_tl, vc, vc_tl, mfx, mfx_tl, mfy, mfy_tl, cx, cx_tl&
670 & , cy, cy_tl, pkz, pkz_tl, peln, peln_tl, q_con, ak, bk&
671 & , dpx, dpx_tl, ks, gridstruct, flagstruct, flagstructp&
672 & , neststruct, idiag, bd, domain, n_map .EQ. 1, i_pack&
673 & , last_step, gz, gz_tl, pkc, pkc_tl, ptc, ptc_tl, crx&
674 & , crx_tl, xfx, xfx_tl, cry, cry_tl, yfx, yfx_tl, divgd&
675 & , divgd_tl, delpc, delpc_tl, ut, ut_tl, vt, vt_tl, zh&
676 & , zh_tl, pk3, pk3_tl, du, du_tl, dv, dv_tl, time_total&
681 IF (
fpp%fpp_overload_r4)
THEN 684 psx_tl(i, j) = psx_tl(i, j) + dpx_tl(i, j)
685 psx(i, j) = psx(i, j) + dpx(i, j)
693 pe_tl(i, npz+1, j) = psx_tl(i, j)
694 pe(i, npz+1, j) = psx(i, j)
700 IF (.NOT.flagstruct%inline_q .AND. nq .NE. 0)
THEN 706 IF (gridstruct%nested)
THEN 708 & mfy, mfy_tl, cx, cx_tl, cy, cy_tl, &
709 & gridstruct, bd, domain, npx, npy, npz, nq&
710 & , flagstruct%hord_tr, q_split, mdt, idiag%&
711 & id_divg, i_pack(10), flagstruct%nord_tr, &
712 & flagstruct%trdm2, k_split, neststruct, &
713 & parent_grid, flagstructp%hord_tr_pert, &
714 & flagstructp%nord_tr_pert, flagstructp%&
715 & trdm2_pert, flagstructp%split_damp_tr)
716 ELSE IF (flagstruct%z_tracer)
THEN 718 & mfy_tl, cx, cx_tl, cy, cy_tl, gridstruct, bd, &
719 & domain, npx, npy, npz, nq, flagstruct%hord_tr&
720 & , q_split, mdt, idiag%id_divg, i_pack(10), &
721 & flagstruct%nord_tr, flagstruct%trdm2, &
722 & flagstructp%hord_tr_pert, flagstructp%&
723 & nord_tr_pert, flagstructp%trdm2_pert, &
724 & flagstructp%split_damp_tr)
727 & mfy_tl, cx, cx_tl, cy, cy_tl, gridstruct, bd, &
728 & domain, npx, npy, npz, nq, flagstruct%hord_tr, &
729 & q_split, mdt, idiag%id_divg, i_pack(10), &
730 & flagstruct%nord_tr, flagstruct%trdm2, flagstructp&
731 & %hord_tr_pert, flagstructp%nord_tr_pert, &
732 & flagstructp%trdm2_pert, flagstructp%split_damp_tr&
736 IF (flagstruct%hord_tr .LT. 8 .AND. flagstruct%moist_phys)
THEN 738 IF (liq_wat .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
739 & :ied, jsd:jed, 1, liq_wat), delp, &
740 & gridstruct%area, domain, neststruct%&
742 IF (rainwat .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
743 & :ied, jsd:jed, 1, rainwat), delp, &
744 & gridstruct%area, domain, neststruct%&
746 IF (ice_wat .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
747 & :ied, jsd:jed, 1, ice_wat), delp, &
748 & gridstruct%area, domain, neststruct%&
750 IF (snowwat .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
751 & :ied, jsd:jed, 1, snowwat), delp, &
752 & gridstruct%area, domain, neststruct%&
754 IF (graupel .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
755 & :ied, jsd:jed, 1, graupel), delp, &
756 & gridstruct%area, domain, neststruct%&
760 IF (last_step .AND. idiag%id_divg .GT. 0)
THEN 762 IF (flagstruct%fv_debug)
CALL prt_mxm(
'divg', dp1, is, ie, js&
763 & , je, 0, npz, 1., gridstruct%&
775 kord_tracer(iq) = flagstruct%kord_tr
777 IF (iq .EQ. cld_amt) kord_tracer(iq) = 9
778 kord_tracer_pert(iq) = flagstructp%kord_tr_pert
780 IF (iq .EQ. cld_amt) kord_tracer_pert(iq) = 17
782 do_omega = hydrostatic .AND. last_step
784 kord_mt = flagstruct%kord_mt
785 kord_wz = flagstruct%kord_wz
786 kord_tm = flagstruct%kord_tm
787 kord_mt_pert = flagstructp%kord_mt_pert
788 kord_wz_pert = flagstructp%kord_wz_pert
789 kord_tm_pert = flagstructp%kord_tm_pert
790 IF (n_map .EQ. k_split)
THEN 791 kord_mt = kord_mt_pert
792 kord_wz = kord_wz_pert
793 kord_tm = kord_tm_pert
794 kord_tracer = kord_tracer_pert
797 & pe, pe_tl, delp, delp_tl, pkz, pkz_tl&
798 & , pk, pk_tl, mdt, bdt, npz, is, ie, js&
799 & , je, isd, ied, jsd, jed, nq, nwat, &
800 & sphum, q_con, u, u_tl, v, v_tl, w, &
801 & w_tl, delz, delz_tl, pt, pt_tl, q, &
802 & q_tl, phis, zvir, cp_air, akap, cappa&
803 & , kord_mt, kord_wz, kord_tracer, &
804 & kord_tm, peln, peln_tl, te_2d, &
805 & te_2d_tl, ng, ua, ua_tl, va, omga, &
806 & omga_tl, dp1, dp1_tl, ws, ws_tl, fill&
807 & , reproduce_sum, idiag%id_mdt .GT. 0, &
808 & dtdt_m, ptop, ak, bk, pfull, &
809 & flagstruct, gridstruct, domain, &
810 & flagstruct%do_sat_adj, hydrostatic, &
811 & hybrid_z, do_omega, flagstruct%&
813 & , flagstruct%remap_option, &
814 & kord_mt_pert, kord_wz_pert, &
815 & kord_tracer_pert, kord_tm_pert)
818 IF (.NOT.hydrostatic)
THEN 823 omga_tl(i, j, k) = (delp_tl(i, j, k)*delz(i, j, k)-&
824 & delp(i, j, k)*delz_tl(i, j, k))*w(i, j, k)/delz(i, j&
825 & , k)**2 + delp(i, j, k)*w_tl(i, j, k)/delz(i, j, k)
826 omga(i, j, k) = delp(i, j, k)/delz(i, j, k)*w(i, j, k)
854 dtdt_m(i, j, k) = dtdt_m(i, j, k)/bdt*86400.
862 IF (nwat .EQ. 6)
THEN 863 IF (cld_amt .GT. 0)
THEN 864 CALL neg_adj3(is, ie, js, je, ng, npz, flagstruct%hydrostatic, &
865 & peln, delz, pt, delp, q(isd:ied, jsd:jed, 1, sphum), q(&
866 & isd:ied, jsd:jed, 1, liq_wat), q(isd:ied, jsd:jed, 1, &
867 & rainwat), q(isd:ied, jsd:jed, 1, ice_wat), q(isd:ied, &
868 & jsd:jed, 1, snowwat), q(isd:ied, jsd:jed, 1, graupel), q&
869 & (isd:ied, jsd:jed, 1, cld_amt), flagstruct%&
872 CALL neg_adj3(is, ie, js, je, ng, npz, flagstruct%hydrostatic, &
873 & peln, delz, pt, delp, q(isd:ied, jsd:jed, 1, sphum), q(&
874 & isd:ied, jsd:jed, 1, liq_wat), q(isd:ied, jsd:jed, 1, &
875 & rainwat), q(isd:ied, jsd:jed, 1, ice_wat), q(isd:ied, &
876 & jsd:jed, 1, snowwat), q(isd:ied, jsd:jed, 1, graupel), &
877 & check_negative=flagstruct%check_negative)
879 IF (flagstruct%fv_debug)
THEN 880 CALL prt_mxm(
'T_dyn_a3', pt, is, ie, js, je, ng, npz, 1., &
881 & gridstruct%area_64, domain)
882 CALL prt_mxm(
'SPHUM_dyn', q(isd:ied, jsd:jed, 1, sphum), is, ie&
883 & , js, je, ng, npz, 1., gridstruct%area_64, domain)
884 CALL prt_mxm(
'liq_wat_dyn', q(isd:ied, jsd:jed, 1, liq_wat), is&
885 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
886 CALL prt_mxm(
'rainwat_dyn', q(isd:ied, jsd:jed, 1, rainwat), is&
887 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
888 CALL prt_mxm(
'ice_wat_dyn', q(isd:ied, jsd:jed, 1, ice_wat), is&
889 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
890 CALL prt_mxm(
'snowwat_dyn', q(isd:ied, jsd:jed, 1, snowwat), is&
891 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
892 CALL prt_mxm(
'graupel_dyn', q(isd:ied, jsd:jed, 1, graupel), is&
893 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
896 IF (((flagstruct%consv_am .OR. idiag%id_amdt .GT. 0) .OR. idiag%&
899 & gridstruct, bd, ptop, ua, ua_tl, va, va_tl, u, u_tl&
900 & , v, v_tl, delp, delp_tl, te_2d, te_2d_tl, ps, &
901 & ps_tl, m_fac, m_fac_tl)
902 IF (idiag%id_aam .GT. 0)
THEN 904 IF (
prt_minmax) gam = g_sum(domain, te_2d, is, ie, js, je, ng, &
905 & gridstruct%area_64, 0)
909 IF ((flagstruct%consv_am .OR. idiag%id_amdt .GT. 0) .AND. (.NOT.&
916 te_2d_tl(i, j) = te_2d_tl(i, j) - teq_tl(i, j) + dt2*idiag%zxg&
917 & (i, j)*(ps2_tl(i, j)+ps_tl(i, j))
918 te_2d(i, j) = te_2d(i, j) - teq(i, j) + dt2*(ps2(i, j)+ps(i, j&
922 IF (idiag%id_amdt .GT. 0) used =
send_data(idiag%id_amdt, te_2d/&
925 amdt_tl =
g_sum_tlm(domain, te_2d, te_2d_tl, is, ie, js, je, ng&
926 & , gridstruct%area_64, 0, reproduce=.true., g_sum=amdt)
927 result1_tl =
g_sum_tlm(domain, m_fac, m_fac_tl, is, ie, js, je, &
928 & ng, gridstruct%area_64, 0, reproduce=.true., g_sum=result1)
929 u0_tl = -((
radius*amdt_tl*result1-
radius*amdt*result1_tl)/&
931 u0 = -(
radius*amdt/result1)
932 IF (is_master() .AND.
prt_minmax)
WRITE(6, *) &
933 &
'Dynamic AM tendency (Hadleys)='&
934 & , amdt/(bdt*1.e18), &
935 &
'del-u (per day)=', u0*86400./&
941 IF (flagstruct%consv_am)
THEN 945 m_fac(i, j) = u0*cos(gridstruct%agrid(i, j, 2))
953 u_tl(i, j, k) = u_tl(i, j, k) + gridstruct%l2c_u(i, j)*&
955 u(i, j, k) = u(i, j, k) + u0*gridstruct%l2c_u(i, j)
960 v_tl(i, j, k) = v_tl(i, j, k) + gridstruct%l2c_v(i, j)*&
962 v(i, j, k) = v(i, j, k) + u0*gridstruct%l2c_v(i, j)
972 IF (flagstruct%fv_debug)
THEN 973 CALL prt_mxm(
'UA', ua, is, ie, js, je, ng, npz, 1., gridstruct%&
975 CALL prt_mxm(
'VA', va, is, ie, js, je, ng, npz, 1., gridstruct%&
977 CALL prt_mxm(
'TA', pt, is, ie, js, je, ng, npz, 1., gridstruct%&
979 IF (.NOT.hydrostatic)
CALL prt_mxm(
'W ', w, is, ie, js, je, ng, &
980 & npz, 1., gridstruct%area_64, domain)
982 IF (flagstruct%range_warn)
THEN 983 CALL range_check(
'UA_dyn', ua, is, ie, js, je, ng, npz, gridstruct&
985 CALL range_check(
'VA_dyn', ua, is, ie, js, je, ng, npz, gridstruct&
987 CALL range_check(
'TA_dyn', pt, is, ie, js, je, ng, npz, gridstruct&
989 IF (.NOT.hydrostatic)
CALL range_check(
'W_dyn', w, is, ie, js, je&
990 & , ng, npz, gridstruct%agrid, -50.&
999 SUBROUTINE fv_dynamics(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill&
1000 & , reproduce_sum, kappa, cp_air, zvir, ptop, ks, ncnst, n_split, &
1001 & q_split, u, v, w, delz, hydrostatic, pt, delp, q, ps, pe, pk, peln, &
1002 & pkz, phis, q_con, omga, ua, va, uc, vc, ak, bk, mfx, mfy, cx, cy, &
1003 & ze0, hybrid_z, gridstruct, flagstruct, flagstructp, neststruct, &
1004 & idiag, bd, parent_grid, domain, time_total)
1007 REAL,
INTENT(IN) :: bdt
1008 REAL,
INTENT(IN) :: consv_te
1009 REAL,
INTENT(IN) :: kappa, cp_air
1010 REAL,
INTENT(IN) :: zvir, ptop
1011 REAL,
INTENT(IN),
OPTIONAL :: time_total
1012 INTEGER,
INTENT(IN) :: npx
1013 INTEGER,
INTENT(IN) :: npy
1014 INTEGER,
INTENT(IN) :: npz
1016 INTEGER,
INTENT(IN) :: nq_tot
1017 INTEGER,
INTENT(IN) :: ng
1018 INTEGER,
INTENT(IN) :: ks
1019 INTEGER,
INTENT(IN) :: ncnst
1021 INTEGER,
INTENT(IN) :: n_split
1023 INTEGER,
INTENT(IN) :: q_split
1024 LOGICAL,
INTENT(IN) :: fill
1025 LOGICAL,
INTENT(IN) :: reproduce_sum
1026 LOGICAL,
INTENT(IN) :: hydrostatic
1028 LOGICAL,
INTENT(IN) :: hybrid_z
1031 REAL,
DIMENSION(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz),
INTENT(INOUT) &
1034 REAL,
DIMENSION(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz),
INTENT(INOUT) &
1037 REAL,
INTENT(INOUT) :: w(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1039 REAL,
INTENT(INOUT) :: pt(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1041 REAL,
INTENT(INOUT) :: delp(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1043 REAL,
INTENT(INOUT) :: q(bd%isd:bd%ied, bd%jsd:bd%jed, npz, ncnst)
1045 REAL,
INTENT(INOUT) :: delz(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1047 REAL,
INTENT(INOUT) :: ze0(bd%is:bd%is, bd%js:bd%js, 1)
1055 REAL,
INTENT(INOUT) :: ps(bd%isd:bd%ied, bd%jsd:bd%jed)
1057 REAL,
INTENT(INOUT) :: pe(bd%is-1:bd%ie+1, npz+1, bd%js-1:bd%je+1)
1059 REAL,
INTENT(INOUT) :: pk(bd%is:bd%ie, bd%js:bd%je, npz+1)
1061 REAL,
INTENT(INOUT) :: peln(bd%is:bd%ie, npz+1, bd%js:bd%je)
1063 REAL,
INTENT(INOUT) :: pkz(bd%is:bd%ie, bd%js:bd%je, npz)
1064 REAL,
INTENT(INOUT) :: q_con(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1069 REAL,
INTENT(INOUT) :: phis(bd%isd:bd%ied, bd%jsd:bd%jed)
1071 REAL,
INTENT(INOUT) :: omga(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1073 REAL,
INTENT(INOUT) :: uc(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
1074 REAL,
INTENT(INOUT) :: vc(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
1075 REAL,
DIMENSION(bd%isd:bd%ied, bd%jsd:bd%jed, npz),
INTENT(INOUT) ::&
1077 REAL,
DIMENSION(npz+1),
INTENT(IN) :: ak, bk
1079 REAL,
INTENT(INOUT) :: mfx(bd%is:bd%ie+1, bd%js:bd%je, npz)
1080 REAL,
INTENT(INOUT) :: mfy(bd%is:bd%ie, bd%js:bd%je+1, npz)
1082 REAL,
INTENT(INOUT) :: cx(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
1083 REAL,
INTENT(INOUT) :: cy(bd%isd:bd%ied, bd%js:bd%je+1, npz)
1084 TYPE(
fv_grid_type),
INTENT(INOUT),
TARGET :: gridstruct
1088 TYPE(
domain2d),
INTENT(INOUT) :: domain
1092 REAL :: ws(bd%is:bd%ie, bd%js:bd%je)
1093 REAL :: te_2d(bd%is:bd%ie, bd%js:bd%je)
1094 REAL :: teq(bd%is:bd%ie, bd%js:bd%je)
1095 REAL :: ps2(bd%isd:bd%ied, bd%jsd:bd%jed)
1096 REAL :: m_fac(bd%is:bd%ie, bd%js:bd%je)
1098 REAL,
DIMENSION(bd%is:bd%ie) :: cvm
1099 REAL :: dp1(bd%isd:bd%ied, bd%jsd:bd%jed, npz), dtdt_m(bd%is:bd%ie, &
1100 & bd%js:bd%je, npz), cappa(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1101 REAL(kind=8) :: psx(bd%isd:bd%ied, bd%jsd:bd%jed)
1102 REAL(kind=8) :: dpx(bd%is:bd%ie, bd%js:bd%je)
1103 REAL :: akap, rdg, ph1, ph2, mdt, gam, amdt, u0
1104 INTEGER :: kord_tracer(ncnst), kord_mt, kord_wz, kord_tm
1105 INTEGER :: kord_tracer_pert(ncnst), kord_mt_pert, kord_wz_pert, &
1107 INTEGER :: i, j, k, n, iq, n_map, nq, nwat, k_split
1110 INTEGER,
SAVE :: liq_wat=-999
1111 INTEGER,
SAVE :: ice_wat=-999
1112 INTEGER,
SAVE :: rainwat=-999
1113 INTEGER,
SAVE :: snowwat=-999
1114 INTEGER,
SAVE :: graupel=-999
1115 INTEGER,
SAVE :: cld_amt=-999
1116 INTEGER,
SAVE :: theta_d=-999
1117 LOGICAL :: used, last_step, do_omega
1118 INTEGER,
PARAMETER :: max_packs=12
1119 TYPE(group_halo_update_type),
SAVE :: i_pack(max_packs)
1120 INTEGER :: is, ie, js, je
1121 INTEGER :: isd, ied, jsd, jed
1123 REAL(kind=8) :: t1, t2
1126 REAL :: gz(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
1127 REAL :: pkc(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
1128 REAL :: ptc(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1129 REAL :: crx(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
1130 REAL :: xfx(bd%is:bd%ie+1, bd%jsd:bd%jed, npz)
1131 REAL :: cry(bd%isd:bd%ied, bd%js:bd%je+1, npz)
1132 REAL :: yfx(bd%isd:bd%ied, bd%js:bd%je+1, npz)
1133 REAL :: divgd(bd%isd:bd%ied+1, bd%jsd:bd%jed+1, npz)
1134 REAL :: delpc(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1135 REAL :: ut(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1136 REAL :: vt(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1137 REAL :: zh(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
1138 REAL :: pk3(bd%isd:bd%ied, bd%jsd:bd%jed, npz+1)
1139 REAL :: du(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
1140 REAL :: dv(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
1180 k_split = flagstruct%k_split
1181 nwat = flagstruct%nwat
1182 nq = nq_tot - flagstruct%dnats
1193 IF (gridstruct%nested .OR. any(neststruct%child_grids))
THEN 1195 CALL setup_nested_grid_bcs(npx, npy, npz, zvir, ncnst, u, v, w, pt&
1196 & , delp, delz, q, uc, vc, pkz, neststruct%&
1197 & nested, flagstruct%inline_q, flagstruct%&
1198 & make_nh, ng, gridstruct, flagstruct, &
1199 & neststruct, neststruct%nest_timestep, &
1200 & neststruct%tracer_nest_timestep, domain, bd, &
1202 IF (gridstruct%nested)
CALL nested_grid_bc_apply_intt(pt, 0, 0, &
1203 & npx, npy, npz, bd&
1205 & neststruct%pt_bc, &
1211 IF (flagstruct%no_dycore)
THEN 1216 IF (
fpp%fpp_mapl_mode)
THEN 1254 IF (nwat .EQ. 0)
THEN 1273 ph1 = ak(k) + bk(k)*flagstruct%p_ref
1274 ph2 = ak(k+1) + bk(k+1)*flagstruct%p_ref
1275 pfull(k) = (ph2-ph1)/log(ph2/ph1)
1277 IF (hydrostatic)
THEN 1283 dp1(i, j, k) = zvir*q(i, j, k, sphum)
1293 IF (flagstruct%moist_phys)
THEN 1296 dp1(i, j, k) = zvir*q(i, j, k, sphum)
1297 arg1 = rdg*delp(i, j, k)*pt(i, j, k)*(1.+dp1(i, j, k))/&
1299 arg2 = kappa*log(arg1)
1300 pkz(i, j, k) = exp(arg2)
1310 arg1 = rdg*delp(i, j, k)*pt(i, j, k)/delz(i, j, k)
1311 arg2 = kappa*log(arg1)
1312 pkz(i, j, k) = exp(arg2)
1318 IF (flagstruct%fv_debug)
THEN 1319 CALL prt_mxm(
'PS', ps, is, ie, js, je, ng, 1, 0.01, gridstruct%&
1321 CALL prt_mxm(
'T_dyn_b', pt, is, ie, js, je, ng, npz, 1., &
1322 & gridstruct%area_64, domain)
1323 IF (.NOT.hydrostatic)
CALL prt_mxm(
'delz', delz, is, ie, js, je, &
1324 & ng, npz, 1., gridstruct%area_64, &
1326 CALL prt_mxm(
'delp_b ', delp, is, ie, js, je, ng, npz, 0.01, &
1327 & gridstruct%area_64, domain)
1328 CALL prt_mxm(
'pk_b', pk, is, ie, js, je, 0, npz + 1, 1., &
1329 & gridstruct%area_64, domain)
1330 CALL prt_mxm(
'pkz_b', pkz, is, ie, js, je, 0, npz, 1., gridstruct%&
1337 CALL compute_total_energy(is, ie, js, je, isd, ied, jsd, jed, npz&
1338 & , u, v, w, delz, pt, delp, q, dp1, pe, peln, &
1339 & phis, gridstruct%rsin2, gridstruct%cosa_s, &
1340 & zvir, cp_air,
rdgas,
hlv, te_2d, ua, va, teq, &
1341 & flagstruct%moist_phys, nwat, sphum, liq_wat, &
1342 & rainwat, ice_wat, snowwat, graupel, &
1343 & hydrostatic, idiag%id_te)
1349 IF ((flagstruct%consv_am .OR. idiag%id_amdt .GT. 0) .AND. (.NOT.&
1351 & ied, jsd, jed, gridstruct, bd, &
1352 & ptop, ua, va, u, v, delp, teq, &
1354 IF (flagstruct%tau .GT. 0.)
THEN 1355 IF (gridstruct%grid_type .LT. 4)
THEN 1356 IF (bdt .GE. 0.)
THEN 1362 & flagstruct%tau, u, v, w, pt, ua, va, delz, &
1363 & gridstruct%agrid, cp_air,
rdgas, ptop, hydrostatic&
1364 & , .NOT.neststruct%nested, flagstruct%rf_cutoff,
rf&
1365 & , gridstruct, domain, bd)
1367 IF (bdt .GE. 0.)
THEN 1373 & flagstruct%tau, u, v, w, pt, ua, va, delz, &
1374 & cp_air,
rdgas, ptop, hydrostatic, .true., &
1375 & flagstruct%rf_cutoff,
rf, gridstruct, domain, &
1380 IF (flagstruct%adiabatic)
THEN 1385 pt(i, j, k) = pt(i, j, k)/pkz(i, j, k)
1388 IF (theta_d .GT. 0)
THEN 1391 q(i, j, k, theta_d) = pt(i, j, k)
1401 pt(i, j, k) = pt(i, j, k)*(1.+dp1(i, j, k))/pkz(i, j, k)
1407 mdt = bdt/
REAL(k_split)
1414 dtdt_m(i, j, k) = 0.
1421 IF (
fpp%fpp_overload_r4)
THEN 1424 psx(i, j) = pe(i, npz+1, j)
1444 dp1(i, j, k) = delp(i, j, k)
1448 IF (n_map .EQ. k_split) last_step = .true.
1450 CALL dyn_core(npx, npy, npz, ng, sphum, nq, mdt, n_split, zvir, &
1451 & cp_air, akap, cappa,
grav, hydrostatic, u, v, w, delz, pt&
1452 & , q, delp, pe, pk, phis, ws, omga, ptop, pfull, ua, va, uc&
1453 & , vc, mfx, mfy, cx, cy, pkz, peln, q_con, ak, bk, dpx, ks&
1454 & , gridstruct, flagstruct, flagstructp, neststruct, idiag, &
1455 & bd, domain, n_map .EQ. 1, i_pack, last_step, gz, pkc, ptc&
1456 & , crx, xfx, cry, yfx, divgd, delpc, ut, vt, zh, pk3, du, &
1461 IF (
fpp%fpp_overload_r4)
THEN 1464 psx(i, j) = psx(i, j) + dpx(i, j)
1472 pe(i, npz+1, j) = psx(i, j)
1478 IF (.NOT.flagstruct%inline_q .AND. nq .NE. 0)
THEN 1484 IF (gridstruct%nested)
THEN 1485 CALL tracer_2d_nested(q, dp1, mfx, mfy, cx, cy, gridstruct, bd&
1486 & , domain, npx, npy, npz, nq, flagstruct%&
1487 & hord_tr, q_split, mdt, idiag%id_divg, i_pack(&
1488 & 10), flagstruct%nord_tr, flagstruct%trdm2, &
1489 & k_split, neststruct, parent_grid, flagstructp%&
1490 & hord_tr_pert, flagstructp%nord_tr_pert, &
1491 & flagstructp%trdm2_pert, flagstructp%&
1493 ELSE IF (flagstruct%z_tracer)
THEN 1494 CALL tracer_2d_1l(q, dp1, mfx, mfy, cx, cy, gridstruct, bd, &
1495 & domain, npx, npy, npz, nq, flagstruct%hord_tr, &
1496 & q_split, mdt, idiag%id_divg, i_pack(10), &
1497 & flagstruct%nord_tr, flagstruct%trdm2, flagstructp%&
1498 & hord_tr_pert, flagstructp%nord_tr_pert, &
1499 & flagstructp%trdm2_pert, flagstructp%split_damp_tr)
1501 CALL tracer_2d(q, dp1, mfx, mfy, cx, cy, gridstruct, bd, &
1502 & domain, npx, npy, npz, nq, flagstruct%hord_tr, &
1503 & q_split, mdt, idiag%id_divg, i_pack(10), flagstruct%&
1504 & nord_tr, flagstruct%trdm2, flagstructp%hord_tr_pert, &
1505 & flagstructp%nord_tr_pert, flagstructp%trdm2_pert, &
1506 & flagstructp%split_damp_tr)
1509 IF (flagstruct%hord_tr .LT. 8 .AND. flagstruct%moist_phys)
THEN 1511 IF (liq_wat .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
1512 & :ied, jsd:jed, 1, liq_wat), delp, &
1513 & gridstruct%area, domain, neststruct%&
1515 IF (rainwat .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
1516 & :ied, jsd:jed, 1, rainwat), delp, &
1517 & gridstruct%area, domain, neststruct%&
1519 IF (ice_wat .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
1520 & :ied, jsd:jed, 1, ice_wat), delp, &
1521 & gridstruct%area, domain, neststruct%&
1523 IF (snowwat .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
1524 & :ied, jsd:jed, 1, snowwat), delp, &
1525 & gridstruct%area, domain, neststruct%&
1527 IF (graupel .GT. 0)
CALL fill2d(is, ie, js, je, ng, npz, q(isd&
1528 & :ied, jsd:jed, 1, graupel), delp, &
1529 & gridstruct%area, domain, neststruct%&
1533 IF (last_step .AND. idiag%id_divg .GT. 0)
THEN 1535 IF (flagstruct%fv_debug)
CALL prt_mxm(
'divg', dp1, is, ie, js&
1536 & , je, 0, npz, 1., gridstruct%&
1540 IF (npz .GT. 4)
THEN 1548 kord_tracer(iq) = flagstruct%kord_tr
1550 IF (iq .EQ. cld_amt) kord_tracer(iq) = 9
1551 kord_tracer_pert(iq) = flagstructp%kord_tr_pert
1553 IF (iq .EQ. cld_amt) kord_tracer_pert(iq) = 17
1555 do_omega = hydrostatic .AND. last_step
1557 kord_mt = flagstruct%kord_mt
1558 kord_wz = flagstruct%kord_wz
1559 kord_tm = flagstruct%kord_tm
1560 kord_mt_pert = flagstructp%kord_mt_pert
1561 kord_wz_pert = flagstructp%kord_wz_pert
1562 kord_tm_pert = flagstructp%kord_tm_pert
1563 IF (n_map .EQ. k_split)
THEN 1564 kord_mt = kord_mt_pert
1565 kord_wz = kord_wz_pert
1566 kord_tm = kord_tm_pert
1567 kord_tracer = kord_tracer_pert
1569 CALL lagrangian_to_eulerian(last_step, consv_te, ps, pe, delp, &
1570 & pkz, pk, mdt, bdt, npz, is, ie, js, je, &
1571 & isd, ied, jsd, jed, nq, nwat, sphum, q_con&
1572 & , u, v, w, delz, pt, q, phis, zvir, cp_air&
1573 & , akap, cappa, kord_mt, kord_wz, &
1574 & kord_tracer, kord_tm, peln, te_2d, ng, ua&
1575 & , va, omga, dp1, ws, fill, reproduce_sum, &
1576 & idiag%id_mdt .GT. 0, dtdt_m, ptop, ak, bk&
1577 & , pfull, flagstruct, gridstruct, domain, &
1578 & flagstruct%do_sat_adj, hydrostatic, &
1579 & hybrid_z, do_omega, flagstruct%adiabatic, &
1581 & remap_option, kord_mt_pert, kord_wz_pert, &
1582 & kord_tracer_pert, kord_tm_pert)
1585 IF (.NOT.hydrostatic)
THEN 1590 omga(i, j, k) = delp(i, j, k)/delz(i, j, k)*w(i, j, k)
1598 IF (flagstruct%nf_omega .GT. 0)
CALL del2_cubed(omga, 0.18*&
1599 & gridstruct%da_min, &
1600 & gridstruct, domain, &
1602 & flagstruct%nf_omega&
1615 dtdt_m(i, j, k) = dtdt_m(i, j, k)/bdt*86400.
1623 IF (nwat .EQ. 6)
THEN 1624 IF (cld_amt .GT. 0)
THEN 1625 CALL neg_adj3(is, ie, js, je, ng, npz, flagstruct%hydrostatic, &
1626 & peln, delz, pt, delp, q(isd:ied, jsd:jed, 1, sphum), q(&
1627 & isd:ied, jsd:jed, 1, liq_wat), q(isd:ied, jsd:jed, 1, &
1628 & rainwat), q(isd:ied, jsd:jed, 1, ice_wat), q(isd:ied, &
1629 & jsd:jed, 1, snowwat), q(isd:ied, jsd:jed, 1, graupel), q&
1630 & (isd:ied, jsd:jed, 1, cld_amt), flagstruct%&
1633 CALL neg_adj3(is, ie, js, je, ng, npz, flagstruct%hydrostatic, &
1634 & peln, delz, pt, delp, q(isd:ied, jsd:jed, 1, sphum), q(&
1635 & isd:ied, jsd:jed, 1, liq_wat), q(isd:ied, jsd:jed, 1, &
1636 & rainwat), q(isd:ied, jsd:jed, 1, ice_wat), q(isd:ied, &
1637 & jsd:jed, 1, snowwat), q(isd:ied, jsd:jed, 1, graupel), &
1638 & check_negative=flagstruct%check_negative)
1640 IF (flagstruct%fv_debug)
THEN 1641 CALL prt_mxm(
'T_dyn_a3', pt, is, ie, js, je, ng, npz, 1., &
1642 & gridstruct%area_64, domain)
1643 CALL prt_mxm(
'SPHUM_dyn', q(isd:ied, jsd:jed, 1, sphum), is, ie&
1644 & , js, je, ng, npz, 1., gridstruct%area_64, domain)
1645 CALL prt_mxm(
'liq_wat_dyn', q(isd:ied, jsd:jed, 1, liq_wat), is&
1646 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
1647 CALL prt_mxm(
'rainwat_dyn', q(isd:ied, jsd:jed, 1, rainwat), is&
1648 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
1649 CALL prt_mxm(
'ice_wat_dyn', q(isd:ied, jsd:jed, 1, ice_wat), is&
1650 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
1651 CALL prt_mxm(
'snowwat_dyn', q(isd:ied, jsd:jed, 1, snowwat), is&
1652 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
1653 CALL prt_mxm(
'graupel_dyn', q(isd:ied, jsd:jed, 1, graupel), is&
1654 & , ie, js, je, ng, npz, 1., gridstruct%area_64, domain)
1657 IF (((flagstruct%consv_am .OR. idiag%id_amdt .GT. 0) .OR. idiag%&
1659 CALL compute_aam(npz, is, ie, js, je, isd, ied, jsd, jed, &
1660 & gridstruct, bd, ptop, ua, va, u, v, delp, te_2d, ps, &
1662 IF (idiag%id_aam .GT. 0)
THEN 1664 IF (
prt_minmax) gam = g_sum(domain, te_2d, is, ie, js, je, ng, &
1665 & gridstruct%area_64, 0)
1669 IF ((flagstruct%consv_am .OR. idiag%id_amdt .GT. 0) .AND. (.NOT.&
1676 te_2d(i, j) = te_2d(i, j) - teq(i, j) + dt2*(ps2(i, j)+ps(i, j&
1677 & ))*idiag%zxg(i, j)
1680 IF (idiag%id_amdt .GT. 0) used =
send_data(idiag%id_amdt, te_2d/&
1682 IF (flagstruct%consv_am .OR.
prt_minmax)
THEN 1683 amdt = g_sum(domain, te_2d, is, ie, js, je, ng, gridstruct%&
1684 & area_64, 0, .true.)
1685 result1 = g_sum(domain, m_fac, is, ie, js, je, ng, gridstruct%&
1686 & area_64, 0, .true.)
1687 u0 = -(
radius*amdt/result1)
1688 IF (is_master() .AND.
prt_minmax)
WRITE(6, *) &
1689 &
'Dynamic AM tendency (Hadleys)='&
1690 & , amdt/(bdt*1.e18), &
1691 &
'del-u (per day)=', u0*86400./&
1695 IF (flagstruct%consv_am)
THEN 1699 m_fac(i, j) = u0*cos(gridstruct%agrid(i, j, 2))
1707 u(i, j, k) = u(i, j, k) + u0*gridstruct%l2c_u(i, j)
1712 v(i, j, k) = v(i, j, k) + u0*gridstruct%l2c_v(i, j)
1722 IF (flagstruct%fv_debug)
THEN 1723 CALL prt_mxm(
'UA', ua, is, ie, js, je, ng, npz, 1., gridstruct%&
1725 CALL prt_mxm(
'VA', va, is, ie, js, je, ng, npz, 1., gridstruct%&
1727 CALL prt_mxm(
'TA', pt, is, ie, js, je, ng, npz, 1., gridstruct%&
1729 IF (.NOT.hydrostatic)
CALL prt_mxm(
'W ', w, is, ie, js, je, ng, &
1730 & npz, 1., gridstruct%area_64, domain)
1732 IF (flagstruct%range_warn)
THEN 1733 CALL range_check(
'UA_dyn', ua, is, ie, js, je, ng, npz, gridstruct&
1735 CALL range_check(
'VA_dyn', ua, is, ie, js, je, ng, npz, gridstruct&
1737 CALL range_check(
'TA_dyn', pt, is, ie, js, je, ng, npz, gridstruct&
1739 IF (.NOT.hydrostatic)
CALL range_check(
'W_dyn', w, is, ie, js, je&
1740 & , ng, npz, gridstruct%agrid, -50.&
1750 & , u_tl, v, v_tl, w, w_tl, pt, pt_tl, ua, ua_tl, va, va_tl, delz, &
1751 & agrid, cp, rg, ptop, hydrostatic, conserve, rf_cutoff, rf, &
1752 & gridstruct, domain, bd)
1755 REAL,
INTENT(IN) :: dt
1757 REAL,
INTENT(IN) :: tau
1758 REAL,
INTENT(IN) :: cp, rg, ptop, rf_cutoff
1759 INTEGER,
INTENT(IN) :: npx, npy, npz, ks
1760 REAL,
DIMENSION(npz),
INTENT(IN) :: pm
1761 LOGICAL,
INTENT(IN) :: hydrostatic
1762 LOGICAL,
INTENT(IN) :: conserve
1763 TYPE(FV_GRID_BOUNDS_TYPE),
INTENT(IN) :: bd
1765 REAL,
INTENT(INOUT) :: u(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
1766 REAL,
INTENT(INOUT) :: u_tl(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
1768 REAL,
INTENT(INOUT) :: v(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
1769 REAL,
INTENT(INOUT) :: v_tl(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
1771 REAL,
INTENT(INOUT) :: w(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1772 REAL,
INTENT(INOUT) :: w_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1774 REAL,
INTENT(INOUT) :: pt(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1775 REAL,
INTENT(INOUT) :: pt_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1777 REAL,
INTENT(INOUT) :: ua(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1778 REAL,
INTENT(INOUT) :: ua_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1780 REAL,
INTENT(INOUT) :: va(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1781 REAL,
INTENT(INOUT) :: va_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1783 REAL,
INTENT(INOUT) :: delz(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1784 REAL,
INTENT(INOUT) :: rf(npz)
1785 REAL,
INTENT(IN) :: agrid(bd%isd:bd%ied, bd%jsd:bd%jed, 2)
1787 REAL,
INTENT(IN) :: phis(bd%isd:bd%ied, bd%jsd:bd%jed)
1788 TYPE(FV_GRID_TYPE),
INTENT(IN) :: gridstruct
1789 TYPE(DOMAIN2D),
INTENT(INOUT) :: domain
1791 REAL :: u2f(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1793 REAL,
PARAMETER :: u0=60.
1794 REAL,
PARAMETER :: sday=86400.
1797 INTEGER :: is, ie, js, je
1798 INTEGER :: isd, ied, jsd, jed
1817 IF (is_master())
WRITE(6, *) &
1818 &
'Rayleigh friction E-folding time (days):' 1820 IF (pm(k) .LT. rf_cutoff)
THEN 1821 arg1 = 0.5*
pi*log(rf_cutoff/pm(k))/log(rf_cutoff/ptop)
1822 rf(k) = dt/tau0*sin(arg1)**2
1831 CALL c2l_ord2_tlm(u, u_tl, v, v_tl, ua, ua_tl, va, va_tl, gridstruct&
1832 & , npz, gridstruct%grid_type, bd, gridstruct%nested)
1838 IF (pm(k) .LT. rf_cutoff)
THEN 1839 u2f(:, :, k) = 1./(1.+rf(k))
1850 IF (pm(k) .LT. rf_cutoff)
THEN 1853 IF (hydrostatic)
THEN 1856 pt_tl(i, j, k) = pt_tl(i, j, k) + 0.5*(1.-u2f(i, j, k)**&
1857 & 2)*(2*ua(i, j, k)*ua_tl(i, j, k)+2*va(i, j, k)*va_tl(i&
1858 & , j, k))/(cp-rg*ptop/pm(k))
1859 pt(i, j, k) = pt(i, j, k) + 0.5*(ua(i, j, k)**2+va(i, j&
1860 & , k)**2)*(1.-u2f(i, j, k)**2)/(cp-rg*ptop/pm(k))
1866 pt_tl(i, j, k) = pt_tl(i, j, k) + 0.5*(1.-u2f(i, j, k)**&
1867 & 2)*rcv*(2*ua(i, j, k)*ua_tl(i, j, k)+2*va(i, j, k)*&
1868 & va_tl(i, j, k)+2*w(i, j, k)*w_tl(i, j, k))
1869 pt(i, j, k) = pt(i, j, k) + 0.5*(ua(i, j, k)**2+va(i, j&
1870 & , k)**2+w(i, j, k)**2)*(1.-u2f(i, j, k)**2)*rcv
1877 u_tl(i, j, k) = 0.5*(u2f(i, j-1, k)+u2f(i, j, k))*u_tl(i, j&
1879 u(i, j, k) = 0.5*(u2f(i, j-1, k)+u2f(i, j, k))*u(i, j, k)
1884 v_tl(i, j, k) = 0.5*(u2f(i-1, j, k)+u2f(i, j, k))*v_tl(i, j&
1886 v(i, j, k) = 0.5*(u2f(i-1, j, k)+u2f(i, j, k))*v(i, j, k)
1889 IF (.NOT.hydrostatic)
THEN 1892 w_tl(i, j, k) = u2f(i, j, k)*w_tl(i, j, k)
1893 w(i, j, k) = u2f(i, j, k)*w(i, j, k)
1900 SUBROUTINE rayleigh_super(dt, npx, npy, npz, ks, pm, phis, tau, u, v, &
1901 & w, pt, ua, va, delz, agrid, cp, rg, ptop, hydrostatic, conserve, &
1902 & rf_cutoff, rf, gridstruct, domain, bd)
1905 REAL,
INTENT(IN) :: dt
1907 REAL,
INTENT(IN) :: tau
1908 REAL,
INTENT(IN) :: cp, rg, ptop, rf_cutoff
1909 INTEGER,
INTENT(IN) :: npx, npy, npz, ks
1910 REAL,
DIMENSION(npz),
INTENT(IN) :: pm
1911 LOGICAL,
INTENT(IN) :: hydrostatic
1912 LOGICAL,
INTENT(IN) :: conserve
1913 TYPE(FV_GRID_BOUNDS_TYPE),
INTENT(IN) :: bd
1915 REAL,
INTENT(INOUT) :: u(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
1917 REAL,
INTENT(INOUT) :: v(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
1919 REAL,
INTENT(INOUT) :: w(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1921 REAL,
INTENT(INOUT) :: pt(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1923 REAL,
INTENT(INOUT) :: ua(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1925 REAL,
INTENT(INOUT) :: va(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1927 REAL,
INTENT(INOUT) :: delz(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1928 REAL,
INTENT(INOUT) :: rf(npz)
1929 REAL,
INTENT(IN) :: agrid(bd%isd:bd%ied, bd%jsd:bd%jed, 2)
1931 REAL,
INTENT(IN) :: phis(bd%isd:bd%ied, bd%jsd:bd%jed)
1932 TYPE(FV_GRID_TYPE),
INTENT(IN) :: gridstruct
1933 TYPE(DOMAIN2D),
INTENT(INOUT) :: domain
1935 REAL :: u2f(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
1937 REAL,
PARAMETER :: u0=60.
1938 REAL,
PARAMETER :: sday=86400.
1941 INTEGER :: is, ie, js, je
1942 INTEGER :: isd, ied, jsd, jed
1961 IF (is_master())
WRITE(6, *) &
1962 &
'Rayleigh friction E-folding time (days):' 1964 IF (pm(k) .LT. rf_cutoff)
THEN 1965 arg1 = 0.5*
pi*log(rf_cutoff/pm(k))/log(rf_cutoff/ptop)
1966 rf(k) = dt/tau0*sin(arg1)**2
1975 CALL c2l_ord2(u, v, ua, va, gridstruct, npz, gridstruct%grid_type, &
1976 & bd, gridstruct%nested)
1982 IF (pm(k) .LT. rf_cutoff)
THEN 1983 u2f(:, :, k) = 1./(1.+rf(k))
1994 IF (pm(k) .LT. rf_cutoff)
THEN 1997 IF (hydrostatic)
THEN 2000 pt(i, j, k) = pt(i, j, k) + 0.5*(ua(i, j, k)**2+va(i, j&
2001 & , k)**2)*(1.-u2f(i, j, k)**2)/(cp-rg*ptop/pm(k))
2007 pt(i, j, k) = pt(i, j, k) + 0.5*(ua(i, j, k)**2+va(i, j&
2008 & , k)**2+w(i, j, k)**2)*(1.-u2f(i, j, k)**2)*rcv
2015 u(i, j, k) = 0.5*(u2f(i, j-1, k)+u2f(i, j, k))*u(i, j, k)
2020 v(i, j, k) = 0.5*(u2f(i-1, j, k)+u2f(i, j, k))*v(i, j, k)
2023 IF (.NOT.hydrostatic)
THEN 2026 w(i, j, k) = u2f(i, j, k)*w(i, j, k)
2037 & u_tl, v, v_tl, w, w_tl, pt, pt_tl, ua, ua_tl, va, va_tl, delz, &
2038 & delz_tl, cp, rg, ptop, hydrostatic, conserve, rf_cutoff, rf, &
2039 & gridstruct, domain, bd)
2042 REAL,
INTENT(IN) :: dt
2044 REAL,
INTENT(IN) :: tau
2045 REAL,
INTENT(IN) :: cp, rg, ptop, rf_cutoff
2046 INTEGER,
INTENT(IN) :: npx, npy, npz, ks
2047 REAL,
DIMENSION(npz),
INTENT(IN) :: pm
2048 LOGICAL,
INTENT(IN) :: hydrostatic
2049 LOGICAL,
INTENT(IN) :: conserve
2050 TYPE(FV_GRID_BOUNDS_TYPE),
INTENT(IN) :: bd
2052 REAL,
INTENT(INOUT) :: u(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
2053 REAL,
INTENT(INOUT) :: u_tl(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
2055 REAL,
INTENT(INOUT) :: v(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
2056 REAL,
INTENT(INOUT) :: v_tl(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
2058 REAL,
INTENT(INOUT) :: w(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2059 REAL,
INTENT(INOUT) :: w_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2061 REAL,
INTENT(INOUT) :: pt(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2062 REAL,
INTENT(INOUT) :: pt_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2064 REAL,
INTENT(INOUT) :: ua(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2065 REAL,
INTENT(INOUT) :: ua_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2067 REAL,
INTENT(INOUT) :: va(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2068 REAL,
INTENT(INOUT) :: va_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2070 REAL,
INTENT(INOUT) :: delz(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2071 REAL,
INTENT(INOUT) :: delz_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2072 REAL,
INTENT(INOUT) :: rf(npz)
2073 TYPE(FV_GRID_TYPE),
INTENT(IN) :: gridstruct
2074 TYPE(DOMAIN2D),
INTENT(INOUT) :: domain
2076 REAL :: u2f(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2077 REAL :: u2f_tl(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2078 REAL,
PARAMETER :: sday=86400.
2080 REAL,
PARAMETER :: u000=4900.
2083 INTEGER :: is, ie, js, je
2084 INTEGER :: isd, ied, jsd, jed
2105 IF (is_master())
WRITE(6, *) &
2106 &
'Rayleigh friction E-folding time (days):' 2108 IF (pm(k) .LT. rf_cutoff)
THEN 2109 arg1 = 0.5*
pi*log(rf_cutoff/pm(k))/log(rf_cutoff/ptop)
2110 rf(k) = dt/(tau*sday)*sin(arg1)**2
2120 CALL c2l_ord2_tlm(u, u_tl, v, v_tl, ua, ua_tl, va, va_tl, gridstruct&
2121 & , npz, gridstruct%grid_type, bd, gridstruct%nested)
2125 IF (hydrostatic)
THEN 2128 u2f_tl(i, j, k) = 2*ua(i, j, k)*ua_tl(i, j, k) + 2*va(i, j, &
2130 u2f(i, j, k) = ua(i, j, k)**2 + va(i, j, k)**2
2136 u2f_tl(i, j, k) = 2*ua(i, j, k)*ua_tl(i, j, k) + 2*va(i, j, &
2137 & k)*va_tl(i, j, k) + 2*w(i, j, k)*w_tl(i, j, k)
2138 u2f(i, j, k) = ua(i, j, k)**2 + va(i, j, k)**2 + w(i, j, k)&
2151 IF (hydrostatic)
THEN 2154 arg10_tl = u2f_tl(i, j, k)/u000
2155 arg10 = u2f(i, j, k)/u000
2156 IF (arg10 .EQ. 0.0)
THEN 2159 result1_tl = arg10_tl/(2.0*sqrt(arg10))
2161 result1 = sqrt(arg10)
2162 pt_tl(i, j, k) = pt_tl(i, j, k) + 0.5*u2f_tl(i, j, k)*(1.-&
2163 & 1./(1.+rf(k)*result1)**2)/(cp-rg*ptop/pm(k)) + 0.5*u2f(i&
2164 & , j, k)*2*rf(k)*result1_tl/((cp-rg*ptop/pm(k))*(1.+rf(k)&
2166 pt(i, j, k) = pt(i, j, k) + 0.5*u2f(i, j, k)/(cp-rg*ptop/&
2167 & pm(k))*(1.-1./(1.+rf(k)*result1)**2)
2173 delz_tl(i, j, k) = (delz_tl(i, j, k)*pt(i, j, k)-delz(i, j&
2174 & , k)*pt_tl(i, j, k))/pt(i, j, k)**2
2175 delz(i, j, k) = delz(i, j, k)/pt(i, j, k)
2176 arg10_tl = u2f_tl(i, j, k)/u000
2177 arg10 = u2f(i, j, k)/u000
2178 IF (arg10 .EQ. 0.0)
THEN 2181 result1_tl = arg10_tl/(2.0*sqrt(arg10))
2183 result1 = sqrt(arg10)
2184 pt_tl(i, j, k) = pt_tl(i, j, k) + 0.5*rcv*(u2f_tl(i, j, k)&
2185 & *(1.-1./(1.+rf(k)*result1)**2)+u2f(i, j, k)*2*rf(k)*&
2186 & result1_tl/(1.+rf(k)*result1)**3)
2187 pt(i, j, k) = pt(i, j, k) + 0.5*u2f(i, j, k)*rcv*(1.-1./(&
2188 & 1.+rf(k)*result1)**2)
2189 delz_tl(i, j, k) = delz_tl(i, j, k)*pt(i, j, k) + delz(i, &
2190 & j, k)*pt_tl(i, j, k)
2191 delz(i, j, k) = delz(i, j, k)*pt(i, j, k)
2198 arg10_tl = u2f_tl(i, j, k)/u000
2199 arg10 = u2f(i, j, k)/u000
2200 IF (arg10 .EQ. 0.0)
THEN 2203 result1_tl = arg10_tl/(2.0*sqrt(arg10))
2205 result1 = sqrt(arg10)
2206 u2f_tl(i, j, k) = rf(k)*result1_tl
2207 u2f(i, j, k) = rf(k)*result1
2212 u_tl(i, j, k) = (u_tl(i, j, k)*(1.+0.5*(u2f(i, j-1, k)+u2f(i, &
2213 & j, k)))-u(i, j, k)*0.5*(u2f_tl(i, j-1, k)+u2f_tl(i, j, k)))/&
2214 & (1.+0.5*(u2f(i, j-1, k)+u2f(i, j, k)))**2
2215 u(i, j, k) = u(i, j, k)/(1.+0.5*(u2f(i, j-1, k)+u2f(i, j, k)))
2220 v_tl(i, j, k) = (v_tl(i, j, k)*(1.+0.5*(u2f(i-1, j, k)+u2f(i, &
2221 & j, k)))-v(i, j, k)*0.5*(u2f_tl(i-1, j, k)+u2f_tl(i, j, k)))/&
2222 & (1.+0.5*(u2f(i-1, j, k)+u2f(i, j, k)))**2
2223 v(i, j, k) = v(i, j, k)/(1.+0.5*(u2f(i-1, j, k)+u2f(i, j, k)))
2226 IF (.NOT.hydrostatic)
THEN 2229 w_tl(i, j, k) = (w_tl(i, j, k)*(1.+u2f(i, j, k))-w(i, j, k)*&
2230 & u2f_tl(i, j, k))/(1.+u2f(i, j, k))**2
2231 w(i, j, k) = w(i, j, k)/(1.+u2f(i, j, k))
2237 SUBROUTINE rayleigh_friction(dt, npx, npy, npz, ks, pm, tau, u, v, w, &
2238 & pt, ua, va, delz, cp, rg, ptop, hydrostatic, conserve, rf_cutoff, rf&
2239 & , gridstruct, domain, bd)
2242 REAL,
INTENT(IN) :: dt
2244 REAL,
INTENT(IN) :: tau
2245 REAL,
INTENT(IN) :: cp, rg, ptop, rf_cutoff
2246 INTEGER,
INTENT(IN) :: npx, npy, npz, ks
2247 REAL,
DIMENSION(npz),
INTENT(IN) :: pm
2248 LOGICAL,
INTENT(IN) :: hydrostatic
2249 LOGICAL,
INTENT(IN) :: conserve
2250 TYPE(FV_GRID_BOUNDS_TYPE),
INTENT(IN) :: bd
2252 REAL,
INTENT(INOUT) :: u(bd%isd:bd%ied, bd%jsd:bd%jed+1, npz)
2254 REAL,
INTENT(INOUT) :: v(bd%isd:bd%ied+1, bd%jsd:bd%jed, npz)
2256 REAL,
INTENT(INOUT) :: w(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2258 REAL,
INTENT(INOUT) :: pt(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2260 REAL,
INTENT(INOUT) :: ua(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2262 REAL,
INTENT(INOUT) :: va(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2264 REAL,
INTENT(INOUT) :: delz(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2265 REAL,
INTENT(INOUT) :: rf(npz)
2266 TYPE(FV_GRID_TYPE),
INTENT(IN) :: gridstruct
2267 TYPE(DOMAIN2D),
INTENT(INOUT) :: domain
2269 REAL :: u2f(bd%isd:bd%ied, bd%jsd:bd%jed, npz)
2270 REAL,
PARAMETER :: sday=86400.
2272 REAL,
PARAMETER :: u000=4900.
2275 INTEGER :: is, ie, js, je
2276 INTEGER :: isd, ied, jsd, jed
2295 IF (is_master())
WRITE(6, *) &
2296 &
'Rayleigh friction E-folding time (days):' 2298 IF (pm(k) .LT. rf_cutoff)
THEN 2299 arg1 = 0.5*
pi*log(rf_cutoff/pm(k))/log(rf_cutoff/ptop)
2300 rf(k) = dt/(tau*sday)*sin(arg1)**2
2310 CALL c2l_ord2(u, v, ua, va, gridstruct, npz, gridstruct%grid_type, &
2311 & bd, gridstruct%nested)
2314 IF (hydrostatic)
THEN 2317 u2f(i, j, k) = ua(i, j, k)**2 + va(i, j, k)**2
2323 u2f(i, j, k) = ua(i, j, k)**2 + va(i, j, k)**2 + w(i, j, k)&
2336 IF (hydrostatic)
THEN 2339 arg10 = u2f(i, j, k)/u000
2340 result1 = sqrt(arg10)
2341 pt(i, j, k) = pt(i, j, k) + 0.5*u2f(i, j, k)/(cp-rg*ptop/&
2342 & pm(k))*(1.-1./(1.+rf(k)*result1)**2)
2348 delz(i, j, k) = delz(i, j, k)/pt(i, j, k)
2349 arg10 = u2f(i, j, k)/u000
2350 result1 = sqrt(arg10)
2351 pt(i, j, k) = pt(i, j, k) + 0.5*u2f(i, j, k)*rcv*(1.-1./(&
2352 & 1.+rf(k)*result1)**2)
2353 delz(i, j, k) = delz(i, j, k)*pt(i, j, k)
2360 arg10 = u2f(i, j, k)/u000
2361 result1 = sqrt(arg10)
2362 u2f(i, j, k) = rf(k)*result1
2367 u(i, j, k) = u(i, j, k)/(1.+0.5*(u2f(i, j-1, k)+u2f(i, j, k)))
2372 v(i, j, k) = v(i, j, k)/(1.+0.5*(u2f(i-1, j, k)+u2f(i, j, k)))
2375 IF (.NOT.hydrostatic)
THEN 2378 w(i, j, k) = w(i, j, k)/(1.+u2f(i, j, k))
2388 & gridstruct, bd, ptop, ua, ua_tl, va, va_tl, u, u_tl, v, v_tl, delp, &
2389 & delp_tl, aam, aam_tl, ps, ps_tl, m_fac, m_fac_tl)
2392 INTEGER,
INTENT(IN) :: npz
2393 INTEGER,
INTENT(IN) :: is, ie, js, je
2394 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed
2395 REAL,
INTENT(IN) :: ptop
2397 REAL,
INTENT(INOUT) :: u(isd:ied, jsd:jed+1, npz)
2398 REAL,
INTENT(INOUT) :: u_tl(isd:ied, jsd:jed+1, npz)
2400 REAL,
INTENT(INOUT) :: v(isd:ied+1, jsd:jed, npz)
2401 REAL,
INTENT(INOUT) :: v_tl(isd:ied+1, jsd:jed, npz)
2402 REAL,
INTENT(INOUT) :: delp(isd:ied, jsd:jed, npz)
2403 REAL,
INTENT(INOUT) :: delp_tl(isd:ied, jsd:jed, npz)
2404 REAL,
DIMENSION(isd:ied, jsd:jed, npz),
INTENT(INOUT) :: ua, va
2405 REAL,
DIMENSION(isd:ied, jsd:jed, npz),
INTENT(INOUT) :: ua_tl, &
2407 REAL,
INTENT(OUT) :: aam(is:ie, js:je)
2408 REAL,
INTENT(OUT) :: aam_tl(is:ie, js:je)
2409 REAL,
INTENT(OUT) :: m_fac(is:ie, js:je)
2410 REAL,
INTENT(OUT) :: m_fac_tl(is:ie, js:je)
2411 REAL,
INTENT(OUT) :: ps(isd:ied, jsd:jed)
2412 REAL,
INTENT(OUT) :: ps_tl(isd:ied, jsd:jed)
2413 TYPE(FV_GRID_BOUNDS_TYPE),
INTENT(IN) :: bd
2414 TYPE(FV_GRID_TYPE),
INTENT(IN) :: gridstruct
2416 REAL,
DIMENSION(is:ie) :: r1, r2, dm
2417 REAL,
DIMENSION(is:ie) :: dm_tl
2420 CALL c2l_ord2_tlm(u, u_tl, v, v_tl, ua, ua_tl, va, va_tl, gridstruct&
2421 & , npz, gridstruct%grid_type, bd, gridstruct%nested)
2427 r1(i) =
radius*cos(gridstruct%agrid(i, j, 2))
2431 m_fac_tl(i, j) = 0.0
2438 dm_tl(i) = delp_tl(i, j, k)
2439 dm(i) = delp(i, j, k)
2440 ps_tl(i, j) = ps_tl(i, j) + dm_tl(i)
2441 ps(i, j) = ps(i, j) + dm(i)
2442 dm_tl(i) =
agrav*dm_tl(i)
2444 aam_tl(i, j) = aam_tl(i, j) + r1(i)*ua_tl(i, j, k)*dm(i) + (r2&
2445 & (i)*
omega+r1(i)*ua(i, j, k))*dm_tl(i)
2446 aam(i, j) = aam(i, j) + (r2(i)*
omega+r1(i)*ua(i, j, k))*dm(i)
2447 m_fac_tl(i, j) = m_fac_tl(i, j) + r2(i)*dm_tl(i)
2448 m_fac(i, j) = m_fac(i, j) + dm(i)*r2(i)
2453 SUBROUTINE compute_aam(npz, is, ie, js, je, isd, ied, jsd, jed, &
2454 & gridstruct, bd, ptop, ua, va, u, v, delp, aam, ps, m_fac)
2457 INTEGER,
INTENT(IN) :: npz
2458 INTEGER,
INTENT(IN) :: is, ie, js, je
2459 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed
2460 REAL,
INTENT(IN) :: ptop
2462 REAL,
INTENT(INOUT) :: u(isd:ied, jsd:jed+1, npz)
2464 REAL,
INTENT(INOUT) :: v(isd:ied+1, jsd:jed, npz)
2465 REAL,
INTENT(INOUT) :: delp(isd:ied, jsd:jed, npz)
2466 REAL,
DIMENSION(isd:ied, jsd:jed, npz),
INTENT(INOUT) :: ua, va
2467 REAL,
INTENT(OUT) :: aam(is:ie, js:je)
2468 REAL,
INTENT(OUT) :: m_fac(is:ie, js:je)
2469 REAL,
INTENT(OUT) :: ps(isd:ied, jsd:jed)
2470 TYPE(FV_GRID_BOUNDS_TYPE),
INTENT(IN) :: bd
2471 TYPE(FV_GRID_TYPE),
INTENT(IN) :: gridstruct
2473 REAL,
DIMENSION(is:ie) :: r1, r2, dm
2476 CALL c2l_ord2(u, v, ua, va, gridstruct, npz, gridstruct%grid_type, &
2477 & bd, gridstruct%nested)
2482 r1(i) =
radius*cos(gridstruct%agrid(i, j, 2))
2490 dm(i) = delp(i, j, k)
2491 ps(i, j) = ps(i, j) + dm(i)
2493 aam(i, j) = aam(i, j) + (r2(i)*
omega+r1(i)*ua(i, j, k))*dm(i)
2494 m_fac(i, j) = m_fac(i, j) + dm(i)*r2(i)
real, parameter, public radius
Radius of the Earth [m].
integer, parameter, public model_atmos
subroutine, public nested_grid_bc_apply_intt(var_nest, istag, jstag, npx, npy, npz, bd, step, split, bc, bctype)
real, parameter, public omega
Rotation rate of the Earth [1/s].
subroutine, public cubed_to_latlon(u, v, ua, va, gridstruct, npx, npy, km, mode, grid_type, domain, nested, c2l_ord, bd)
subroutine, public moist_cp(is, ie, isd, ied, jsd, jed, km, j, k, nwat, sphum, liq_wat, rainwat, ice_wat, snowwat, graupel, q, qd, cpm, t1)
real, dimension(:), allocatable rf
real(kind=8), parameter, public pi_8
Ratio of circle circumference to diameter [N/A].
subroutine, public tracer_2d_1l_tlm(q, q_tl, dp1, dp1_tl, mfx, mfx_tl, mfy, mfy_tl, cx, cx_tl, cy, cy_tl, gridstruct, bd, domain, npx, npy, npz, nq, hord, q_split, dt, id_divg, q_pack, nord_tr, trdm, hord_pert, nord_tr_pert, trdm_pert, split_damp_tr, dpa)
logical, save, public idealtest
real, parameter, public hlv
Latent heat of evaporation [J/kg].
subroutine compute_aam(npz, is, ie, js, je, isd, ied, jsd, jed, gridstruct, bd, ptop, ua, va, u, v, delp, aam, ps, m_fac)
subroutine, public dyn_core(npx, npy, npz, ng, sphum, nq, bdt, n_split, zvir, cp, akap, cappa, grav, hydrostatic, u, v, w, delz, pt, q, delp, pe, pk, phis, ws, omga, ptop, pfull, ua, va, uc, vc, mfx, mfy, cx, cy, pkz, peln, q_con, ak, bk, dpx, ks, gridstruct, flagstruct, flagstructp, neststruct, idiag, bd, domain, init_step, i_pack, end_step, gz, pkc, ptc, crx, xfx, cry, yfx, divgd, delpc, ut, vt, zh, pk3, du, dv, time_total)
subroutine, public c2l_ord2_tlm(u, u_tl, v, v_tl, ua, ua_tl, va, va_tl, gridstruct, km, grid_type, bd, do_halo)
subroutine, public tracer_2d_tlm(q, q_tl, dp1, dp1_tl, mfx, mfx_tl, mfy, mfy_tl, cx, cx_tl, cy, cy_tl, gridstruct, bd, domain, npx, npy, npz, nq, hord, q_split, dt, id_divg, q_pack, nord_tr, trdm, hord_pert, nord_tr_pert, trdm_pert, split_damp_tr, dpa)
subroutine, public c2l_ord2(u, v, ua, va, gridstruct, km, grid_type, bd, do_halo)
subroutine, public del2_cubed(q, cd, gridstruct, domain, npx, npy, km, nmax, bd)
real, parameter, public rdgas
Gas constant for dry air [J/kg/deg].
subroutine, public del2_cubed_tlm(q, q_tl, cd, gridstruct, domain, npx, npy, km, nmax, bd)
real, parameter, public cp_vapor
Specific heat capacity of water vapor at constant pressure [J/kg/deg].
subroutine rayleigh_friction_tlm(dt, npx, npy, npz, ks, pm, tau, u, u_tl, v, v_tl, w, w_tl, pt, pt_tl, ua, ua_tl, va, va_tl, delz, delz_tl, cp, rg, ptop, hydrostatic, conserve, rf_cutoff, rf, gridstruct, domain, bd)
subroutine, public tracer_2d_nested(q, dp1, mfx, mfy, cx, cy, gridstruct, bd, domain, npx, npy, npz, nq, hord, q_split, dt, id_divg, q_pack, nord_tr, trdm, k_split, neststruct, parent_grid, hord_pert, nord_tr_pert, trdm_pert, split_damp_tr)
subroutine, public complete_group_halo_update(group, group_tl, domain)
subroutine rayleigh_super_tlm(dt, npx, npy, npz, ks, pm, phis, tau, u, u_tl, v, v_tl, w, w_tl, pt, pt_tl, ua, ua_tl, va, va_tl, delz, agrid, cp, rg, ptop, hydrostatic, conserve, rf_cutoff, rf, gridstruct, domain, bd)
subroutine, public lagrangian_to_eulerian(last_step, consv, ps, pe, delp, pkz, pk, mdt, pdt, km, is, ie, js, je, isd, ied, jsd, jed, nq, nwat, sphum, q_con, u, v, w, delz, pt, q, hs, r_vir, cp, akap, cappa, kord_mt, kord_wz, kord_tr, kord_tm, peln, te0_2d, ng, ua, va, omga, te, ws, fill, reproduce_sum, out_dt, dtdt, ptop, ak, bk, pfull, flagstruct, gridstruct, domain, do_sat_adj, hydrostatic, hybrid_z, do_omega, adiabatic, do_adiabatic_init, mfx, mfy, remap_option, kord_mt_pert, kord_wz_pert, kord_tr_pert, kord_tm_pert)
real function, public g_sum(domain, p, ifirst, ilast, jfirst, jlast, ngc, area, mode, reproduce)
subroutine, public dyn_core_tlm(npx, npy, npz, ng, sphum, nq, bdt, n_split, zvir, cp, akap, cappa, grav, hydrostatic, u, u_tl, v, v_tl, w, w_tl, delz, delz_tl, pt, pt_tl, q, q_tl, delp, delp_tl, pe, pe_tl, pk, pk_tl, phis, ws, ws_tl, omga, omga_tl, ptop, pfull, ua, ua_tl, va, va_tl, uc, uc_tl, vc, vc_tl, mfx, mfx_tl, mfy, mfy_tl, cx, cx_tl, cy, cy_tl, pkz, pkz_tl, peln, peln_tl, q_con, ak, bk, dpx, dpx_tl, ks, gridstruct, flagstruct, flagstructp, neststruct, idiag, bd, domain, init_step, i_pack, end_step, gz, gz_tl, pkc, pkc_tl, ptc, ptc_tl, crx, crx_tl, xfx, xfx_tl, cry, cry_tl, yfx, yfx_tl, divgd, divgd_tl, delpc, delpc_tl, ut, ut_tl, vt, vt_tl, zh, zh_tl, pk3, pk3_tl, du, du_tl, dv, dv_tl, time_total)
real, parameter, public rvgas
Gas constant for water vapor [J/kg/deg].
subroutine, public lagrangian_to_eulerian_tlm(last_step, consv, ps, ps_tl, pe, pe_tl, delp, delp_tl, pkz, pkz_tl, pk, pk_tl, mdt, pdt, km, is, ie, js, je, isd, ied, jsd, jed, nq, nwat, sphum, q_con, u, u_tl, v, v_tl, w, w_tl, delz, delz_tl, pt, pt_tl, q, q_tl, hs, r_vir, cp, akap, cappa, kord_mt, kord_wz, kord_tr, kord_tm, peln, peln_tl, te0_2d, te0_2d_tl, ng, ua, ua_tl, va, omga, omga_tl, te, te_tl, ws, ws_tl, fill, reproduce_sum, out_dt, dtdt, ptop, ak, bk, pfull, flagstruct, gridstruct, domain, do_sat_adj, hydrostatic, hybrid_z, do_omega, adiabatic, do_adiabatic_init, mfx, mfy, remap_option, kord_mt_pert, kord_wz_pert, kord_tr_pert, kord_tm_pert)
subroutine, public setup_nested_grid_bcs_tlm(npx, npy, npz, zvir, ncnst, u, u_tl, v, v_tl, w, pt, delp, delz, q, uc, uc_tl, vc, vc_tl, pkz, nested, inline_q, make_nh, ng, gridstruct, flagstruct, neststruct, nest_timestep, tracer_nest_timestep, domain, bd, nwat)
subroutine timing_on(blk_name)
subroutine, public compute_total_energy(is, ie, js, je, isd, ied, jsd, jed, km, u, v, w, delz, pt, delp, q, qc, pe, peln, hs, rsin2_l, cosa_s_l, r_vir, cp, rg, hlv, te_2d, ua, va, teq, moist_phys, nwat, sphum, liq_wat, rainwat, ice_wat, snowwat, graupel, hydrostatic, id_te)
subroutine, public compute_total_energy_tlm(is, ie, js, je, isd, ied, jsd, jed, km, u, u_tl, v, v_tl, w, w_tl, delz, delz_tl, pt, pt_tl, delp, delp_tl, q, q_tl, qc, qc_tl, pe, pe_tl, peln, peln_tl, hs, rsin2_l, cosa_s_l, r_vir, cp, rg, hlv, te_2d, te_2d_tl, ua, va, teq, teq_tl, moist_phys, nwat, sphum, liq_wat, rainwat, ice_wat, snowwat, graupel, hydrostatic, id_te)
logical, public do_adiabatic_init
subroutine, public init_ijk_mem(i1, i2, j1, j2, km, array, var)
subroutine compute_aam_tlm(npz, is, ie, js, je, isd, ied, jsd, jed, gridstruct, bd, ptop, ua, ua_tl, va, va_tl, u, u_tl, v, v_tl, delp, delp_tl, aam, aam_tl, ps, ps_tl, m_fac, m_fac_tl)
subroutine rayleigh_super(dt, npx, npy, npz, ks, pm, phis, tau, u, v, w, pt, ua, va, delz, agrid, cp, rg, ptop, hydrostatic, conserve, rf_cutoff, rf, gridstruct, domain, bd)
subroutine, public tracer_2d(q, dp1, mfx, mfy, cx, cy, gridstruct, bd, domain, npx, npy, npz, nq, hord, q_split, dt, id_divg, q_pack, nord_tr, trdm, hord_pert, nord_tr_pert, trdm_pert, split_damp_tr, dpa)
real, parameter, public grav
Acceleration due to gravity [m/s^2].
subroutine, public moist_cv(is, ie, isd, ied, jsd, jed, km, j, k, nwat, sphum, liq_wat, rainwat, ice_wat, snowwat, graupel, q, qd, cvm, t1)
subroutine, public neg_adj3(is, ie, js, je, ng, kbot, hydrostatic, peln, delz, pt, dp, qv, ql, qr, qi, qs, qg, qa, check_negative)
subroutine, public fv_dynamics(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill, reproduce_sum, kappa, cp_air, zvir, ptop, ks, ncnst, n_split, q_split, u, v, w, delz, hydrostatic, pt, delp, q, ps, pe, pk, peln, pkz, phis, q_con, omga, ua, va, uc, vc, ak, bk, mfx, mfy, cx, cy, ze0, hybrid_z, gridstruct, flagstruct, flagstructp, neststruct, idiag, bd, parent_grid, domain, time_total)
subroutine, public nested_grid_bc_apply_intt_tlm(var_nest, var_nest_tl, istag, jstag, npx, npy, npz, bd, step, split, bc, bctype)
subroutine, public prt_mxm(qname, q, is, ie, js, je, n_g, km, fac, area, domain)
subroutine, public tracer_2d_1l(q, dp1, mfx, mfy, cx, cy, gridstruct, bd, domain, npx, npy, npz, nq, hord, q_split, dt, id_divg, q_pack, nord_tr, trdm, hord_pert, nord_tr_pert, trdm_pert, split_damp_tr, dpa)
subroutine, public fill2d(is, ie, js, je, ng, km, q, delp, area, domain, nested, npx, npy)
logical, public prt_minmax
subroutine, public range_check(qname, q, is, ie, js, je, n_g, km, pos, q_low, q_hi, bad_range)
type(time_type), public fv_time
subroutine, public setup_nested_grid_bcs(npx, npy, npz, zvir, ncnst, u, v, w, pt, delp, delz, q, uc, vc, pkz, nested, inline_q, make_nh, ng, gridstruct, flagstruct, neststruct, nest_timestep, tracer_nest_timestep, domain, bd, nwat)
real function, public g_sum_tlm(domain, p, p_tl, ifirst, ilast, jfirst, jlast, ngc, area, mode, reproduce, g_sum)
subroutine, public tracer_2d_nested_tlm(q, q_tl, dp1, dp1_tl, mfx, mfx_tl, mfy, mfy_tl, cx, cx_tl, cy, cy_tl, gridstruct, bd, domain, npx, npy, npz, nq, hord, q_split, dt, id_divg, q_pack, nord_tr, trdm, k_split, neststruct, parent_grid, hord_pert, nord_tr_pert, trdm_pert, split_damp_tr)
real(fp), parameter, public pi
subroutine rayleigh_friction(dt, npx, npy, npz, ks, pm, tau, u, v, w, pt, ua, va, delz, cp, rg, ptop, hydrostatic, conserve, rf_cutoff, rf, gridstruct, domain, bd)
subroutine timing_off(blk_name)
subroutine, public fv_dynamics_tlm(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill, reproduce_sum, kappa, cp_air, zvir, ptop, ks, ncnst, n_split, q_split, u, u_tl, v, v_tl, w, w_tl, delz, delz_tl, hydrostatic, pt, pt_tl, delp, delp_tl, q, q_tl, ps, ps_tl, pe, pe_tl, pk, pk_tl, peln, peln_tl, pkz, pkz_tl, phis, q_con, omga, omga_tl, ua, ua_tl, va, va_tl, uc, uc_tl, vc, vc_tl, ak, bk, mfx, mfx_tl, mfy, mfy_tl, cx, cx_tl, cy, cy_tl, ze0, hybrid_z, gridstruct, flagstruct, flagstructp, neststruct, idiag, bd, parent_grid, domain, time_total)