Skip to content

Commit 4909e7f

Browse files
committed
Update the MPAS-A Kain-Fritsch CPS to WRF 4.4.1
This EPA_KF commit will update the MPAS-A release version of the KF convection parameterization scheme to a kfeta module based on the latest version included with WRF 4.4.1, thereby adding a convective trigger option, subgrid-scale cloud feedbacks (utilizing cloud fraction, and water and ice condensates) to RRTMG SW and LW radiation, and a dynamic convective time scale (see references below for more details). Other KF enhancements include extending the KF look-up table (to prevent "OUT OF BOUNDS" errors being written to fort.98 file) and improving the DQEVAP and QICE calculations. This version of module_cu_kfeta.F has also been generalized to work with either MPAS or WRF. Modified files: Makefile src/core_atmosphere/Registry.xml src/core_atmosphere/physics/mpas_atmphys_driver.F src/core_atmosphere/physics/mpas_atmphys_driver_cloudiness.F src/core_atmosphere/physics/mpas_atmphys_driver_convection.F src/core_atmosphere/physics/mpas_atmphys_driver_radiation_lw.F src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F src/core_atmosphere/physics/mpas_atmphys_vars.F src/core_atmosphere/physics/physics_wrf/module_cu_kfeta.F src/core_atmosphere/physics/physics_wrf/module_ra_rrtmg_sw.F These EPA_KF code changes to MPAS-A are based on the 22 August 2022 "develop" branch of MPAS v7.3. References: Bullock, O. R., K. Alapaty, J. A. Herwehe, and J. S. Kain, 2015: A dynamically computed convective time scale for the KainFritsch convective parameterization scheme. Monthly Weather Review, 143, 2105-2120. https://doi.org/10.1175/MWR-D-14-00251.1 Herwehe, J. A., K. Alapaty, T. L. Spero, and C. G. Nolte, 2014: Increasing the credibility of regional climate simulations by introducing subgrid-scale cloud-radiation interactions. Journal of Geophysical Research: Atmospheres, 119, 5317-5330. https://doi.org/10.1002/2014JD021504 Alapaty, K., J. A. Herwehe, T. L. Otte, C. G. Nolte, O. R. Bullock, M. S. Mallard, J. S. Kain, and J. Dudhia, 2012: Introducing subgrid- scale cloud feedbacks to radiation for regional meteorological and climate modeling. Geophysical Research Letters, 39, L24808. https://doi.org/10.1029/2012GL054031
1 parent a0323b9 commit 4909e7f

10 files changed

Lines changed: 1079 additions & 304 deletions

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,11 @@ intel-mpi: # BUILDTARGET Intel compiler suite with Intel MPI library
300300
"CC_SERIAL = icc" \
301301
"CXX_SERIAL = icpc" \
302302
"FFLAGS_PROMOTION = -real-size 64" \
303-
"FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \
304-
"CFLAGS_OPT = -O3" \
305-
"CXXFLAGS_OPT = -O3" \
303+
"FFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback -no-wrap-margin -convert big_endian -free -align array64byte" \
304+
"CFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
305+
"CXXFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
306306
"LDFLAGS_OPT = -O3" \
307-
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback" \
307+
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback -no-wrap-margin" \
308308
"CFLAGS_DEBUG = -g -traceback" \
309309
"CXXFLAGS_DEBUG = -g -traceback" \
310310
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
@@ -660,7 +660,7 @@ ifneq "$(LAPACK)" ""
660660
endif
661661

662662
RM = rm -f
663-
CPP = cpp -P -traditional
663+
CPP = ${CXX_SERIAL} -E # Modified for use with the Intel C++ compiler
664664
RANLIB = ranlib
665665

666666
ifdef CORE
@@ -875,7 +875,7 @@ ifeq "$(findstring clean, $(MAKECMDGOALS))" "clean" # CHECK FOR CLEAN TARGET
875875
override AUTOCLEAN=false
876876
endif # END OF CLEAN TARGET CHECK
877877

878-
VER=$(shell git describe --dirty 2> /dev/null)
878+
VER="v7.3.develop.EPA_KF" # Hard-coded specific version identifier
879879
#override CPPFLAGS += -DMPAS_GIT_VERSION=$(VER)
880880

881881
ifeq "$(findstring v, $(VER))" "v"

