67 log_info(
"ATMOS_PHY_TB_driver_tracer_setup",*)
'Setup' 81 log_error(
"ATMOS_PHY_TB_driver_tracer_setup",*)
'ATMOS_PHY_TB_TYPE is invalid: ',
atmos_phy_tb_type 119 log_info(
"ATMOS_PHY_TB_driver_setup",*)
'Setup' 125 momz_t_tb(
ks-1,i,j) = 0.0_rp
126 momz_t_tb(
ke ,i,j) = 0.0_rp
132 case(
'SMAGORINSKY' )
191 atmos_vars_get_diagnostic, &
219 logical,
intent(in) :: update_flag
222 real(RP) :: QFLX_MOMZ(
ka,
ia,
ja,3)
223 real(RP) :: QFLX_MOMX(
ka,
ia,
ja,3)
224 real(RP) :: QFLX_MOMY(
ka,
ia,
ja,3)
225 real(RP) :: QFLX_RHOT(
ka,
ia,
ja,3)
226 real(RP) :: QFLX_RHOQ(
ka,
ia,
ja,3,
qa)
234 real(RP) :: tend(
ka,
ia,
ja)
239 integer :: k, i, j, iq
242 if ( update_flag )
then 244 call atmos_vars_get_diagnostic(
"N2", n2 )
247 case(
'SMAGORINSKY' )
249 qflx_rhot, qflx_rhoq, &
250 momz_t_tb, momx_t_tb, momy_t_tb, &
251 rhot_t_tb, rhoq_t_tb, &
254 fz, fdz, rcdz, rfdz, cdx, fdx, cdy, fdy, &
255 gsqrt, j13g, j23g, j33g, mapf, &
258 momz_t_tb(:,:,:) = 0.0_rp
259 momx_t_tb(:,:,:) = 0.0_rp
260 momy_t_tb(:,:,:) = 0.0_rp
261 rhot_t_tb(:,:,:) = 0.0_rp
263 qflx_rhot, qflx_rhoq, &
267 sflx_mw, sflx_mu, sflx_mv, &
269 gsqrt, j13g, j23g, j33g, mapf, &
272 momz_t_tb(:,:,:) = 0.0_rp
273 momx_t_tb(:,:,:) = 0.0_rp
274 momy_t_tb(:,:,:) = 0.0_rp
275 rhot_t_tb(:,:,:) = 0.0_rp
277 qflx_rhot, qflx_rhoq, &
281 sflx_mw, sflx_mu, sflx_mv, &
283 gsqrt, j13g, j23g, j33g, mapf, &
293 call calc_tend_momz( tend(:,:,:), &
295 gsqrt, j13g, j23g, j33g, mapf, &
301 momz_t_tb(k,i,j) = momz_t_tb(k,i,j) + tend(k,i,j)
306 call calc_tend_momx( tend(:,:,:), &
308 gsqrt, j13g, j23g, j33g, mapf, &
314 momx_t_tb(k,i,j) = momx_t_tb(k,i,j) + tend(k,i,j)
319 call calc_tend_momy( tend(:,:,:), &
321 gsqrt, j13g, j23g, j33g, mapf, &
327 momy_t_tb(k,i,j) = momy_t_tb(k,i,j) + tend(k,i,j)
332 call calc_tend_phi ( tend(:,:,:), &
334 gsqrt, j13g, j23g, j33g, mapf, &
340 rhot_t_tb(k,i,j) = rhot_t_tb(k,i,j) + tend(k,i,j)
348 call calc_tend_phi( tend(:,:,:), &
349 qflx_rhoq(:,:,:,:,iq), &
350 gsqrt, j13g, j23g, j33g, mapf, &
357 rhoq_t_tb(k,i,j,iq) = rhoq_t_tb(k,i,j,iq) + tend(k,i,j)
368 call file_history_in( nu(:,:,:),
'NU',
'eddy viscosity',
'm2/s' , fill_halo=.true. )
369 call file_history_in( ri(:,:,:),
'Ri',
'Richardson number',
'NIL' , fill_halo=.true. )
370 call file_history_in( pr(:,:,:),
'Pr',
'Prantle number',
'NIL' , fill_halo=.true. )
372 call file_history_in( momz_t_tb(:,:,:),
'MOMZ_t_TB',
'MOMZ tendency (TB)',
'kg/m2/s2', fill_halo=.true. )
373 call file_history_in( momx_t_tb(:,:,:),
'MOMX_t_TB',
'MOMX tendency (TB)',
'kg/m2/s2', fill_halo=.true. )
374 call file_history_in( momy_t_tb(:,:,:),
'MOMY_t_TB',
'MOMY tendency (TB)',
'kg/m2/s2', fill_halo=.true. )
375 call file_history_in( rhot_t_tb(:,:,:),
'RHOT_t_TB',
'RHOT tendency (TB)',
'K.kg/m3/s', fill_halo=.true. )
378 call file_history_in( rhoq_t_tb(:,:,:,iq), trim(
tracer_name(iq))//
'_t_TB', &
379 'tendency rho*'//trim(
tracer_name(iq))//
' in TB',
'kg/m3/s', fill_halo=.true. )
382 call file_history_in( qflx_momz(:,:,:,
zdir),
'SGS_ZFLX_MOMZ',
'SGS Z FLUX of MOMZ',
'kg/m/s2', &
384 call file_history_in( qflx_momz(:,:,:,
xdir),
'SGS_XFLX_MOMZ',
'SGS X FLUX of MOMZ',
'kg/m/s2', &
385 dim_type=
'ZHXHY', fill_halo=.true.)
386 call file_history_in( qflx_momz(:,:,:,
ydir),
'SGS_YFLX_MOMZ',
'SGS Y FLUX of MOMZ',
'kg/m/s2', &
387 dim_type=
'ZHXYH', fill_halo=.true.)
389 call file_history_in( qflx_momx(:,:,:,
zdir),
'SGS_ZFLX_MOMX',
'SGS Z FLUX of MOMX',
'kg/m/s2', &
390 dim_type=
'ZHXHY', fill_halo=.true.)
391 call file_history_in( qflx_momx(:,:,:,
xdir),
'SGS_XFLX_MOMX',
'SGS X FLUX of MOMX',
'kg/m/s2', &
393 call file_history_in( qflx_momx(:,:,:,
ydir),
'SGS_YFLX_MOMX',
'SGS Y FLUX of MOMX',
'kg/m/s2', &
394 dim_type=
'ZXHYH', fill_halo=.true.)
396 call file_history_in( qflx_momy(:,:,:,
zdir),
'SGS_ZFLX_MOMY',
'SGS Z FLUX of MOMY',
'kg/m/s2', &
397 dim_type=
'ZHXYH', fill_halo=.true.)
398 call file_history_in( qflx_momy(:,:,:,
xdir),
'SGS_XFLX_MOMY',
'SGS X FLUX of MOMY',
'kg/m/s2', &
399 dim_type=
'ZXHYH', fill_halo=.true.)
400 call file_history_in( qflx_momy(:,:,:,
ydir),
'SGS_YFLX_MOMY',
'SGS Y FLUX of MOMY',
'kg/m/s2', &
403 call file_history_in( qflx_rhot(:,:,:,
zdir),
'SGS_ZFLX_RHOT',
'SGS Z FLUX of RHOT',
'K*kg/m2/s', &
404 dim_type=
'ZHXY', fill_halo=.true.)
405 call file_history_in( qflx_rhot(:,:,:,
xdir),
'SGS_XFLX_RHOT',
'SGS X FLUX of RHOT',
'K*kg/m2/s', &
406 dim_type=
'ZXHY', fill_halo=.true.)
407 call file_history_in( qflx_rhot(:,:,:,
ydir),
'SGS_YFLX_RHOT',
'SGS Y FLUX of RHOT',
'K*kg/m2/s', &
408 dim_type=
'ZXYH', fill_halo=.true.)
414 call file_history_in( qflx_rhoq(:,:,:,
zdir,iq), &
416 dim_type=
'ZHXY', fill_halo=.true.)
417 call file_history_in( qflx_rhoq(:,:,:,
xdir,iq), &
419 dim_type=
'ZXHY', fill_halo=.true.)
420 call file_history_in( qflx_rhoq(:,:,:,
ydir,iq), &
422 dim_type=
'ZXYH', fill_halo=.true.)
427 momz_t_tb(:,:,:),
'MOMZ_t_TB', &
431 momx_t_tb(:,:,:),
'MOMX_t_TB', &
435 momy_t_tb(:,:,:),
'MOMY_t_TB', &
439 rhot_t_tb(:,:,:),
'RHOT_t_TB', &
457 rhoq_t_tb(:,:,:,iq), trim(
tracer_name(iq))//
'_t_TB', &
470 momz_t(k,i,j) = momz_t(k,i,j) + momz_t_tb(k,i,j)
471 momx_t(k,i,j) = momx_t(k,i,j) + momx_t_tb(k,i,j)
472 momy_t(k,i,j) = momy_t(k,i,j) + momy_t_tb(k,i,j)
473 rhot_t(k,i,j) = rhot_t(k,i,j) + rhot_t_tb(k,i,j)
486 rhoq_t(k,i,j,iq) = rhoq_t(k,i,j,iq) + rhoq_t_tb(k,i,j,iq)
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdy
y-length of control volume [m]
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_gsqrt
transformation metrics from Z to Xi, {G}^1/2
real(rp), dimension(:,:,:), allocatable, target, public momz
subroutine, public atmos_phy_tb_calc_tend_momz(MOMZ_t_TB, QFLX_MOMZ, GSQRT, J13G, J23G, J33G, MAPF, IIS, IIE, JJS, JJE)
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_momx_t
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdx
x-length of control volume [m]
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_rhot_t
subroutine, public atmos_phy_tb_d1980(qflx_sgs_momz, qflx_sgs_momx, qflx_sgs_momy, qflx_sgs_rhot, qflx_sgs_rhoq, RHOQ_t, Km, Ri, Pr, MOMZ, MOMX, MOMY, RHOT, DENS, QTRC, N2, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_Q, GSQRT, J13G, J23G, J33G, MAPF, dt)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mw
subroutine, public atmos_phy_tb_smg_setup(FZ, CZ, CDX, CDY, MAPF)
Setup.
real(rp), dimension(:,:,:), allocatable, target, public rhot
real(rp), dimension(:,:,:), allocatable, public momy_tp
module ATMOSPHERE / Physics Turbulence
subroutine, public atmos_phy_tb_dns(qflx_sgs_MOMZ, qflx_sgs_MOMX, qflx_sgs_MOMY, qflx_sgs_rhot, qflx_sgs_rhoq, RHOQ_t, nu, Ri, Pr, MOMZ, MOMX, MOMY, RHOT, DENS, QTRC, N2, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_Q, GSQRT, J13G, J23G, J33G, MAPF, dt)
subroutine, public atmos_phy_tb_calc_tend_momy(MOMY_t_TB, QFLX_MOMY, GSQRT, J13G, J23G, J33G, MAPF, IIS, IIE, JJS, JJE)
integer, public ia
of whole cells: x, local, with HALO
module Atmosphere Grid CartesianC metirc
subroutine, public atmos_phy_tb_d1980_config(TYPE_TB, I_TKE_out)
Config.
module ATMOSPHERIC Variables
real(rp), dimension(:,:,:,:), pointer, public qtrc_av
real(rp), dimension(:,:,:), allocatable, target, public momx
integer, public iblock
block size for cache blocking: x
real(rp), public atmos_grid_cartesc_real_totvolzxv
total volume (zxv, local) [m3]
real(rp), dimension(:,:,:), allocatable, public rhot_tp
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
logical, dimension(qa_max), public tracer_advc
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
integer, public ja
of whole cells: y, local, with HALO
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzxv
control volume (zxv) [m3]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdz
z-length of grid(i+1) to grid(i) [m]
real(rp), dimension(:,:,:), allocatable, target, public dens
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mv
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdy
y-length of grid(j+1) to grid(j) [m]
character(len=h_short), dimension(qa_max), public tracer_name
logical, public statistics_checktotal
calc&report variable totals to logfile?
real(rp), public atmos_grid_cartesc_real_totvolzuy
total volume (zuy, local) [m3]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_rfdz
reciprocal of face-dz
integer, public is
start point of inner domain: x, local
subroutine, public atmos_phy_tb_calc_tend_phi(phi_t_TB, QFLX_phi, GSQRT, J13G, J23G, J33G, MAPF, IIS, IIE, JJS, JJE)
module ATMOSPHERIC Surface Variables
integer, public ie
end point of inner domain: x, local
real(rp), dimension(:,:,:), pointer, public momx_av
logical, public atmos_sw_phy_tb
module ATMOSPHERE / Physics Turbulence
subroutine, public atmos_phy_tb_dns_setup(CDZ, CDX, CDY, CZ)
real(rp), public atmos_grid_cartesc_metric_j33g
(3,3) element of Jacobian matrix * {G}^1/2
subroutine, public atmos_phy_tb_calc_tend_momx(MOMX_t_TB, QFLX_MOMX, GSQRT, J13G, J23G, J33G, MAPF, IIS, IIE, JJS, JJE)
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_rcdz
reciprocal of center-dz
integer, parameter, public ydir
module ATMOSPHERE / Physics Turbulence
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdx
x-length of grid(i+1) to grid(i) [m]
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volwxy
control volume (wxy) [m3]
real(rp), dimension(:,:,:,:), allocatable, public rhoq_tp
integer, public je
end point of inner domain: y, local
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdz
z-length of control volume [m]
subroutine, public atmos_phy_tb_smg(qflx_sgs_momz, qflx_sgs_momx, qflx_sgs_momy, qflx_sgs_rhot, qflx_sgs_rhoq, MOMZ_t, MOMX_t, MOMY_t, RHOT_t, RHOQ_t, Nu, Ri, Pr, MOMZ, MOMX, MOMY, POTT, DENS, QTRC, N2, FZ, FDZ, RCDZ, RFDZ, CDX, FDX, CDY, FDY, GSQRT, J13G, J23G, J33G, MAPF, dt)
subroutine, public atmos_phy_tb_dns_config(TYPE_TB, I_TKE_out)
Config.
real(rp), dimension(:,:,:), allocatable, target, public atmos_phy_sf_sflx_qtrc
module atmosphere / grid / cartesC
module ATMOSPHERE / Physics Turbulence
integer, public ks
start point of inner domain: z, local
real(dp), public time_dtsec_atmos_phy_tb
time interval of physics(turbulence ) [sec]
subroutine, public atmos_phy_tb_driver_tracer_setup
Tracer setup.
integer, public jblock
block size for cache blocking: y
real(rp), dimension(:,:,:), allocatable, target, public pott
module Atmosphere / Physics Turbulence
real(rp), dimension(:,:,:), pointer, public dens_av
subroutine, public prc_abort
Abort Process.
character(len=h_short), public atmos_phy_tb_type
integer, public js
start point of inner domain: y, local
integer, parameter, public xdir
subroutine, public atmos_phy_tb_driver_setup
Setup.
module ATMOSPHERE / Physics Turbulence
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_momy_t
real(rp), public atmos_grid_cartesc_real_totvolwxy
total volume (wxy, local) [m3]
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_mapf
map factor
real(rp), dimension(:,:,:), allocatable, public momx_tp
real(rp), dimension(:,:,:), allocatable, target, public momy
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_j23g
(2,3) element of Jacobian matrix * {G}^1/2
real(rp), dimension(:,:,:), allocatable, public momz_tp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_j13g
(1,3) element of Jacobian matrix * {G}^1/2
subroutine, public atmos_phy_tb_d1980_setup(CDZ, CDX, CDY, CZ)
Setup.
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_tb_rhoq_t
integer, public ka
of whole cells: z, local, with HALO
real(rp), dimension(:,:,:), pointer, public momz_av
real(rp), dimension(:,:,:), pointer, public rhot_av
subroutine, public atmos_phy_tb_driver_calc_tendency(update_flag)
calclate tendency
real(rp), dimension(:,:,:), pointer, public momy_av
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mu
integer, parameter, public zdir
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzuy
control volume (zuy) [m3]
real(rp), dimension(:,:,:), allocatable, public atmos_phy_tb_momz_t
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc