Skip to content

Commit

Permalink
updates to P3, including a new 3-moment option (wrf-model#1356)
Browse files Browse the repository at this point in the history
TYPE: new feature

KEYWORDS: P3 microphysics

SOURCE: Hugh Morrison (NCAR)

DESCRIPTION OF CHANGES:

1. Main update is to add 3-moment option for P3, which we have chosen as MP option 53. This uses the 
same P3 module so that all 4 versions (MP options 50, 51, 52, 53) use the same code base. Also added new 
lookup tables.

2. Besides changes for the 3-moment option, a small bug fix was made to lookup table and the lookup tables 
were generalized to allow a larger range of mean ice particle sizes. This changes answers but has little impact 
compared to P3 in the previous WRF release. 

3. We also did general code cleanup and improved code comments.

LIST OF MODIFIED FILES: 
module_mp_p3.F
module_microphysics_driver.F
module_physics_init.F
Registry_EM.COMMON

Also added new lookup tables in: 
run/p3_lookupTable_2.dat-4.1
run/p3_lookupTable_1.dat-2momI_v5.1.6_oldDimax
run/p3_lookupTable_1.dat-3momI_v5.1.6.gz

Deleted the old lookup tables:
p3_lookup_table_1.dat-v4.1
p3_lookup_table_2.dat-v4.1

Modified files to handle moving the p3 lookup tables around:
Makefile
clean
test/em_b_wave/run_me_first.csh
test/em_convrad/run_me_first.csh
test/em_quarter_ss/run_me_first.csh
test/em_scm_xy/run_me_first.csh
test/em_seabreeze2d_x/run_me_first.csh
test/em_tropical_cyclone/run_me_first.csh

[Editor's note: We likely are removing all of these `run_me_first.csh` scripts in a later PR.]

TESTS CONDUCTED: 
1. Extensive testing was done for all MP options for P3 (50, 51, 52, 53)
2. Jenkins test is all pass.

RELEASE NOTE: An updated version of P3 now includes a 3-moment option. Milbrandt et al. (2021) [Milbrandt, J. A., H. Morrison, D. T. Dawson II, and M. Paukert, 2021: A triple-moment representation of ice in the Predicted Particle Properties (P3) microphysics scheme, J. Atmos. Sci., 78(2), 439-458, https://doi.org/10.1175/JAS-D-20-0084.1]
  • Loading branch information
hmorrison100 authored and vlakshmanan-scala committed Apr 4, 2024
1 parent 614c320 commit 574c481
Show file tree
Hide file tree
Showing 17 changed files with 32,905 additions and 31,912 deletions.
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ wrf : framework_only
if [ $(ESMF_COUPLING) -eq 1 ] ; then \
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" SOLVER=em em_wrf_SST_ESMF ) ; \
fi
if [ ! -f run/p3_lookupTable_1.dat-3momI_v5.1.6 ] ; then \
( cd run ; cp p3_lookupTable_1.dat-3momI_v5.1.6.gz hold.gz ; \
gunzip hold.gz ; mv hold p3_lookupTable_1.dat-3momI_v5.1.6 ) ; \
fi
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`

Expand Down Expand Up @@ -557,8 +561,9 @@ em_real : wrf
ln -sf ../../run/aerosol_plev.formatted . ; \
ln -sf ../../run/eclipse_besselian_elements.dat . ; \
ln -sf ../../run/CCN_ACTIVATE.BIN . ; \
ln -sf ../../run/p3_lookup_table_1.dat-v4.1 . ; \
ln -sf ../../run/p3_lookup_table_2.dat-v4.1 . ; \
ln -sf ../../run/p3_lookupTable_1.dat-2momI_v5.1.6_oldDimax . ; \
ln -sf ../../run/p3_lookupTable_1.dat-3momI_v5.1.6 . ; \
ln -sf ../../run/p3_lookupTable_2.dat-4.1 . ; \
ln -sf ../../run/HLC.TBL . ; \
ln -sf ../../run/wind-turbine-1.tbl . ; \
ln -sf ../../run/ishmael-gamma-tab.bin . ; \
Expand Down Expand Up @@ -630,8 +635,9 @@ em_real : wrf
ln -sf ../../run/bulkdens.asc_s_0_03_0_9 . ; \
ln -sf ../../run/bulkradii.asc_s_0_03_0_9 . ; \
ln -sf ../../run/CCN_ACTIVATE.BIN . ; \
ln -sf ../../run/p3_lookup_table_1.dat-v4.1 . ; \
ln -sf ../../run/p3_lookup_table_2.dat-v4.1 . ; \
ln -sf ../../run/p3_lookupTable_1.dat-2momI_v5.1.6_oldDimax . ; \
ln -sf ../../run/p3_lookupTable_1.dat-3momI_v5.1.6 . ; \
ln -sf ../../run/p3_lookupTable_2.dat-4.1 . ; \
ln -sf ../../run/HLC.TBL . ; \
ln -sf ../../run/wind-turbine-1.tbl . ; \
ln -sf ../../run/ishmael-gamma-tab.bin . ; \
Expand Down Expand Up @@ -925,8 +931,9 @@ nmm_real : nmm_wrf
ln -sf ../../run/bulkdens.asc_s_0_03_0_9 . ; \
ln -sf ../../run/bulkradii.asc_s_0_03_0_9 . ; \
ln -sf ../../run/CCN_ACTIVATE.BIN . ; \
ln -sf ../../run/p3_lookup_table_1.dat-v4.1 . ; \
ln -sf ../../run/p3_lookup_table_2.dat-v4.1 . ; \
ln -sf ../../run/p3_lookupTable_1.dat-2momI_v5.1.6_oldDimax . ; \
ln -sf ../../run/p3_lookupTable_1.dat-3momI_v5.1.6 . ; \
ln -sf ../../run/p3_lookupTable_2.dat-4.1 . ; \
ln -sf ../../run/HLC.TBL . ; \
ln -sf ../../run/wind-turbine-1.tbl . ; \
ln -sf ../../run/ishmael-gamma-tab.bin . ; \
Expand Down
4 changes: 4 additions & 0 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ state real qir2 ikjftb scalar 1 - \
i0rhusdf=(bdy_interp:dt) "QIR2" "Rime ice mass-2 mixing ratio" "kg kg(-1)"
state real qib2 ikjftb scalar 1 - \
i0rhusdf=(bdy_interp:dt) "QIB2" "Rime ice volume-2 mixing ratio" "m(3) kg(-1)"
state real qzi ikjftb scalar 1 - \
i0rhusdf=(bdy_interp:dt) "QZI" "Sixth moment ice mixing ratio" "m(6) kg(-1)"
state real qvoli ikjftb scalar 1 - \
i0rhusdf=(bdy_interp:dt) "QVOLI" "Ice volume-1 mixing ratio" "m(3) kg(-1)"
state real qaoli ikjftb scalar 1 - \
Expand Down Expand Up @@ -2897,6 +2899,7 @@ package thompsonaero mp_physics==28 - moist:qv,qc
package p3_1category mp_physics==50 - moist:qv,qc,qr,qi;scalar:qni,qnr,qir,qib;state:re_cloud,re_ice,vmi3d,rhopo3d,di3d,refl_10cm,th_old,qv_old
package p3_1category_nc mp_physics==51 - moist:qv,qc,qr,qi;scalar:qnc,qni,qnr,qir,qib;state:re_cloud,re_ice,vmi3d,rhopo3d,di3d,refl_10cm,th_old,qv_old
package p3_2category mp_physics==52 - moist:qv,qc,qr,qi,qi2;scalar:qnc,qni,qnr,qir,qib,qni2,qir2,qib2;state:re_cloud,re_ice,vmi3d,rhopo3d,di3d,vmi3d_2,rhopo3d_2,di3d_2,refl_10cm,th_old,qv_old
package p3_1cat_3mom mp_physics==53 - moist:qv,qc,qr,qi;scalar:qnc,qni,qnr,qir,qib,qzi;state:re_cloud,re_ice,vmi3d,rhopo3d,di3d,refl_10cm,th_old,qv_old
package morr_tm_aero mp_physics==40 - moist:qv,qc,qr,qi,qs,qg;scalar:qnc,qni,qns,qnr,qng;state:rqrcuten,rqscuten,rqicuten,EFCG,EFIG,EFSG,WACT,CCN1_GS,CCN2_GS,CCN3_GS,CCN4_GS,CCN5_GS,CCN6_GS,CCN7_GS,re_cloud,re_ice,re_snow,mskf_refl_10cm
package jensen_ishmael mp_physics==55 - moist:qv,qc,qr,qi,qi2,qi3;scalar:qnr,qni,qvoli,qaoli,qni2,qvoli2,qaoli2,qni3,qvoli3,qaoli3;state:re_cloud,re_ice,vmi3d,rhopo3d,di3d,phii3d,itype,vmi3d_2,rhopo3d_2,di3d_2,phii3d_2,itype_2,vmi3d_3,rhopo3d_3,di3d_3,phii3d_3,itype_3,refl_10cm
package ntu mp_physics==56 - moist:qv,qc,qr,qi,qs,qg,qh;scalar:qnc,qnr,qni,qns,qng,qnh,qdcn,qtcn,qccn,qrcn,qnin,fi,fs,vi,vs,vg,ai,as,ag,ah,i3m
Expand Down Expand Up @@ -2933,6 +2936,7 @@ package thompsonaero_dfi mp_physics_dfi==28 - dfi_moist:dfi
package p3_1category_dfi mp_physics_dfi==50 - dfi_moist:dfi_qv,dfi_qc,dfi_qr,dfi_qi;dfi_scalar:dfi_qni,dfi_qnr,dfi_qir,dfi_qib;state:dfi_re_cloud,dfi_re_ice
package p3_1category_nc_dfi mp_physics_dfi==51 - dfi_moist:dfi_qv,dfi_qc,dfi_qr,dfi_qi;dfi_scalar:dfi_qnc,dfi_qni,dfi_qnr,dfi_qir,dfi_qib;state:dfi_re_cloud,dfi_re_ice
package p3_2category_dfi mp_physics_dfi==52 - dfi_moist:dfi_qv,dfi_qc,dfi_qr,dfi_qi,dfi_qi2;dfi_scalar:dfi_qnc,dfi_qni,dfi_qnr,dfi_qir,dfi_qib,dfi_qni2,dfi_qir2,dfi_qib2;state:dfi_re_cloud,dfi_re_ice
package p3_1cat_3mom_dfi mp_physics_dfi==53 - dfi_moist:dfi_qv,dfi_qc,dfi_qr,dfi_qi;dfi_scalar:dfi_qni,dfi_qnr,dfi_qir,dfi_qib,dfi_qzi;state:dfi_re_cloud,dfi_re_ice
package jensen_ishmael_dfi mp_physics_dfi==55 - dfi_moist:dfi_qv,dfi_qc,dfi_qr,dfi_qi,dfi_qi2,dfi_qi3;dfi_scalar:dfi_qnr,dfi_qni,dfi_qvoli,dfi_qaoli,dfi_qni2,dfi_qvoli2,dfi_qaoli2,dfi_qni3,dfi_qvoli3,dfi_qaoli3;state:dfi_re_cloud,dfi_re_ice
package ntu_dfi mp_physics_dfi==56 - dfi_moist:dfi_qv,dfi_qc,dfi_qr,dfi_qi,dfi_qs,dfi_qg,dfi_qh;dfi_scalar:dfi_qnc,dfi_qnr,dfi_qni,dfi_qns,dfi_qng,dfi_qnh,dfi_qdcn,dfi_qtcn,dfi_qccn,dfi_qrcn,dfi_qnin,dfi_fi,dfi_fs,dfi_vi,dfi_vs,dfi_vg,dfi_ai,dfi_as,dfi_ag,dfi_ah,dfi_i3m
package etampnew_dfi mp_physics_dfi==95 - dfi_moist:dfi_qv,dfi_qc,dfi_qr,dfi_qs;dfi_scalar:dfi_qt
Expand Down
1 change: 1 addition & 0 deletions Registry/Registry.NMM
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,7 @@ package wdm7scheme mp_physics==26 - moist:qv,qc,q
package p3_1category mp_physics==50 - moist:qv
package p3_1category_nc mp_physics==51 - moist:qv
package p3_2category mp_physics==52 - moist:qv
package p3_1cat_3mom mp_physics==53 - moist:qv
package ntu mp_physics==56 - moist:qv
package jensen_ishmael mp_physics==86 - moist:qv
package etamp_hwrf mp_physics==85 - moist:qv,qc,qr,qi,qs;state:f_ice,f_rain,f_rimef
Expand Down
6 changes: 3 additions & 3 deletions clean
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if ( "$arg" == '-a' || "$arg" == '-aa' ) then
/bin/rm -f configure.wrf >& /dev/null
endif
if ( "$arg" != '-aa' ) then
( cd run ; /bin/rm -f gm* out* fort* ideal* *.exe input_sounding ; \
( cd run ; /bin/rm -f gm* out* fort* ideal* *.exe input_sounding p3_lookupTable_1.dat-3momI_v5.1.6 ; \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; \
/bin/rm -f namelist.input ) >& /dev/null
( cd test/exp_real ; /bin/rm -f gm* out* fort* real* ) >& /dev/null
Expand All @@ -58,11 +58,11 @@ if ( "$arg" == '-a' || "$arg" == '-aa' ) then
*/CAMtr_volume_mixing_ratio.RCP4.5 */CAMtr_volume_mixing_ratio.RCP6 */CAMtr_volume_mixing_ratio.RCP8.5 \
*/CAMtr_volume_mixing_ratio.A1B */CAMtr_volume_mixing_ratio.A2 */CAMtr_volume_mixing_ratio \
*/CLM_*DATA */RRTMG_LW_DATA */RRTMG_SW_DATA \
*/p3_lookup_table_?.dat* */BROADBAND_CLOUD_GODDARD.bin \
*/p3_lookup* */BROADBAND_CLOUD_GODDARD.bin \
*/ozone.formatted */ozone_lat.formatted */ozone_plev.formatted \
*/aerosol.formatted */aerosol_lat.formatted */aerosol_plev.formatted */aerosol_lon.formatted \
*/kernels.asc_s_0_03_0_9 */bulkradii.asc_s_0_03_0_9 */bulkdens.asc_s_0_03_0_9 \
*/constants.asc */p3_lookup_table_1.dat \
*/constants.asc \
*/masses.asc */kernels_z.asc */capacity.asc */termvels.asc */coeff_p.asc */coeff_q.asc \
*/gribmap.txt */tr??t?? */co2_trans */namelist.output */ishmael-gamma-tab.bin \
*/eclipse_besselian_elements.dat \
Expand Down
48 changes: 47 additions & 1 deletion phys/module_microphysics_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ SUBROUTINE microphysics_driver( &
,NSSL_1MOM,NSSL_1MOMLFO, FER_MP_HIRES_ADVECT & ! ,NSSL_3MOM &
,WSM7SCHEME, WDM7SCHEME &
,NUWRF4ICESCHEME &
,MILBRANDT2MOM , CAMMGMPSCHEME,FULL_KHAIN_LYNN, P3_1CATEGORY, P3_1CATEGORY_NC, P3_2CATEGORY, MORR_TM_AERO, JENSEN_ISHMAEL,SPRINKLER, NTU !,MILBRANDT3MOM, for ntu3m
,MILBRANDT2MOM , CAMMGMPSCHEME,FULL_KHAIN_LYNN, P3_1CATEGORY, P3_1CATEGORY_NC, P3_2CATEGORY, P3_1CAT_3MOM &
,MORR_TM_AERO, JENSEN_ISHMAEL, SPRINKLER, NTU !,MILBRANDT3MOM
#if ( WRFPLUS == 1 )
USE module_state_description, ONLY : LSCONDSCHEME, MKESSLERSCHEME
#endif
Expand Down Expand Up @@ -1540,6 +1541,51 @@ SUBROUTINE microphysics_driver( &
,diag_di2_3d=di3d_2 &
,diag_rhopo2_3d=rhopo3d_2 &
)
CASE (P3_1CAT_3MOM)
CALL wrf_debug(100, 'microphysics_driver: calling p3 one category 3 moment')
CALL mp_p3_wrapper_wrf( &
ITIMESTEP=itimestep, &
TH_3d=th, &
QV_3d=qv_curr, &
QC_3d=qc_curr, &
QR_3d=qr_curr, &
QNR_3d=qnr_curr, &
QI1_3d=qi_curr, &
QIR1_3d=qir_curr, &
QNI1_3d=qni_curr, &
QIB1_3d=qib_curr, &
th_old_3d=th_old, &
qv_old_3d=qv_old, &
nc_3d=qnc_curr, &
PII=pi_phy, &
P=p, &
DT=dt, &
DZ=dz8w, &
W=w &
,RAINNC=RAINNC &
,RAINNCV=RAINNCV &
,SR=SR &
,SNOWNC=SNOWNC &
,SNOWNCV=SNOWNCV &
,N_ICECAT=1 &
,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
,diag_zdbz_3d=refl_10cm, &
diag_effc_3d=re_cloud, &
diag_effi_3d=re_ice &
,diag_vmi_3d=vmi3d &
,diag_di_3d=di3d &
,diag_rhopo_3d=rhopo3d &
,QZI1_3d=qzi_curr &
! not currently output
! ,diag_dhmax_3d=dhmax3d &
! ,diag_lami_3d=lami3d &
! ,diag_mui_3d=mui3d &
)
#endif
Expand Down
Loading

0 comments on commit 574c481

Please sign in to comment.