src/core_atmosphere/Registry.xml

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,9 @@
655655
<var name="i_rainnc"/>
656656
<var name="rainncv"/>
657657
<var name="rainnc"/>
658+
<var name="snowncv"/>
658659
<var name="snownc"/>
660+
<var name="graupelncv"/>
659661
<var name="graupelnc"/>
660662
<var name="sr"/>
661663
<var name="i_rainc"/>
@@ -788,6 +790,8 @@
788790
<var name="ktop_deep"/>
789791
<var name="xmb_total"/>
790792
<var name="xmb_shallow"/>
793+
<var name="cldfrac_dp"/>
794+
<var name="cldfrac_sh"/>
791795
<var name="qc_cu"/>
792796
<var name="qi_cu"/>
793797
<var name="rthcuten"/>
@@ -943,10 +947,12 @@
943947

944948
<var name="i_rainnc"/>
945949
<var name="rainnc"/>
950+
<var name="rainncv"/>
946951
<var name="precipw"/>
947952
<var name="cuprec"/>
948953
<var name="i_rainc"/>
949954
<var name="rainc"/>
955+
<var name="raincv"/>
950956
<var name="kpbl"/>
951957
<var name="hpbl"/>
952958
<var name="hfx"/>
@@ -2016,6 +2022,16 @@
20162022
description="configuration for convection schemes"
20172023
possible_values="`suite',`cu_kain_fritsch',`cu_tiedtke',`cu_ntiedtke',`cu_grell_freitas',`off'"/>
20182024

2025+
<nml_option name="config_kfeta_trigger" type="integer" default_value="1" in_defaults="false"
2026+
units="-"
2027+
description="KF (1) original or (2) moisture-advection based convection trigger"
2028+
possible_values="1 or 2"/>
2029+
2030+
<nml_option name="config_cu_rad_feedback" type="logical" default_value="false" in_defaults="false"
2031+
units="-"
2032+
description="whether to enable KF subgrid-scale cloud feedbacks to the SW and LW radiation schemes"
2033+
possible_values=".true. or .false."/>
2034+
20192035
<nml_option name="config_lsm_scheme" type="character" default_value="suite" in_defaults="false"
20202036
units="-"
20212037
description="configuration for land-surface schemes"
@@ -2232,6 +2248,22 @@
22322248
description="time running-averaged vertical velocity"
22332249
packages="cu_kain_fritsch_in"/>
22342250

2251+
<var name="cldfrac_dp" type="real" dimensions="nVertLevels nCells Time" units="unitless"
2252+
description="sugbgrid-scale cloud fraction from KF deep convection"
2253+
packages="cu_kain_fritsch_in"/>
2254+
2255+
<var name="cldfrac_sh" type="real" dimensions="nVertLevels nCells Time" units="unitless"
2256+
description="subgrid-scale cloud fraction from KF shallow convection"
2257+
packages="cu_kain_fritsch_in"/>
2258+
2259+
<var name="cldfracwcu" type="real" dimensions="nVertLevels nCells Time" units="unitless"
2260+
description="horizontal cloud fraction including Cu"
2261+
packages="cu_kain_fritsch_in"/>
2262+
2263+
<var name="cldfracwcut" type="real" dimensions="nCells Time" units="unitless"
2264+
description="total cloud fraction including Cu"
2265+
packages="cu_kain_fritsch_in"/>
2266+
22352267

22362268
<!-- ... GRELL-FREITAS ONLY: -->
22372269
<var name="k22_shallow" type="integer" dimensions="nCells Time" units="unitless"
@@ -2258,14 +2290,6 @@
22582290
description="cloud base mass flux for shallow convection"
22592291
packages="cu_grell_freitas_in"/>
22602292

2261-
<var name="qc_cu" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
2262-
description="in-cloud cloud water mixing ratio in Grell-Freitas cloud model"
2263-
packages="cu_grell_freitas_in"/>
2264-
2265-
<var name="qi_cu" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
2266-
description="in-cloud cloud ice mixing ratio in Grell-Freitas cloud model"
2267-
packages="cu_grell_freitas_in"/>
2268-
22692293

22702294
<!-- ... KAIN_FRITSCH AND GRELL-FREITAS: -->
22712295
<var name="cubot" type="real" dimensions="nCells Time" units="unitless"
@@ -2276,6 +2300,14 @@
22762300
description="index of lowest level of convection"
22772301
packages="cu_grell_freitas_in;cu_kain_fritsch_in"/>
22782302

