Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
29db559
added a new cloud fraction scheme (actually upgraded cal_cldfra3) des…
gthompsnWRF Nov 16, 2021
052145c
correct a dumb mistake
gthompsnWRF Nov 16, 2021
8da0705
make icloud=3 call cldfra3 compatible with updated subroutine
gthompsnWRF Nov 16, 2021
3787899
bug fix lwp_ex and iwp_ex inside progcld6; factor of 1000
gthompsnWRF Nov 17, 2021
f9c785f
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
climbfuji Nov 19, 2021
4742485
Fix compilation error with gfortran in physics/radiation_clouds.f
climbfuji Nov 19, 2021
cba377d
Merge pull request #1 from climbfuji/new_thompson_cloud_fraction_upda…
gthompsnWRF Nov 21, 2021
30ae919
Avoid dividing by zero in physics/GFS_rrtmg_post.F90
climbfuji Nov 22, 2021
74cae0c
Move total albedo to right place in physics/GFS_rrtmg_post.meta, make…
climbfuji Nov 22, 2021
fe6677f
minor adjustments to reduce coverage of partly cloudy conditions
gthompsnWRF Nov 22, 2021
25d28e7
Merge branch 'new_thompson_cloud_fraction' of https://github.com/gtho…
gthompsnWRF Nov 22, 2021
b4d7ab0
Use correct vertical dimension for several cloud arrays in physics/GF…
climbfuji Nov 22, 2021
aba5331
Merge branch 'new_thompson_cloud_fraction' of https://github.com/gtho…
climbfuji Nov 22, 2021
24d850d
Merge pull request #2 from climbfuji/new_thompson_cloud_fraction_upda…
gthompsnWRF Nov 23, 2021
6f91aea
silly stray comment/exclamation point
gthompsnWRF Nov 23, 2021
211a413
fix a few comment lines per review of pull request 781
gthompsnWRF Nov 23, 2021
0a54eec
per discussions with Ruiyu, increasing min snow and graupel size seem…
gthompsnWRF Nov 23, 2021
1120779
tiny adjustment of indent/format consistency
gthompsnWRF Nov 23, 2021
7e119fc
re-use icloud=3 option for progcld_thompson
gthompsnWRF Nov 23, 2021
bc8c26d
per review by climbfuji, make suggested changes
gthompsnWRF Nov 23, 2021
2b2e3b1
disallow rain in Thompson to be used in radiation scheme; also set fr…
gthompsnWRF Nov 24, 2021
7d0d736
minor rearrangement of cloud fraction with very low mixing ratios
gthompsnWRF Nov 26, 2021
cd00e16
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
climbfuji Nov 29, 2021
f1dd327
Merge pull request #4 from climbfuji/greg_new_thompson_cloud_fraction…
gthompsnWRF Nov 29, 2021
472987f
permit few max ice number conc; scale back cloud fraction a little; r…
gthompsnWRF Dec 7, 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
9 changes: 8 additions & 1 deletion physics/GFS_rrtmg_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ subroutine GFS_rrtmg_post_run (im, km, kmp1, lm, ltp, kt, kb, kd, nspc1, &
nfxr, nday, lsswr, lslwr, lssav, fhlwr, fhswr, raddt, coszen, &
coszdg, prsi, tgrs, aerodp, cldsa, mtopa, mbota, clouds1, &
cldtaulw, cldtausw, sfcflw, sfcfsw, topflw, topfsw, scmpsw, &
fluxr, errmsg, errflg)
fluxr, total_albedo, errmsg, errflg)

