Skip to content

Commit 3834765

Browse files
authored
Implementation of MYNN-EDMF submodule (#2148)
This replaces the original (non submodule) MYNN with the public-facing MYNN-EDMF submodule, which will the central point of development for the MYNN-EDMF in WRF, MPAS, and CCPP. TYPE: bug fix, enhancement, and new feature KEYWORDS: refactored, submodule, MYNN-EDMF SOURCE: Joseph Olson (NOAA/GSL) DESCRIPTION OF CHANGES: 1. Submodule implementation pointing to https://github.com/NCAR/MYNN-EDMF/ 2. This is a refactored scheme (now k-only) which is called from a new driver derived heavily from the MPAS driver. 3. The module names changed from *_mynn_* to *_mynnedmf_* to resolve a version conflict in MPAS. 4. This version carries many modification that originated in FV3-related development for RRFSv1, but it has since been tuned to better perform in MPAS and WRF, unlike previous versions of the MYNN. The list of modifications are fairly extensive but the most dycore-sensitive parts of the MYNN are related to the subgrid clouds. From now on, all minor commits are captured in the public-facing submodule repository and the submodule will be updated in WRF at a lower frequency (probably every 6 months or so). LIST OF MODIFIED FILES: M .gitmodules M Makefile M Registry/Registry.EM_COMMON M clean M dyn_em/module_first_rk_step_part1.F M main/depend.common A phys/MYNN-EDMF M phys/Makefile D phys/module_bl_mynn.F D phys/module_bl_mynn_common.F D phys/module_bl_mynn_wrapper.F M phys/module_pbl_driver.F M phys/module_physics_init.F TESTS CONDUCTED: 1. The submodule itself has been tested in both WRF and MPAS for several months now in NOAA-GSL realtime systems and case study tests, passing all of our newly designed regression tests. 2. Has been compiled and run with intel and gnu compilers on Jet and Hera. 3. Are the Jenkins tests all passing? RELEASE NOTE: Submodule implementation of the MYNN-EDMF (https://github.com/NCAR/MYNN-EDMF). The module names changed from *_mynn_* to *_mynnedmf_* to resolve a version conflict in MPAS. This version was originally developed within FV3/CCPP for RRFSv1, but has been refactored (to a k-only scheme) resulting in a speed-up of about 10-15% and it has since been tuned to better perform in MPAS and WRF compared to previous versions which were primarily developed for use in FV3.
1 parent fd079bf commit 3834765

14 files changed

+61
-8692
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule ".ci/hpc-workflows"]
55
path = .ci/hpc-workflows
66
url = https://github.com/islas/hpc-workflows
7+
[submodule "phys/MYNN-EDMF"]
8+
path = phys/MYNN-EDMF
9+
url = https://github.com/NCAR/MYNN-EDMF

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,20 @@ wrf : framework_only
124124
echo "NoahMP submodule files populating WRF directories" ; \
125125
echo "------------------------------------------------------------------------------" ; \
126126
fi
127+
if [ \( ! -f phys/module_bl_mynnedmf.F \) -o \
128+
\( ! -f phys/module_bl_mynnedmf_common.F \) -o \
129+
\( ! -f phys/module_bl_mynnedmf_common.F \) ] ; then \
130+
echo " " ; \
131+
echo "------------------------------------------------------------------------------" ; \
132+
echo "Error Error Error MYNN-EDMF submodule files not populating WRF directories" ; \
133+
echo "------------------------------------------------------------------------------" ; \
134+
echo " " ; \
135+
exit 31 ; \
136+
else \
137+
echo "------------------------------------------------------------------------------" ; \
138+
echo "MYNN-EDMF submodule files populating WRF directories" ; \
139+
echo "------------------------------------------------------------------------------" ; \
140+
fi
127141
if [ $(WRF_CHEM) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" chemics ; fi
128142
if [ $(WRF_EM_CORE) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" em_core ; fi
129143
if [ $(WRF_HYDRO) -eq 1 ] ; then $(MAKE) MODULE_DIRS="$(ALL_MODULES)" wrf_hydro ; fi

Registry/Registry.EM_COMMON

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,6 @@ state real sub_thl3D ikj misc 1 - h "s
11421142
state real sub_sqv3D ikj misc 1 - h "sub_sqv3D" "qv subsidence tendency from EDMF" "kg kg-1 s-1"
11431143
state real det_thl3D ikj misc 1 - h "det_thl3D" "thetaL detrainment tendency from EDMF" "K s-1"
11441144
state real det_sqv3D ikj misc 1 - h "det_sqv3D" "qv detrainment tendency from EDMF" "kg kg-1 s-1"
1145-
state integer ktop_plume ij misc 1 - h "ktop_plume" "k-level of highest pentrating plume" ""
11461145
state real maxMF ij misc 1 - h "maxMF" "Maximum mass-flux (neg: all dry, pos: moist)" "m/s * area"
11471146
state real maxwidth ij misc 1 - h "maxwidth" "Maximum plume width" "m"
11481147
state real ztop_plume ij misc 1 - h "ztop_plume" "Height of tallest plume" "m"
@@ -2476,7 +2475,7 @@ rconfig integer bl_mynn_mixlength namelist,physics 1 1
24762475
rconfig integer bl_mynn_edmf namelist,physics max_domains 1 irh "bl_mynn_edmf" "0:off,1:activate mass-flux in mynn" ""
24772476
rconfig integer bl_mynn_edmf_mom namelist,physics max_domains 1 irh "bl_mynn_edmf_mom" "0:off,1:activate mass-flux transport of momentum" ""
24782477
rconfig integer bl_mynn_edmf_tke namelist,physics max_domains 0 irh "bl_mynn_edmf_tke" "0:off,1:activate mass-flux transport of tke" ""
2479-
rconfig integer bl_mynn_mixscalars namelist,physics max_domains 0 irh "bl_mynn_mixscalars" "0:off,1:activate mixing of scalars (qnx, qnxfa) in MYNN" ""
2478+
rconfig integer bl_mynn_mixscalars namelist,physics max_domains 1 irh "bl_mynn_mixscalars" "0:off,1:activate mixing of scalars (qnx, qnxfa) in MYNN" ""
24802479
rconfig integer bl_mynn_output namelist,physics max_domains 0 irh "bl_mynn_output" "0:off,1:Allocate and output extra 3D arrays" ""
24812480
rconfig integer bl_mynn_cloudmix namelist,physics max_domains 1 irh "bl_mynn_cloudmix" "0:off,1:activate mixing of all cloud species" ""
24822481
rconfig integer bl_mynn_mixqt namelist,physics max_domains 0 irh "bl_mynn_mixqt" "0:mix moisture species separate,1: mix total water" ""
@@ -3179,7 +3178,7 @@ package kepsscheme bl_pbl_physics==17 - scalar:tke_ad
31793178
package mrfscheme bl_pbl_physics==99 - -
31803179

31813180
package tkebudget tke_budget==1 - state:qSHEAR,qBUOY,qDISS,qWT,dqke
3182-
package mynn_dmp_edmf bl_mynn_edmf==1 - state:ktop_plume,ztop_plume,maxmf,maxwidth
3181+
package mynn_dmp_edmf bl_mynn_edmf==1 - state:ztop_plume,maxmf,maxwidth
31833182
package mynn_3Doutput bl_mynn_output==1 - state:edmf_a,edmf_w,edmf_thl,edmf_qt,edmf_ent,edmf_qc,sub_thl3D,sub_sqv3D,det_thl3D,det_sqv3D
31843183
package pbl_cloud icloud_bl==1 - state:cldfra_bl,qc_bl,qi_bl
31853184

clean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ if ( "$arg" == '-a' || "$arg" == '-aa' ) then
8383
/bin/rm -f phys/module_sf_noahmpdrv.F phys/module_sf_noahmp_glacier.F \
8484
phys/module_sf_noahmp_groundwater.F phys/module_sf_noahmplsm.F \
8585
run/MPTABLE.TBL
86+
/bin/rm -f phys/module_bl_mynnedmf.F phys/module_bl_mynnedmf_common.F \
87+
phys/module_bl_mynnedmf_driver.F
8688
endif
8789
endif
8890

dyn_em/module_first_rk_step_part1.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
12321232
& ,qcg=grid%qcg, grav_settling=config_flags%grav_settling &
12331233
! & ,K_m=grid%K_m, K_h=grid%K_h, K_q=grid%K_q &
12341234
& ,vdfg=grid%vdfg,maxwidth=grid%maxwidth,maxMF=grid%maxmf &
1235-
& ,ztop_plume=grid%ztop_plume,ktop_plume=grid%ktop_plume &
1235+
& ,ztop_plume=grid%ztop_plume &
12361236
& ,spp_pbl=config_flags%spp_pbl &
12371237
& ,pattern_spp_pbl=grid%pattern_spp_pbl &
12381238
& ,restart=config_flags%restart,cycling=config_flags%cycling &

main/depend.common

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -663,13 +663,13 @@ module_bl_gfsedmf.o: \
663663
module_gfs_physcons.o
664664

665665

666-
module_bl_mynn.o: \
667-
module_bl_mynn_common.o
666+
module_bl_mynnedmf.o: \
667+
module_bl_mynnedmf_common.o
668668

669669

670-
module_bl_mynn_wrapper.o: \
671-
module_bl_mynn.o \
672-
module_bl_mynn_common.o
670+
module_bl_mynnedmf_driver.o: \
671+
module_bl_mynnedmf.o \
672+
module_bl_mynnedmf_common.o
673673

674674

675675
module_bl_gwdo.o: \
@@ -735,7 +735,6 @@ module_bl_camuwpbl_driver.o: \
735735

736736

737737
module_sf_mynn.o: \
738-
module_bl_mynn.o \
739738
../share/module_model_constants.o \
740739
../frame/module_wrf_error.o
741740

@@ -1308,8 +1307,8 @@ module_physics_init.o: \
13081307
module_bl_acm.o \
13091308
module_bl_myjpbl.o \
13101309
module_bl_qnsepbl.o \
1311-
module_bl_mynn.o \
1312-
module_bl_mynn_wrapper.o \
1310+
module_bl_mynnedmf.o \
1311+
module_bl_mynnedmf_driver.o \
13131312
module_bl_myjurb.o \
13141313
module_bl_boulac.o \
13151314
module_bl_camuwpbl_driver.o \
@@ -1486,8 +1485,8 @@ module_pbl_driver.o: \
14861485
module_bl_camuwpbl_driver.o \
14871486
module_bl_gfs.o \
14881487
module_bl_gfsedmf.o \
1489-
module_bl_mynn.o \
1490-
module_bl_mynn_wrapper.o \
1488+
module_bl_mynnedmf.o \
1489+
module_bl_mynnedmf_driver.o \
14911490
module_bl_fogdes.o \
14921491
module_bl_gwdo.o \
14931492
module_bl_gwdo_gsl.o \
@@ -2790,8 +2789,7 @@ module_bl_mfshconvpbl.o: \
27902789
../share/module_model_constants.o
27912790

27922791

2793-
module_bl_mynn_common.o: \
2794-
module_gfs_machine.o \
2792+
module_bl_mynnedmf_common.o: \
27952793
../share/module_model_constants.o \
27962794
ccpp_kind_types.o
27972795

phys/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ target_sources(
4242
module_bl_mrf.F
4343
module_bl_myjpbl.F
4444
module_bl_myjurb.F
45-
module_bl_mynn.F
46-
module_bl_mynn_common.F
47-
module_bl_mynn_wrapper.F
4845
module_bl_qnsepbl.F
4946
module_bl_shinhong.F
5047
module_bl_temf.F
@@ -263,6 +260,11 @@ target_sources(
263260
physics_mmm/mp_wsm6.F90
264261
physics_mmm/mp_wsm6_effectRad.F90
265262
physics_mmm/sf_sfclayrev.F90
263+
264+
# MYNN-EDMF
265+
MYNN-EDMF/module_bl_mynnedmf.F90
266+
MYNN-EDMF/WRF/module_bl_mynnedmf_common.F90
267+
MYNN-EDMF/WRF/module_bl_mynnedmf_driver.F90
266268
)
267269

268270

phys/MYNN-EDMF

Submodule MYNN-EDMF added at 90f36c2

phys/Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ MODULES = \
4343
module_bl_myjpbl.o \
4444
module_bl_qnsepbl.o \
4545
module_bl_acm.o \
46-
module_bl_mynn_common.o \
47-
module_bl_mynn.o \
48-
module_bl_mynn_wrapper.o \
46+
module_bl_mynnedmf_common.o \
47+
module_bl_mynnedmf.o \
48+
module_bl_mynnedmf_driver.o \
4949
module_bl_fogdes.o \
5050
module_bl_gwdo.o \
5151
module_bl_gwdo_gsl.o \
@@ -272,7 +272,17 @@ submodules :
272272
else \
273273
echo No action required for NoahMP submodule ; \
274274
fi
275-
275+
@if [ \( ! -f module_bl_mynnedmf.F \) -o \( ! -f module_bl_mynedmf_common.F \) -o \
276+
\( ! -f module_bl_mynnedmf_driver.F \) ] ; then \
277+
echo Pulling in MYNN-EDMF submodule ; \
278+
( cd .. ; git submodule update --init --recursive ) ; \
279+
ln -sf MYNN-EDMF/module_bl_mynnedmf.F90 module_bl_mynnedmf.F ; \
280+
ln -sf MYNN-EDMF/WRF/module_bl_mynnedmf_common.F90 module_bl_mynnedmf_common.F ; \
281+
ln -sf MYNN-EDMF/WRF/module_bl_mynnedmf_driver.F90 module_bl_mynnedmf_driver.F ; \
282+
else \
283+
echo No action required for MYNN-EDMF submodule ; \
284+
fi
285+
276286
clean:
277287
@ echo 'use the clean script'
278288

0 commit comments

Comments
 (0)