Skip to content

Commit

Permalink
remove progcld6 and thompson & wsm6 flags
Browse files Browse the repository at this point in the history
  • Loading branch information
joeolson42 committed Jun 4, 2020
1 parent 72ac01d commit 8fd1674
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 320 deletions.
2 changes: 1 addition & 1 deletion physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input
& progcld1, progcld3, &
& progcld2, &
& progcld4, progcld5, &
& progcld6, progclduni
& progclduni
use module_radsw_parameters, only: topfsw_type, sfcfsw_type, &
& profsw_type, NBDSW
use module_radlw_parameters, only: topflw_type, sfcflw_type, &
Expand Down
5 changes: 1 addition & 4 deletions physics/module_SGSCloud_RadPre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ subroutine sgscloud_radpre_run( &
nlay, plyr, xlat, dz,de_lgth, &
cldsa,mtopa,mbota, &
imp_physics, imp_physics_gfdl,&
imp_physics_thompson, &
imp_physics_wsm6, &
errmsg, errflg )

! should be moved to inside the mynn:
Expand All @@ -67,8 +65,7 @@ subroutine sgscloud_radpre_run( &
! Interface variables
real (kind=kind_phys), parameter :: gfac=1.0e5/con_g
integer, intent(in) :: im, levs, imfdeepcnv, imfdeepcnv_gf, &
& nlay, imp_physics, imp_physics_wsm6, &
& imp_physics_thompson, imp_physics_gfdl
& nlay, imp_physics, imp_physics_gfdl
logical, intent(in) :: flag_init, flag_restart, do_mynnedmf
real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi
real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs
Expand Down
16 changes: 0 additions & 16 deletions physics/module_SGSCloud_RadPre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -332,22 +332,6 @@
type = integer
intent = in
optional = F
[imp_physics_thompson]
standard_name = flag_for_thompson_microphysics_scheme
long_name = choice of Thompson microphysics scheme
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[imp_physics_wsm6]
standard_name = flag_for_wsm6_microphysics_scheme
long_name = choice of WSM6 microphysics scheme
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
300 changes: 1 addition & 299 deletions physics/radiation_clouds.f
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ module module_radiation_clouds
integer :: iovr = 1 !< maximum-random cloud overlapping method
public progcld1, progcld2, progcld3, progcld4, progclduni, &
& cld_init, progcld5, progcld6, progcld4o, gethml
& cld_init, progcld5, progcld4o, gethml
! =================
Expand Down Expand Up @@ -2683,304 +2683,6 @@ subroutine progcld5 &
end subroutine progcld5
!...................................

!-----------------------------------
!> \ingroup module_radiation_clouds
!! This subroutine computes cloud related quantities using the Thompson
!! cloud microphysics scheme with updated microphysics-cloud-radiation
!! interaction (including subgrid clouds). Adapted from progcld5.
subroutine progcld6 &
& ( plyr,plvl,tlyr,qlyr,qstl,rhly,clw, & ! --- inputs:
& xlat,xlon,slmsk,dz,delp, &
& ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, &
& IX, NLAY, NLP1, &
& uni_cld, lmfshal, lmfdeep2, cldcov, &
& re_cloud,re_ice,re_snow, &
& clouds,clds,mtop,mbot,de_lgth & ! --- outputs:
& )

! ================= subprogram documentation block ================ !
! !
! subprogram: progcld6 computes cloud related quantities using !
! the Thompson cloud microphysics scheme with updated microphysics !
! cloud-radiation interaction (including subgrid clouds). !
! !
! abstract: this program computes cloud fractions from cloud !
! condensates, !
! and computes the low, mid, high, total and boundary layer cloud !
! fractions and the vertical indices of low, mid, and high cloud !
! top and base. the three vertical cloud domains are set up in the !
! initial subroutine "cld_init". !
! !
! usage: call progcld6 !
! !
! subprograms called: gethml !
! !
! attributes: !
! language: fortran 90 !
! machine: ibm-sp, sgi !
! !
! !
! ==================== definition of variables ==================== !
! !
! input variables: !
! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
! plvl (IX,NLP1) : model level pressure in mb (100Pa) !
! tlyr (IX,NLAY) : model layer mean temperature in k !
! tvly (IX,NLAY) : model layer virtual temperature in k !
! qlyr (IX,NLAY) : layer specific humidity in gm/gm !
! qstl (IX,NLAY) : layer saturate humidity in gm/gm !
! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) !
! clw (IX,NLAY,ntrac) : layer cloud condensate amount !
! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2!
! range, otherwise see in-line comment !
! xlon (IX) : grid longitude in radians (not used) !
! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) !
! dz (ix,nlay) : layer thickness (km) !
! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
! IX : horizontal dimention !
! NLAY,NLP1 : vertical layer/level dimensions !
! uni_cld : logical - true for cloud fraction from shoc !
! lmfshal : logical - true for mass flux shallow convection !
! lmfdeep2 : logical - true for mass flux deep convection !
! cldcov : layer cloud fraction (used when uni_cld=.true. !
! !
! output variables: !
! clouds(IX,NLAY,NF_CLDS) : cloud profiles !
! clouds(:,:,1) - layer total cloud fraction !
! clouds(:,:,2) - layer cloud liq water path (g/m**2) !
! clouds(:,:,3) - mean eff radius for liq cloud (micron) !
! clouds(:,:,4) - layer cloud ice water path (g/m**2) !
! clouds(:,:,5) - mean eff radius for ice cloud (micron) !
! clouds(:,:,6) - layer rain drop water path not assigned !
! clouds(:,:,7) - mean eff radius for rain drop (micron) !
! *** clouds(:,:,8) - layer snow flake water path not assigned !
! clouds(:,:,9) - mean eff radius for snow flake (micron) !
! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) !
! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl !
! mtop (IX,3) : vertical indices for low, mid, hi cloud tops !
! mbot (IX,3) : vertical indices for low, mid, hi cloud bases !
! de_lgth(ix) : clouds decorrelation length (km) !
! !
! module variables: !
! ivflip : control flag of vertical index direction !
! =0: index from toa to surface !
! =1: index from surface to toa !
! lmfshal : mass-flux shallow conv scheme flag !
! lmfdeep2 : scale-aware mass-flux deep conv scheme flag !
! lcrick : control flag for eliminating CRICK !
! =t: apply layer smoothing to eliminate CRICK !
! =f: do not apply layer smoothing !
! lcnorm : control flag for in-cld condensate !
! =t: normalize cloud condensate !
! =f: not normalize cloud condensate !
! !
! ==================== end of description ===================== !
!
implicit none
! --- inputs
integer, intent(in) :: IX, NLAY, NLP1
integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl
logical, intent(in) :: uni_cld, lmfshal, lmfdeep2
real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
& tlyr, qlyr, qstl, rhly, cldcov, delp, dz, &
& re_cloud, re_ice, re_snow
real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw
real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
& slmsk
! --- outputs
real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds
real (kind=kind_phys), dimension(:,:), intent(out) :: clds
real (kind=kind_phys), dimension(:), intent(out) :: de_lgth
integer, dimension(:,:), intent(out) :: mtop,mbot
! --- local variables:
real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, &
& cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf
real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix)
real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
& tem1, tem2, tem3
integer :: i, k, id, nf
! --- constant values
real (kind=kind_phys), parameter :: xrc3 = 100.
!
!===> ... begin here
!
do k = 1, NLAY
do i = 1, IX
cldtot(i,k) = 0.0
cldcnv(i,k) = 0.0
cwp (i,k) = 0.0
cip (i,k) = 0.0
crp (i,k) = 0.0
csp (i,k) = 0.0
rew (i,k) = re_cloud(i,k)
rei (i,k) = re_ice(i,k)
rer (i,k) = rrain_def ! default rain radius to 1000 micron
res (i,k) = re_snow(i,K)
! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) )
clwf(i,k) = 0.0
enddo
enddo
do k = 1, NLAY
do i = 1, IX
clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw)
& + clw(i,k,ntrw) + clw(i,k,ntgl)
enddo
enddo
!> - Find top pressure for each cloud domain for given latitude.
!! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h;
!! i=1,2 are low-lat (<45 degree) and pole regions)
do i =1, IX
rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range
! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range
enddo
do id = 1, 4
tem1 = ptopc(id,2) - ptopc(id,1)
do i =1, IX
ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 )
enddo
enddo
!> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ .
do k = 1, NLAY
do i = 1, IX
cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k))
cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k))
crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k))
csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) *
& gfac * delp(i,k))
enddo
enddo
if (uni_cld) then ! use unified sgs clouds generated outside
do k = 1, NLAY
do i = 1, IX
cldtot(i,k) = cldcov(i,k)
enddo
enddo
else
!> - Calculate layer cloud fraction.
clwmin = 0.0
do k = 1, NLAY
do i = 1, IX
clwt = 1.0e-6 * (plyr(i,k)*0.001)
! clwt = 2.0e-6 * (plyr(i,k)*0.001)
if (clwf(i,k) > clwt) then
onemrh= max( 1.e-10, 1.0-rhly(i,k) )
clwm = clwmin / max( 0.01, plyr(i,k)*0.001 )
!
tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan
!if (lmfdeep2) then
! tem1 = xrc3 / tem1
!else
tem1 = 100.0 / tem1
!endif
!
value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 )
tem2 = sqrt( sqrt(rhly(i,k)) )
cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 )
endif
enddo
enddo
endif ! if (uni_cld) then
do k = 1, NLAY
do i = 1, IX
if (cldtot(i,k) < climit) then
cwp(i,k) = 0.0
cip(i,k) = 0.0
crp(i,k) = 0.0
csp(i,k) = 0.0
endif
enddo
enddo
if ( lcnorm ) then
do k = 1, NLAY
do i = 1, IX
if (cldtot(i,k) >= climit) then
tem1 = 1.0 / max(climit2, cldtot(i,k))
cwp(i,k) = cwp(i,k) * tem1
cip(i,k) = cip(i,k) * tem1
crp(i,k) = crp(i,k) * tem1
csp(i,k) = csp(i,k) * tem1
endif
enddo
enddo
endif
!
do k = 1, NLAY
do i = 1, IX
clouds(i,k,1) = cldtot(i,k)
clouds(i,k,2) = cwp(i,k)
clouds(i,k,3) = rew(i,k)
clouds(i,k,4) = cip(i,k)
clouds(i,k,5) = rei(i,k)
clouds(i,k,6) = crp(i,k) ! added for Thompson
clouds(i,k,7) = rer(i,k)
clouds(i,k,8) = csp(i,k) ! added for Thompson
clouds(i,k,9) = res(i,k)
enddo
enddo
! --- ... estimate clouds decorrelation length in km
! this is only a tentative test, need to consider change later
if ( iovr == 3 ) then
do i = 1, ix
de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) )
enddo
endif
!> - Call gethml() to compute low,mid,high,total, and boundary layer
!! cloud fractions and clouds top/bottom layer indices for low, mid,
!! and high clouds.
! --- compute low, mid, high, total, and boundary layer cloud fractions
! and clouds top/bottom layer indices for low, mid, and high clouds.
! The three cloud domain boundaries are defined by ptopc. The cloud
! overlapping method is defined by control flag 'iovr', which may
! be different for lw and sw radiation programs.
call gethml &
! --- inputs:
& ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, &
& IX,NLAY, &
! --- outputs:
& clds, mtop, mbot &
& )
!
return
!...................................
end subroutine progcld6
!...................................
!> \ingroup module_radiation_clouds
!> This subroutine computes cloud related quantities using
!! for unified cloud microphysics scheme.
Expand Down

0 comments on commit 8fd1674

Please sign in to comment.