Skip to content

Commit 3b1d341

Browse files
jherweheldfowler58
authored andcommitted
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 4c3682e commit 3b1d341

10 files changed

Lines changed: 1085 additions & 290 deletions

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,11 @@ intel-mpi: # BUILDTARGET Intel compiler suite with Intel MPI library
360360
"CC_SERIAL = icc" \
361361
"CXX_SERIAL = icpc" \
362362
"FFLAGS_PROMOTION = -real-size 64" \
363-
"FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \
364-
"CFLAGS_OPT = -O3" \
365-
"CXXFLAGS_OPT = -O3" \
363+
"FFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback -no-wrap-margin -convert big_endian -free -align array64byte" \
364+
"CFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
365+
"CXXFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
366366
"LDFLAGS_OPT = -O3" \
367-
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback" \
367+
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback -no-wrap-margin" \
368368
"CFLAGS_DEBUG = -g -traceback" \
369369
"CXXFLAGS_DEBUG = -g -traceback" \
370370
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
@@ -779,7 +779,7 @@ ifneq "$(LAPACK)" ""
779779
endif
780780

781781
RM = rm -f
782-
CPP = cpp -P -traditional
782+
CPP = ${CXX_SERIAL} -E # Modified for use with the Intel C++ compiler
783783
RANLIB = ranlib
784784

785785
ifdef CORE
@@ -998,7 +998,7 @@ ifeq "$(findstring clean, $(MAKECMDGOALS))" "clean" # CHECK FOR CLEAN TARGET
998998
override AUTOCLEAN=false
999999
endif # END OF CLEAN TARGET CHECK
10001000

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

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

src/core_atmosphere/Registry.xml

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,9 @@
625625
<var name="i_rainnc"/>
626626
<var name="rainncv"/>
627627
<var name="rainnc"/>
628+
<var name="snowncv"/>
628629
<var name="snownc"/>
630+
<var name="graupelncv"/>
629631
<var name="graupelnc"/>
630632
<var name="sr"/>
631633
<var name="i_rainc"/>
@@ -771,6 +773,8 @@
771773
<var name="ktop_deep"/>
772774
<var name="xmb_total"/>
773775
<var name="xmb_shallow"/>
776+
<var name="cldfrac_dp"/>
777+
<var name="cldfrac_sh"/>
774778
<var name="qc_cu"/>
775779
<var name="qi_cu"/>
776780
<var name="rthcuten"/>
@@ -926,10 +930,12 @@
926930

927931
<var name="i_rainnc"/>
928932
<var name="rainnc"/>
933+
<var name="rainncv"/>
929934
<var name="precipw"/>
930935
<var name="cuprec"/>
931936
<var name="i_rainc"/>
932937
<var name="rainc"/>
938+
<var name="raincv"/>
933939
<var name="kpbl"/>
934940
<var name="hpbl"/>
935941
<var name="hfx"/>
@@ -2036,6 +2042,16 @@
20362042
description="configuration for convection schemes"
20372043
possible_values="`suite',`cu_kain_fritsch',`cu_tiedtke',`cu_ntiedtke',`cu_grell_freitas',`off'"/>
20382044

2045+
<nml_option name="config_kfeta_trigger" type="integer" default_value="1" in_defaults="false"
2046+
units="-"
2047+
description="KF (1) original or (2) moisture-advection based convection trigger"
2048+
possible_values="1 or 2"/>
2049+
2050+
<nml_option name="config_cu_rad_feedback" type="logical" default_value="false" in_defaults="false"
2051+
units="-"
2052+
description="whether to enable KF subgrid-scale cloud feedbacks to the SW and LW radiation schemes"
2053+
possible_values=".true. or .false."/>
2054+
20392055
<nml_option name="config_lsm_scheme" type="character" default_value="suite" in_defaults="false"
20402056
units="-"
20412057
description="configuration for land-surface schemes"
@@ -2336,6 +2352,22 @@
23362352
description="time running-averaged vertical velocity"
23372353
packages="cu_kain_fritsch_in"/>
23382354

