From fad9c8fad6cb429a956a17f5764fde461f6bb404 Mon Sep 17 00:00:00 2001 From: Weiwei Date: Mon, 19 Aug 2024 12:15:08 -0600 Subject: [PATCH] Code update to connect MMM WSM6 to CCPP SCM modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_common.F90 modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90 modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90 modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.meta modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 modified: ../../Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 modified: ../../Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90 modified: ../../Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta new file: gfs_mmm_mp_wsm6_post.F90 new file: gfs_mmm_mp_wsm6_post.meta new file: gfs_mmm_mp_wsm6_pre.F90 new file: gfs_mmm_mp_wsm6_pre.meta deleted: scm_mp_wsm6_post.F90 deleted: scm_mp_wsm6_post.meta deleted: scm_mp_wsm6_pre.F90 deleted: scm_mp_wsm6_pre.meta modified: ../../PBL/MYNN_EDMF/mynnedmf_wrapper.F90 modified: ../../PBL/MYNN_EDMF/mynnedmf_wrapper.meta modified: ../../Radiation/radiation_clouds.f modified: ../../mmm_physics --- .../UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta | 2 +- .../GFS_PBL_generic_common.F90 | 8 +- .../UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90 | 19 +- .../UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta | 7 + .../UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90 | 21 +- .../UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.meta | 7 + .../UFS_SCM_NEPTUNE/GFS_debug.F90 | 2 +- .../UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 | 18 +- .../GFS_suite_interstitial_4.F90 | 2 +- .../maximum_hourly_diagnostics.F90 | 7 +- .../maximum_hourly_diagnostics.meta | 7 + physics/MP/wsm6/gfs_mmm_mp_wsm6_post.F90 | 82 ++++++ physics/MP/wsm6/gfs_mmm_mp_wsm6_post.meta | 234 +++++++++++++++++ physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.F90 | 112 ++++++++ physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.meta | 248 ++++++++++++++++++ physics/MP/wsm6/scm_mp_wsm6_post.F90 | 53 ---- physics/MP/wsm6/scm_mp_wsm6_post.meta | 27 -- physics/MP/wsm6/scm_mp_wsm6_pre.F90 | 57 ---- physics/MP/wsm6/scm_mp_wsm6_pre.meta | 71 ----- physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90 | 30 ++- physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta | 7 + physics/Radiation/radiation_clouds.f | 51 +++- physics/mmm_physics | 2 +- 23 files changed, 820 insertions(+), 254 deletions(-) create mode 100644 physics/MP/wsm6/gfs_mmm_mp_wsm6_post.F90 create mode 100755 physics/MP/wsm6/gfs_mmm_mp_wsm6_post.meta create mode 100644 physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.F90 create mode 100755 physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.meta delete mode 100644 physics/MP/wsm6/scm_mp_wsm6_post.F90 delete mode 100644 physics/MP/wsm6/scm_mp_wsm6_post.meta delete mode 100644 physics/MP/wsm6/scm_mp_wsm6_pre.F90 delete mode 100644 physics/MP/wsm6/scm_mp_wsm6_pre.meta diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta index eda9eab1d..7667906f8 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta @@ -437,7 +437,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys - intent = inout + intent = in [rain0] standard_name = lwe_thickness_of_explicit_rain_amount long_name = explicit rain on physics timestep diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_common.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_common.F90 index 5f09f5347..58736f731 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_common.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_common.F90 @@ -11,7 +11,7 @@ module GFS_PBL_generic_common contains - subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, & + subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6,imp_physics_wsm6_mmm, & imp_physics_thompson, ltaerosol,mraerosol, & imp_physics_mg, ntgl, imp_physics_gfdl, & imp_physics_zhao_carr, imp_physics_nssl,& @@ -19,7 +19,7 @@ subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, & errmsg, errflg) implicit none ! - integer, intent(in ) :: imp_physics, imp_physics_wsm6, & + integer, intent(in ) :: imp_physics, imp_physics_wsm6, imp_physics_wsm6_mmm, & imp_physics_thompson, & imp_physics_mg, ntgl, imp_physics_gfdl, & imp_physics_zhao_carr,imp_physics_nssl @@ -31,9 +31,9 @@ subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, & errflg = 0 ! Set Interstitial%kk = last index in diffused tracer array before chemistry-aerosol tracers - if (imp_physics == imp_physics_wsm6) then + if (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_wsm6_mmm) then ! WSM6 - kk = 4 + kk = 7 elseif (imp_physics == imp_physics_thompson) then ! Thompson if(ltaerosol) then diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90 index a4e5f172a..894767aa2 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90 @@ -11,7 +11,7 @@ module GFS_PBL_generic_post subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, & ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev,nqrimef, & trans_aero, ntchs, ntchm, ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz, & - imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_mg, & + imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_wsm6_mmm, imp_physics_zhao_carr, imp_physics_mg, & imp_physics_fer_hires, imp_physics_nssl, nssl_ccn_on, ltaerosol, mraerosol, nssl_hail_on, nssl_3moment, & cplflx, cplaqm, cplchm, lssav, flag_for_pbl_generic_tend, ldiag3d, lsidea, hybedmf, do_shoc, satmedmf, & shinhong, do_ysu, dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, & @@ -32,7 +32,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef integer, intent(in) :: ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz logical, intent(in) :: trans_aero - integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 + integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_wsm6_mmm integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires integer, intent(in) :: imp_physics_nssl logical, intent(in) :: nssl_ccn_on, nssl_hail_on, nssl_3moment @@ -103,7 +103,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! if (trans_aero) then ! Set kk if chemistry-aerosol tracers are diffused - call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, & + call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, imp_physics_wsm6_mmm, & imp_physics_thompson, ltaerosol,mraerosol, & imp_physics_mg, ntgl, imp_physics_gfdl, & imp_physics_zhao_carr, imp_physics_nssl,& @@ -122,14 +122,17 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, enddo endif ! - if (imp_physics == imp_physics_wsm6) then + if (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_wsm6_mmm) then ! WSM6 do k=1,levs do i=1,im - dqdt(i,k,ntqv) = dvdftra(i,k,1) - dqdt(i,k,ntcw) = dvdftra(i,k,2) - dqdt(i,k,ntiw) = dvdftra(i,k,3) - dqdt(i,k,ntoz) = dvdftra(i,k,4) + dqdt(i,k,ntqv) = dvdftra(i,k,1) + dqdt(i,k,ntcw) = dvdftra(i,k,2) + dqdt(i,k,ntiw) = dvdftra(i,k,3) + dqdt(i,k,ntrw) = dvdftra(i,k,4) + dqdt(i,k,ntsw) = dvdftra(i,k,5) + dqdt(i,k,ntgl) = dvdftra(i,k,6) + dqdt(i,k,ntoz) = dvdftra(i,k,7) enddo enddo diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta index d49a885c5..4c2537f92 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta @@ -260,6 +260,13 @@ dimensions = () type = integer intent = in +[imp_physics_wsm6_mmm] + standard_name = identifier_for_wsm6_mmm_microphysics_scheme + long_name = choice of WSM6 MMM microphysics scheme + units = flag + dimensions = () + type = integer + intent = in [imp_physics_zhao_carr] standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90 index d8ed0f8fc..47e92ef3a 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90 @@ -13,7 +13,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index, ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, & ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef, trans_aero, ntchs, ntchm, & ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz, & - imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & + imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_wsm6_mmm, & imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires, imp_physics_nssl, & ltaerosol, mraerosol, nssl_ccn_on, nssl_hail_on, nssl_3moment, & hybedmf, do_shoc, satmedmf, qgrs, vdftra, save_u, save_v, save_t, save_q, & @@ -31,7 +31,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index, integer, intent(in) :: ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef,ntchs, ntchm integer, intent(in) :: ntccn, nthl, nthnc, ntgv, nthv, ntrz, ntgz, nthz logical, intent(in) :: trans_aero, ldiag3d, qdiag3d, lssav - integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 + integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_wsm6_mmm integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: ltaerosol, hybedmf, do_shoc, satmedmf, flag_for_pbl_generic_tend, mraerosol integer, intent(in) :: imp_physics_nssl @@ -62,17 +62,20 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index, vdftra = qgrs rtg_ozone_index = ntoz else - if (imp_physics == imp_physics_wsm6) then + if (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_wsm6_mmm) then ! WSM6 do k=1,levs do i=1,im - vdftra(i,k,1) = qgrs(i,k,ntqv) - vdftra(i,k,2) = qgrs(i,k,ntcw) - vdftra(i,k,3) = qgrs(i,k,ntiw) - vdftra(i,k,4) = qgrs(i,k,ntoz) + vdftra(i,k,1) = qgrs(i,k,ntqv) + vdftra(i,k,2) = qgrs(i,k,ntcw) + vdftra(i,k,3) = qgrs(i,k,ntiw) + vdftra(i,k,4) = qgrs(i,k,ntrw) + vdftra(i,k,5) = qgrs(i,k,ntsw) + vdftra(i,k,6) = qgrs(i,k,ntgl) + vdftra(i,k,7) = qgrs(i,k,ntoz) enddo enddo - rtg_ozone_index = 4 + rtg_ozone_index = 7 ! Ferrier-Aligo elseif (imp_physics == imp_physics_fer_hires) then @@ -272,7 +275,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index, endif ! if (trans_aero) then - call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, & + call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, imp_physics_wsm6_mmm, & imp_physics_thompson, ltaerosol,mraerosol, & imp_physics_mg, ntgl, imp_physics_gfdl, & imp_physics_zhao_carr, imp_physics_nssl,& diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.meta index 7a8e72bba..bcf6cb5da 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.meta @@ -266,6 +266,13 @@ dimensions = () type = integer intent = in +[imp_physics_wsm6_mmm] + standard_name = identifier_for_wsm6_mmm_microphysics_scheme + long_name = choice of WSM6 MMM microphysics scheme + units = flag + dimensions = () + type = integer + intent = in [imp_physics_zhao_carr] standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 index ed26b795f..b5c7fe14e 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 @@ -1392,7 +1392,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clxss ', Interstitial%clxss ) end if ! GFDL and Thompson MP - if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_nssl) then + if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_nssl .or. Model%imp_physics == Model%imp_physics_wsm6_mmm) then call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%graupelmp ', Interstitial%graupelmp ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icemp ', Interstitial%icemp ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rainmp ', Interstitial%rainmp ) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 index c1d4afa98..8b7d188f7 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 @@ -721,7 +721,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,& ccnd(i,k,4) = tracer1(i,k,ntsw) ! snow water enddo enddo - elseif (ncnd == 5 .or. ncnd == 6) then ! GFDL MP, Thompson, MG3, NSSL + elseif (ncnd == 5 .or. ncnd == 6) then ! GFDL MP, Thompson, MG3, NSSL, MMM WSM6 do k=1,LMK do i=1,IM ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water @@ -880,6 +880,22 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,& ! not used yet -- effr_in should always be true for now endif + elseif (imp_physics == imp_physics_wsm6_mmm ) then ! MMM WSM6 MP + cldcov = 0.0 + if(effr_in) then + do k=1,lm + k1 = k + kd + do i=1,im + effrl(i,k1) = effrl_inout(i,k)! re_cloud (i,k) + effri(i,k1) = effri_inout(i,k)! re_ice (i,k) + effrr(i,k1) = 1000. ! Neither G or Gp needs it, pass in a placeholder with reasonable value + effrs(i,k1) = effrs_inout(i,k) ! re_snow(i,k) + enddo + enddo + else + ! not used yet -- effr_in should always be true for now + endif + elseif (imp_physics == imp_physics_thompson) then ! Thompson MP ! ! Compute effective radii for QC, QI, QS with (GF, MYNN) or without (all others) sub-grid clouds diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 index 746d02205..130804e9a 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 @@ -211,7 +211,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, tracers_total, ntr enddo endif - if ((imp_physics == imp_physics_thompson .or. imp_physics == imp_physics_wsm6_mmm) & + if ((imp_physics == imp_physics_thompson) & .and. (ntlnc>0 .or. ntinc>0)) then if_convert_dry_rho: if (convert_dry_rho) then do k=1,levs diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90 index cd1016053..9d6598340 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90 @@ -25,7 +25,7 @@ module maximum_hourly_diagnostics subroutine maximum_hourly_diagnostics_run(im, levs, reset, lradar, imp_physics, & imp_physics_gfdl, imp_physics_thompson, & imp_physics_fer_hires, imp_physics_nssl, & - con_g, phil, & + imp_physics_wsm6_mmm, con_g, phil, & gt0, refl_10cm, refdmax, refdmax263k, u10m, v10m, & u10max, v10max, spd10max, pgr, t2m, q2m, t02max, & t02min, rh02max, rh02min, dtp, rain, pratemax, & @@ -37,7 +37,7 @@ subroutine maximum_hourly_diagnostics_run(im, levs, reset, lradar, imp_physics, integer, intent(in) :: im, levs, kdt logical, intent(in) :: reset, lradar, lightning_threat integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_fer_hires, & - imp_physics_nssl + imp_physics_nssl, imp_physics_wsm6_mmm real(kind_phys), intent(in ) :: con_g real(kind_phys), intent(in ) :: con_rd real(kind_phys), intent(in ) :: phil(:,:) @@ -86,7 +86,8 @@ subroutine maximum_hourly_diagnostics_run(im, levs, reset, lradar, imp_physics, if (lradar .and. (imp_physics == imp_physics_gfdl .or. & imp_physics == imp_physics_thompson .or. & imp_physics == imp_physics_fer_hires .or. & - imp_physics == imp_physics_nssl )) then + imp_physics == imp_physics_nssl .or. & + imp_physics == imp_physics_wsm6_mmm)) then allocate(refd(im)) allocate(refd263k(im)) call max_fields(phil,refl_10cm,con_g,im,levs,refd,gt0,refd263k) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta index 0c2d1bcbe..61d4ced1b 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta @@ -70,6 +70,13 @@ dimensions = () type = integer intent = in +[imp_physics_wsm6_mmm] + standard_name = identifier_for_wsm6_mmm_microphysics_scheme + long_name = choice of WSM6 MMM microphysics scheme + units = flag + dimensions = () + type = integer + intent = in [con_g] standard_name = gravitational_acceleration long_name = gravitational acceleration diff --git a/physics/MP/wsm6/gfs_mmm_mp_wsm6_post.F90 b/physics/MP/wsm6/gfs_mmm_mp_wsm6_post.F90 new file mode 100644 index 000000000..0db8e8218 --- /dev/null +++ b/physics/MP/wsm6/gfs_mmm_mp_wsm6_post.F90 @@ -0,0 +1,82 @@ +! ########################################################################################### +! +! ########################################################################################### +module gfs_mmm_mp_wsm6_post + use machine, only: kind_phys + + implicit none + + public gfs_mmm_mp_wsm6_post_run + +contains +!> \section arg_table_gfs_mmm_mp_wsm6_post_run +!! \htmlinclude gfs_mmm_mp_wsm6_post_run.html +!! + ! ######################################################################################### + ! + ! ######################################################################################### + subroutine gfs_mmm_mp_wsm6_post_run(nCol, nLev, re_qc, re_qi, re_qs, re_qc_um, re_qi_um, re_qs_um, & + convert_dry_rho, qv, spechum, qc, qr, qi, qs, qg, & + rainmp_mm, snowmp_mm, graupelmp_mm, rainmp, snowmp, graupelmp, & + rain_nonphy_mm, snow_nonphy_mm, graupel_nonphy_mm, & + rain_nonphy, snow_nonphy, graupel_nonphy, prcpmp, errmsg, errflg) + + ! input variables + integer, intent(in) :: nCol + integer, intent(in) :: nLev + real(kind_phys), dimension(:,:), intent(in) :: re_qc, re_qi, re_qs + real(kind_phys), dimension(:,:), intent(in) :: qv + real(kind_phys), dimension(:), intent(in) :: rainmp_mm, snowmp_mm, graupelmp_mm, rain_nonphy_mm, snow_nonphy_mm, graupel_nonphy_mm + logical, intent(in) :: convert_dry_rho + + ! output variables + real(kind_phys), dimension(:,:), intent(out) :: re_qc_um, re_qi_um, re_qs_um + real(kind_phys), dimension(:,:), intent(inout) :: spechum, qc, qr, qi, qs, qg + real(kind_phys), dimension(:), intent(out) :: rainmp, snowmp, graupelmp, rain_nonphy, snow_nonphy, graupel_nonphy, prcpmp + + character(len=*), intent(out) :: & + errmsg ! CCPP error message + integer, intent(out) :: & + errflg ! CCPP error code + ! local variables + integer :: i, k + + ! Initialize CCPP error handling + errmsg = '' + errflg = 0 + + ! Convert unit of meter to micrometer + do k=1,nLev + do i=1,nCol + re_qc_um(i,k) = re_qc(i,k) * 1e6 + re_qi_um(i,k) = re_qi(i,k) * 1e6 + re_qs_um(i,k) = re_qs(i,k) * 1e6 + end do + end do + + !> - Convert water vapor mixing ratio back to specific humidity + spechum = qv/(1.0_kind_phys+qv) + + if (convert_dry_rho) then + qc = qc/(1.0_kind_phys+qv) + qr = qr/(1.0_kind_phys+qv) + qi = qi/(1.0_kind_phys+qv) + qs = qs/(1.0_kind_phys+qv) + qg = qg/(1.0_kind_phys+qv) + end if + + !> - Convert unit of precipitation from mm to m + rainmp = rainmp_mm / 1e3 + snowmp = snowmp_mm / 1e3 + graupelmp = graupelmp_mm / 1e3 + + rain_nonphy = rain_nonphy_mm / 1e3 + snow_nonphy = snow_nonphy_mm / 1e3 + graupel_nonphy = graupel_nonphy_mm / 1e3 + + !> - Output total amount of precip (rain, snow, graupel) on physics timestep + prcpmp = rainmp + snowmp + graupelmp + + end subroutine gfs_mmm_mp_wsm6_post_run + +end module gfs_mmm_mp_wsm6_post diff --git a/physics/MP/wsm6/gfs_mmm_mp_wsm6_post.meta b/physics/MP/wsm6/gfs_mmm_mp_wsm6_post.meta new file mode 100755 index 000000000..f2e1e708e --- /dev/null +++ b/physics/MP/wsm6/gfs_mmm_mp_wsm6_post.meta @@ -0,0 +1,234 @@ +[ccpp-table-properties] + name = gfs_mmm_mp_wsm6_post + type = scheme + dependencies = ../../hooks/machine.F + +######################################################################## +[ccpp-arg-table] + name = gfs_mmm_mp_wsm6_post_run + type = scheme +[nCol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in +[nLev] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in +[re_qc] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_meter + long_name = eff. radius of cloud liquid water particle in meter + units = m + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real | kind = kind_phys + intent = in +[re_qi] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_meter + long_name = eff. radius of cloud ice water particle in meter + units = m + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real | kind = kind_phys + intent = in +[re_qs] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_meter + long_name = effective radius of cloud snow particle in meter + units = m + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real | kind = kind_phys + intent = in +[re_qc_um] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle + long_name = eff. radius of cloud liquid water particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real | kind = kind_phys + intent = out +[re_qi_um] + standard_name = effective_radius_of_stratiform_cloud_ice_particle + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real | kind = kind_phys + intent = out +[re_qs_um] + standard_name = effective_radius_of_stratiform_cloud_snow_particle + long_name = effective radius of cloud snow particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real | kind = kind_phys + intent = out +[convert_dry_rho] + standard_name = flag_for_converting_hydrometeors_from_moist_to_dry_air + long_name = flag for converting hydrometeors from moist to dry air + units = flag + dimensions = () + type = logical + intent = in +[qv] + standard_name = water_vapor_mixing_ratio + long_name = water vapor mixing ratio + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real | kind = kind_phys + intent = in +[spechum] + standard_name = specific_humidity_of_new_state + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qc] + standard_name = cloud_liquid_water_mixing_ratio_of_new_state + long_name = cloud water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qr] + standard_name = rain_mixing_ratio_of_new_state + long_name = rain water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qi] + standard_name = cloud_ice_mixing_ratio_of_new_state + long_name = ice water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qs] + standard_name = snow_mixing_ratio_of_new_state + long_name = snow water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qg] + standard_name = graupel_mixing_ratio_of_new_state + long_name = graupel mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[rainmp_mm] + standard_name = lwe_thickness_of_explicit_rain_amount_in_mm + long_name = explicit rain on physics timestep + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = in +[snowmp_mm] + standard_name = lwe_thickness_of_snow_amount_in_mm + long_name = explicit snow fall on physics timestep + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = in +[graupelmp_mm] + standard_name = lwe_thickness_of_graupel_amount_in_mm + long_name = explicit graupel fall on physics timestep + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = in +[rainmp] + standard_name = lwe_thickness_of_explicit_rain_amount + long_name = explicit rain on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[snowmp] + standard_name = lwe_thickness_of_snow_amount + long_name = explicit snow fall on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[graupelmp] + standard_name = lwe_thickness_of_graupel_amount + long_name = explicit graupel fall on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[rain_nonphy_mm] + standard_name = lwe_thickness_of_rain_amount_on_dynamics_timestep_in_mm + long_name = total rain at this time step + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = in +[snow_nonphy_mm] + standard_name = lwe_thickness_of_snow_amount_on_dynamics_timestep_in_mm + long_name = snow fall at this time step + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = in +[graupel_nonphy_mm] + standard_name = lwe_thickness_of_graupel_amount_on_dynamics_timestep_in_mm + long_name = graupel fall at this time step + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = in +[rain_nonphy] + standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep + long_name = total rain at this time step + units = m + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[snow_nonphy] + standard_name = lwe_thickness_of_snow_amount_on_dynamics_timestep + long_name = snow fall at this time step + units = m + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[graupel_nonphy] + standard_name = lwe_thickness_of_graupel_amount_on_dynamics_timestep + long_name = graupel fall at this time step + units = m + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[prcpmp] + standard_name = lwe_thickness_of_explicit_precipitation_amount + long_name = explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out diff --git a/physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.F90 b/physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.F90 new file mode 100644 index 000000000..ecdb133c3 --- /dev/null +++ b/physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.F90 @@ -0,0 +1,112 @@ +! ########################################################################################### +! +! ########################################################################################### +module gfs_mmm_mp_wsm6_pre + use machine, only: kind_phys + + implicit none + + public gfs_mmm_mp_wsm6_pre_run + +contains +!> \section arg_table_gfs_mmm_mp_wsm6_pre_run +!! \htmlinclude gfs_mmm_mp_wsm6_pre_run.html +!! + ! ######################################################################################### + ! + ! ######################################################################################### + subroutine gfs_mmm_mp_wsm6_pre_run(nCol, nLev, phii, con_1ograv, dz, con_eps, prsl, con_rd, tgrs, spechum, rho, & + re_qc_bg, re_qi_bg, re_qs_bg, re_qc_max, re_qi_max, re_qs_max, & + convert_dry_rho, qv, qc, qr, qi, qs, qg, & + rainmp_mm, snowmp_mm, graupelmp_mm, & + rain_nonphy_mm, snow_nonphy_mm, graupel_nonphy_mm, errmsg, errflg) + + ! Input variables + integer, intent(in) :: nCol + integer, intent(in) :: nLev + real(kind_phys), intent(in) :: con_eps, con_rd, con_1ograv + real(kind_phys), dimension(:,:), intent(in) :: & + tgrs, & ! air temperature (K) + prsl, & ! air pressure (Pa) + phii ! geopotential at model-interfaces (m2 s-2) + + logical, intent(in ) :: convert_dry_rho + real(kind_phys), dimension(:,:), intent(inout) :: spechum, qv, qc, qr, qi, qs, qg + + ! Output variables + real(kind_phys), intent(out) :: re_qc_bg, re_qi_bg, re_qs_bg + real(kind_phys), intent(out) :: re_qc_max, re_qi_max, re_qs_max + real(kind_phys), dimension(:), intent(out) :: rainmp_mm, snowmp_mm, graupelmp_mm, rain_nonphy_mm, snow_nonphy_mm, graupel_nonphy_mm + real(kind_phys), dimension(:,:), intent(out) :: & + rho, & ! air density (kg/m3) + dz ! layer thickness (m) + + character(len=*), intent(out) :: & + errmsg ! CCPP error message + integer, intent(out) :: & + errflg ! CCPP error code + + ! Local variables + integer :: i, k + real(kind_phys),dimension(nCol, nLev+1) :: zi + + ! Initialize CCPP error handling + errmsg = '' + errflg = 0 + + ! Height (m) at interface from geopotential (m2/s2) + do k = 1,nLev+1 + do i = 1,nCol + zi(i,k) = phii(i,k)*con_1ograv + enddo + enddo + + ! Compute layer thickness (m) + do k = 1,nLev + do i = 1,nCol + dz(i,k) = abs(zi(i,k)-zi(i,k+1)) + enddo + enddo + + !> - Density of moist air in kg m-3 + do k=1,nLev + do i=1,nCol + ! convert specific humidity to water vapor mixing ratio + qv(i,k) = spechum(i,k)/(1.0_kind_phys-spechum(i,k)) + ! calculate air density + rho(i,k)= con_eps * prsl(i,k) / (con_rd * tgrs(i,k) * (qv(i,k) + con_eps)) + end do + end do + + !> - WSM6 uses "dry" hydrometeor fields, e.g., water vapor mixing ratio (the mass of water vapor per unit mass of dry air) + !> - CCPP only passes "wet" hydrometeor fields, e.g., specific humidity (the mass of water vapor per unit mass of air incl. vapor) + !> - Need to do the following conversion + if (convert_dry_rho) then + qc = qc/(1.0_kind_phys-spechum) + qr = qr/(1.0_kind_phys-spechum) + qi = qi/(1.0_kind_phys-spechum) + qs = qs/(1.0_kind_phys-spechum) + qg = qg/(1.0_kind_phys-spechum) + end if + + ! initialize background effective radius in meter (values from WRF) + re_qc_bg = 2.49E-6 + re_qi_bg = 4.99E-6 + re_qs_bg = 9.99E-6 + + ! initialize maximum effective radius in um (LF2024: have not checked if they are updated in WRF-v4.0) + re_qc_max = 50. + re_qi_max = 125. + re_qs_max = 999.0 + + ! intialize precipitation in mm + rainmp_mm = 0.0 + snowmp_mm = 0.0 + graupelmp_mm = 0.0 + rain_nonphy_mm = 0.0 + snow_nonphy_mm = 0.0 + graupel_nonphy_mm = 0.0 + + end subroutine gfs_mmm_mp_wsm6_pre_run + +end module gfs_mmm_mp_wsm6_pre diff --git a/physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.meta b/physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.meta new file mode 100755 index 000000000..7aad6766d --- /dev/null +++ b/physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.meta @@ -0,0 +1,248 @@ +[ccpp-table-properties] + name = gfs_mmm_mp_wsm6_pre + type = scheme + dependencies = ../../hooks/machine.F + +######################################################################## +[ccpp-arg-table] + name = gfs_mmm_mp_wsm6_pre_run + type = scheme +[nCol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in +[nLev] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in +[phii] + standard_name = geopotential_at_interface + long_name = geopotential at model layer interfaces + units = m2 s-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + intent = in +[con_1ograv] + standard_name = one_divided_by_the_gravitational_acceleration + long_name = one divided by gravitational acceleration + units = s2 m-1 + dimensions = () + type = real + kind = kind_phys + intent = in +[dz] + standard_name = layer_thickness + long_name = layer_thickness + units = m + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in +[con_rd] + standard_name = gas_constant_of_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in +[tgrs] + standard_name = air_temperature + long_name = air temperature + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in +[spechum] + standard_name = specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in +[rho] + standard_name = air_density + long_name = air density + units = kg m-3 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out +[re_qc_bg] + standard_name = background_cloud_liquid_water_effective_radius + long_name = background cloud liquid water effective radius + units = m + dimensions = () + type = real | kind = kind_phys + intent = out +[re_qi_bg] + standard_name = background_ice_water_effective_radius + long_name = background ice water effective radius + units = m + dimensions = () + type = real | kind = kind_phys + intent = out +[re_qs_bg] + standard_name = background_snow_effective_radius + long_name = background snow effective radius + units = m + dimensions = () + type = real | kind = kind_phys + intent = out +[re_qc_max] + standard_name = maximum_cloud_liquid_water_effective_radius + long_name = maximum cloud liquid water effective radius + units = m + dimensions = () + type = real | kind = kind_phys + intent = out +[re_qi_max] + standard_name = maximum_ice_water_effective_radius + long_name = maximum ice water effective radius + units = m + dimensions = () + type = real | kind = kind_phys + intent = out +[re_qs_max] + standard_name = maximum_snow_effective_radius + long_name = maximum snow effective radius + units = m + dimensions = () + type = real | kind = kind_phys + intent = out +[convert_dry_rho] + standard_name = flag_for_converting_hydrometeors_from_moist_to_dry_air + long_name = flag for converting hydrometeors from moist to dry air + units = flag + dimensions = () + type = logical + intent = in +[qv] + standard_name = water_vapor_mixing_ratio + long_name = water vapor mixing ratio + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real | kind = kind_phys + intent = inout +[qc] + standard_name = cloud_liquid_water_mixing_ratio_of_new_state + long_name = cloud water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qr] + standard_name = rain_mixing_ratio_of_new_state + long_name = rain water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qi] + standard_name = cloud_ice_mixing_ratio_of_new_state + long_name = ice water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qs] + standard_name = snow_mixing_ratio_of_new_state + long_name = snow water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[qg] + standard_name = graupel_mixing_ratio_of_new_state + long_name = graupel mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[rainmp_mm] + standard_name = lwe_thickness_of_explicit_rain_amount_in_mm + long_name = explicit rain on physics timestep + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[snowmp_mm] + standard_name = lwe_thickness_of_snow_amount_in_mm + long_name = explicit snow fall on physics timestep + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[graupelmp_mm] + standard_name = lwe_thickness_of_graupel_amount_in_mm + long_name = explicit graupel fall on physics timestep + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[rain_nonphy_mm] + standard_name = lwe_thickness_of_rain_amount_on_dynamics_timestep_in_mm + long_name = total rain at this time step + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[snow_nonphy_mm] + standard_name = lwe_thickness_of_snow_amount_on_dynamics_timestep_in_mm + long_name = snow fall at this time step + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[graupel_nonphy_mm] + standard_name = lwe_thickness_of_graupel_amount_on_dynamics_timestep_in_mm + long_name = graupel fall at this time step + units = mm + dimensions = (horizontal_loop_extent) + type = real | kind = kind_phys + intent = out +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out diff --git a/physics/MP/wsm6/scm_mp_wsm6_post.F90 b/physics/MP/wsm6/scm_mp_wsm6_post.F90 deleted file mode 100644 index ba885f1a1..000000000 --- a/physics/MP/wsm6/scm_mp_wsm6_post.F90 +++ /dev/null @@ -1,53 +0,0 @@ -!>\file scm_mp_wsm6_post.F90 -!! This file runs the Single-Moment 6-class Microphysics scheme (WSM6) - - -!>\defgroup aathompson Aerosol-Aware Thompson MP Module -!! This module runs the Single-Moment 6-class Microphysics scheme (WSM6) -module scm_mp_wsm6_post - - use ccpp_kinds, only : kind_phys - - use mp_wsm6, only : mp_wsm6_finalize - ! use module_mp_thompson, only : naIN0, naIN1, naCCN0, naCCN1, eps, Nt_c_l, Nt_c_o - ! use module_mp_thompson, only : re_qc_min, re_qc_max, re_qi_min, re_qi_max, re_qs_min, re_qs_max - - ! use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber, make_RainNumber - - implicit none - - public :: scm_mp_wsm6_post_finalize - - private - - logical :: is_initialized = .False. - - ! integer, parameter :: ext_ndiag3d = 37 - - contains - -!> \section arg_table_scm_mp_wsm6_finalize Argument Table -!! \htmlinclude scm_mp_wsm6_finalize.html -!! - subroutine scm_mp_wsm6_post_finalize(errmsg, errflg) - - implicit none - - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Initialize the CCPP error handling variables - errmsg = '' - errflg = 0 - - - - if (.not. is_initialized) return - - call mp_wsm6_finalize(errmsg, errflg) - - is_initialized = .false. - - end subroutine scm_mp_wsm6_post_finalize - -end module scm_mp_wsm6_post diff --git a/physics/MP/wsm6/scm_mp_wsm6_post.meta b/physics/MP/wsm6/scm_mp_wsm6_post.meta deleted file mode 100644 index bfa6acaeb..000000000 --- a/physics/MP/wsm6/scm_mp_wsm6_post.meta +++ /dev/null @@ -1,27 +0,0 @@ -[ccpp-table-properties] - name = scm_mp_wsm6_post - type = scheme - dependencies = ../../hooks/mmm_kinds.F90, ../../mmm_physics/mp_wsm6.F90 - -######################################################################## - -[ccpp-arg-table] - name = scm_mp_wsm6_finalize - type = scheme -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## \ No newline at end of file diff --git a/physics/MP/wsm6/scm_mp_wsm6_pre.F90 b/physics/MP/wsm6/scm_mp_wsm6_pre.F90 deleted file mode 100644 index 8fcee2c54..000000000 --- a/physics/MP/wsm6/scm_mp_wsm6_pre.F90 +++ /dev/null @@ -1,57 +0,0 @@ -!>\file scm_mp_wsm6_pre.F90 -!! This file runs the Single-Moment 6-class Microphysics scheme (WSM6) - - -!>\defgroup aathompson Aerosol-Aware Thompson MP Module -!! This module runs the Single-Moment 6-class Microphysics scheme (WSM6) -module scm_mp_wsm6_pre - - use ccpp_kinds, only : kind_phys - use mp_wsm6, only : mp_wsm6_init - - implicit none - - public :: scm_mp_wsm6_pre_init - - private - - logical :: is_initialized = .False. - - contains - -!> This subroutine is a wrapper around the actual mp_wsm6_init(). -!! \section arg_table_scm_mp_wsm6_init Argument Table -!! \htmlinclude scm_mp_wsm6_init.html -!! - subroutine scm_mp_wsm6_pre_init(den0, denr, dens, cl, & - cpv, hail_opt, errmsg, errflg) - - implicit none - ! Input arguments: - real(kind=kind_phys), intent(in ) :: den0 - real(kind=kind_phys), intent(in ) :: denr - real(kind=kind_phys), intent(in ) :: dens - real(kind=kind_phys), intent(in ) :: cl - real(kind=kind_phys), intent(in ) :: cpv - integer, intent(in ) :: hail_opt - - ! CCPP error handling - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Initialize the CCPP error handling variables - errmsg = '' - errflg = 0 - - if (is_initialized) return - - ! Call wsm6 init - call mp_wsm6_init(den0, denr, dens, cl, & - cpv, hail_opt, errmsg, errflg) - - if (errflg /= 0) return - - is_initialized = .true. - - end subroutine scm_mp_wsm6_pre_init -end module scm_mp_wsm6_pre diff --git a/physics/MP/wsm6/scm_mp_wsm6_pre.meta b/physics/MP/wsm6/scm_mp_wsm6_pre.meta deleted file mode 100644 index 85752842c..000000000 --- a/physics/MP/wsm6/scm_mp_wsm6_pre.meta +++ /dev/null @@ -1,71 +0,0 @@ -[ccpp-table-properties] - name = scm_mp_wsm6_pre - type = scheme - dependencies = ../../hooks/mmm_kinds.F90, ../../mmm_physics/mp_wsm6.F90 - -######################################################################## -[ccpp-arg-table] - name = scm_mp_wsm6_init - type = scheme -[den0] - standard_name = density_of_dry_air - long_name = density of dry air - units = kg m-3 - dimensions = () - type = real - kind = kind_phys - intent = in -[denr] - standard_name = fresh_liquid_water_density_at_0c - long_name = density of liquid water - units = kg m-3 - dimensions = () - type = real - kind = kind_phys - intent = in -[dens] - standard_name = density_of_snow - long_name = density of snow - units = kg m-3 - dimensions = () - type = real - kind = kind_phys - intent = in -[cl] - standard_name = specific_heat_of_liquid_water_at_constant_pressure - long_name = specific heat of liquid water at constant pressure - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys - intent = in -[cpv] - standard_name = four_times_gas_constant_water_vapor - long_name = four times the gas constant water vapor - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys - intent = in -[hail_opt] - standard_name = flag_for_hail_instead_of_graupel_parameters - long_name = flag for hail instead of graupel parameters (graupel if false) - units = flag - dimensions = () - type = integer - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out diff --git a/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90 b/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90 index 487753027..7d97fe468 100644 --- a/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90 +++ b/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90 @@ -155,7 +155,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & icloud_bl, do_mynnsfclay, & & imp_physics, imp_physics_gfdl, & & imp_physics_thompson, imp_physics_wsm6, & - & imp_physics_fa, & + & imp_physics_wsm6_mmm, imp_physics_fa, & & chem3d, frp, mix_chem, rrfs_sd, enh_mix, & & nchem, ndvel, vdep, smoke_dbg, & & imp_physics_nssl, nssl_ccn_on, & @@ -203,7 +203,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & bl_mynn_cloudmix, & & bl_mynn_mixqt, & & bl_mynn_output, & - & imp_physics, imp_physics_wsm6, & + & imp_physics,imp_physics_wsm6,imp_physics_wsm6_mmm, & & imp_physics_thompson, imp_physics_gfdl, & & imp_physics_nssl, imp_physics_fa, & & spp_pbl, & @@ -388,6 +388,30 @@ SUBROUTINE mynnedmf_wrapper_run( & qnbca(i,k) = 0. enddo enddo + elseif ( imp_physics == imp_physics_wsm6_mmm ) then + ! MMM WSM6 + FLAG_QI = .true. + FLAG_QNI= .false. + FLAG_QC = .true. + FLAG_QNC= .false. + FLAG_QS = .true. + FLAG_QNWFA= .false. + FLAG_QNIFA= .false. + FLAG_QNBCA= .false. + do k=1,levs + do i=1,im + sqv(i,k) = qgrs_water_vapor(i,k) + sqc(i,k) = qgrs_liquid_cloud(i,k) + sqi(i,k) = qgrs_ice(i,k) + sqs(i,k) = qgrs_snow(i,k) + ozone(i,k) = qgrs_ozone(i,k) + qnc(i,k) = 0. + qni(i,k) = 0. + qnwfa(i,k) = 0. + qnifa(i,k) = 0. + qnbca(i,k) = 0. + enddo + enddo elseif (imp_physics == imp_physics_nssl ) then ! NSSL FLAG_QI = .true. @@ -802,7 +826,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !enddo !DO moist/scalar/tracer tendencies: - if (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_fa) then + if (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_wsm6_mmm .or. imp_physics == imp_physics_fa) then ! WSM6 do k=1,levs do i=1,im diff --git a/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta b/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta index 00589dfe5..d3055397c 100644 --- a/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta +++ b/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta @@ -1362,6 +1362,13 @@ dimensions = () type = integer intent = in +[imp_physics_wsm6_mmm] + standard_name = identifier_for_wsm6_mmm_microphysics_scheme + long_name = choice of WSM6 MMM microphysics scheme + units = flag + dimensions = () + type = integer + intent = in [imp_physics_fa] standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme diff --git a/physics/Radiation/radiation_clouds.f b/physics/Radiation/radiation_clouds.f index d90209b1d..8b9d3ad15 100644 --- a/physics/Radiation/radiation_clouds.f +++ b/physics/Radiation/radiation_clouds.f @@ -28,6 +28,7 @@ ! ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, ntclamt, ! ! imp_physics, imp_physics_nssl, imp_physics_fer_hires, ! ! imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, ! +! imp_physics_wsm6_mmm, ! ! imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, ! ! imp_physics_mg, iovr, iovr_rand, iovr_maxrand, iovr_max, ! ! iovr_dcorr, iovr_exp, iovr_exprand, idcor, idcor_con, ! @@ -438,6 +439,7 @@ subroutine radiation_clouds_prop & ! imp_physics_gfdl : GFDL microphysics scheme ! ! imp_physics_thompson : Thompson microphysics scheme ! ! imp_physics_wsm6 : WSMG microphysics scheme ! +! imp_physics_wsm6_mmm : MMM WSMG microphysics scheme ! ! imp_physics_zhao_carr : Zhao-Carr microphysics scheme ! ! imp_physics_zhao_carr_pdf : Zhao-Carr microphysics scheme with PDF clouds ! imp_physics_mg : Morrison-Gettelman microphysics scheme ! @@ -821,21 +823,42 @@ subroutine radiation_clouds_prop & !!\n =6: WSM6 microphysics elseif(imp_physics == imp_physics_wsm6_mmm) then ! Thompson MP - ! MYNN PBL or GF convective are not used - call progcld_thompson_wsm6 (plyr,plvl,tlyr,qlyr,qstl, & ! --- outputs ! inout ! --- inputs - & rhly,tracer1,xlat,xlon,slmsk,dz,delp, & - & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - & ntsw-1,ntgl-1,con_ttp, & - & IX, NLAY, NLP1, uni_cld, lmfshal, lmfdeep2, & - & cldcov(:,1:NLAY), cnvw, effrl_inout, & - & effri_inout, effrs_inout, & - & lwp_ex, iwp_ex, lwp_fc, iwp_fc, & - & dzlay, & - & cldtot, cldcnv, lcnorm, & - & cld_frac, cld_lwp, cld_reliq, cld_iwp, & - & cld_reice, cld_rwp, cld_rerain,cld_swp, & - & cld_resnow) + if(do_mynnedmf .or. imfdeepcnv == imfdeepcnv_gf .or. & + & imfdeepcnv == imfdeepcnv_c3) then ! MYNN PBL or GF or unified conv + !-- MYNN PBL or convective GF + !-- use cloud fractions with SGS clouds + do k=1,NLAY + do i=1,IX + cld_frac(i,k) = clouds1(i,k) + enddo + enddo + ! --- use clduni with the NSSL microphysics. + ! --- make sure that effr_in=.true. in the input.nml! + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs + & xlat, xlon, slmsk, dz, delp, IX, NLAY, NLP1, & + & cld_frac, & + & effrl, effri, effrr, effrs, effr_in , & + & dzlay, & + & cldtot, cldcnv, lcrick, lcnorm, con_ttp, & ! inout + & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs + & cld_reice,cld_rwp, cld_rerain,cld_swp, & + & cld_resnow) + else + ! MYNN PBL or GF convective are not used + call progcld_thompson_wsm6 (plyr,plvl,tlyr,qlyr,qstl, & ! --- inputs + & rhly,tracer1,xlat,xlon,slmsk,dz,delp, & + & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + & ntsw-1,ntgl-1,con_ttp, & + & IX, NLAY, NLP1, uni_cld, lmfshal, lmfdeep2, & + & cldcov(:,1:NLAY), cnvw, effrl, effri, effrs, & + & lwp_ex, iwp_ex, lwp_fc, iwp_fc, & + & dzlay, & + & cldtot, cldcnv, lcnorm, & ! inout + & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs + & cld_reice,cld_rwp, cld_rerain,cld_swp, & + & cld_resnow) + endif ! MYNN PBL or GF endif ! end if_imp_physics diff --git a/physics/mmm_physics b/physics/mmm_physics index e8758f126..7f41c52aa 160000 --- a/physics/mmm_physics +++ b/physics/mmm_physics @@ -1 +1 @@ -Subproject commit e8758f1267def421011d131d0a80e93fce274299 +Subproject commit 7f41c52aa29ffc9eb77f3f1563fbe1e3cf93e865