Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for TEMPO microphysics with 2-moment/predicted density graupel #850

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d22bd65
Adds support for TEMPO microphysics with 2-moment/predicted density g…
AndersJensen-NOAA Jun 21, 2024
4a8d90b
Update physics
dustinswales Jun 27, 2024
0268545
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Jun 27, 2024
37161ba
Update TEMPO submodule hash in ccpp-physics
dustinswales Jun 27, 2024
c0e7021
Some reorg. Move drivers and ccpp code to ccpp repo.
dustinswales Jul 24, 2024
5d6c5b7
Updated physics. New SDF for tempo w/ v17_p8 configs.
dustinswales Aug 27, 2024
3b57b85
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
dustinswales Aug 27, 2024
76eaab4
Revert Thompson MP to use Thompson mp module, not TEMPO module
dustinswales Aug 27, 2024
f2d5eb2
Renamed PP directive.
dustinswales Aug 28, 2024
e442346
Merge pull request #3 from dustinswales/feature/ccpp_implementation
dustinswales Aug 28, 2024
34e1357
Update .gitmodules. FIxed physics hash.
dustinswales Aug 28, 2024
1a4a424
Added new TEMP config type to CCPP typedefs and new TEMPO scheme cont…
dustinswales Sep 23, 2024
e3fe22f
Synced physics
dustinswales Sep 23, 2024
f78d2c4
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Sep 23, 2024
f17caf1
Omission from previous commit
dustinswales Sep 23, 2024
dc5009e
Synced physics
dustinswales Nov 12, 2024
0ca4612
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Nov 12, 2024
81ba285
Bug fixes and rename for TEMPO
AndersJensen-NOAA Dec 18, 2024
846d1ce
update pointer to physics
AndersJensen-NOAA Dec 18, 2024
a0a8610
update pointer to ccpp
AndersJensen-NOAA Dec 18, 2024
bfda968
Merge branch 'develop' into tempo
AndersJensen-NOAA Dec 18, 2024
ef2c371
Updates for renaming Thompson to TEMPO
AndersJensen-NOAA Dec 19, 2024
72746fc
Update pointer to CCPP
AndersJensen-NOAA Dec 19, 2024
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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/ufs-community/ccpp-physics
branch = ufs/dev
url = https://github.com/AndersJensen-NOAA/ccpp-physics
branch = tempo
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ endif()
###############################################################################

set(MPI ON)
# DJS asks Anders: These two PP directives are needed in TEMPO. We should avoid
# using PP directives if possible, so let's plan to remove them if feasible.
set(OLD_MPTBLS ON)
set(ccpp_default ON)
add_subdirectory(ccpp)

###############################################################################
Expand Down
6 changes: 6 additions & 0 deletions ccpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ add_definitions(-DFV3)
if(MPI)
add_definitions(-DMPI)
endif()
if (OLD_MPTBLS)
add_definitions(-DOLD_MPTBLS)
endif()
if (ccpp_default)
add_definitions(-Dccpp_default)
endif()

