-
Notifications
You must be signed in to change notification settings - Fork 26
noresm2_3_beta02: Add RafWBF parameterization for Bergeron factor #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: noresm2_3_develop
Are you sure you want to change the base?
Changes from 7 commits
1e128d9
0a769c0
ab01817
149f4ea
849508d
5c5a2f0
dd93f6c
a04007b
67a2068
a82ecc1
18d4edf
b4a8ee4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ./xmlchange ROF_NCPL=\$ATM_NCPL | ||
| ./xmlchange GLC_NCPL=\$ATM_NCPL |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| mfilt = 1,1,1,1,1,1 | ||
| ndens = 1,1,1,1,1,1 | ||
| nhtfrq = 3,3,3,3,3,3 | ||
| inithist = 'ENDOFRUN' | ||
| history_budget = .true. | ||
| rafwbf_on = .true. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| !---------------------------------------------------------------------------------- | ||
| ! Users should add all user specific namelist changes below in the form of | ||
| ! namelist_var = new_namelist_value | ||
| ! | ||
| ! Include namelist variables for drv_flds_in ONLY if -megan and/or -drydep options | ||
| ! are set in the CLM_NAMELIST_OPTS env variable. | ||
| ! | ||
| ! EXCEPTIONS: | ||
| ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting | ||
| ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting | ||
| ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting | ||
| ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting | ||
| ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting | ||
| ! Set irrigate by the CLM_BLDNML_OPTS -irrig setting | ||
| ! Set dtime with L_NCPL option | ||
| ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options | ||
| ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases | ||
| ! (includes $inst_string for multi-ensemble cases) | ||
| ! Set glc_grid with CISM_GRID option | ||
| ! Set glc_smb with GLC_SMB option | ||
| ! Set maxpatch_glcmec with GLC_NEC option | ||
| ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable | ||
| !---------------------------------------------------------------------------------- | ||
| hist_nhtfrq = 9 | ||
| hist_mfilt = 1 | ||
| hist_ndens = 1 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -146,6 +146,11 @@ module micro_mg2_0 | |||||
| use module_random_forests, only: max_nodes5, leftchild5, rightchild5, splitfeat5 | ||||||
| use module_random_forests, only: thresh5, out51 | ||||||
|
|
||||||
| !RafWBF | ||||||
| use module_random_forests, only: rafwbf_on, jbtb | ||||||
| use module_random_forests, only: max_nodesb, leftchildb, rightchildb, splitfeatb | ||||||
| use module_random_forests, only: threshb, outb | ||||||
|
|
||||||
| implicit none | ||||||
| private | ||||||
| save | ||||||
|
|
@@ -254,7 +259,7 @@ subroutine micro_mg_init( & | |||||
| allow_sed_supersat_in, do_sb_physics_in, & | ||||||
| nccons_in, nicons_in, ncnst_in, ninst_in, errstring) | ||||||
|
|
||||||
| use module_random_forests, only: sec_ice_init | ||||||
| use module_random_forests, only: sec_ice_init, wbf_init | ||||||
| use micro_mg_utils, only: micro_mg_utils_init | ||||||
|
|
||||||
| !----------------------------------------------------------------------- | ||||||
|
|
@@ -364,7 +369,10 @@ subroutine micro_mg_init( & | |||||
| ! RaFSIP: INITIALIZE THE RANDOM FOREST PARAMETERS | ||||||
| call sec_ice_init() | ||||||
| end if | ||||||
|
|
||||||
| if (rafwbf_on) then | ||||||
| ! RaFWBF: INITIALIZE THE RANDOM FOREST PARAMETERS | ||||||
| call wbf_init() | ||||||
| end if | ||||||
|
|
||||||
| end subroutine micro_mg_init | ||||||
|
|
||||||
|
|
@@ -373,7 +381,7 @@ end subroutine micro_mg_init | |||||
|
|
||||||
| subroutine micro_mg_tend ( & | ||||||
| mgncol, nlev, deltatin, & | ||||||
| t, q, & | ||||||
| t, q, tsk, pblh, & | ||||||
| qcn, qin, & | ||||||
| ncn, nin, & | ||||||
| qrn, qsn, & | ||||||
|
|
@@ -408,7 +416,7 @@ subroutine micro_mg_tend ( & | |||||
| qrsedten, qssedten, & | ||||||
| pratot, prctot, & | ||||||
| mnuccctot, mnuccttot, msacwitot, & | ||||||
| psacwstot, bergstot, bergtot, & | ||||||
| psacwstot, bergstot, bergtot, bergf, & | ||||||
| melttot, homotot, & | ||||||
| qcrestot, prcitot, praitot, & | ||||||
| qirestot, mnuccrtot, pracstot, & | ||||||
|
|
@@ -471,7 +479,7 @@ subroutine micro_mg_tend ( & | |||||
| evaporate_sublimate_precip, & | ||||||
| bergeron_process_snow | ||||||
|
|
||||||
| use module_random_forests, only: MDIM5, MDIM6 | ||||||
| use module_random_forests, only: MDIM5, MDIM6, MDIMB | ||||||
| use module_random_forests, only: runforestmulti | ||||||
| use module_random_forests, only: runforestriv | ||||||
| use module_random_forests, only: runforest | ||||||
|
|
@@ -485,6 +493,8 @@ subroutine micro_mg_tend ( & | |||||
| real(r8), intent(in) :: deltatin ! time step (s) | ||||||
| real(r8), intent(in) :: t(mgncol,nlev) ! input temperature (K) | ||||||
| real(r8), intent(in) :: q(mgncol,nlev) ! input h20 vapor mixing ratio (kg/kg) | ||||||
| real(r8), intent(in) :: tsk(mgncol) ! input skin temperature for RaFWBF (K) | ||||||
| real(r8), intent(in) :: pblh(mgncol) ! input planetary boundary layer for RaFWBF (K) | ||||||
|
|
||||||
| ! note: all input cloud variables are grid-averaged | ||||||
| real(r8), intent(in) :: qcn(mgncol,nlev) ! cloud water mixing ratio (kg/kg) | ||||||
|
|
@@ -519,6 +529,7 @@ subroutine micro_mg_tend ( & | |||||
| real(r8), intent(in) :: rndst(:,:,:) ! radius of each dust bin, for contact freezing (from microp_aero_ts) (m) | ||||||
| real(r8), intent(in) :: nacon(:,:,:) ! number in each dust bin, for contact freezing (from microp_aero_ts) (1/m^3) | ||||||
|
|
||||||
|
|
||||||
| ! output arguments | ||||||
|
|
||||||
| real(r8), intent(out) :: qcsinksum_rate1ord(mgncol,nlev) ! 1st order rate for | ||||||
|
|
@@ -581,6 +592,7 @@ subroutine micro_mg_tend ( & | |||||
| real(r8), intent(out) :: psacwstot(mgncol,nlev) ! collection of cloud water by snow | ||||||
| real(r8), intent(out) :: bergstot(mgncol,nlev) ! bergeron process on snow | ||||||
| real(r8), intent(out) :: bergtot(mgncol,nlev) ! bergeron process on cloud ice | ||||||
| real(r8), intent(out) :: bergf(mgncol,nlev) ! factor for bergeron process in RafWBF | ||||||
| real(r8), intent(out) :: melttot(mgncol,nlev) ! melting of cloud ice | ||||||
| real(r8), intent(out) :: homotot(mgncol,nlev) ! homogeneous freezing cloud water | ||||||
| real(r8), intent(out) :: qcrestot(mgncol,nlev) ! residual cloud condensation due to removal of excess supersat | ||||||
|
|
@@ -928,6 +940,10 @@ subroutine micro_mg_tend ( & | |||||
| real(r8) :: FEATURES5(MDIM5),FEATURES6(MDIM6) | ||||||
| real(r8) :: YPRED1,YPRED2,YPRED3,YPRED4,YPRED5 | ||||||
|
|
||||||
| ! RaFWBF variables: | ||||||
| real(r8) :: Pb, LWCb, IWCb, Tb, PBLHb, TSKb ! INPUT, dummy | ||||||
| real(r8) :: FEATURESB(MDIMB),YPREDB | ||||||
| real(r8) :: wbf_factor(mgncol,nlev) ! will be applied regardless if RafWBF is ON or OFF | ||||||
|
|
||||||
|
|
||||||
| !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc | ||||||
|
|
@@ -1272,7 +1288,18 @@ subroutine micro_mg_tend ( & | |||||
| SIP_RATE=0._r8 | ||||||
| QIRSIP=0._r8 | ||||||
| QICSIP=0._r8 | ||||||
|
|
||||||
|
|
||||||
| ! RaFWBF zero vars | ||||||
| Pb = 0._r8 | ||||||
| LWCb = 0._r8 | ||||||
| IWCb = 0._r8 | ||||||
| Tb = 0._r8 | ||||||
| PBLHb = 0._r8 | ||||||
| TSKb = 0._r8 | ||||||
| FEATURESB(:) = 0._r8 | ||||||
| YPREDB = 0._r8 | ||||||
| wbf_factor(:,:) = 1._r8 ! this should default to 1 | ||||||
| bergf=1.0_r8 | ||||||
|
|
||||||
|
|
||||||
| !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc | ||||||
|
|
@@ -1725,11 +1752,34 @@ subroutine micro_mg_tend ( & | |||||
| qric(:,k), qsic(:,k), lamr(:,k), n0r(:,k), lams(:,k), n0s(:,k), & | ||||||
| pre(:,k), prds(:,k), am_evp_st(:,k), mgncol) | ||||||
|
|
||||||
| ! RaFWBF parameterisattion: | ||||||
| if (rafwbf_on) then | ||||||
| do i = 1,mgncol | ||||||
| if (t(i,k) .le. 273.15_r8 .and. t(i,k) .ge. 235.15_r8) then | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of these uses of 273.15 (here and below) should
Suggested change
Also, it would be great if you could define and document a parameter for |
||||||
| ! make inputs: | ||||||
| Pb = p(i,k) ! Pa | ||||||
| LWCb = qcic(i,k) + qric(i,k) !kg/kg | ||||||
| IWCb = qiic(i,k) + qsic(i,k) !kg/kg | ||||||
| Tb = t(i,k) - 273.15_r8 ! DegC | ||||||
| PBLHb = pblh(i) !m | ||||||
| TSKb = tsk(i) - 273.15 ! DegC | ||||||
|
Comment on lines
+1765
to
+1767
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these constants explicitly supposed to be the same as |
||||||
| FEATURESB =(/ Pb, LWCb, IWCb, Tb, PBLHb, TSKb /) | ||||||
| call runforest(MDIMB, MAX_NODESB, JBTB, FEATURESB, YPREDB, & | ||||||
| LEFTCHILDB, RIGHTCHILDB, SPLITFEATB, THRESHB, OUTB) | ||||||
| wbf_factor(i,k) = max(0.0_r8, min(1.0_r8,YPREDB)) | ||||||
| else | ||||||
| wbf_factor(i,k) = 1.0_r8 | ||||||
| end if | ||||||
| end do | ||||||
| else | ||||||
| wbf_factor(:,:) = 1.0_r8 | ||||||
| end if | ||||||
|
|
||||||
| call bergeron_process_snow(t(:,k), rho(:,k), dv(:,k), mu(:,k), sc(:,k), & | ||||||
| qvl(:,k), qvi(:,k), asn(:,k), qcic(1:mgncol,k), qsic(:,k), lams(:,k), n0s(:,k), & | ||||||
| bergs(:,k), mgncol) | ||||||
|
|
||||||
| bergs(:,k)=bergs(:,k)*micro_mg_berg_eff_factor | ||||||
| bergs(:,k)=bergs(:,k)*micro_mg_berg_eff_factor * wbf_factor(:,k) | ||||||
|
|
||||||
| !+++PMC 12/3/12 - NEW VAPOR DEP/SUBLIMATION GOES HERE!!! | ||||||
| if (do_cldice) then | ||||||
|
|
@@ -1738,7 +1788,7 @@ subroutine micro_mg_tend ( & | |||||
| icldm(:,k), rho(:,k), dv(:,k), qvl(:,k), qvi(:,k), & | ||||||
| berg(:,k), vap_dep(:,k), ice_sublim(:,k), mgncol) | ||||||
|
|
||||||
| berg(:,k)=berg(:,k)*micro_mg_berg_eff_factor | ||||||
| berg(:,k)=berg(:,k)*micro_mg_berg_eff_factor * wbf_factor(:,k) | ||||||
|
|
||||||
| where (ice_sublim(:,k) < 0._r8 .and. qi(:,k) > qsmall .and. icldm(:,k) > mincld) | ||||||
| nsubi(:,k) = sublim_factor*ice_sublim(:,k) / qi(:,k) * ni(:,k) / icldm(:,k) | ||||||
|
|
@@ -2430,6 +2480,7 @@ subroutine micro_mg_tend ( & | |||||
| psacwstot(i,k) = psacws(i,k)*lcldm(i,k) | ||||||
| bergstot(i,k) = bergs(i,k)*lcldm(i,k) | ||||||
| bergtot(i,k) = berg(i,k) | ||||||
| bergf(i,k) = wbf_factor(i,k) | ||||||
| prcitot(i,k) = prci(i,k)*icldm(i,k) | ||||||
| praitot(i,k) = prai(i,k)*icldm(i,k) | ||||||
| mnuccdtot(i,k) = mnuccd(i,k)*icldm(i,k) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there supposed to be a reference here?
This needs some reference / documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not published yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, please include the title and current submission status (e.g., journal, status).