Skip to content

Commit

Permalink
FV3: This commits #refs 50052 bug fix in radiation diagnostic average…
Browse files Browse the repository at this point in the history
…d field at fh000, #refs 52603 bug fix for bucket precipitation adjustment due to sppt, #53278 fix the trace amount of snow
  • Loading branch information
junwang-noaa committed Jul 31, 2018
1 parent 0787850 commit 0d42e63
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 32 deletions.
3 changes: 2 additions & 1 deletion atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,8 @@ subroutine update_atmos_model_state (Atmos)
if (mpp_pe() == mpp_root_pe()) write(6,*) ' gfs diags time since last bucket empty: ',time_int/3600.,'hrs'
call atmosphere_nggps_diag(Atmos%Time)
call FV3GFS_diag_output(Atmos%Time, IPD_DIag, Atm_block, IPD_Control%nx, IPD_Control%ny, &
IPD_Control%levs, 1, 1, 1.d0, time_int, time_intfull)
IPD_Control%levs, 1, 1, 1.d0, time_int, time_intfull, &
IPD_Control%fhswr, IPD_Control%fhlwr)
if (mod(isec,3600*nint(IPD_Control%fhzero)) == 0) diag_time = Atmos%Time
call diag_send_complete_instant (Atmos%Time)
endif
Expand Down
47 changes: 39 additions & 8 deletions gfsphysics/GFS_layer/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module GFS_diagnostics
integer :: id
integer :: axes
logical :: time_avg
logical :: full_time_avg !no bucket
character(len=64) :: time_avg_kind
character(len=64) :: mod_name
character(len=64) :: name
character(len=128) :: desc
Expand Down Expand Up @@ -68,7 +68,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
! ExtDiag%id [integer ] switch to turn on/off variable output !
! ExtDiag%axes [integer ] dimensionality of variable (2 or 3) !
! ExtDiag%time_avg [logical ] bucketed accumulation time average !
! ExtDiag%full_time_avg [logical ] accumulation time average (no bucket) !
! ExtDiag%time_avg_kind [char*64 ] time average period !
! ExtDiag%mod_name [char*64 ] classification of the variable !
! ExtDiag%name [char*64 ] output name for variable !
! ExtDiag%desc [char*128] long description of field !
Expand Down Expand Up @@ -112,7 +112,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(:)%axes = -99
ExtDiag(:)%cnvfac = cn_one
ExtDiag(:)%time_avg = .FALSE.
ExtDiag(:)%full_time_avg = .FALSE.
ExtDiag(:)%time_avg_kind = ''
ExtDiag(:)%mask = ''
ExtDiag(:)%name = ''
ExtDiag(:)%intpl_method = 'nearest_stod'
Expand Down Expand Up @@ -194,6 +194,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_one
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -220,6 +221,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_one
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -245,6 +247,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -258,6 +261,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -271,6 +275,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -284,6 +289,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -297,6 +303,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -310,6 +317,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -323,6 +331,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_lw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -336,6 +345,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -349,6 +359,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_lw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -362,6 +373,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -375,6 +387,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -388,6 +401,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_lw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -403,6 +417,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_one
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -418,6 +433,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_one
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_sw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -432,6 +448,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_one
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_lw'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -447,6 +464,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_100
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,17)
Expand All @@ -460,6 +478,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_100
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,18)
Expand Down Expand Up @@ -513,6 +532,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_100
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,5)
Expand All @@ -525,6 +545,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = '%'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -539,6 +560,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = '%'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -553,6 +575,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'K'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -568,6 +591,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_100
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,6)
Expand All @@ -580,6 +604,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = '%'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -594,6 +619,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = '%'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -608,6 +634,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'K'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -623,6 +650,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_100
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,7)
Expand All @@ -635,6 +663,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = '%'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -649,6 +678,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = '%'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand All @@ -663,6 +693,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%unit = 'K'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'rad_swlw_min'
ExtDiag(idx)%mask = "cldmask_ratio"
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand Down Expand Up @@ -968,7 +999,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_th
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%full_time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'full'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand Down Expand Up @@ -1123,7 +1154,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_th
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%full_time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'full'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
Expand Down Expand Up @@ -1278,7 +1309,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_th
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%full_time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'full'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totice(:)
Expand All @@ -1305,7 +1336,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_th
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%full_time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'full'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totsnw(:)
Expand All @@ -1332,7 +1363,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%cnvfac = cn_th
ExtDiag(idx)%time_avg = .TRUE.
ExtDiag(idx)%full_time_avg = .TRUE.
ExtDiag(idx)%time_avg_kind = 'full'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totgrp(:)
Expand Down
4 changes: 4 additions & 0 deletions gfsphysics/GFS_layer/GFS_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,10 @@ subroutine GFS_stochastic_driver (Model, Statein, Stateout, Sfcprop, Coupling, &
Diag%totprcp(:) = Diag%totprcp(:) + (Coupling%sppt_wts(:,15) - 1 )*Diag%rain(:)
! acccumulated total and convective preciptiation
Diag%cnvprcp(:) = Diag%cnvprcp(:) + (Coupling%sppt_wts(:,15) - 1 )*Diag%rainc(:)
! bucket precipitation adjustment due to sppt
Diag%totprcpb(:) = Diag%totprcpb(:) + (Coupling%sppt_wts(:,15) - 1 )*Diag%rain(:)
Diag%cnvprcpb(:) = Diag%cnvprcpb(:) + (Coupling%sppt_wts(:,15) - 1 )*Diag%rainc(:)

if (Model%cplflx) then
Coupling%rain_cpl(:) = Coupling%rain_cpl(:) + (Coupling%sppt_wts(:,15) - 1.0)*Tbd%drain_cpl(:)
Coupling%snow_cpl(:) = Coupling%snow_cpl(:) + (Coupling%sppt_wts(:,15) - 1.0)*Tbd%dsnow_cpl(:)
Expand Down
24 changes: 19 additions & 5 deletions gfsphysics/GFS_layer/GFS_physics_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3556,10 +3556,23 @@ subroutine GFS_physics_driver &

tem = dtp * con_p001 / con_day
do i = 1, im
rain0(i,1) = max(con_d00, rain0(i,1))
snow0(i,1) = max(con_d00, snow0(i,1))
ice0(i,1) = max(con_d00, ice0(i,1))
graupel0(i,1) = max(con_d00, graupel0(i,1))
! rain0(i,1) = max(con_d00, rain0(i,1))
! snow0(i,1) = max(con_d00, snow0(i,1))
! ice0(i,1) = max(con_d00, ice0(i,1))
! graupel0(i,1) = max(con_d00, graupel0(i,1))
if(rain0(i,1)*tem < rainmin) then
rain0(i,1) = 0.0
endif
if(ice0(i,1)*tem < rainmin) then
ice0(i,1) = 0.0
endif
if(snow0(i,1)*tem < rainmin) then
snow0(i,1) = 0.0
endif
if(graupel0(i,1)*tem < rainmin) then
graupel0(i,1) = 0.0
endif

rain1(i) = (rain0(i,1)+snow0(i,1)+ice0(i,1)+graupel0(i,1)) * tem
Diag%ice(i) = ice0 (i,1) * tem
Diag%snow(i) = snow0 (i,1) * tem
Expand Down Expand Up @@ -3741,7 +3754,8 @@ subroutine GFS_physics_driver &
crain = 0.0
csnow = Diag%rainc(i)
endif
if ((snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow) > (rain0(i,1)+crain)) then
! if ((snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow) > (rain0(i,1)+crain)) then
if ((snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow) > 0.0) then
Sfcprop%srflag(i) = 1. ! clu: set srflag to 'snow' (i.e. 1)
endif
enddo
Expand Down
4 changes: 3 additions & 1 deletion gfsphysics/physics/sflx.f
Original file line number Diff line number Diff line change
Expand Up @@ -2410,7 +2410,9 @@ subroutine snopac
! so with snoexp = 2.0 (>1), surface skin temperature is higher than
! for the linear case (snoexp = 1).

t1 = tfreez * sncovr**snoexp + t12 * (1.0 - sncovr**snoexp)
! t1 = tfreez * sncovr**snoexp + t12 * (1.0 - sncovr**snoexp)
t1 = tfreez * max(0.01,sncovr**snoexp) + &
& t12 * (1.0 - max(0.01,sncovr**snoexp))

beta = 1.0
ssoil = df1 * (t1 - stc(1)) / dtot
Expand Down
Loading

0 comments on commit 0d42e63

Please sign in to comment.