From d22bd65d194a764071bbb733ce867bfd302fd465 Mon Sep 17 00:00:00 2001 From: Anders Jensen Date: Fri, 21 Jun 2024 14:06:55 +0000 Subject: [PATCH 01/17] Adds support for TEMPO microphysics with 2-moment/predicted density graupel --- .gitmodules | 4 +- ccpp/config/ccpp_prebuild_config.py | 3 + ccpp/data/GFS_typedefs.F90 | 9 ++- ccpp/data/GFS_typedefs.meta | 6 ++ ccpp/physics | 2 +- ccpp/suites/suite_osprey.xml | 94 +++++++++++++++++++++++++++++ 6 files changed, 113 insertions(+), 5 deletions(-) create mode 100644 ccpp/suites/suite_osprey.xml diff --git a/.gitmodules b/.gitmodules index 22c723ac1..d01c7bf49 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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_suite [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 976b1d4f6..3d251a68e 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -163,6 +163,9 @@ '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/drivers/ccpp/mp_tempo_pre.F90', + 'physics/physics/MP/TEMPO/drivers/ccpp/mp_tempo.F90', + 'physics/physics/MP/TEMPO/drivers/ccpp/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', diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 40c33cfc5..afbd4ac8b 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1007,6 +1007,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 @@ -3544,6 +3545,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 @@ -4025,8 +4027,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, & @@ -4659,6 +4661,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 @@ -6073,6 +6076,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, & @@ -6614,6 +6618,7 @@ subroutine control_print(Model) print *, ' Thompson 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 diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 5ac00e403..2ece996e9 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -4771,6 +4771,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 diff --git a/ccpp/physics b/ccpp/physics index 16a1d8817..39886f43c 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 16a1d881774d795f46db16017aeed7fc351d661a +Subproject commit 39886f43c6810088a9b22588a9aac6732b643690 diff --git a/ccpp/suites/suite_osprey.xml b/ccpp/suites/suite_osprey.xml new file mode 100644 index 000000000..336f0a386 --- /dev/null +++ b/ccpp/suites/suite_osprey.xml @@ -0,0 +1,94 @@ + + + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + sgscloud_radpre + GFS_rrtmg_pre + GFS_radiation_surface + rad_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw + sgscloud_radpost + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + mynnsfc_wrapper + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + noahmpdrv + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + mynnedmf_wrapper + GFS_GWD_generic_pre + ugwpv1_gsldrag + ugwpv1_gsldrag_post + GFS_GWD_generic_post + GFS_suite_stateout_update + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_DCNV_generic_pre + cu_c3_driver_pre + cu_c3_driver + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + mp_tempo_pre + + + mp_tempo + + + mp_tempo_post + GFS_MP_generic_post + cu_c3_driver_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + GFS_physics_post + + + + From 4a8d90ba8eb5c7b47eadfc099a5093552f03d0df Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 27 Jun 2024 17:25:18 +0000 Subject: [PATCH 02/17] Update physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 39886f43c..6a39cb867 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 39886f43c6810088a9b22588a9aac6732b643690 +Subproject commit 6a39cb867fae63e2e42afe98f20c1669ebbca580 From 37161bad7b9c01420ab9191050808d98c83bbf5c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 27 Jun 2024 17:51:35 +0000 Subject: [PATCH 03/17] Update TEMPO submodule hash in ccpp-physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 6a39cb867..a11085b67 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 6a39cb867fae63e2e42afe98f20c1669ebbca580 +Subproject commit a11085b670ee33ce2702438ace78e2345507f2fc From c0e70216a0074fc9596f2d97c3183bc92a090e22 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 24 Jul 2024 20:53:49 +0000 Subject: [PATCH 04/17] Some reorg. Move drivers and ccpp code to ccpp repo. --- ccpp/config/ccpp_prebuild_config.py | 6 +++--- ccpp/physics | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 3d251a68e..f9672c539 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -163,9 +163,9 @@ '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/drivers/ccpp/mp_tempo_pre.F90', - 'physics/physics/MP/TEMPO/drivers/ccpp/mp_tempo.F90', - 'physics/physics/MP/TEMPO/drivers/ccpp/mp_tempo_post.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', diff --git a/ccpp/physics b/ccpp/physics index a11085b67..fe8b6dada 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit a11085b670ee33ce2702438ace78e2345507f2fc +Subproject commit fe8b6dadacd04248a3a7782348d557deca6825f0 From 5d6c5b7e527943f660cfe1b678caba6b70ba8484 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 27 Aug 2024 15:17:49 +0000 Subject: [PATCH 05/17] Updated physics. New SDF for tempo w/ v17_p8 configs. --- ccpp/physics | 2 +- .../suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml | 93 +++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml diff --git a/ccpp/physics b/ccpp/physics index fe8b6dada..dbe9774a9 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit fe8b6dadacd04248a3a7782348d557deca6825f0 +Subproject commit dbe9774a942ee012db7624d3720fbc6efec295aa diff --git a/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml b/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml new file mode 100644 index 000000000..28fcba940 --- /dev/null +++ b/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml @@ -0,0 +1,93 @@ + + + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + GFS_radiation_surface + rad_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + noahmpdrv + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + satmedmfvdifq + GFS_PBL_generic_post + GFS_GWD_generic_pre + ugwpv1_gsldrag + ugwpv1_gsldrag_post + GFS_GWD_generic_post + GFS_suite_stateout_update + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_DCNV_generic_pre + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + mp_tempo_pre + + + mp_tempo + + + mp_tempo_post + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + GFS_physics_post + + + + From 76eaab409f51d28286cb55580177e29a5630c180 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 27 Aug 2024 16:25:28 +0000 Subject: [PATCH 06/17] Revert Thompson MP to use Thompson mp module, not TEMPO module --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index dbe9774a9..41d2030cc 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit dbe9774a942ee012db7624d3720fbc6efec295aa +Subproject commit 41d2030cc43534cbcbaf7f1825ab26599e9ecb0e From f2d5eb242dede94da69b37e33d9777c892d90647 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 28 Aug 2024 17:02:28 +0000 Subject: [PATCH 07/17] Renamed PP directive. --- CMakeLists.txt | 1 + ccpp/CMakeLists.txt | 4 ++++ ccpp/physics | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdf597df2..4dbad0072 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ endif() ############################################################################### set(MPI ON) +set(OLD_MPTBLS ON) add_subdirectory(ccpp) ############################################################################### diff --git a/ccpp/CMakeLists.txt b/ccpp/CMakeLists.txt index e9a5d56c7..e93832a89 100644 --- a/ccpp/CMakeLists.txt +++ b/ccpp/CMakeLists.txt @@ -43,12 +43,16 @@ endif() #------------------------------------------------------------------------------ # Add host-model specific preprocessor flag (needed for some physics schemes) add_definitions(-DFV3) +add_definitions(-DOLD_MPTBLS) #------------------------------------------------------------------------------ # Set MPI flags for C/C++/Fortran preprocessor if(MPI) add_definitions(-DMPI) endif() +if (OLD_MPTBLS) + add_definitions(-DOLD_MPTBLS) +endif() #------------------------------------------------------------------------------ # Set flag for 32bit dynamics build diff --git a/ccpp/physics b/ccpp/physics index 41d2030cc..9c67aae79 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 41d2030cc43534cbcbaf7f1825ab26599e9ecb0e +Subproject commit 9c67aae79896b9211fdb7d73fbd43f7b016347bc From 34e13576ef3b2ebe8b5d32d9eaad3c58989a4a25 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 28 Aug 2024 21:00:41 +0000 Subject: [PATCH 08/17] Update .gitmodules. FIxed physics hash. --- .gitmodules | 2 +- ccpp/physics | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index d01c7bf49..a25bd810d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,7 +9,7 @@ [submodule "ccpp/physics"] path = ccpp/physics url = https://github.com/AndersJensen-NOAA/ccpp-physics - branch = tempo_suite + branch = tempo_submodule [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/ccpp/physics b/ccpp/physics index 9c67aae79..b9be2d98c 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 9c67aae79896b9211fdb7d73fbd43f7b016347bc +Subproject commit b9be2d98c21d2d6b815503a9292d4af57bc37e4b From 1a4a4249faf584281db3a13d676eccf4952674c7 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 23 Sep 2024 21:05:30 +0000 Subject: [PATCH 09/17] Added new TEMP config type to CCPP typedefs and new TEMPO scheme control flag. --- CMakeLists.txt | 3 +++ ccpp/CMakeLists.txt | 4 +++- ccpp/config/ccpp_prebuild_config.py | 6 +++++ ccpp/data/GFS_typedefs.F90 | 35 ++++++++++++++++++++--------- ccpp/data/GFS_typedefs.meta | 13 +++++++++++ ccpp/physics | 2 +- 6 files changed, 50 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dbad0072..2a564e1a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +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) ############################################################################### diff --git a/ccpp/CMakeLists.txt b/ccpp/CMakeLists.txt index e93832a89..bd55152d3 100644 --- a/ccpp/CMakeLists.txt +++ b/ccpp/CMakeLists.txt @@ -43,7 +43,6 @@ endif() #------------------------------------------------------------------------------ # Add host-model specific preprocessor flag (needed for some physics schemes) add_definitions(-DFV3) -add_definitions(-DOLD_MPTBLS) #------------------------------------------------------------------------------ # Set MPI flags for C/C++/Fortran preprocessor @@ -53,6 +52,9 @@ endif() if (OLD_MPTBLS) add_definitions(-DOLD_MPTBLS) endif() +if (ccpp_default) + add_definitions(-Dccpp_default) +endif() #------------------------------------------------------------------------------ # Set flag for 32bit dynamics build diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index d8c7d6308..c24519f93 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -21,6 +21,7 @@ 'physics/physics/Radiation/RRTMG/radlw_param.f', 'physics/physics/photochem/h2o_def.f', 'physics/physics/photochem/module_ozphys.F90', + 'physics/physics/MP/TEMPO/tempo/module_mp_thompson_params.F90', 'data/CCPP_typedefs.F90', 'data/GFS_typedefs.F90', 'data/CCPP_data.F90', @@ -45,6 +46,10 @@ 'module_ozphys' : '', 'ty_ozphys' : '', }, + 'module_mp_thompson_params' : { + 'module_mp_thompson_params' : '', + 'ty_tempo_cfg' : '', + }, 'CCPP_typedefs' : { 'GFS_interstitial_type' : 'GFS_Interstitial(cdata%thrd_no)', 'GFDL_interstitial_type' : 'GFDL_interstitial', @@ -162,6 +167,7 @@ '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_thompson_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', diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 78d544367..d6389c4cb 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -14,6 +14,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_thompson_params,only: ty_tempo_cfg use h2o_def, only: levh2o, h2o_coeff use module_ozphys, only: ty_ozphys @@ -926,6 +927,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 @@ -1019,6 +1021,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. !--- GFDL microphysical paramters logical :: lgfdlmprad !< flag for GFDL mp scheme and radiation consistency @@ -3218,13 +3221,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 @@ -4696,6 +4699,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 @@ -4798,11 +4811,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 @@ -5718,8 +5731,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 @@ -6079,7 +6092,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 @@ -6637,8 +6650,8 @@ 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 diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 17cf4e70d..660d50092 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -4278,6 +4278,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 @@ -4858,6 +4864,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 [lgfdlmprad] standard_name = flag_for_GFDL_microphysics_radiation_interaction long_name = flag for GFDL microphysics-radiation interaction @@ -10019,6 +10031,7 @@ dependencies = hooks/machine.F,hooks/physcons.F90 dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f dependencies = photochem/h2o_def.f,photochem/module_ozphys.F90 + dependencies = MP/TEMPO/tempo/module_mp_thompson_params.F90 dependencies = MP/GFDL/GFDL_parse_tracers.F90 [ccpp-arg-table] diff --git a/ccpp/physics b/ccpp/physics index b9be2d98c..a5981bcff 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit b9be2d98c21d2d6b815503a9292d4af57bc37e4b +Subproject commit a5981bcffdd66a387da82fce168127691d54523f From e3fe22f9e76321341c11d6b9d3322abe44432833 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 23 Sep 2024 21:19:54 +0000 Subject: [PATCH 10/17] Synced physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index a5981bcff..3d92c8db8 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit a5981bcffdd66a387da82fce168127691d54523f +Subproject commit 3d92c8db8acc942120e4e3e14f08b6ea360c586d From f17caf13f101730b701807be1677e5ee46d238da Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 23 Sep 2024 22:14:41 +0000 Subject: [PATCH 11/17] Omission from previous commit --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 3d92c8db8..6f8c3ebfb 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 3d92c8db8acc942120e4e3e14f08b6ea360c586d +Subproject commit 6f8c3ebfbf01ba5bc0f2365da592dfeb20be0515 From dc5009e3d0aea4d5317274058f2439448cd26c8e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 12 Nov 2024 20:36:22 +0000 Subject: [PATCH 12/17] Synced physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 6f8c3ebfb..5571bfab0 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 6f8c3ebfbf01ba5bc0f2365da592dfeb20be0515 +Subproject commit 5571bfab099fe086955264b3b39ee1ec92f65e79 From 81ba2855d1e56715b6c5930dde8002dc7770f9a8 Mon Sep 17 00:00:00 2001 From: Anders Jensen Date: Wed, 18 Dec 2024 19:27:38 +0000 Subject: [PATCH 13/17] Bug fixes and rename for TEMPO --- ccpp/config/ccpp_prebuild_config.py | 5 +++-- ccpp/data/GFS_typedefs.meta | 2 +- ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 0bd1c6554..858ab0b5d 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -20,7 +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_thompson_params.F90', + 'physics/physics/MP/TEMPO/tempo/module_mp_tempo_params.F90', 'physics/physics/photochem/module_h2ophys.F90', 'data/CCPP_typedefs.F90', 'data/GFS_typedefs.F90', @@ -49,6 +49,7 @@ 'module_mp_thompson_params' : { 'module_mp_thompson_params' : '', 'ty_tempo_cfg' : '', + }, 'module_h2ophys' : { 'module_h2ophys' : '', 'ty_h2ophys' : '', @@ -171,7 +172,7 @@ '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_thompson_params.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', diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index f5dd83c0a..d8d704b4a 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -10087,7 +10087,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_thompson_params.F90 + dependencies = MP/TEMPO/tempo/module_mp_tempo_params.F90 dependencies = photochem/module_ozphys.F90,photochem/module_h2ophys.F90 dependencies = MP/GFDL/GFDL_parse_tracers.F90 diff --git a/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml b/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml index 28fcba940..06cd3d6ae 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1_tempo.xml @@ -60,7 +60,7 @@ ugwpv1_gsldrag_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre From 846d1ce653390be44308eee8101a962168b6868f Mon Sep 17 00:00:00 2001 From: Anders Jensen Date: Wed, 18 Dec 2024 19:30:29 +0000 Subject: [PATCH 14/17] update pointer to physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 5571bfab0..f743cdbf3 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 5571bfab099fe086955264b3b39ee1ec92f65e79 +Subproject commit f743cdbf3ec64a2dc74cd91bdab295fadee663e8 From a0a861061de597bcbf30fa1f7c05853b559cdc7a Mon Sep 17 00:00:00 2001 From: Anders Jensen Date: Wed, 18 Dec 2024 19:49:49 +0000 Subject: [PATCH 15/17] update pointer to ccpp --- .gitmodules | 2 +- ccpp/physics | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index a25bd810d..9cd543b82 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,7 +9,7 @@ [submodule "ccpp/physics"] path = ccpp/physics url = https://github.com/AndersJensen-NOAA/ccpp-physics - branch = tempo_submodule + branch = tempo [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/ccpp/physics b/ccpp/physics index f743cdbf3..35aaeab53 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f743cdbf3ec64a2dc74cd91bdab295fadee663e8 +Subproject commit 35aaeab53252e9e47b6b209873a340732c5d3dff From ef2c37119d2d8e997715de80704017d22e5a9457 Mon Sep 17 00:00:00 2001 From: Anders Jensen Date: Thu, 19 Dec 2024 14:50:57 +0000 Subject: [PATCH 16/17] Updates for renaming Thompson to TEMPO --- ccpp/config/ccpp_prebuild_config.py | 4 ++-- ccpp/data/GFS_typedefs.F90 | 2 +- ccpp/physics | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 6decb97ce..64c9508c9 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -47,8 +47,8 @@ 'module_ozphys' : '', 'ty_ozphys' : '', }, - 'module_mp_thompson_params' : { - 'module_mp_thompson_params' : '', + 'module_mp_tempo_params' : { + 'module_mp_tempo_params' : '', 'ty_tempo_cfg' : '', }, 'module_h2ophys' : { diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 139c79670..94fccf448 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -15,7 +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_thompson_params,only: ty_tempo_cfg + 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, & diff --git a/ccpp/physics b/ccpp/physics index 35aaeab53..0f15c7ca4 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 35aaeab53252e9e47b6b209873a340732c5d3dff +Subproject commit 0f15c7ca42c3bcc3e9e7ca1e85c68c5616f25ef8 From 72746fcaa2baa263974934494b9db15e188ea720 Mon Sep 17 00:00:00 2001 From: Anders Jensen Date: Thu, 19 Dec 2024 22:27:16 +0000 Subject: [PATCH 17/17] Update pointer to CCPP --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 0f15c7ca4..be684f0bc 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 0f15c7ca42c3bcc3e9e7ca1e85c68c5616f25ef8 +Subproject commit be684f0bc3fac84db28080869c5b46e44b871d67