Go to the documentation of this file.
45 integer :: hist_uabs10, hist_u10m, hist_v10m
46 integer :: hist_t2, hist_q2, hist_rh2
89 log_info(
"ATMOS_PHY_SF_driver_setup",*)
'Setup'
94 log_info(
"ATMOS_PHY_SF_driver_setup",*)
'Coupler is enabled.'
103 log_error(
"ATMOS_PHY_SF_driver_setup",*)
'invalid Surface flux type(', trim(
atmos_phy_sf_type),
'). CHECK!'
110 log_info(
"ATMOS_PHY_SF_driver_setup",*)
'this component is never called.'
111 log_info(
"ATMOS_PHY_SF_driver_setup",*)
'surface fluxes are set to zero.'
113 sflx_mw(:,:) = 0.0_rp
114 sflx_mu(:,:) = 0.0_rp
115 sflx_mv(:,:) = 0.0_rp
116 sflx_sh(:,:) = 0.0_rp
117 sflx_lh(:,:) = 0.0_rp
118 sflx_shex(:,:) = 0.0_rp
119 sflx_qvex(:,:) = 0.0_rp
126 log_info(
"ATMOS_PHY_SF_driver_setup",*)
'SFC_TEMP, SFC_albedo is set in ATMOS_PHY_SF_vars.'
131 sflx_qtrc(:,:,:) = 0.0_rp
132 sflx_engi(:,:) = 0.0_rp
135 call file_history_reg(
'Uabs10',
'10m absolute wind',
'm/s' , hist_uabs10, ndims=2, fill_halo=.true. )
136 call file_history_reg(
'U10m',
'10m eastward wind',
'm/s' , hist_u10m, ndims=2, fill_halo=.true. )
137 call file_history_reg(
'V10m',
'10m northward wind',
'm/s' , hist_v10m, ndims=2, fill_halo=.true. )
138 call file_history_reg(
'T2',
'2m air temperature',
'K' , hist_t2, ndims=2, fill_halo=.true. )
139 call file_history_reg(
'Q2',
'2m specific humidity',
'kg/kg', hist_q2, ndims=2, fill_halo=.true. )
140 call file_history_reg(
'RH2',
'2m relative humidity',
'%', hist_rh2, ndims=2, fill_halo=.true. )
141 call file_history_reg(
'MSLP',
'mean sea-level pressure',
'Pa' , hist_mslp, ndims=2, fill_halo=.true., standard_name=
'air_pressure_at_mean_sea_level' )
182 bulkflux_diagnose_scales
243 logical,
intent(in) :: update_flag
248 real(
rp) :: atm_dens(
ia,
ja)
249 real(
rp) :: atm_temp(
ia,
ja)
250 real(
rp) :: atm_pres(
ia,
ja)
251 real(
rp) :: atm_qv (
ia,
ja)
252 real(
rp) :: sfc_potv(
ia,
ja)
253 real(
rp) :: sflx_sh2(
ia,
ja)
254 real(
rp) :: sflx_qv (
ia,
ja)
255 real(
rp) :: cp_t, cv_t
264 if ( update_flag )
then
273 sfc_dens(:,:), sfc_pres(:,:) )
279 atm_dens(i,j) =
dens(
ks,i,j)
280 atm_temp(i,j) =
temp(
ks,i,j)
281 atm_pres(i,j) =
pres(
ks,i,j)
294 sflx_sh2(i,j) = sflx_sh(i,j) - sflx_shex(i,j)
304 sflx_qv(i,j) = 0.0_rp
305 sfc_potv(i,j) = sfc_temp(i,j) * ( pre00 / sfc_pres(i,j) )**( rdry / cpdry )
314 sflx_qv(i,j) = sflx_qtrc(i,j,
i_qv) - sflx_qvex(i,j)
315 kappa = ( rdry + ( rvap - rdry ) *
qv(
ks,i,j) ) &
316 / ( cpdry + ( cpvap - cpdry ) *
qv(
ks,i,j) )
317 sfc_potv(i,j) = sfc_temp(i,j) * ( pre00 / sfc_pres(i,j) )**kappa &
318 * ( 1.0_rp + epstvap *
qv(
ks,i,j) )
324 call bulkflux_diagnose_scales(
ia,
is,
ie,
ja,
js,
je, &
325 sflx_mw(:,:), sflx_mu(:,:), sflx_mv(:,:), &
326 sflx_sh2(:,:), sflx_qv(:,:), &
327 sfc_dens(:,:), sfc_potv(:,:), pbl_zi(:,:), &
328 ustar(:,:), tstar(:,:), qstar(:,:), &
329 wstar(:,:), rlmo(:,:) )
340 atm_u(i,j) =
u(
ks,i,j)
341 atm_v(i,j) =
v(
ks,i,j)
342 atm_w(i,j) = atm_u(i,j) * tansl_x(i,j) + atm_v(i,j) * tansl_y(i,j)
343 atm_qv(i,j) =
qv(
ks,i,j)
352 atm_w(:,:), atm_u(:,:), atm_v(:,:), &
353 atm_temp(:,:), atm_pres(:,:), atm_qv(:,:), &
354 sfc_dens(:,:), sfc_temp(:,:), sfc_pres(:,:), &
355 sfc_z0m(:,:), sfc_z0h(:,:), sfc_z0e(:,:), &
356 pbl_zi(:,:), z1(:,:), &
357 sflx_mw(:,:), sflx_mu(:,:), sflx_mv(:,:), &
358 sflx_sh(:,:), sflx_lh(:,:), sflx_qv(:,:), &
359 ustar(:,:), tstar(:,:), qstar(:,:), &
362 u10(:,:), v10(:,:), t2(:,:), q2(:,:) )
368 atm_w(:,:), atm_u(:,:), atm_v(:,:), sfc_temp(:,:), &
369 z1(:,:), sfc_dens(:,:), &
370 sflx_mw(:,:), sflx_mu(:,:), sflx_mv(:,:), &
371 sflx_sh(:,:), sflx_lh(:,:), sflx_qv(:,:), &
377 t2(:,:) = atm_temp(:,:)
378 q2(:,:) = atm_qv(:,:)
385 sflx_qtrc(:,:,
i_qv) = sflx_qv(:,:)
402 rdz = 1.0_rp / ( fz(
ks,i,j) - fz(
ks-1,i,j) )
403 momz_t_sf(i,j) = sflx_mw(i,j) / ( cz(
ks+1,i,j) - cz(
ks,i,j) )
404 rhou_t_sf(i,j) = sflx_mu(i,j) * rdz
405 rhov_t_sf(i,j) = sflx_mv(i,j) * rdz
415 rdz = 1.0_rp / ( fz(
ks,i,j) - fz(
ks-1,i,j) )
416 dens_t_sf(i,j) = 0.0_rp
419 engi_t = sflx_engi(i,j) * rdz
422 work = sflx_qtrc(i,j,iq) * rdz
424 rhoq_t_sf(i,j,iq) = work
425 dens_t_sf(i,j) = dens_t_sf(i,j) + work *
tracer_mass(iq)
430 cp_t = ( cp_t -
cptot(
ks,i,j) * dens_t_sf(i,j) ) / atm_dens(i,j)
431 cv_t = ( cv_t -
cvtot(
ks,i,j) * dens_t_sf(i,j) ) / atm_dens(i,j)
433 rhoh_sf(i,j) = sflx_sh(i,j) * rdz + engi_t &
434 - ( cp_t + log( atm_pres(i,j) / pre00 ) * (
cvtot(
ks,i,j) /
cptot(
ks,i,j) * cp_t - cv_t ) ) * atm_dens(i,j) * atm_temp(i,j)
447 momz_t(
ks,i,j) = momz_t(
ks,i,j) + momz_t_sf(i,j)
448 rhou_t(
ks,i,j) = rhou_t(
ks,i,j) + rhou_t_sf(i,j)
449 rhov_t(
ks,i,j) = rhov_t(
ks,i,j) + rhov_t_sf(i,j)
450 rhoh(
ks,i,j) = rhoh(
ks,i,j) + rhoh_sf(i,j)
451 dens_t(
ks,i,j) = dens_t(
ks,i,j) + dens_t_sf(i,j)
462 rhoq_t(
ks,i,j,iq) = rhoq_t(
ks,i,j,iq) + rhoq_t_sf(i,j,iq)
475 sflx_qtrc(:,:,iq),
'SFLX_'//trim(
tracer_name(iq)), &
482 dens_t_sf(:,:),
'DENS_t_SF', &
486 momz_t_sf(:,:),
'MOMZ_t_SF', &
490 rhou_t_sf(:,:),
'RHOU_t_SF', &
494 rhov_t_sf(:,:),
'RHOV_t_SF', &
498 rhoh_sf(:,:),
'RHOH_SF', &
504 rhoq_t_sf(:,:,iq), trim(
tracer_name(iq))//
'_t_SF', &
520 file_history_query, &
524 barometric_law_mslp => atmos_hydrostatic_barometric_law_mslp
526 atmos_saturation_psat_liq
565 real(RP) :: work(IA,JA)
571 call file_history_in( sfc_dens(:,:),
'SFC_DENS',
'surface atmospheric density',
'kg/m3' )
572 call file_history_in( sfc_pres(:,:),
'SFC_PRES',
'surface atmospheric pressure',
'Pa' )
573 call file_history_in( sfc_temp(:,:),
'SFC_TEMP',
'surface skin temperature',
'K' )
574 call file_history_in( sfc_albedo(:,:,
i_r_direct ,
i_r_ir ),
'SFC_ALB_IR_dir' ,
'surface albedo (IR; direct',
'1' , fill_halo=.true. )
575 call file_history_in( sfc_albedo(:,:,
i_r_diffuse,
i_r_ir ),
'SFC_ALB_IR_dif' ,
'surface albedo (IR; diffuse)',
'1' , fill_halo=.true. )
576 call file_history_in( sfc_albedo(:,:,
i_r_direct ,
i_r_nir),
'SFC_ALB_NIR_dir',
'surface albedo (NIR; direct',
'1' , fill_halo=.true. )
577 call file_history_in( sfc_albedo(:,:,
i_r_diffuse,
i_r_nir),
'SFC_ALB_NIR_dif',
'surface albedo (NIR; diffuse',
'1' , fill_halo=.true. )
578 call file_history_in( sfc_albedo(:,:,
i_r_direct ,
i_r_vis),
'SFC_ALB_VIS_dir',
'surface albedo (VIS; direct',
'1' , fill_halo=.true. )
579 call file_history_in( sfc_albedo(:,:,
i_r_diffuse,
i_r_vis),
'SFC_ALB_VIS_dif',
'surface albedo (VIS; diffuse',
'1' , fill_halo=.true. )
580 call file_history_in( sfc_z0m(:,:),
'SFC_Z0M',
'roughness length (momentum)',
'm' , fill_halo=.true. )
581 call file_history_in( sfc_z0h(:,:),
'SFC_Z0H',
'roughness length (heat)',
'm' , fill_halo=.true. )
582 call file_history_in( sfc_z0e(:,:),
'SFC_Z0E',
'roughness length (vapor)',
'm' , fill_halo=.true. )
583 call file_history_in( sflx_mw(:,:),
'MWFLX',
'w-momentum flux',
'kg/m/s2' )
584 call file_history_in( sflx_mu(:,:),
'MUFLX',
'u-momentum flux',
'kg/m/s2' )
585 call file_history_in( sflx_mv(:,:),
'MVFLX',
'v-momentum flux',
'kg/m/s2' )
586 call file_history_in( sflx_sh(:,:),
'SHFLX',
'sensible heat flux',
'W/m2' , fill_halo=.true. )
587 call file_history_in( sflx_lh(:,:),
'LHFLX',
'latent heat flux',
'W/m2' , fill_halo=.true. )
588 call file_history_in( sflx_gh(:,:),
'GHFLX',
'ground heat flux (downward)',
'W/m2' , fill_halo=.true. )
590 call file_history_in( sflx_qtrc(:,:,iq),
'SFLX_'//trim(
tracer_name(iq)), &
592 'kg/m2/s' , fill_halo=.true. )
594 call file_history_in( sflx_engi(:,:),
'SFLX_ENGI',
'ground internal energy flux (merged)',
'W/m2' , fill_halo=.true. )
596 call file_history_in( ustar(:,:),
'Ustar',
'friction velocity',
'm/s' , fill_halo=.true. )
597 call file_history_in( tstar(:,:),
'Tstar',
'temperature scale',
'K' , fill_halo=.true. )
598 call file_history_in( qstar(:,:),
'Qstar',
'moisuter scale',
'kg/kg', fill_halo=.true. )
599 call file_history_in( wstar(:,:),
'Wstar',
'convective velocity scale',
'm/s', fill_halo=.true. )
600 call file_history_in( rlmo(:,:),
'RLmo',
'inverse of Obukhov length',
'1/m' , fill_halo=.true. )
602 call file_history_in( u10(:,:),
'U10',
'10m x-wind',
'm/s' , fill_halo=.true. )
603 call file_history_in( v10(:,:),
'V10',
'10m y-wind',
'm/s' , fill_halo=.true. )
604 call file_history_in( t2(:,:),
'T2 ',
'2m air temperature',
'K' , fill_halo=.true. )
605 call file_history_in( q2(:,:),
'Q2 ',
'2m specific humidity',
'kg/kg', fill_halo=.true. )
610 call file_history_query( hist_uabs10, do_put )
616 work(i,j) = sqrt( u10(i,j)**2 + v10(i,j)**2 )
620 call file_history_put( hist_uabs10, work(:,:) )
623 call file_history_query( hist_u10m, do_put )
629 work(i,j) = u10(i,j) * rotc(i,j,1) - v10(i,j) * rotc(i,j,2)
633 call file_history_put( hist_u10m, work(:,:) )
636 call file_history_query( hist_v10m, do_put )
642 work(i,j) = u10(i,j) * rotc(i,j,2) + v10(i,j) * rotc(i,j,1)
646 call file_history_put( hist_v10m, work(:,:) )
649 call file_history_query( hist_rh2, do_put )
651 call atmos_saturation_psat_liq( &
659 work(i,j) = sfc_dens(i,j) * q2(i,j) &
660 / work(i,j) * rvap * t2(i,j) &
665 call file_history_put( hist_rh2, work(:,:) )
669 call file_history_query( hist_mslp, do_put )
675 call file_history_put( hist_mslp, work(:,:) )
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0m
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_dens
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mu
subroutine, public prc_abort
Abort Process.
integer, parameter, public i_r_direct
real(rp), public const_epstvap
1 / epsilon - 1
subroutine, public atmos_phy_sf_bulk_flux(IA, IS, IE, JA, JS, JE, ATM_W, ATM_U, ATM_V, ATM_TEMP, ATM_PRES, ATM_QV, SFC_DENS, SFC_TEMP, SFC_PRES, SFC_Z0M, SFC_Z0H, SFC_Z0E, PBL, ATM_Z1, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_LH, SFLX_QV, Ustar, Tstar, Qstar, Wstar, RLmo, U10, V10, T2, Q2)
Calculate surface flux.
real(rp), dimension(:,:,:,:), allocatable, public rhoq_tp
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_v10
real(rp), dimension(:,:,:), allocatable, target, public pott
real(rp), dimension(qa_max), public tracer_mass
subroutine history_output
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0e
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_z1
Height of the lowermost grid from surface (cell center) [m].
integer, parameter, public i_r_diffuse
real(rp), dimension(:,:), allocatable, public topography_tansl_y
tan(slope_y)
real(rp), dimension(:,:,:), allocatable, public rhov_tp
real(rp), dimension(:,:), allocatable, public atmos_phy_bl_zi
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_qstar
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhoh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_ustar
real(rp), parameter, public const_rvap
specific gas constant (water vapor) [J/kg/K]
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_wstar
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]
real(rp), dimension(:,:,:), allocatable, target, public cptot
integer, parameter, public i_r_ir
module Atmosphere Grid CartesianC metirc
real(rp), dimension(:,:,:), pointer, public rhot_av
module atmosphere / hydrometeor
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mv
module Atmosphere / Physics Radiation
module ATMOSPHERIC Surface Variables
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mw
logical, public atmos_hydrometeor_dry
real(rp), dimension(:,:,:), allocatable, target, public rhot
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0h
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
real(rp), dimension(qa_max), public tracer_engi0
module atmosphere / physics / surface / bulk
subroutine, public atmos_phy_sf_bulk_setup
Setup.
real(rp), parameter, public const_cpvap
specific heat (water vapor, constant pressure) [J/kg/K]
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_qvex
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_u10
subroutine, public atmos_phy_sf_driver_calc_tendency(update_flag)
calculation tendency
real(rp), dimension(:,:,:), allocatable, public rhou_tp
character(len=h_short), public atmos_phy_sf_type
integer, parameter, public rp
integer, public ie
end point of inner domain: x, local
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
module atmosphere / physics / PBL
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
real(rp), dimension(:,:,:), allocatable, target, public dens
integer, parameter, public i_r_nir
real(rp), dimension(:,:,:), allocatable, public atmos_phy_sf_rhoq_t
module atmosphere / grid / cartesC index
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_shex
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_sf_sfc_albedo
subroutine, public atmos_phy_sf_driver_setup
Setup.
real(rp), public lhv
latent heat of vaporization for use [J/kg]
real(dp), public time_dtsec_atmos_phy_sf
time interval of physics(surface flux) [sec]
real(rp), dimension(:,:), allocatable, public topography_tansl_x
tan(slope_x)
real(rp), dimension(qa_max), public tracer_cv
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rlmo
real(rp), dimension(:,:,:), allocatable, target, public v
character(len=h_short), dimension(qa_max), public tracer_name
real(rp), dimension(:,:,:), allocatable, target, public w
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
real(rp), dimension(:,:,:), allocatable, public momz_tp
subroutine, public atmos_phy_sf_const_setup
Setup.
integer, public is
start point of inner domain: x, local
real(rp), dimension(:,:,:), allocatable, target, public temp
real(rp), dimension(:,:,:), allocatable, public dens_tp
real(rp), dimension(:,:,:), allocatable, pointer, target, public qv
real(rp), dimension(:,:,:), allocatable, target, public atmos_phy_sf_sflx_qtrc
real(rp), dimension(:,:,:), allocatable, target, public pres
module ATMOSPHERE / Physics Surface fluxes
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_engi
real(rp), dimension(:,:,:), pointer, public dens_av
real(rp), dimension(:,:,:), allocatable, target, public u
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_t2
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_lh
real(rp), dimension(qa_max), public tracer_cp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_dens_t
module atmosphere / hydrostatic barance
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_pres
real(rp), dimension(:,:,:), allocatable, public rhoh_p
logical, public statistics_checktotal
calc&report variable totals to logfile?
module ATMOSPHERIC Variables
module coupler / surface-atmospehre
module atmosphere / bottom boundary extrapolation
integer, public js
start point of inner domain: y, local
integer, parameter, public i_r_vis
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
subroutine, public file_history_reg(name, desc, unit, itemid, standard_name, ndims, dim_type, cell_measures, fill_halo)
Register/Append variable to history file.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_q2
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_gh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhou_t
real(rp), public const_undef
module atmosphere / saturation
subroutine, public atmos_phy_sf_const_flux(IA, IS, IE, JA, JS, JE, ATM_W, ATM_U, ATM_V, ATM_TEMP, ATM_Z1, SFC_DENS, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_LH, SFLX_QV, U10, V10)
Constant flux.
real(rp), public const_pre00
pressure reference [Pa]
integer, public je
end point of inner domain: y, local
real(rp), dimension(:,:,:), allocatable, target, public cvtot
subroutine, public atmos_bottom_estimate(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, PRES, QV, SFC_TEMP, FZ, SFC_DENS, SFC_PRES)
Calc bottom boundary of atmosphere (just above surface)
module atmosphere / physics / surface / const
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_tstar
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_momz_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhov_t
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_metric_rotc
rotation coefficient
logical, public atmos_sw_phy_sf