Skip to content
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

Stochastic MP and cloud perturbations #553

Merged
merged 24 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f2a8df4
Merge pull request #2 from NCAR/master
pjpegion Apr 22, 2020
f60ec02
Merge pull request #3 from NCAR/master
pjpegion May 5, 2020
b934a13
Merge pull request #4 from NCAR/master
pjpegion Dec 2, 2020
8a8056e
add mp perts to GFS_stochastics
pjpegion Dec 2, 2020
3226ffb
add CN perts to GFS_stochastics
pjpegion Dec 2, 2020
ac42e80
additions for MP perturbations
pjpegion Dec 8, 2020
6782e0e
add temporary surface perturbation diagnostic
pjpegion Dec 14, 2020
4c7d8ad
merge with upstream NCAR
pjpegion Dec 23, 2020
9ff5e80
Merge branch 'master' into pert_clds_mp
pjpegion Dec 23, 2020
cbe310f
Merge pull request #5 from NCAR/master
pjpegion Jan 6, 2021
f850899
Merge pull request #6 from pjpegion/master
pjpegion Jan 6, 2021
3750b6b
add cloud perturbations and clean up radiation perturbations
pjpegion Jan 6, 2021
2980ce1
Merge branch 'pert_clds_mp' of https://github.com/pjpegion/ccpp-physi…
pjpegion Jan 6, 2021
264fa1b
Merge remote-tracking branch 'upstream/master' into pert_clds_mp
pjpegion Jan 12, 2021
f2bc200
Merge remote-tracking branch 'upstream/master' into pert_clds_mp
pjpegion Jan 22, 2021
c148234
add ca_global to radiation tendency logic
pjpegion Feb 2, 2021
f304650
add MP perturbations to ca_global section
pjpegion Feb 2, 2021
4dd3f5e
Merge remote-tracking branch 'upstream/master' into pert_clds_mp
pjpegion Feb 16, 2021
4a164c0
Merge remote-tracking branch 'upstream/master' into pert_clds_mp
pjpegion Feb 26, 2021
eaab868
point to correct branch of rrtmgp
pjpegion Mar 3, 2021
31d99da
Merge remote-tracking branch 'upstream/master' into pert_clds_mp
pjpegion Mar 4, 2021
daca231
Address Dom code review
pjpegion Mar 15, 2021
55f84f6
Merge remote-tracking branch 'upstream/master' into pert_clds_mp
pjpegion Mar 18, 2021
bb0839e
change declaration of dtdtnp in GFS_stochastics
pjpegion Mar 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions physics/GFS_MP_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac,
rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_qv, rain0, ice0, snow0, &
graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, &
totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, dt3dt, dq3dt, rain_cpl, rainc_cpl, snow_cpl, pwat, &
do_sppt, ca_global, dtdtr, dtdtc, drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, &
drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, &
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, errmsg, errflg)
!
use machine, only: kind_phys
Expand Down Expand Up @@ -119,9 +119,6 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac,
real(kind=kind_phys), dimension(:,:), intent(inout) :: dq3dt ! only if ldiag3d and qdiag3d

! Stochastic physics / surface perturbations
logical, intent(in) :: do_sppt, ca_global
real(kind=kind_phys), dimension(im,levs), intent(inout) :: dtdtr
real(kind=kind_phys), dimension(im,levs), intent(in) :: dtdtc
real(kind=kind_phys), dimension(im), intent(inout) :: drain_cpl
real(kind=kind_phys), dimension(im), intent(inout) :: dsnow_cpl

Expand Down Expand Up @@ -391,11 +388,6 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac,
pwat(i) = pwat(i) * onebg
enddo

! Stochastic physics / surface perturbations
if (do_sppt .or. ca_global) then
!--- radiation heating rate
dtdtr(1:im,:) = dtdtr(1:im,:) + dtdtc(1:im,:)*dtf
endif