use machine, only: kind_phys
use module_radsw_parameters, only: topfsw_type, sfcfsw_type, &
Expand All @@ -43,6 +43,7 @@ subroutine GFS_rrtmg_post_run (im, km, kmp1, lm, ltp, kt, kb, kd, nspc1, &
real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: clouds1
Comment thread
gthompsnWRF marked this conversation as resolved.
real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtausw
real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtaulw
real(kind=kind_phys), dimension(im), intent(out) :: total_albedo
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated

type(sfcflw_type), dimension(im), intent(in) :: sfcflw
type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw
Expand Down Expand Up @@ -196,6 +197,12 @@ subroutine GFS_rrtmg_post_run (im, km, kmp1, lm, ltp, kt, kb, kd, nspc1, &
endif

endif ! end_if_lssav

! --- The total sky (with clouds) shortwave albedo

do i=1,im
total_albedo(i) = topfsw(i)%upfxc/topfsw(i)%dnfxc
enddo
!
end subroutine GFS_rrtmg_post_run

Expand Down
9 changes: 9 additions & 0 deletions physics/GFS_rrtmg_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,15 @@
type = topfsw_type
intent = in
optional = F
[total_albedo]
standard_name = total_sky_albedo
long_name = total sky albedo at toa
units = frac
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
optional = F
[scmpsw]
standard_name = components_of_surface_downward_shortwave_fluxes
long_name = derived type for special components of surface downward shortwave fluxes
Expand Down
96 changes: 65 additions & 31 deletions physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
plvl, plyr, tlvl, tlyr, qlyr, olyr, gasvmr_co2, gasvmr_n2o, gasvmr_ch4,&
gasvmr_o2, gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, gasvmr_cfc22, &
gasvmr_ccl4, gasvmr_cfc113, aerodp, clouds6, clouds7, clouds8, &
clouds9, cldsa, cldfra, faersw1, faersw2, faersw3, faerlw1, faerlw2, &
faerlw3, alpha, errmsg, errflg)
clouds9, cldsa, cldfra, cldfra2d, lwp_ex,iwp_ex, lwp_fc,iwp_fc, &
faersw1, faersw2, faersw3, &
Comment thread
climbfuji marked this conversation as resolved.
Outdated
faerlw1, faerlw2, faerlw3, alpha, errmsg, errflg)

use machine, only: kind_phys

Expand All @@ -54,6 +55,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
& progcld2, &
& progcld4, progcld5, &
& progcld6, &
& progcld_thompson, &
& progclduni, &
& cal_cldfra3, &
& find_cloudLayers, &
Expand Down Expand Up @@ -125,6 +127,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
real(kind=kind_phys), dimension(:,:), intent(inout) :: clouds1, &
clouds2, clouds3, &
clouds4, clouds5
real(kind=kind_phys), dimension(:), intent(out) :: lwp_ex,iwp_ex, &
& lwp_fc,iwp_fc

integer, intent(out) :: kd, kt, kb

Expand Down Expand Up @@ -158,6 +162,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
clouds8, &
clouds9, &
cldfra
real(kind=kind_phys), dimension(:), intent(out) :: cldfra2d
real(kind=kind_phys), dimension(:,:), intent(out) :: cldsa

real(kind=kind_phys), dimension(:,:,:), intent(out) :: faersw1,&
Expand Down Expand Up @@ -191,9 +196,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
real(kind=kind_phys), dimension(im,lm+LTP) :: &
re_cloud, re_ice, re_snow, qv_mp, qc_mp, &
qi_mp, qs_mp, nc_mp, ni_mp, nwfa
real (kind=kind_phys), dimension(lm) :: cldfra1d, qv1d, &
& qc1d, qi1d, qs1d, dz1d, p1d, t1d

! for F-A MP
real(kind=kind_phys), dimension(im,lm+LTP) :: qc_save, qi_save, qs_save
real(kind=kind_phys), dimension(im,lm+LTP+1) :: tem2db, hz

real(kind=kind_phys), dimension(im,lm+LTP,min(4,ncnd)) :: ccnd
Expand All @@ -206,6 +212,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
! for stochastic cloud perturbations
real(kind=kind_phys), dimension(im) :: cldp1d
real (kind=kind_phys) :: alpha0,beta0,m,s,cldtmp,tmp_wt,cdfz
real (kind=kind_phys) :: max_relh
integer :: iflag

integer :: ids, ide, jds, jde, kds, kde, &
Expand All @@ -228,6 +235,15 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
LP1 = LM + 1 ! num of in/out levels


gridkm = sqrt(2.0)*sqrt(dx(1)*0.001*dx(1)*0.001)

