Skip to content

Commit

Permalink
Updates to MYNN-EDMF (#1938)
Browse files Browse the repository at this point in the history
TYPE: bug fix and enhancement

KEYWORDS: MYNN-EDMF, subgrid clouds, code optimization

SOURCE: Joseph Olson (NOAA-GSL)

DESCRIPTION OF CHANGES:
Problems:
1. lack of loop vectorization due to logicals inside loops
2. stratus subgrid clouds had a limited cloud-radiative impact
3. mass flux scheme was too inactive over water
4. upper-level clouds were lacking radiative impact

Solutions:
1. Optimization work: fixed 8-plume model instead of variable number plume. maintains performance, allows more vectorization, and removed some logic outside of loops. This required a change in the output variables (nupdrafts is no longer useful, replaced by maxwidth and ztop_plume).
2. Bug fix to correct grid mean vs in-cloud mixing ratios. Now all subgrid clouds (mass-flux and stratus) are output as grid means and the addition of subgrid clouds to the resolved cloud in the radiation driver was corrected.
3. Adjustments to cloud pdf and diffusion to better fit modifications to the Thompson-Eidhammer aerosol-aware scheme over the marine boundary layer. This will require updates to the Thompson-Eidhammer scheme to be optimal. We consider this work in progress, but the results are still positive overall, especially in the tropics.
4. Added a patch to ensure robust cloud fractions were diagnosed for radiatively significant water, ice, & snow mixing ratios.

LIST OF MODIFIED FILES: 
M       Registry/Registry.EM_COMMON
M       dyn_em/module_first_rk_step_part1.F
M       phys/module_bl_mynn.F
M       phys/module_bl_mynn_common.F
M       phys/module_bl_mynn_wrapper.F
M       phys/module_pbl_driver.F
M       phys/module_radiation_driver.F
M       main/depend.common
M       phys/Makefile
A        phys/ccpp_kind_types.F

TESTS CONDUCTED: 
1. See attached pdf
2. It passed the regression tests.

RELEASE NOTE: See notes above and this [Overview of Updates to MYNN-EDMF.pdf](https://github.com/wrf-model/WRF/files/13400986/Overview.of.Updates.to.MYNN-EDMF.pdf).
  • Loading branch information
joeolson42 authored Jan 12, 2024
1 parent c124dd5 commit b36b3ec
Show file tree
Hide file tree
Showing 10 changed files with 1,977 additions and 1,919 deletions.
5 changes: 3 additions & 2 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,10 @@ state real sub_thl3D ikj misc 1 - h "s
state real sub_sqv3D ikj misc 1 - h "sub_sqv3D" "qv subsidence tendency from EDMF" "kg kg-1 s-1"
state real det_thl3D ikj misc 1 - h "det_thl3D" "thetaL detrainment tendency from EDMF" "K s-1"
state real det_sqv3D ikj misc 1 - h "det_sqv3D" "qv detrainment tendency from EDMF" "kg kg-1 s-1"
state integer nupdraft ij misc 1 - h "nupdraft" "Number of updrafts per grid cell" ""
state integer ktop_plume ij misc 1 - h "ktop_plume" "k-level of highest pentrating plume" ""
state real maxMF ij misc 1 - h "maxMF" "Maximum mass-flux (neg: all dry, pos: moist)" "m/s * area"
state real maxwidth ij misc 1 - h "maxwidth" "Maximum plume width" "m"
state real ztop_plume ij misc 1 - h "ztop_plume" "Height of tallest plume" "m"

#FogDES variables
state real fgdp ij misc 1 - - "fgdp" "Accumulated fog deposition" "mm"
Expand Down Expand Up @@ -3133,7 +3134,7 @@ package kepsscheme bl_pbl_physics==17 - scalar:tke_ad
package mrfscheme bl_pbl_physics==99 - -

package tkebudget tke_budget==1 - state:qSHEAR,qBUOY,qDISS,qWT,dqke
package mynn_dmp_edmf bl_mynn_edmf==1 - state:ktop_plume,maxmf,nupdraft
package mynn_dmp_edmf bl_mynn_edmf==1 - state:ktop_plume,ztop_plume,maxmf,maxwidth
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
package pbl_cloud icloud_bl==1 - state:cldfra_bl,qc_bl,qi_bl

Expand Down
4 changes: 2 additions & 2 deletions dyn_em/module_first_rk_step_part1.F
Original file line number Diff line number Diff line change
Expand Up @@ -1223,8 +1223,8 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
& ,rmol=grid%rmol, ch=grid%ch &
& ,qcg=grid%qcg, grav_settling=config_flags%grav_settling &
! & ,K_m=grid%K_m, K_h=grid%K_h, K_q=grid%K_q &
& ,vdfg=grid%vdfg,nupdraft=grid%nupdraft,maxMF=grid%maxmf &
& ,ktop_plume=grid%ktop_plume &
& ,vdfg=grid%vdfg,maxwidth=grid%maxwidth,maxMF=grid%maxmf &
& ,ztop_plume=grid%ztop_plume,ktop_plume=grid%ktop_plume &
& ,spp_pbl=config_flags%spp_pbl &
& ,pattern_spp_pbl=grid%pattern_spp_pbl &
& ,restart=config_flags%restart,cycling=config_flags%cycling &
Expand Down
2 changes: 2 additions & 0 deletions main/depend.common
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ module_bl_gfs.o: module_gfs_machine.o \
module_bl_gfsedmf.o: module_gfs_machine.o \
module_gfs_physcons.o

module_bl_mynn_common.o: ccpp_kind_types.o

module_bl_mynn.o: module_bl_mynn_common.o

module_bl_mynn_wrapper.o: module_bl_mynn.o \
Expand Down
1 change: 1 addition & 0 deletions phys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RM = rm -f


MODULES = \
ccpp_kind_types.o \
module_bep_bem_helper.o \
complex_number_module.o \
module_cam_shr_kind_mod.o \
Expand Down
8 changes: 8 additions & 0 deletions phys/ccpp_kind_types.F
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module ccpp_kind_types
#if ( RWORDSIZE == 4 )
integer, parameter :: kind_phys = selected_real_kind(6)
#else
integer, parameter :: kind_phys = selected_real_kind(12)
#endif
contains
end module ccpp_kind_types
Loading

0 comments on commit b36b3ec

Please sign in to comment.