2355+
<var name="cldfrac_dp" type="real" dimensions="nVertLevels nCells Time" units="unitless"
2356+
description="sugbgrid-scale cloud fraction from KF deep convection"
2357+
packages="cu_kain_fritsch_in"/>
2358+
2359+
<var name="cldfrac_sh" type="real" dimensions="nVertLevels nCells Time" units="unitless"
2360+
description="subgrid-scale cloud fraction from KF shallow convection"
2361+
packages="cu_kain_fritsch_in"/>
2362+
2363+
<var name="cldfracwcu" type="real" dimensions="nVertLevels nCells Time" units="unitless"
2364+
description="horizontal cloud fraction including Cu"
2365+
packages="cu_kain_fritsch_in"/>
2366+
2367+
<var name="cldfracwcut" type="real" dimensions="nCells Time" units="unitless"
2368+
description="total cloud fraction including Cu"
2369+
packages="cu_kain_fritsch_in"/>
2370+
23392371

23402372
<!-- ... GRELL-FREITAS ONLY: -->
23412373
<var name="k22_shallow" type="integer" dimensions="nCells Time" units="unitless"
@@ -2362,14 +2394,6 @@
23622394
description="cloud base mass flux for shallow convection"
23632395
packages="cu_grell_freitas_in"/>
23642396

2365-
<var name="qc_cu" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
2366-
description="in-cloud cloud water mixing ratio in Grell-Freitas cloud model"
2367-
packages="cu_grell_freitas_in"/>
2368-
2369-
<var name="qi_cu" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
2370-
description="in-cloud cloud ice mixing ratio in Grell-Freitas cloud model"
2371-
packages="cu_grell_freitas_in"/>
2372-
23732397

23742398
<!-- ... KAIN_FRITSCH AND GRELL-FREITAS: -->
23752399
<var name="cubot" type="real" dimensions="nCells Time" units="unitless"
@@ -2380,6 +2404,14 @@
23802404
description="index of lowest level of convection"
23812405
packages="cu_grell_freitas_in;cu_kain_fritsch_in"/>
23822406

2407+
<var name="qc_cu" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
2408+
description="in-cloud cloud water mixing ratio from convection parameterization"
2409+
packages="cu_grell_freitas_in;cu_kain_fritsch_in"/>
2410+
2411+
<var name="qi_cu" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1}"
2412+
description="in-cloud cloud ice mixing ratio from convection parameterization"
2413+
packages="cu_grell_freitas_in;cu_kain_fritsch_in"/>
2414+
23832415

23842416
<!-- ================================================================================================== -->
23852417
<!-- ... PARAMETERIZATION OF PLANETARY BOUNDARY LAYER PROCESSES: -->
@@ -2949,7 +2981,10 @@
29492981
<!-- ================================================================================================== -->
29502982

29512983
<var name="cldfrac" type="real" dimensions="nVertLevels nCells Time" units="unitless"
2952-
description="horizontal cloud fraction"/>
2984+
description="grid-scale horizontal cloud fraction"/>
2985+
2986+
<var name="cldfract" type="real" dimensions="nCells Time" units="unitless"
2987+
description="grid-scale total cloud fraction"/>
29532988

29542989

29552990
<!-- ================================================================================================== -->
@@ -3106,6 +3141,10 @@
31063141
description="tendency of cloud ice mixing ratio due to cumulus convection"
31073142
packages="cu_grell_freitas_in;cu_kain_fritsch_in;cu_ntiedtke_in"/>
31083143

3144+
<var name="rqvdynten" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1} s^{-1}"
3145+
description="tendency of water vapor due to horizontal and vertical advections"
3146+
packages="cu_grell_freitas_in;cu_kain_fritsch_in;cu_tiedtke_in"/>
3147+
31093148

31103149
<!-- KAIN_FRITSCH: -->
31113150
<var name="rqrcuten" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1} s^{-1}"
@@ -3117,10 +3156,6 @@
31173156
packages="cu_kain_fritsch_in"/>
31183157

31193158
<!-- TIEDTKE AND GRELL -->
3120-
<var name="rqvdynten" type="real" dimensions="nVertLevels nCells Time" units="kg kg^{-1} s^{-1}"
3121-
description="tendency of water vapor due to horizontal and vertical advections"
3122-
packages="cu_grell_freitas_in;cu_ntiedtke_in"/>
3123-
31243159
<var name="rucuten" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1} s^{-1}"
31253160
description="tendency of zonal wind due to cumulus convection"
31263161
packages="cu_grell_freitas_in;cu_ntiedtke_in"/>

src/core_atmosphere/physics/mpas_atmphys_driver.F

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

102104

103105
contains

0 commit comments

Comments
 (0)