do i = 1, IM
lwp_ex(i) = 0.0
iwp_ex(i) = 0.0
lwp_fc(i) = 0.0
iwp_fc(i) = 0.0
enddo

! --- ... set local /level/layer indexes corresponding to in/out
! variables

Expand Down Expand Up @@ -637,7 +653,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
enddo
! for Thompson MP - prepare variables for calc_effr
if_thompson: if (imp_physics == imp_physics_thompson .and. ltaerosol) then
do k=1,LMK
do k=1,LM
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
do i=1,IM
qvs = qlyr(i,k)
qv_mp (i,k) = qvs/(1.-qvs)
Expand All @@ -652,7 +668,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
enddo
enddo
elseif (imp_physics == imp_physics_thompson) then
do k=1,LMK
do k=1,LM
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
do i=1,IM
qvs = qlyr(i,k)
qv_mp (i,k) = qvs/(1.-qvs)
Expand Down Expand Up @@ -892,29 +908,29 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
endif
enddo

gridkm = sqrt(2.0)*sqrt(dx(1)*0.001*dx(1)*0.001)
if (imp_physics == imp_physics_thompson) then
max_relh = 1.5
else
max_relh = 1.1
endif

do i =1, im
do k =1, lmk
qc_save(i,k) = ccnd(i,k,1)
qi_save(i,k) = ccnd(i,k,2)
qs_save(i,k) = ccnd(i,k,4)
cldfra1d(:) = 0.0
do k = 1, lm-1
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
qv1d(k) = qlyr(i,k)
qc1d(k) = max(0.0, tracer1(i,k,ntcw))
qi1d(k) = max(0.0, tracer1(i,k,ntiw))
qs1d(k) = max(0.0, tracer1(i,k,ntsw))
dz1d(k) = dz(i,k)*1.E3
p1d(k) = plyr(i,k)*100.0
t1d(k) = tlyr(i,k)
enddo
enddo


call cal_cldfra3(cldcov,qlyr,ccnd(:,:,1),ccnd(:,:,2), &
ccnd(:,:,4),plyrpa,tlyr,rho,xland,gridkm, &
ids,ide,jds,jde,kds,kde, &
ims,ime,jms,jme,kms,kme, &
its,ite,jts,jte,kts,kte)

!mz* back to micro-only qc qi,qs
do i =1, im
do k =1, lmk
ccnd(i,k,1) = qc_save(i,k)
ccnd(i,k,2) = qi_save(i,k)
ccnd(i,k,4) = qs_save(i,k)
call cal_cldfra3(cldfra1d, qv1d, qc1d, qi1d, qs1d, dz1d, &
& p1d, t1d, xland(i), gridkm, &
& .false., max_relh, 1, lm-1, .false.)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
do k = 1, lm-1
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
cldcov(i,k) = cldfra1d(k)
enddo
enddo

Expand Down Expand Up @@ -1031,14 +1047,26 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &

else
! MYNN PBL or GF convective are not used
call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs
xlat,xlon,slmsk,dz,delp, &
! call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs
! xlat,xlon,slmsk,dz,delp, &
! ntrac-1, ntcw-1,ntiw-1,ntrw-1, &
! ntsw-1,ntgl-1, &
! im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, &
! cldcov(:,1:LMK), effrl_inout, &
! effri_inout, effrs_inout, &
! lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
! dzb, xlat_d, julian, yearlen, &
! clouds, cldsa, mtopa ,mbota, de_lgth, alpha) ! --- outputs

call progcld_thompson (plyr,plvl,tlyr,qlyr,qstl,rhly, & ! --- inputs
tracer1,xlat,xlon,slmsk,dz,delp, &
ntrac-1, ntcw-1,ntiw-1,ntrw-1, &
ntsw-1,ntgl-1, &
im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, &
cldcov(:,1:LMK), effrl_inout(:,:), &
effri_inout(:,:), effrs_inout(:,:), &
dzb, xlat_d, julian, yearlen, &
im, lm, lmp, uni_cld, lmfshal, lmfdeep2, &
Comment thread
gthompsnWRF marked this conversation as resolved.
cldcov(:,1:LM), effrl_inout, &
effri_inout, effrs_inout, &
lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
dzb, xlat_d, julian, yearlen, gridkm, &
clouds, cldsa, mtopa ,mbota, de_lgth, alpha) ! --- outputs
endif ! MYNN PBL or GF

