92 use constants_mod
, only: kappa, rdgas, rvgas, grav, cp_air, cp_vapor, pi=>pi_8, radius, tfreeze
93 use field_manager_mod
, only: model_atmos
94 use mpp_domains_mod
, only: mpp_update_domains, domain2d
95 use mpp_parameter_mod
, only: agrid_param=>agrid
96 use mpp_mod
, only: fatal, mpp_error
97 use mpp_mod
, only: mpp_error, note, warning, mpp_pe
98 use time_manager_mod
, only: time_type
99 use tracer_manager_mod
, only: get_tracer_index, adjust_mass, get_tracer_names
100 use fv_mp_mod, only: start_group_halo_update, complete_group_halo_update
101 use fv_mp_mod, only: group_halo_update_type
109 #if defined (ATMOS_NUDGE) 110 use atmos_nudge_mod
, only: get_atmos_nudge, do_ps
111 #elif defined (CLIMATE_NUDGE) 112 use fv_climate_nudge_mod
, only: fv_climate_nudge, do_ps
113 #elif defined (ADA_NUDGE) 114 use fv_ada_nudge_mod
, only: fv_ada_nudge
121 use sat_vapor_pres_mod
, only: tcmin, tcmax
133 subroutine fv_update_phys ( dt, is, ie, js, je, isd, ied, jsd, jed, ng, nq, &
134 u, v, w, delp, pt, q, qdiag, ua, va, ps, pe, peln, pk, pkz, &
135 ak, bk, phis, u_srf, v_srf, ts, delz, hydrostatic, &
136 u_dt, v_dt, t_dt, moist_phys, Time, nudge, &
137 gridstruct, lona, lata, npx, npy, npz, flagstruct, &
138 neststruct, bd, domain, ptop, phys_diag, q_dt)
139 real,
intent(in) :: dt, ptop
140 integer,
intent(in):: is, ie, js, je, ng
141 integer,
intent(in):: isd, ied, jsd, jed
142 integer,
intent(in):: nq
144 logical,
intent(in):: moist_phys
145 logical,
intent(in):: hydrostatic
146 logical,
intent(in):: nudge
148 type(time_type),
intent(in) :: time
150 real,
intent(in),
dimension(npz+1):: ak, bk
151 real,
intent(in) :: phis(isd:ied,jsd:jed)
152 real,
intent(inout):: delz(is:,js:,1:)
155 real,
intent(in),
dimension(isd:ied,jsd:jed),
optional :: &
159 real,
intent(inout),
dimension(isd:ied,jsd:jed,npz):: ua, va
160 real,
intent(inout),
dimension(isd: ,jsd: ,1: ):: w
163 real,
intent(inout),
dimension(isd:ied,jsd:jed,npz):: u_dt, v_dt
164 real,
intent(inout):: t_dt(is:ie,js:je,npz)
165 real,
intent(inout),
optional :: q_dt(is:ie,js:je,npz,nq)
169 real,
intent(out),
dimension(is:ie,js:je):: u_srf, v_srf, ts
173 type(domain2d),
intent(INOUT) :: domain
175 real,
intent(inout):: u(isd:ied ,jsd:jed+1,npz)
176 real,
intent(inout):: v(isd:ied+1,jsd:jed ,npz)
177 real,
intent(inout),
dimension(isd:ied,jsd:jed,npz):: pt, delp
178 real,
intent(inout):: q(isd:ied,jsd:jed,npz,nq)
179 real,
intent(inout):: qdiag(isd:ied,jsd:jed,npz,nq+1:flagstruct%ncnst)
186 real,
intent(inout):: ps (isd:ied ,jsd:jed)
187 real,
intent(inout):: pe (is-1:ie+1, npz+1,js-1:je+1)
188 real,
intent(inout):: pk (is:ie,js:je , npz+1)
189 real,
intent(inout):: peln(is:ie,npz+1,js:je)
190 real,
intent(inout):: pkz (is:ie,js:je,npz)
191 real,
parameter:: tice = 273.16
196 real :: q_dt_nudge(is:ie,js:je,npz,nq)
198 integer,
intent(IN) :: npx, npy, npz
203 real,
parameter:: q1_h2o = 2.2e-6
204 real,
parameter:: q7_h2o = 3.8e-6
205 real,
parameter:: q100_h2o = 3.8e-6
206 real,
parameter:: q1000_h2o = 3.1e-6
207 real,
parameter:: q2000_h2o = 2.8e-6
208 real,
parameter:: q3000_h2o = 3.0e-6
211 real ps_dt(is:ie,js:je)
212 real cvm(is:ie), qc(is:ie)
213 real phalf(npz+1), pfull(npz)
219 type(group_halo_update_type),
save :: i_pack(2)
220 integer i, j, k, m, n, nwat
221 integer sphum, liq_wat, ice_wat, cld_amt
222 integer rainwat, snowwat, graupel
224 real:: qstar, dbk, rdg, zvir, p_fac, cv_air, gama_dt, tbad
229 logical,
dimension(nq) :: conv_vmr_mmr
230 real :: adj_vmr(is:ie,js:je,npz)
231 character(len=32) :: tracer_units, tracer_name
233 cv_air = cp_air - rdgas
237 nwat = flagstruct%nwat
239 if ( moist_phys .or. nwat/=0 )
then 240 zvir = rvgas/rdgas - 1.
246 conv_vmr_mmr(1:nq) = .false.
247 if (flagstruct%adj_mass_vmr)
then 249 call get_tracer_names (model_atmos, m, name = tracer_name, &
250 units = tracer_units)
251 if ( trim(tracer_units) .eq.
'vmr' )
then 252 conv_vmr_mmr(m) = .true.
254 conv_vmr_mmr(m) = .false.
259 sphum = get_tracer_index(model_atmos,
'sphum')
260 liq_wat = get_tracer_index(model_atmos,
'liq_wat')
261 ice_wat = get_tracer_index(model_atmos,
'ice_wat')
262 rainwat = get_tracer_index(model_atmos,
'rainwat')
263 snowwat = get_tracer_index(model_atmos,
'snowwat')
264 graupel = get_tracer_index(model_atmos,
'graupel')
265 cld_amt = get_tracer_index(model_atmos,
'cld_amt')
267 if ( .not. hydrostatic )
then 268 w_diff = get_tracer_index(model_atmos,
'w_diff')
274 if ( .not. hydrostatic .and. .not. flagstruct%phys_hydrostatic .and. nwat == 0 )
then 275 gama_dt = dt*cp_air/cv_air
280 if ( flagstruct%fv_debug )
then 281 call prt_maxmin(
'delp_b_update', delp, is, ie, js, je, ng, npz, 0.01)
282 if (
present(q_dt))
then 284 call prt_maxmin(
'q_dt', q_dt(is,js,1,m), is, ie, js, je, 0, npz, 1.)
287 call prt_maxmin(
'u_dt', u_dt, is, ie, js, je, ng, npz, 1.)
288 call prt_maxmin(
'v_dt', v_dt, is, ie, js, je, ng, npz, 1.)
289 call prt_maxmin(
'T_dt', t_dt, is, ie, js, je, 0, npz, 1.)
295 nn = max(flagstruct%nwat,
num_gas)
298 if (
size(neststruct%child_grids) > 1)
then 299 call set_physics_bcs(ps, u_dt, v_dt, flagstruct, gridstruct, neststruct, npx, npy, npz, ng, ak, bk, bd)
302 if (
allocated(phys_diag%phys_t_dt)) phys_diag%phys_t_dt = pt(is:ie,js:je,:)
303 if (
present(q_dt))
then 304 if (
allocated(phys_diag%phys_qv_dt)) phys_diag%phys_qv_dt = q(is:ie,js:je,:,sphum)
305 if (
allocated(phys_diag%phys_ql_dt))
then 306 if (liq_wat < 0)
call mpp_error(fatal,
" phys_ql_dt needs at least one liquid water tracer defined")
307 phys_diag%phys_ql_dt = q(is:ie,js:je,:,liq_wat)
308 if (rainwat > 0) phys_diag%phys_ql_dt = q(is:ie,js:je,:,rainwat) + phys_diag%phys_ql_dt
310 if (
allocated(phys_diag%phys_qi_dt))
then 311 if (ice_wat < 0)
then 312 call mpp_error(warning,
" phys_qi_dt needs at least one ice water tracer defined")
313 phys_diag%phys_qi_dt = 0.
315 phys_diag%phys_qi_dt = q(is:ie,js:je,:,ice_wat)
316 if (snowwat > 0) phys_diag%phys_qi_dt = q(is:ie,js:je,:,snowwat) + phys_diag%phys_qi_dt
317 if (graupel > 0) phys_diag%phys_qi_dt = q(is:ie,js:je,:,graupel) + phys_diag%phys_qi_dt
333 if (
present(q_dt))
then 335 if (flagstruct%tau_h2o<0.0 .and. pfull(k) < 100.e2 )
then 338 p_fac = -flagstruct%tau_h2o*86400.
341 q_dt(i,j,k,sphum) = q_dt(i,j,k,sphum) + (3.e-6-q(i,j,k,sphum))/p_fac
344 elseif ( flagstruct%tau_h2o>0.0 .and. pfull(k) < 3000. )
then 347 if ( pfull(k) < 1. )
then 349 p_fac = 0.2 * flagstruct%tau_h2o*86400.
350 elseif ( pfull(k) < 7. .and. pfull(k) >= 1. )
then 351 qstar = q1_h2o + (q7_h2o-q1_h2o)*log(pfull(k)/1.)/log(7.)
352 p_fac = 0.3 * flagstruct%tau_h2o*86400.
353 elseif ( pfull(k) < 100. .and. pfull(k) >= 7. )
then 354 qstar = q7_h2o + (q100_h2o-q7_h2o)*log(pfull(k)/7.)/log(100./7.)
355 p_fac = 0.4 * flagstruct%tau_h2o*86400.
356 elseif ( pfull(k) < 1000. .and. pfull(k) >= 100. )
then 357 qstar = q100_h2o + (q1000_h2o-q100_h2o)*log(pfull(k)/1.e2)/log(10.)
358 p_fac = 0.5 * flagstruct%tau_h2o*86400.
359 elseif ( pfull(k) < 2000. .and. pfull(k) >= 1000. )
then 360 qstar = q1000_h2o + (q2000_h2o-q1000_h2o)*log(pfull(k)/1.e3)/log(2.)
361 p_fac = 0.75 * flagstruct%tau_h2o*86400.
364 p_fac = flagstruct%tau_h2o*86400.
369 q_dt(i,j,k,sphum) = q_dt(i,j,k,sphum) + (qstar-q(i,j,k,sphum))/p_fac
378 if( m /= w_diff )
then 381 q(i,j,k,m) = q(i,j,k,m) + dt*q_dt(i,j,k,m)
393 ps_dt(i,j) = 1. + dt*sum(q_dt(i,j,k,1:nm))
395 ps_dt(i,j) = 1. + dt*sum(q_dt(i,j,k,1:nwat))
397 delp(i,j,k) = delp(i,j,k) * ps_dt(i,j)
398 if (flagstruct%adj_mass_vmr)
then 401 (ps_dt(i,j) - sum(q(i,j,k,1:nn))) / &
402 (1.d0 - sum(q(i,j,k,1:nn)))
405 (ps_dt(i,j) - sum(q(i,j,k,1:flagstruct%nwat))) / &
406 (1.d0 - sum(q(i,j,k,1:flagstruct%nwat)))
416 do m=1,flagstruct%ncnst
418 if( m /= cld_amt .and. m /= w_diff .and. adjust_mass(model_atmos,m))
then 420 q(is:ie,js:je,k,m) = q(is:ie,js:je,k,m) / ps_dt(is:ie,js:je)
421 if (conv_vmr_mmr(m)) &
422 q(is:ie,js:je,k,m) = q(is:ie,js:je,k,m) * adj_vmr(is:ie,js:je,k)
424 qdiag(is:ie,js:je,k,m) = qdiag(is:ie,js:je,k,m) / ps_dt(is:ie,js:je)
432 if ( hydrostatic )
then 434 call moist_cp(is,ie,isd,ied,jsd,jed, npz, j, k, nwat, sphum, liq_wat, rainwat, &
435 ice_wat, snowwat, graupel, q, qc, cvm, pt(is:ie,j,k) )
437 pt(i,j,k) = pt(i,j,k) + t_dt(i,j,k)*dt*
con_cp/cvm(i)
441 if ( flagstruct%phys_hydrostatic )
then 444 call moist_cp(is,ie,isd,ied,jsd,jed, npz, j, k, nwat, sphum, liq_wat, rainwat, &
445 ice_wat, snowwat, graupel, q, qc, cvm, pt(is:ie,j,k) )
447 delz(i,j,k) = delz(i,j,k) / pt(i,j,k)
448 pt(i,j,k) = pt(i,j,k) + t_dt(i,j,k)*dt*
con_cp/cvm(i)
449 delz(i,j,k) = delz(i,j,k) * pt(i,j,k)
457 pt(i,j,k) = pt(i,j,k) + t_dt(i,j,k)*gama_dt
462 call moist_cv(is,ie,isd,ied,jsd,jed, npz, j, k, nwat, sphum, liq_wat, rainwat, &
463 ice_wat, snowwat, graupel, q, qc, cvm, pt(is:ie,j,k))
465 pt(i,j,k) = pt(i,j,k) + t_dt(i,j,k)*dt*
con_cp/cvm(i)
475 ua(i,j,k) = ua(i,j,k) + dt*u_dt(i,j,k)
476 va(i,j,k) = va(i,j,k) + dt*v_dt(i,j,k)
483 if (
allocated(phys_diag%phys_t_dt)) phys_diag%phys_t_dt = (pt(is:ie,js:je,:) - phys_diag%phys_t_dt) / dt
484 if (
present(q_dt))
then 485 if (
allocated(phys_diag%phys_qv_dt)) phys_diag%phys_qv_dt = (q(is:ie,js:je,:,sphum) - phys_diag%phys_qv_dt) / dt
486 if (
allocated(phys_diag%phys_ql_dt))
then 487 if (liq_wat < 0)
call mpp_error(fatal,
" phys_ql_dt needs at least one liquid water tracer defined")
488 phys_diag%phys_ql_dt = q(is:ie,js:je,:,liq_wat) - phys_diag%phys_qv_dt
489 if (rainwat > 0) phys_diag%phys_ql_dt = q(is:ie,js:je,:,rainwat) + phys_diag%phys_ql_dt
490 phys_diag%phys_ql_dt = phys_diag%phys_ql_dt / dt
492 if (
allocated(phys_diag%phys_qi_dt))
then 493 if (ice_wat < 0)
then 494 call mpp_error(warning,
" phys_qi_dt needs at least one ice water tracer defined")
495 phys_diag%phys_qi_dt = 0.
497 phys_diag%phys_qi_dt = q(is:ie,js:je,:,ice_wat) - phys_diag%phys_qi_dt
498 if (snowwat > 0) phys_diag%phys_qi_dt = q(is:ie,js:je,:,snowwat) + phys_diag%phys_qi_dt
499 if (graupel > 0) phys_diag%phys_qi_dt = q(is:ie,js:je,:,graupel) + phys_diag%phys_qi_dt
500 phys_diag%phys_qi_dt = phys_diag%phys_qi_dt / dt
504 if ( flagstruct%range_warn )
then 505 call range_check(
'PT UPDATE', pt, is, ie, js, je, ng, npz, gridstruct%agrid, &
506 tcmin+tfreeze, tcmax+tfreeze, bad_range, time)
511 if (pt(i,j,k) < tcmin+tfreeze .or. pt(i,j,k) > tcmax+tfreeze)
then 512 write(*,*)
'PT UPDATE: ', t_dt(i,j,k)*dt, i,j,k, gridstruct%agrid(i,j,:)
526 #if defined (ATMOS_NUDGE) 530 call get_atmos_nudge ( time, dt, is, ie, js, je, &
531 npz, ng, ps(is:ie,js:je), ua(is:ie, js:je,:), &
532 va(is:ie,js:je,:), pt(is:ie,js:je,:), &
533 q(is:ie,js:je,:,:), ps_dt(is:ie,js:je), u_dt(is:ie,js:je,:), &
534 v_dt(is:ie,js:je,:), t_dt(is:ie,js:je,:), &
535 q_dt_nudge(is:ie,js:je,:,:) )
543 dbk = dt * (bk(k+1) - bk(k))
546 delp(i,j,k) = delp(i,j,k) + dbk*ps_dt(i,j)
551 #elif defined (CLIMATE_NUDGE) 555 call fv_climate_nudge ( time, dt, is, ie, js, je, npz, pfull, &
556 lona(is:ie,js:je), lata(is:ie,js:je), phis(is:ie,js:je), &
558 ps(is:ie,js:je), ua(is:ie,js:je,:), va(is:ie,js:je,:), &
559 pt(is:ie,js:je,:), q(is:ie,js:je,:,sphum:sphum), &
560 ps_dt(is:ie,js:je), u_dt(is:ie,js:je,:), &
561 v_dt(is:ie,js:je,:), t_dt(is:ie,js:je,:), &
562 q_dt_nudge(is:ie,js:je,:,sphum:sphum) )
570 dbk = dt * (bk(k+1) - bk(k))
573 delp(i,j,k) = delp(i,j,k) + dbk*ps_dt(i,j)
578 #elif defined (ADA_NUDGE) 584 pe(i,k,j) = pe(i,k-1,j) + delp(i,j,k-1)
588 ps(i,j) = pe(i,npz+1,j)
591 call fv_ada_nudge ( time, dt, npx, npy, npz, ps_dt, u_dt, v_dt, t_dt, q_dt_nudge, &
592 zvir, ptop, ak, bk, ts, ps, delp, ua, va, pt, &
593 nwat, q, phis, gridstruct, bd, domain )
600 pe(i,k,j) = pe(i,k-1,j) + delp(i,j,k-1)
604 ps(i,j) = pe(i,npz+1,j)
607 call fv_nwp_nudge ( time, dt, npx, npy, npz, ps_dt, u_dt, v_dt, t_dt, q_dt_nudge, &
608 zvir, ptop, ak, bk, ts, ps, delp, ua, va, pt, &
609 nwat, q, phis, gridstruct, bd, domain )
614 if ( .not.flagstruct%dwind_2d )
then 617 if ( gridstruct%square_domain )
then 618 call start_group_halo_update(i_pack(1), u_dt, domain, whalo=1, ehalo=1, shalo=1, nhalo=1, complete=.false.)
619 call start_group_halo_update(i_pack(1), v_dt, domain, whalo=1, ehalo=1, shalo=1, nhalo=1, complete=.true.)
621 call start_group_halo_update(i_pack(1), u_dt, domain, complete=.false.)
622 call start_group_halo_update(i_pack(1), v_dt, domain, complete=.true.)
630 if ( flagstruct%fv_debug )
then 631 call prt_maxmin(
'PS_b_update', ps, is, ie, js, je, ng, 1, 0.01)
632 call prt_maxmin(
'delp_a_update', delp, is, ie, js, je, ng, npz, 0.01)
643 pe(i,k,j) = pe(i,k-1,j) + delp(i,j,k-1)
644 peln(i,k,j) = log( pe(i,k,j) )
645 pk(i,j,k) = exp( kappa*peln(i,k,j) )
650 ps(i,j) = pe(i,npz+1,j)
651 u_srf(i,j) = ua(i,j,npz)
652 v_srf(i,j) = va(i,j,npz)
655 if ( hydrostatic )
then 658 pkz(i,j,k) = (pk(i,j,k+1)-pk(i,j,k))/(kappa*(peln(i,k+1,j)-peln(i,k,j)))
660 pkz(i,j,k) = exp(
virqd(q(i,j,k,:))/
vicpqd(q(i,j,k,:)) * log( pkz(i,j,k) ) )
668 if ( flagstruct%dwind_2d )
then 669 call update2d_dwinds_phys(is, ie, js, je, isd, ied, jsd, jed, dt, u_dt, v_dt, u, v, gridstruct, &
677 call complete_group_halo_update(i_pack(1), domain)
687 if (gridstruct%regional)
then 691 u_dt(is-1,j,k) = u_dt(is,j,k)
692 v_dt(is-1,j,k) = v_dt(is,j,k)
699 u_dt(ie+1,j,k) = u_dt(ie,j,k)
700 v_dt(ie+1,j,k) = v_dt(ie,j,k)
707 u_dt(i,js-1,k) = u_dt(i,js,k)
708 v_dt(i,js-1,k) = v_dt(i,js,k)
715 u_dt(i,je+1,k) = u_dt(i,je,k)
716 v_dt(i,je+1,k) = v_dt(i,je,k)
724 if (is == 1 .and. js == 1)
then 725 u_dt(is-1,js-1,k) = u_dt(is,js,k)
726 v_dt(is-1,js-1,k) = v_dt(is,js,k)
727 elseif (is == 1 .and. je == npy)
then 728 u_dt(is-1,je+1,k) = u_dt(is,je,k)
729 v_dt(is-1,je+1,k) = v_dt(is,je,k)
730 elseif (ie == npx .and. js == 1)
then 731 u_dt(ie+1,js-1,k) = u_dt(ie,je,k)
732 v_dt(ie+1,js-1,k) = v_dt(ie,je,k)
733 elseif (ie == npx .and. je == npy)
then 734 u_dt(ie+1,je+1,k) = u_dt(ie,je,k)
735 v_dt(ie+1,je+1,k) = v_dt(ie,je,k)
740 call update_dwinds_phys(is, ie, js, je, isd, ied, jsd, jed, dt, u_dt, v_dt, u, v, gridstruct, npx, npy, npz, domain)
745 npx, npy, npz, 1, gridstruct%grid_type, domain, gridstruct%bounded_domain, flagstruct%c2l_ord, bd)
748 if ( flagstruct%fv_debug )
then 749 call prt_maxmin(
'PS_a_update', ps, is, ie, js, je, ng, 1, 0.01)
752 if (
allocated(phys_diag%phys_u_dt))
then 756 phys_diag%phys_u_dt(i,j,k) = u_dt(i,j,k)
761 if (
allocated(phys_diag%phys_v_dt))
then 765 phys_diag%phys_v_dt(i,j,k) = v_dt(i,j,k)
774 subroutine del2_phys(qdt, delp, gridstruct, cd, npx, npy, km, is, ie, js, je, &
775 isd, ied, jsd, jed, ngc, domain)
777 integer,
intent(in):: npx, npy, km
778 integer,
intent(in):: is, ie, js, je, isd, ied, jsd, jed, ngc
779 real,
intent(in):: cd
780 real,
intent(in ):: delp(isd:ied,jsd:jed,km)
781 real,
intent(inout):: qdt(is-ngc:ie+ngc,js-ngc:je+ngc,km)
783 type(domain2d),
intent(INOUT) :: domain
785 real,
pointer,
dimension(:,:) :: rarea, dx, dy, sina_u, sina_v, rdxc, rdyc
786 real,
pointer,
dimension(:,:,:) :: sin_sg
788 real :: q(isd:ied,jsd:jed,km)
789 real :: fx(is:ie+1,js:je), fy(is:ie,js:je+1)
790 real :: mask(is:ie+1,js:je+1)
791 real :: f1(is:ie+1), f2(js:je+1)
795 rarea => gridstruct%rarea
798 sina_u => gridstruct%sina_u
799 sina_v => gridstruct%sina_v
800 rdxc => gridstruct%rdxc
801 rdyc => gridstruct%rdyc
802 sin_sg => gridstruct%sin_sg
805 damp = 0.25 * cd * gridstruct%da_min
811 f1(i) = (1. - sin(
real(i-1)/
real(npx-1)*pi))**2
816 f2(j) = (1. - sin(
real(j-1)/
real(npy-1)*pi))**2
818 mask(i,j) = damp * (f1(i) + f2(j))
828 q(i,j,k) = qdt(i,j,k)*delp(i,j,k)
833 call mpp_update_domains(q, domain, complete=.true.)
843 (mask(i,j)+mask(i,j+1))*dy(i,j)*sina_u(i,j)* &
844 (q(i-1,j,k)-q(i,j,k))*rdxc(i,j)
846 if (is == 1 .and. .not. gridstruct%bounded_domain) fx(i,j) = &
847 (mask(is,j)+mask(is,j+1))*dy(is,j)*(q(is-1,j,k)-q(is,j,k))*rdxc(is,j)* &
848 0.5*(sin_sg(1,j,1) + sin_sg(0,j,3))
849 if (ie+1==npx .and. .not. gridstruct%bounded_domain) fx(i,j) = &
850 (mask(ie+1,j)+mask(ie+1,j+1))*dy(ie+1,j)*(q(ie,j,k)-q(ie+1,j,k))*rdxc(ie+1,j)* &
851 0.5*(sin_sg(npx,j,1) + sin_sg(npx-1,j,3))
854 if ((j == 1 .OR. j == npy) .and. .not. gridstruct%bounded_domain)
then 856 fy(i,j) = (mask(i,j)+mask(i+1,j))*dx(i,j)*&
857 (q(i,j-1,k)-q(i,j,k))*rdyc(i,j) &
858 *0.5*(sin_sg(i,j,2) + sin_sg(i,j-1,4) )
862 fy(i,j) = (mask(i,j)+mask(i+1,j))*dx(i,j)*sina_v(i,j)*&
863 (q(i,j-1,k)-q(i,j,k))*rdyc(i,j)
869 qdt(i,j,k) = qdt(i,j,k) + rarea(i,j)*(fx(i,j)-fx(i+1,j)+fy(i,j)-fy(i,j+1))/delp(i,j,k)
pure real function, public vicpqd(q)
The module 'fv_mp_mod' is a single program multiple data (SPMD) parallel decompostion/communication m...
subroutine timing_off(blk_name)
The subroutine 'timing_off' stops a timer.
The type 'fv_grid_type' is made up of grid-dependent information from fv_grid_tools and fv_grid_utils...
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)
The subroutine 'moist_cv' computes the FV3-consistent moist heat capacity under constant volume...
The module 'multi_gases' peforms multi constitutents computations.
subroutine, public get_eta_level(npz, p_s, pf, ph, ak, bk, pscale)
The subroutine 'get_eta_level' returns the interface and layer-mean pressures for reference...
The module 'fv_update_phys' applies physics tendencies consistent with the FV3 discretization and def...
integer, parameter, public r_grid
pure real function, public virqd(q)
The module fv_nwp_nudge contains routines for nudging to input analyses. note This module is currentl...
The module 'fv_timing' contains FV3 timers.
pure real function, public virq(q)
The module 'boundary' contains utility routines for grid nesting and boundary conditions.
subroutine, public fv_nwp_nudge(Time, dt, npx, npy, npz, ps_dt, u_dt, v_dt, t_dt, q_dt, zvir, ptop, ak, bk, ts, ps, delp, ua, va, pt, nwat, q, phis, gridstruct, bd, domain)
Ths subroutine 'fv_nwp_nudge' computes and returns time tendencies for nudging to analysis...
The module 'fv_mapz' contains the vertical mapping routines .
subroutine, public cubed_to_latlon(u, v, ua, va, gridstruct, npx, npy, km, mode, grid_type, domain, bounded_domain, c2l_ord, bd)
The module 'fv_arrays' contains the 'fv_atmos_type' and associated datatypes.
interface 'nested_grid_BC' includes subroutines 'nested_grid_BC_2d' and 'nested_grid_BC_3d' that fetc...
subroutine, public del2_phys(qdt, delp, gridstruct, cd, npx, npy, km, is, ie, js, je, isd, ied, jsd, jed, ngc, domain)
The subroutine 'del2_phys' is for filtering the physics tendency.
The module 'fv_eta' contains routine to set up the reference (Eulerian) pressure coordinate.
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)
The subroutine 'moist_cp' computes the FV3-consistent moist heat capacity under constant pressure...
subroutine, public update_dwinds_phys(is, ie, js, je, isd, ied, jsd, jed, dt, u_dt, v_dt, u, v, gridstruct, npx, npy, npz, domain)
The subroutine 'update_dwinds_phys' transforms the wind tendencies from the A grid to the D grid for ...
subroutine, public set_physics_bcs(ps, u_dt, v_dt, flagstruct, gridstruct, neststruct, npx, npy, npz, ng, ak, bk, bd)
subroutine timing_on(blk_name)
The subroutine 'timing_on' starts a timer.
@ The module 'fv_diagnostics' contains routines to compute diagnosic fields.
The module 'fv_grid_utils' contains routines for setting up and computing grid-related quantities...
subroutine, public prt_maxmin(qname, q, is, ie, js, je, n_g, km, fac)
subroutine, public fv_update_phys(dt, is, ie, js, je, isd, ied, jsd, jed, ng, nq, u, v, w, delp, pt, q, qdiag, ua, va, ps, pe, peln, pk, pkz, ak, bk, phis, u_srf, v_srf, ts, delz, hydrostatic, u_dt, v_dt, t_dt, moist_phys, Time, nudge, gridstruct, lona, lata, npx, npy, npz, flagstruct, neststruct, bd, domain, ptop, phys_diag, q_dt)
pure real function, public vicvqd(q)
subroutine, public extrapolation_bc(q, istag, jstag, npx, npy, bd, pd_in, debug_in)
The subroutine 'extrapolation_BC' performs linear extrapolation into the halo region.
subroutine, public update2d_dwinds_phys(is, ie, js, je, isd, ied, jsd, jed, dt, u_dt, v_dt, u, v, gridstruct, npx, npy, npz, domain)
The subroutine 'update2d_dwinds_phys' transforms the wind tendencies.
The module 'fv_nesting' is a collection of routines pertaining to grid nesting .