Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/core_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@
<package name="mp_tempo_in" description="parameterization of TEMPO cloud microphysics."/>
<package name="tempo_aerosolaware_in" description="variables for TEMPO with aerosol-aware microphysics."/>
<package name="tempo_hailaware_in" description="variables for TEMPO hail-aware microphysics."/>
<package name="tempo_hailcat_in" description="variables for TEMPO microphysics with separate hail category."/>
<package name="mp_wsm6_in" description="parameterization of WSM6 cloud microphysics."/>
<package name="mp_nssl2m_in" description="parameterization of NSSL 2-moment microphysics."/>
<package name="nssl3m_in" description="variables for NSSL 3-moment microphysics."/>
Expand Down Expand Up @@ -2015,7 +2016,7 @@

<var name="qh" array_group="moist" units="kg kg^{-1}"
description="Hail mixing ratio"
packages="mp_nssl2m_in"/>
packages="mp_nssl2m_in;tempo_hailcat_in"/>

<var name="ni" array_group="number" units="nb kg^{-1}"
description="Cloud ice number concentration"
Expand Down Expand Up @@ -2406,7 +2407,7 @@

<var name="tend_qh" name_in_code="qh" array_group="moist" units="kg m^{-3} s^{-1}"
description="Tendency of hail mass per unit volume divided by d(zeta)/dz"
packages="mp_nssl2m_in"/>
packages="mp_nssl2m_in;tempo_hailcat_in"/>

<var name="tend_ni" name_in_code="ni" array_group="number" units="nb m^{-3} s^{-1}"
description="Tendency of cloud ice number concentration multiplied by dry air density divided by d(zeta)/dz"
Expand Down Expand Up @@ -2522,7 +2523,7 @@
units="kg kg^{-1} s^{-1}"
description="Lateral boundary tendency of graupel mixing ratio"/>

<var name="lbc_qh" name_in_code="qh" array_group="moist" packages="mp_nssl2m_in" units="kg kg^{-1} s^{-1}"
<var name="lbc_qh" name_in_code="qh" array_group="moist" packages="mp_nssl2m_in;tempo_hailcat_in" units="kg kg^{-1} s^{-1}"
description="Lateral boundary tendency of hail mixing ratio"/>

<var name="lbc_nr" name_in_code="nr" array_group="number" packages="mp_thompson_in;mp_nssl2m_in;mp_thompson_aers_in;mp_tempo_in"
Expand Down Expand Up @@ -4656,7 +4657,7 @@
units="kg kg^{-1}"
description="Graupel mixing ratio increment"/>

<var name="qh_amb" name_in_code="qh" array_group="moist" packages="mp_nssl2m_in" units="kg kg^{-1}"
<var name="qh_amb" name_in_code="qh" array_group="moist" packages="mp_nssl2m_in;tempo_hailcat_in" units="kg kg^{-1}"
description="Hail mixing ratio increment"/>
</var_array>
</var_struct>
Expand Down
7 changes: 6 additions & 1 deletion src/core_atmosphere/physics/Registry_tempo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
units="-"
description="Logical flag to turn on/off prognostic cloud droplet and aerosol number concentrations"
possible_values=".true. or .false."/>

<nml_option name="config_tempo_hailaware" type="logical" default_value="true" in_defaults="false"
units="-"
description="Logical flag to turn on/off prognostic graupel number concentration and rime density"
possible_values=".true. or .false."/>

<nml_option name="config_tempo_hailcat" type="logical" default_value="false" in_defaults="false"
units="-"
description="Logical flag to turn on/off separate hail category (qh)"
possible_values=".true. or .false."/>

<nml_option name="config_tempo_ml_for_bl_nc" type="logical" default_value="false" in_defaults="false"
units="-"
description="Logical flag to turn on/off ML prediction of boundary layer cloud number concentrations"
Expand Down
28 changes: 21 additions & 7 deletions src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ subroutine allocate_microphysics(configs)
!local pointers:
character(len=StrKIND),pointer:: microp_scheme
character(len=StrKIND),pointer:: nssl_moments
logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware
logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware,config_tempo_hailcat
logical,pointer:: config_tempo_ml_for_bl_nc
!-----------------------------------------------------------------------------------------------------------------

