Skip to content

Commit

Permalink
Removed diagnostic cloud outputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Dec 19, 2019
1 parent b2d42f3 commit 28bea10
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 179 deletions.
92 changes: 1 addition & 91 deletions physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module GFS_rrtmg_pre
!! \section arg_table_GFS_rrtmg_pre_init Argument Table
!!
subroutine GFS_rrtmg_pre_init ()
open(77,file='dump.rrtmg.cloudprops.txt',status='unknown')
end subroutine GFS_rrtmg_pre_init

!> \section arg_table_GFS_rrtmg_pre_run Argument Table
Expand Down Expand Up @@ -691,47 +690,12 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input
effrs(i,lyb) = effrs(i,lya)
enddo
endif
endif
endif

if (Model%imp_physics == 99) then
ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK)
endif

if (Model%imp_physics == 10) then
ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2)
endif

if (Model%uni_cld) then
if (Model%effr_in) then
do k=1,lm
k1 = k + kd
do i=1,im
cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld)
effrl(i,k1) = Tbd%phy_f3d(i,k,2)
effri(i,k1) = Tbd%phy_f3d(i,k,3)
effrr(i,k1) = Tbd%phy_f3d(i,k,4)
effrs(i,k1) = Tbd%phy_f3d(i,k,5)
enddo
enddo
else
do k=1,lm
k1 = k + kd
do i=1,im
cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld)
if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then
cldcov(i,k1) = 0.1
else
cldcov(i,k1) = 0.0
endif
enddo
enddo
endif
elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP
cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt)
else ! neither of the other two cases
cldcov = 0.0
endif

if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme
! or unified cloud and/or with MG microphysics

Expand Down Expand Up @@ -821,59 +785,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input
enddo
enddo

write(77,*) "####################"
write(77,*) im,Model%levs
do i=1,im
write(77,*) i, grid%xlon(i), grid%xlat(i)
!
write(77,*) "p_lay"
write(77,*) plyr(i,:)
!
write(77,*) "t_lay"
write(77,*) tlyr(i,:)
!
write(77,*) "tv_lay"
write(77,*) tvly(i,:)
!
write(77,*) "relhum"
write(77,*) rhly(i,:)
!
write(77,*) "qs_lay"
write(77,*) qstl(i,:)
!
write(77,*) "q_lay"
write(77,*) qlyr(i,:)
!
write(77,*) "cld_frac"
write(77,*) clouds1(i,:)
!
write(77,*) "cld_lwp"
write(77,*) clouds2(i,:)
!
write(77,*) "cld_reliq"
write(77,*) clouds3(i,:)
!
write(77,*) "cld_iwp"
write(77,*) clouds4(i,:)
!
write(77,*) "cld_reice"
write(77,*) clouds5(i,:)
!
write(77,*) "cld_rwp"
write(77,*) clouds6(i,:)
!
write(77,*) "cld_rerain"
write(77,*) clouds7(i,:)
!
write(77,*) "cld_swp"
write(77,*) clouds8(i,:)
!
write(77,*) "cld_resnow"
write(77,*) clouds9(i,:)
enddo



! mg, sfc-perts
! --- scale random patterns for surface perturbations with
! perturbation size
Expand All @@ -893,7 +804,6 @@ end subroutine GFS_rrtmg_pre_run
!> \section arg_table_GFS_rrtmg_pre_finalize Argument Table
!!
subroutine GFS_rrtmg_pre_finalize ()
close(77)
end subroutine GFS_rrtmg_pre_finalize