2303+
<var name="qc_cu" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
2304+
description="in-cloud cloud water mixing ratio from convection parameterization"
2305+
packages="cu_grell_freitas_in;cu_kain_fritsch_in"/>
2306+
2307+
<var name="qi_cu" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
2308+
description="in-cloud cloud ice mixing ratio from convection parameterization"
2309+
packages="cu_grell_freitas_in;cu_kain_fritsch_in"/>
2310+
22792311

22802312
<!-- ================================================================================================== -->
22812313
<!-- ... PARAMETERIZATION OF PLANETARY BOUNDARY LAYER PROCESSES: -->
@@ -2780,7 +2812,10 @@
27802812
<!-- ================================================================================================== -->
27812813

27822814
<var name="cldfrac" type="real" dimensions="nVertLevels nCells Time" units="unitless"
2783-
description="horizontal cloud fraction"/>
2815+
description="grid-scale horizontal cloud fraction"/>
2816+
2817+
<var name="cldfract" type="real" dimensions="nCells Time" units="unitless"
2818+
description="grid-scale total cloud fraction"/>
27842819

27852820

27862821
<!-- ================================================================================================== -->
@@ -2937,6 +2972,10 @@
29372972
description="tendency of cloud ice mixing ratio due to cumulus convection"
29382973
packages="cu_grell_freitas_in;cu_kain_fritsch_in;cu_tiedtke_in"/>
29392974

2975+
<var name="rqvdynten" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1} s^{-1}"
2976+
description="tendency of water vapor due to horizontal and vertical advections"
2977+
packages="cu_grell_freitas_in;cu_kain_fritsch_in;cu_tiedtke_in"/>
2978+
29402979

29412980
<!-- KAIN_FRITSCH: -->
29422981
<var name="rqrcuten" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1} s^{-1}"
@@ -2948,10 +2987,6 @@
29482987
packages="cu_kain_fritsch_in"/>
29492988

29502989
<!-- TIEDTKE AND GRELL -->
2951-
<var name="rqvdynten" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1} s^{-1}"
2952-
description="tendency of water vapor due to horizontal and vertical advections"
2953-
packages="cu_grell_freitas_in;cu_tiedtke_in"/>
2954-
29552990
<var name="rthdynten" type="real" dimensions="nVertLevels nCells Time" units="K s^{-1}"
29562991
description="tendency of temperature due to horizontal and vertical advections"
29572992
packages="cu_grell_freitas_in;cu_tiedtke_in"/>

src/core_atmosphere/physics/mpas_atmphys_driver.F

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,20 @@ module mpas_atmphys_driver
8585
! Laura D. Fowler (laura@ucar.edu) / 2014-05-15.
8686
! * renamed config_conv_deep_scheme to config_convection_scheme.
8787
! Laura D. Fowler (laura@ucar.edu) / 2014-09-18.
88-
! * in the call to driver_convection, added block%configs needed for the implementation of the
89-
! Grell-Freitas convection scheme.
90-
! Laura D. Fowler (laura@ucar.edu) / 2016-03-30.
9188
! * modified the call to the subroutines driver_sfclayer and driver_pbl for the implementation
9289
! of the MYNN surface layer scheme and PBL schemes. itimestep and block%configs are added to
9390
! the argument list.
9491
! Laura D. Fowler (laura@ucar.edu) / 2015-01-06.
92+
! * in the call to driver_convection, added block%configs needed for the implementation of the
93+
! Grell-Freitas convection scheme.
94+
! Laura D. Fowler (laura@ucar.edu) / 2016-03-30.
9595
! * now only call subroutine update_convection_step2 when config_convection_scheme is not off.
9696
! Laura D. Fowler (laura@ucar.edu) / 2016-04-13.
9797
! * modified call to driver_cloudiness to accomodate the calculation of the cloud fraction with the Thompson
9898
! cloud microphysics scheme.
9999
! Laura D. Fowler (laura@ucar.edu) / 2016-06-04.
100+
! * added configs to cloudiness and convection calls to allow KF feedback and trigger options.
101+
! Jerold A. Herwehe (herwehe.jerry@epa.gov) / 2016-12-07.
100102

101103

102104
contains

0 commit comments

Comments
 (0)