end subroutine GFS_MP_generic_post_run
!> @}
Expand Down
34 changes: 0 additions & 34 deletions physics/GFS_MP_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -728,40 +728,6 @@
kind = kind_phys
intent = inout
optional = F
[do_sppt]
standard_name = flag_for_stochastic_physics_perturbations
long_name = flag for stochastic physics perturbations
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[ca_global]
standard_name = flag_for_global_cellular_automata
long_name = switch for global ca
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[dtdtr]
standard_name = tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step
long_name = temp. change due to radiative heating per time step
units = K
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[dtdtc]
standard_name = tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky
long_name = clear sky radiative (shortwave + longwave) heating rate at current time
units = K s-1
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[drain_cpl]
standard_name = tendency_of_lwe_thickness_of_precipitation_amount_for_coupling
long_name = change in rain_cpl (coupling_type)
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%acvt' , Tbd%acvt)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%hpbl' , Tbd%hpbl)
if (Model%do_sppt) then
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtdtr' , Tbd%dtdtr)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtdtnp' , Tbd%dtdtnp)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtotprcp' , Tbd%dtotprcp)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dcnvprcp' , Tbd%dcnvprcp)
end if
Expand Down
44 changes: 37 additions & 7 deletions physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, &
lmfdeep2, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, &
rog, rocp, con_rd, xlat_d, xlat, xlon, coslat, sinlat, tsfc, slmsk, &
prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, &
cnvw_in, cnvc_in, qgrs, aer_nm, dx, icloud, & !inputs from here and above
prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, pert_clds,sppt_wts,&
sppt_amp, cnvw_in, cnvc_in, qgrs, aer_nm, dx, icloud, & !inputs from here and above
coszen, coszdg, effrl_inout, effri_inout, effrs_inout, &
clouds1, clouds2, clouds3, clouds4, clouds5, & !in/out from here and above
kd, kt, kb, mtopa, mbota, raddt, tsfg, tsfa, de_lgth, alb1d, delp, dz, & !output from here and below
Expand Down Expand Up @@ -65,7 +65,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
& profsw_type, NBDSW
use module_radlw_parameters, only: topflw_type, sfcflw_type, &
& proflw_type, NBDLW
use surface_perturbation, only: cdfnor
use surface_perturbation, only: cdfnor,ppfbet

! For Thompson MP
use module_mp_thompson, only: calc_effectRad, Nt_c
Expand Down Expand Up @@ -97,9 +97,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &

logical, intent(in) :: lsswr, lslwr, ltaerosol, lgfdlmprad, &
uni_cld, effr_in, do_mynnedmf, &
lmfshal, lmfdeep2
lmfshal, lmfdeep2, pert_clds

real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup, julian
real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup, julian, sppt_amp
real(kind=kind_phys), intent(in) :: eps, epsm1, fvirt, rog, rocp, con_rd

real(kind=kind_phys), dimension(:), intent(in) :: xlat_d, xlat, xlon, &
Expand All @@ -109,7 +109,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsl, prslk, &
tgrs, sfc_wts, &
mg_cld, effrr_in, &
cnvw_in, cnvc_in
cnvw_in, cnvc_in, &
sppt_wts

real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs, aer_nm

Expand Down Expand Up @@ -200,6 +201,11 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
real(kind=kind_phys), dimension(im,lm+LTP,NF_VGAS) :: gasvmr
real(kind=kind_phys), dimension(im,lm+LTP,NBDSW,NF_AESW) :: faersw
real(kind=kind_phys), dimension(im,lm+LTP,NBDLW,NF_AELW) :: faerlw

! for stochastic cloud perturbations
real(kind=kind_phys), dimension(im) :: cldp1d
real (kind=kind_phys) :: alpha0,beta0,m,s,cldtmp,tmp_wt,cdfz
integer :: iflag

integer :: ids, ide, jds, jde, kds, kde, &
ims, ime, jms, jme, kms, kme, &
Expand Down Expand Up @@ -932,7 +938,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK)
endif


if (imp_physics == imp_physics_zhao_carr .or. imp_physics == imp_physics_mg) then ! zhao/moorthi's prognostic cloud scheme
! or unified cloud and/or with MG microphysics

Expand Down Expand Up @@ -1038,6 +1043,31 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &

! endif ! end_if_ntcw

! perturb cld cover
if (pert_clds) then
do i=1,im
tmp_wt= -1*log( ( 2.0 / ( sppt_wts(i,38) ) ) - 1 )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the hard-coded '38' index cause any future problems?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may in the future, but for L64 and L127 this works.

call cdfnor(tmp_wt,cdfz)
cldp1d(i) = cdfz
enddo
do k = 1, LMK
do i = 1, IM
! compute beta distribution parameters
m = clouds(i,k,1)
if (m<0.99 .AND. m > 0.01) then
s = sppt_amp*m*(1.-m)
alpha0 = m*m*(1.-m)/(s*s)-m
beta0 = alpha0*(1.-m)/m
! compute beta distribution value corresponding
! to the given percentile albPpert to use as new albedo
call ppfbet(cldp1d(i),alpha0,beta0,iflag,cldtmp)
clouds(i,k,1) = cldtmp
else
clouds(i,k,1) = m
endif
enddo ! end_do_i_loop
enddo ! end_do_k_loop
endif
do k = 1, LMK
do i = 1, IM
clouds1(i,k) = clouds(i,k,1)
Expand Down
26 changes: 26 additions & 0 deletions physics/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,32 @@
type = logical
intent = in
optional = F
[sppt_wts]
standard_name = weights_for_stochastic_sppt_perturbation
long_name = weights for stochastic sppt perturbation
units = none
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[sppt_amp]
standard_name = total_ampltiude_of_sppt_perturbation
long_name = toal ampltidue of stochastic sppt perturbation
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
optional = F
[pert_clds]
standard_name = flag_for_stochastic_cloud_fraction_perturbations
long_name = flag for stochastic cloud fraction physics perturbations
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[do_mynnedmf]
standard_name = do_mynnedmf
long_name = flag to activate MYNN-EDMF
Expand Down
Loading