#------------------------------------------------------------------------------
# Set flag for 32bit dynamics build
Expand Down
9 changes: 9 additions & 0 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
'physics/physics/Radiation/RRTMG/radsw_param.f',
'physics/physics/Radiation/RRTMG/radlw_param.f',
'physics/physics/photochem/module_ozphys.F90',
'physics/physics/MP/TEMPO/tempo/module_mp_tempo_params.F90',
'physics/physics/photochem/module_h2ophys.F90',
'physics/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.F90',
'data/CCPP_typedefs.F90',
Expand All @@ -46,6 +47,10 @@
'module_ozphys' : '',
'ty_ozphys' : '',
},
'module_mp_tempo_params' : {
'module_mp_tempo_params' : '',
'ty_tempo_cfg' : '',
},
'module_h2ophys' : {
'module_h2ophys' : '',
'ty_h2ophys' : '',
Expand Down Expand Up @@ -174,6 +179,10 @@
'physics/physics/MP/Thompson/mp_thompson_pre.F90',
'physics/physics/MP/Thompson/mp_thompson.F90',
'physics/physics/MP/Thompson/mp_thompson_post.F90',
'physics/physics/MP/TEMPO/tempo/module_mp_tempo_params.F90',
'physics/physics/MP/TEMPO/mp_tempo_pre.F90',
'physics/physics/MP/TEMPO/mp_tempo.F90',
'physics/physics/MP/TEMPO/mp_tempo_post.F90',
'physics/physics/MP/Zhao_Carr/zhaocarr_gscond.f',
'physics/physics/MP/Zhao_Carr/zhaocarr_precpd.f',
'physics/physics/PBL/HEDMF/hedmf.f',
Expand Down
44 changes: 31 additions & 13 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module GFS_typedefs

use module_radsw_parameters, only: topfsw_type, sfcfsw_type
use module_radlw_parameters, only: topflw_type, sfcflw_type
use module_mp_tempo_params,only: ty_tempo_cfg
use module_ozphys, only: ty_ozphys
use module_h2ophys, only: ty_h2ophys
use land_iau_mod, only: land_iau_external_data_type, land_iau_control_type, &
Expand Down Expand Up @@ -941,6 +942,7 @@ module GFS_typedefs
integer :: imp_physics !< choice of microphysics scheme
integer :: imp_physics_gfdl = 11 !< choice of GFDL microphysics scheme
integer :: imp_physics_thompson = 8 !< choice of Thompson microphysics scheme
integer :: imp_physics_tempo = 8 !< choice of TEMPO microphysics scheme
integer :: imp_physics_wsm6 = 6 !< choice of WSMG microphysics scheme
integer :: imp_physics_zhao_carr = 99 !< choice of Zhao-Carr microphysics scheme
integer :: imp_physics_zhao_carr_pdf = 98 !< choice of Zhao-Carr microphysics scheme with PDF clouds
Expand Down Expand Up @@ -1025,6 +1027,7 @@ module GFS_typedefs
!--- Thompson's microphysical parameters
logical :: ltaerosol !< flag for aerosol version
logical :: mraerosol !< flag for merra2_aerosol_aware
logical :: lthailaware !< flag for hail-aware version
logical :: lradar !< flag for radar reflectivity
real(kind=kind_phys) :: nsfullradar_diag!< seconds between resetting radar reflectivity calculation
real(kind=kind_phys) :: ttendlim !< temperature tendency limiter per time step in K/s
Expand All @@ -1033,6 +1036,7 @@ module GFS_typedefs
real(kind=kind_phys) :: dt_inner !< time step for the inner loop in s
logical :: sedi_semi !< flag for semi Lagrangian sedi of rain
integer :: decfl !< deformed CFL factor
type(ty_tempo_cfg) :: tempo_cfg !< Thompson MP configuration information.
logical :: thpsnmp_is_init !< Local scheme initialization flag

!--- GFDL microphysical paramters
Expand Down Expand Up @@ -3256,13 +3260,13 @@ subroutine coupling_create (Coupling, Model)
Coupling%spp_wts_cu_deep = clear_val
endif

!--- needed for Thompson's aerosol option
if(Model%imp_physics == Model%imp_physics_thompson .and. (Model%ltaerosol .or. Model%mraerosol)) then
!--- needed for Thompson/TEMPO's aerosol option
if((Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_tempo).and. (Model%ltaerosol .or. Model%mraerosol)) then
allocate (Coupling%nwfa2d (IM))
allocate (Coupling%nifa2d (IM))
Coupling%nwfa2d = clear_val
Coupling%nifa2d = clear_val
endif
endif

if(Model%rrfs_sd) then
!--- needed for smoke aerosol option
Expand Down Expand Up @@ -3584,6 +3588,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- Thompson microphysical parameters
logical :: ltaerosol = .false. !< flag for aerosol version
logical :: mraerosol = .false. !< flag for merra2_aerosol_aware
logical :: lthailaware = .false. !< flag for hail-aware version
logical :: lradar = .false. !< flag for radar reflectivity
real(kind=kind_phys) :: nsfullradar_diag = -999.0 !< seconds between resetting radar reflectivity calculation, set to <0 for every time step
real(kind=kind_phys) :: ttendlim = -999.0 !< temperature tendency limiter, set to <0 to deactivate
Expand Down Expand Up @@ -4090,8 +4095,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
mg_do_graupel, mg_do_hail, mg_nccons, mg_nicons, mg_ngcons, &
mg_ncnst, mg_ninst, mg_ngnst, sed_supersat, do_sb_physics, &
mg_alf, mg_qcmin, mg_do_ice_gmao, mg_do_liq_liu, &
ltaerosol, lradar, nsfullradar_diag, lrefres, ttendlim, &
ext_diag_thompson, dt_inner, lgfdlmprad, &
ltaerosol, lthailaware, lradar, nsfullradar_diag, lrefres, &
ttendlim, ext_diag_thompson, dt_inner, lgfdlmprad, &
sedi_semi, decfl, &
nssl_cccn, nssl_alphah, nssl_alphahl, &
nssl_alphar, nssl_ehw0, nssl_ehlw0, &
Expand Down Expand Up @@ -4749,6 +4754,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- Thompson MP parameters
Model%ltaerosol = ltaerosol
Model%mraerosol = mraerosol
Model%lthailaware = lthailaware
if (Model%ltaerosol .and. Model%mraerosol) then
write(0,*) 'Logic error: Only one Thompson aerosol option can be true, either ltaerosol or mraerosol)'
stop
Expand All @@ -4764,6 +4770,16 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
endif
Model%sedi_semi = sedi_semi
Model%decfl = decfl

!--- TEMPO MP parameters
! DJS to Anders: Maybe we put more of these nml options into the TEMPO configuration type?
Model%tempo_cfg%aerosol_aware = (ltaerosol .or. mraerosol)
Model%tempo_cfg%hail_aware = lthailaware
if (Model%ltaerosol .and. Model%mraerosol) then
write(0,*) 'Logic error: Only one TEMPO aerosol option can be true, either ltaerosol or mraerosol)'
stop
end if

!--- F-A MP parameters
Model%rhgrd = rhgrd
Model%spec_adv = spec_adv
Expand Down Expand Up @@ -4866,11 +4882,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%use_ufo = use_ufo
Model%exticeden = exticeden
if (Model%exticeden .and. &
(Model%imp_physics /= Model%imp_physics_gfdl .and. Model%imp_physics /= Model%imp_physics_thompson .and. &
Model%imp_physics /= Model%imp_physics_nssl )) then
(Model%imp_physics /= Model%imp_physics_gfdl .and. Model%imp_physics /= Model%imp_physics_thompson .and. &
Model%imp_physics /= Model%imp_physics_tempo .and. Model%imp_physics /= Model%imp_physics_nssl )) then
!see GFS_MP_generic_post.F90; exticeden is only compatible with GFDL,
!Thompson, or NSSL MP
print *,' Using exticeden = T is only valid when using GFDL, Thompson, or NSSL microphysics.'
print *,' Using exticeden = T is only valid when using GFDL, Thompson, TEMPO, or NSSL microphysics.'
stop
end if
! GFDL surface layer options
Expand Down Expand Up @@ -5786,8 +5802,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- BEGIN CODE FROM COMPNS_PHYSICS
!--- shoc scheme
if (do_shoc) then
if (Model%imp_physics == Model%imp_physics_thompson) then
print *,'SHOC is not currently compatible with Thompson MP -- shutting down'
if (Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_tempo) then
print *,'SHOC is not currently compatible with Thompson or TEMPO MP -- shutting down'
stop
endif
Model%nshoc_3d = 3
Expand Down Expand Up @@ -6147,7 +6163,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
' num_p2d =',Model%num_p2d