call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme)
call mpas_pool_get_config(configs,'config_nssl_moments',nssl_moments)
call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware)
call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware)
call mpas_pool_get_config(configs,'config_tempo_hailcat',config_tempo_hailcat)
call mpas_pool_get_config(configs,'config_tempo_ml_for_bl_nc',config_tempo_ml_for_bl_nc)

!sounding variables:
Expand Down Expand Up @@ -227,6 +228,10 @@ subroutine allocate_microphysics(configs)
if(.not.allocated(volg_p)) allocate(volg_p(ims:ime,kms:kme,jms:jme))
endif

if (config_tempo_hailcat) then
if(.not.allocated(qh_p) ) allocate(qh_p(ims:ime,kms:kme,jms:jme))
endif

if (config_tempo_ml_for_bl_nc) then
if(.not.allocated(cldfrac_p) ) allocate(cldfrac_p(ims:ime,kms:kme,jms:jme))
if(.not.allocated(qcbl_p) ) allocate(qcbl_p(ims:ime,kms:kme,jms:jme))
Expand Down Expand Up @@ -270,7 +275,7 @@ subroutine deallocate_microphysics(configs)
!local pointers:
character(len=StrKIND),pointer:: microp_scheme
character(len=StrKIND),pointer:: nssl_moments
logical,pointer:: config_tempo_hailaware, config_tempo_aerosolaware
logical,pointer:: config_tempo_hailaware, config_tempo_aerosolaware, config_tempo_hailcat
logical,pointer:: config_tempo_ml_for_bl_nc

!-----------------------------------------------------------------------------------------------------------------
Expand All @@ -279,6 +284,7 @@ subroutine deallocate_microphysics(configs)
call mpas_pool_get_config(configs,'config_nssl_moments',nssl_moments)
call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware)
call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware)
call mpas_pool_get_config(configs,'config_tempo_hailcat',config_tempo_hailcat)
call mpas_pool_get_config(configs,'config_tempo_ml_for_bl_nc',config_tempo_ml_for_bl_nc)

!sounding variables:
Expand Down Expand Up @@ -389,6 +395,10 @@ subroutine deallocate_microphysics(configs)
if(allocated(volg_p) ) deallocate(volg_p )
endif

if (config_tempo_hailcat) then
if(allocated(qh_p) ) deallocate(qh_p )
endif