!! @}
Expand Down
118 changes: 30 additions & 88 deletions physics/GFS_rrtmgp_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ subroutine GFS_rrtmgp_pre_init(Model, Radtend, active_gases_array, errmsg, errfl
enddo
endif

open(77,file='dump.rrtmgp.cloudprops.txt',status='unknown')

end subroutine GFS_rrtmgp_pre_init

! #########################################################################################
Expand Down Expand Up @@ -327,64 +325,12 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop,
cld_swp = clouds(:,:,8)
cld_resnow = clouds(:,:,9)

write(77,*) "####################"
write(77,*) ncol,Model%levs
do iCol=1,NCOL
write(77,*) iCol, grid%xlon(iCol), grid%xlat(iCol)
!
write(77,*) "p_lay"
write(77,*) p_lay(iCol,:)/100.
!
write(77,*) "t_lay"
write(77,*) t_lay(iCol,:)
!
write(77,*) "tv_lay"
write(77,*) tv_lay(iCol,:)
!
write(77,*) "relhum"
write(77,*) relhum(iCol,:)
!
write(77,*) "qs_lay"
write(77,*) qs_lay(iCol,:)
!
write(77,*) "q_lay"
write(77,*) q_lay(iCol,:)
!
write(77,*) "cld_frac"
write(77,*) cld_frac(iCol,:)
!
write(77,*) "cld_lwp"
write(77,*) cld_lwp(iCol,:)
!
write(77,*) "cld_reliq"
write(77,*) cld_reliq(iCol,:)
!
write(77,*) "cld_iwp"
write(77,*) cld_iwp(iCol,:)
!
write(77,*) "cld_reice"
write(77,*) cld_reice(iCol,:)
!
write(77,*) "cld_rwp"
write(77,*) cld_rwp(iCol,:)
!
write(77,*) "cld_rerain"
write(77,*) cld_rerain(iCol,:)
!
write(77,*) "cld_swp"
write(77,*) cld_swp(iCol,:)
!
write(77,*) "cld_resnow"
write(77,*) cld_resnow(iCol,:)
enddo

end subroutine GFS_rrtmgp_pre_run

! #########################################################################################
! SUBROUTINE GFS_rrtmgp_pre_finalize
! #########################################################################################
subroutine GFS_rrtmgp_pre_finalize ()
close(77)
end subroutine GFS_rrtmgp_pre_finalize

! #########################################################################################
Expand Down Expand Up @@ -482,14 +428,41 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_
enddo
endif

if (Model%uni_cld) then
if (Model%effr_in) then
cldcov(:,:) = Tbd%phy_f3d(:,:,Model%indcld)
effr_l(:,:) = Tbd%phy_f3d(:,:,2)
effr_i(:,:) = Tbd%phy_f3d(:,:,3)
effr_r(:,:) = Tbd%phy_f3d(:,:,4)
effr_s(:,:) = Tbd%phy_f3d(:,:,5)
else
do k=1,model%levs
do i=1,ncol
cldcov(i,k) = Tbd%phy_f3d(i,k,Model%indcld)
enddo
enddo
endif
elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP
cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt)
if (Model%effr_in) then
effr_l(:,:) = Tbd%phy_f3d(:,:,1)
effr_i(:,:) = Tbd%phy_f3d(:,:,2)
effr_r(:,:) = Tbd%phy_f3d(:,:,3)
effr_s(:,:) = Tbd%phy_f3d(:,:,4)
endif
else ! neither of the other two cases
cldcov = 0.0
endif


! Add suspended convective cloud water to grid-scale cloud water
! only for cloud fraction & radiation computation it is to enhance
! cloudiness due to suspended convec cloud water for zhao/moorthi's
! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes
if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99
delta_q(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,5)
cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,6)
cnv_c (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,7)
delta_q(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,5)
cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,6)
cnv_c (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,7)
elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98
delta_q(1:ncol,1:Model%levs) = 0.0
cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,Model%num_p3d+1)
Expand All @@ -510,37 +483,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_
cld_condensate(1:NCOL,1:Model%levs,1) = cld_condensate(1:NCOL,1:Model%levs,1) + cnv_w(1:NCOL,1:Model%levs) + cld_condensate(1:NCOL,1:Model%levs,2)
endif

if (Model%uni_cld) then
if (Model%effr_in) then
cldcov(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,Model%indcld)
effr_l(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,2)
effr_i(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,3)
effr_r(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,4)
effr_s(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,5)
else
do k=1,model%levs
do i=1,ncol
cldcov(i,k) = Tbd%phy_f3d(i,k,Model%indcld)
if (tracer(i,k,model%ntcw) .gt. 0 .or. tracer(i,k,model%ntiw) .gt. 0) then
cldcov(i,k) = 0.1
else
cldcov(i,k) = 0.0
endif
enddo
enddo
endif
elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP
cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt)
if (Model%effr_in) then
effr_l(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,1)
effr_i(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,2)
effr_r(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,3)
effr_s(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,4)
endif
else ! neither of the other two cases
cldcov = 0.0
endif

! #######################################################################################
! MICROPHYSICS
! #######################################################################################
Expand Down

0 comments on commit 28bea10

Please sign in to comment.