elseif (Model%imp_physics == Model%imp_physics_thompson) then !Thompson microphysics
elseif (Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_tempo) then !Thompson/TEMPO microphysics
Model%npdf3d = 0
Model%num_p3d = 3
Model%num_p2d = 1
Expand All @@ -6167,6 +6183,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
if (Model%me == Model%master) print *,' Using Thompson double moment microphysics', &
' ltaerosol = ',Model%ltaerosol, &
' mraerosol = ',Model%mraerosol, &
' lthailaware = ',Model%lthailaware, &
' ttendlim =',Model%ttendlim, &
' ext_diag_thompson =',Model%ext_diag_thompson, &
' dt_inner =',Model%dt_inner, &
Expand Down Expand Up @@ -6719,10 +6736,11 @@ subroutine control_print(Model)
print *, ' wminco : ', Model%wminco
print *, ' '
endif
if (Model%imp_physics == Model%imp_physics_wsm6 .or. Model%imp_physics == Model%imp_physics_thompson) then
print *, ' Thompson microphysical parameters'
if (Model%imp_physics == Model%imp_physics_wsm6 .or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_tempo) then
print *, ' Thompson/TEMPO microphysical parameters'
print *, ' ltaerosol : ', Model%ltaerosol
print *, ' mraerosol : ', Model%mraerosol
print *, ' lthailaware : ', Model%lthailaware
print *, ' lradar : ', Model%lradar
print *, ' nsfullradar_diag : ', Model%nsfullradar_diag
print *, ' lrefres : ', Model%lrefres
Expand Down
19 changes: 19 additions & 0 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -4337,6 +4337,12 @@
units = flag
dimensions = ()
type = integer
[imp_physics_tempo]
standard_name = identifier_for_tempo_microphysics_scheme
long_name = choice of TEMPO microphysics scheme
units = flag
dimensions = ()
type = integer
[imp_physics_wsm6]
standard_name = identifier_for_wsm6_microphysics_scheme
long_name = choice of WSM6 microphysics scheme
Expand Down Expand Up @@ -4861,6 +4867,12 @@
units = flag
dimensions = ()
type = logical
[lthailaware]
standard_name = flag_for_hail_physics
long_name = flag for hail physics
units = flag
dimensions = ()
type = logical
[mraerosol]
standard_name = do_merra2_aerosol_awareness
long_name = flag for merra2 aerosol-aware physics for example the thompson microphysics
Expand Down Expand Up @@ -4911,6 +4923,12 @@
units = count
dimensions = ()
type = integer
[tempo_cfg]
standard_name = configuration_for_TEMPO_microphysics
long_name = configuration information for TEMPO microphysics
units = mixed
dimensions = ()
type = ty_tempo_cfg
[thpsnmp_is_init]
standard_name = flag_for_thompson_mp_scheme_initialization
long_name = flag carrying scheme initialization status
Expand Down Expand Up @@ -10114,6 +10132,7 @@
relative_path = ../physics/physics/
dependencies = hooks/machine.F,hooks/physcons.F90
dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f
dependencies = MP/TEMPO/tempo/module_mp_tempo_params.F90
dependencies = photochem/module_ozphys.F90,photochem/module_h2ophys.F90
dependencies = SFC_Models/Land/Noahmp/lnd_iau_mod.F90,MP/GFDL/GFDL_parse_tracers.F90