if (config_tempo_ml_for_bl_nc) then
if(allocated(cldfrac_p) ) deallocate(cldfrac_p)
if(allocated(qcbl_p) ) deallocate(qcbl_p)
Expand Down Expand Up @@ -607,7 +617,7 @@ subroutine driver_microphysics(configs,mesh,state,time_lev,diag,diag_physics,ten
ng = ng_p , qb = volg_p , w = w_p , &
nc = nc_p , nwfa = nwfa_p , nifa = nifa_p , &
pii = pi_p , p = pres_p , dz = dz_p , &
qc_bl = qcbl_p , qcfrac_bl = cldfrac_p , &
qc_bl = qcbl_p , qcfrac_bl = cldfrac_p , qh = qh_p , &
ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte , &
Expand All @@ -619,16 +629,20 @@ subroutine driver_microphysics(configs,mesh,state,time_lev,diag,diag_physics,ten
tempo_driver_diags%snow_liquid_equiv_precip(i,j)
snownc_p(i,j) = snownc_p(i,j) + tempo_driver_diags%ice_liquid_equiv_precip(i,j) + &
tempo_driver_diags%snow_liquid_equiv_precip(i,j)
graupelncv_p(i,j) = graupelncv_p(i,j) + tempo_driver_diags%graupel_liquid_equiv_precip(i,j)
graupelnc_p(i,j) = graupelnc_p(i,j) + tempo_driver_diags%graupel_liquid_equiv_precip(i,j)
graupelncv_p(i,j) = graupelncv_p(i,j) + tempo_driver_diags%graupel_liquid_equiv_precip(i,j) + &
tempo_driver_diags%hail_liquid_equiv_precip(i,j)
graupelnc_p(i,j) = graupelnc_p(i,j) + tempo_driver_diags%graupel_liquid_equiv_precip(i,j) + &
tempo_driver_diags%hail_liquid_equiv_precip(i,j)
rainncv_p(i,j) = rainncv_p(i,j) + tempo_driver_diags%rain_precip(i,j) + &
tempo_driver_diags%ice_liquid_equiv_precip(i,j) + &
tempo_driver_diags%snow_liquid_equiv_precip(i,j) + &
tempo_driver_diags%graupel_liquid_equiv_precip(i,j)
tempo_driver_diags%graupel_liquid_equiv_precip(i,j) + &
tempo_driver_diags%hail_liquid_equiv_precip(i,j)
rainnc_p(i,j) = rainnc_p(i,j) + tempo_driver_diags%rain_precip(i,j) + &
tempo_driver_diags%ice_liquid_equiv_precip(i,j) + &
tempo_driver_diags%snow_liquid_equiv_precip(i,j) + &
tempo_driver_diags%graupel_liquid_equiv_precip(i,j)
tempo_driver_diags%graupel_liquid_equiv_precip(i,j) + &
tempo_driver_diags%hail_liquid_equiv_precip(i,j)
sr_p(i,j) = tempo_driver_diags%frozen_fraction(i,j)
frainnc_p(i,j) = frainnc_p(i,j) + tempo_driver_diags%frz_rain_precip(i,j)
max_hail_diameter_sfc_p(i,j) = tempo_driver_diags%max_hail_diameter_sfc(i,j)
Expand Down
34 changes: 32 additions & 2 deletions src/core_atmosphere/physics/mpas_atmphys_interface.F
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics,
real(kind=RKIND),dimension(:),pointer :: nifa2d,nwfa2d,nt_c,mu_c
!TEMPO/NSSL
character(len=StrKIND),pointer:: nssl_moments
logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware
logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware,config_tempo_hailcat
logical,pointer:: config_tempo_ml_for_bl_nc
integer,pointer:: index_qh
integer,pointer:: index_zrw,index_zgw,index_zhw
Expand Down Expand Up @@ -696,6 +696,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics,
call mpas_pool_get_config(configs,'config_nssl_moments',nssl_moments)
call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware)
call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware)
call mpas_pool_get_config(configs,'config_tempo_hailcat',config_tempo_hailcat)
call mpas_pool_get_config(configs,'config_tempo_ml_for_bl_nc',config_tempo_ml_for_bl_nc)

call mpas_pool_get_array(mesh,'zgrid',zgrid)
Expand Down Expand Up @@ -943,6 +944,20 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics,
enddo
endif

if (config_tempo_hailcat) then
call mpas_pool_get_dimension(state,'index_qh' ,index_qh )

qh => scalars(index_qh,:,:)

do j = jts, jte
do k = kts, kte
do i = its, ite
qh_p(i,k,j) = qh(k,i)
enddo
enddo
enddo
endif

case("mp_nssl2m")
call mpas_pool_get_dimension(state,'index_ni',index_ni)
call mpas_pool_get_dimension(state,'index_nr',index_nr)
Expand Down Expand Up @@ -1150,7 +1165,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te
!local pointers:
character(len=StrKIND),pointer:: mp_scheme
character(len=StrKIND),pointer:: nssl_moments
logical,pointer:: config_tempo_hailaware, config_tempo_aerosolaware
logical,pointer:: config_tempo_hailaware, config_tempo_aerosolaware, config_tempo_hailcat
integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs,index_qg
integer,pointer:: index_nc,index_ni,index_nr,index_nifa,index_nwfa
!TEMPO/NSSL
Expand Down Expand Up @@ -1189,6 +1204,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te
call mpas_pool_get_config(configs,'config_nssl_moments',nssl_moments)
call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware)
call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware)
call mpas_pool_get_config(configs,'config_tempo_hailcat',config_tempo_hailcat)

call mpas_pool_get_array(mesh,'zz' ,zz )
call mpas_pool_get_array(mesh,'zgrid',zgrid)
Expand Down Expand Up @@ -1449,6 +1465,20 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te
enddo
endif

if (config_tempo_hailcat) then
call mpas_pool_get_dimension(state,'index_qh' ,index_qh )