Expand Down Expand Up @@ -1071,7 +1099,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
enddo ! end_do_i_loop
enddo ! end_do_k_loop
endif
do k = 1, LMK
do k = 1, LM
Comment thread
gthompsnWRF marked this conversation as resolved.
do i = 1, IM
clouds1(i,k) = clouds(i,k,1)
clouds2(i,k) = clouds(i,k,2)
Expand All @@ -1085,6 +1113,12 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
cldfra(i,k) = clouds(i,k,1)
enddo
enddo
do i = 1, IM
cldfra2d(i) = 0.0
do k = 1, LM-1
Comment thread
gthompsnWRF marked this conversation as resolved.
cldfra2d(i) = max(cldfra2d(i), cldfra(i,k))
enddo
enddo

! mg, sfc-perts
! --- scale random patterns for surface perturbations with
Expand Down
67 changes: 56 additions & 11 deletions physics/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@
optional = F
[sppt_amp]
standard_name = total_amplitude_of_sppt_perturbation
long_name = toal ampltidue of stochastic sppt perturbation
long_name = total ampltidue of stochastic sppt perturbation
units = none
dimensions = ()
type = real
Expand Down Expand Up @@ -755,7 +755,7 @@
standard_name = total_cloud_fraction
long_name = layer total cloud fraction
units = frac
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = inout
Expand All @@ -764,7 +764,7 @@
standard_name = cloud_liquid_water_path
long_name = layer cloud liquid water path
units = g m-2
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = inout
Expand All @@ -773,7 +773,7 @@
standard_name = mean_effective_radius_for_liquid_cloud
long_name = mean effective radius for liquid cloud
units = um
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = inout
Expand All @@ -782,7 +782,7 @@
standard_name = cloud_ice_water_path
long_name = layer cloud ice water path
units = g m-2
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = inout
Expand All @@ -791,7 +791,7 @@
standard_name = mean_effective_radius_for_ice_cloud
long_name = mean effective radius for ice cloud
units = um
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = inout
Expand Down Expand Up @@ -1056,7 +1056,7 @@
standard_name = cloud_rain_water_path
long_name = cloud rain water path
units = g m-2
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = out
Expand All @@ -1065,7 +1065,7 @@
standard_name = mean_effective_radius_for_rain_drop
long_name = mean effective radius for rain drop
units = um
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = out
Expand All @@ -1074,7 +1074,7 @@
standard_name = cloud_snow_water_path
long_name = cloud snow water path
units = g m-2
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = out
Expand All @@ -1083,7 +1083,7 @@
standard_name = mean_effective_radius_for_snow_flake
long_name = mean effective radius for snow flake
units = um
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = out
Expand All @@ -1101,7 +1101,52 @@
standard_name = instantaneous_3d_cloud_fraction
long_name = instantaneous 3D cloud fraction for all MPs
units = frac
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
Comment thread
gthompsnWRF marked this conversation as resolved.
Outdated
type = real
kind = kind_phys
intent = out
optional = F
[cldfra2d]
standard_name = max_in_column_cloud_fraction
long_name = instantaneous 2D (max-in-column) cloud fraction
units = frac
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
optional = F
[lwp_ex]
standard_name = liq_water_path_from_microphysics
long_name = total liquid water path from explicit microphysics
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
optional = F
[iwp_ex]
standard_name = ice_water_path_from_microphysics
long_name = total ice water path from explicit microphysics
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
optional = F
[lwp_fc]
standard_name = liq_water_path_from_cloud_fraction
long_name = total liquid water path from cloud fraction scheme
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
optional = F
[iwp_fc]
standard_name = ice_water_path_from_cloud_fraction
long_name = total ice water path from cloud fraction scheme
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
Expand Down
Loading