Expand Down
93 changes: 93 additions & 0 deletions ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="FV3_GFS_v17_p8_ugwpv1_tempo" version="1">
<!-- <init></init> -->
<group name="time_vary">
<subcycle loop="1">
<scheme>GFS_time_vary_pre</scheme>
<scheme>GFS_rrtmg_setup</scheme>
<scheme>GFS_rad_time_vary</scheme>
<scheme>GFS_phys_time_vary</scheme>
</subcycle>
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
<scheme>GFS_surface_generic_pre</scheme>
<scheme>GFS_surface_composites_pre</scheme>
<scheme>dcyc2t3</scheme>
<scheme>GFS_surface_composites_inter</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
</subcycle>
<!-- Surface iteration loop -->
<subcycle loop="2">
<scheme>sfc_diff</scheme>
<scheme>GFS_surface_loop_control_part1</scheme>
<scheme>sfc_nst_pre</scheme>
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>noahmpdrv</scheme>
<scheme>sfc_sice</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
<subcycle loop="1">
<scheme>GFS_surface_composites_post</scheme>
<scheme>sfc_diag</scheme>
<scheme>sfc_diag_post</scheme>
<scheme>GFS_surface_generic_post</scheme>
<scheme>GFS_PBL_generic_pre</scheme>
<scheme>satmedmfvdifq</scheme>
<scheme>GFS_PBL_generic_post</scheme>
<scheme>GFS_GWD_generic_pre</scheme>
<scheme>ugwpv1_gsldrag</scheme>
<scheme>ugwpv1_gsldrag_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
<scheme>GFS_DCNV_generic_pre</scheme>
<scheme>samfdeepcnv</scheme>
<scheme>GFS_DCNV_generic_post</scheme>
<scheme>GFS_SCNV_generic_pre</scheme>
<scheme>samfshalcnv</scheme>
<scheme>GFS_SCNV_generic_post</scheme>
<scheme>GFS_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>mp_tempo_pre</scheme>
</subcycle>
<subcycle loop="1">
<scheme>mp_tempo</scheme>
</subcycle>
<subcycle loop="1">
<scheme>mp_tempo_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
<group name="stochastics">
<subcycle loop="1">
<scheme>GFS_stochastics</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
Loading
Loading