qh => scalars(index_qh,:,:)

do j = jts, jte
do k = kts, kte
do i = its, ite
qh(k,i) = qh_p(i,k,j)
enddo
enddo
enddo
endif

case("mp_nssl2m")
call mpas_pool_get_dimension(state,'index_ni' ,index_ni )
call mpas_pool_get_dimension(state,'index_nc' ,index_nc )
Expand Down
13 changes: 10 additions & 3 deletions src/core_atmosphere/physics/mpas_atmphys_packages.F
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie
character(len=StrKIND),pointer:: config_lsm_scheme
character(len=StrKIND),pointer:: config_smoke_scheme
character(len=StrKIND),pointer:: config_dust_scheme
logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware
logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware,config_tempo_hailcat
logical,pointer:: mp_kessler_in,mp_thompson_in,mp_thompson_aers_in,mp_wsm6_in,mp_nssl2m_in,nssl3m_in
logical,pointer:: mp_tempo_in,tempo_hailaware_in,tempo_aerosolaware_in
logical,pointer:: mp_tempo_in,tempo_hailaware_in,tempo_aerosolaware_in,tempo_hailcat_in
logical,pointer:: cu_grell_freitas_in,cu_grell_freitas_li_in,cu_kain_fritsch_in,cu_ntiedtke_in
logical,pointer:: bl_mynn_in,bl_mynnedmf_in,bl_ysu_in,bl_myj_in
logical,pointer:: lsm_noah_in,lsm_ruc_in
Expand All @@ -68,6 +68,7 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie
call mpas_pool_get_config(configs,'config_nssl_moments',config_nssl_moments)
call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware)
call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware)
call mpas_pool_get_config(configs,'config_tempo_hailcat',config_tempo_hailcat)

nullify(mp_kessler_in)
call mpas_pool_get_package(packages,'mp_kessler_inActive',mp_kessler_in)
Expand All @@ -86,7 +87,10 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie

nullify(tempo_hailaware_in)
call mpas_pool_get_package(packages,'tempo_hailaware_inActive',tempo_hailaware_in)


nullify(tempo_hailcat_in)
call mpas_pool_get_package(packages,'tempo_hailcat_inActive',tempo_hailcat_in)

nullify(mp_wsm6_in)
call mpas_pool_get_package(packages,'mp_wsm6_inActive',mp_wsm6_in)

Expand Down Expand Up @@ -115,6 +119,7 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie
mp_tempo_in = .false.
tempo_aerosolaware_in = .false.
tempo_hailaware_in = .false.
tempo_hailcat_in = .false.
mp_wsm6_in = .false.
mp_nssl2m_in = .false.
nssl3m_in = .false.
Expand All @@ -131,6 +136,7 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie
mp_tempo_in = .true.
if (config_tempo_aerosolaware) tempo_aerosolaware_in = .true.
if (config_tempo_hailaware) tempo_hailaware_in = .true.
if (config_tempo_hailcat) tempo_hailcat_in = .true.
elseif(config_microp_scheme == 'mp_nssl2m') then
mp_nssl2m_in = .true.
IF ( config_nssl_moments == 'nssl3m' ) THEN
Expand All @@ -144,6 +150,7 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie
call mpas_log_write(' mp_tempo_in = $l', logicArgs=(/mp_tempo_in/))
call mpas_log_write(' tempo_aerosolaware_in = $l', logicArgs=(/tempo_aerosolaware_in/))
call mpas_log_write(' tempo_hailaware_in = $l', logicArgs=(/tempo_hailaware_in/))
call mpas_log_write(' tempo_hailcat_in = $l', logicArgs=(/tempo_hailcat_in/))
call mpas_log_write(' mp_wsm6_in = $l', logicArgs=(/mp_wsm6_in/))
call mpas_log_write(' mp_nssl2m_in = $l', logicArgs=(/mp_nssl2m_in/))
call mpas_log_write(' nssl3m_in = $l', logicArgs=(/nssl3m_in/))
Expand Down
2 changes: 1 addition & 1 deletion src/core_atmosphere/physics/physics_noaa/TEMPO
Submodule TEMPO updated 101 files
Loading