Skip to content

Commit

Permalink
Merge pull request #164 from hu5970/rrfs_baseE
Browse files Browse the repository at this point in the history
update physics for RRFS baseline E
  • Loading branch information
SamuelTrahanNOAA authored Oct 13, 2022
2 parents 690a369 + 06cb687 commit a099ced
Show file tree
Hide file tree
Showing 8 changed files with 1,019 additions and 978 deletions.
44 changes: 23 additions & 21 deletions physics/lsm_ruc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ subroutine lsm_ruc_run & ! inputs

! --- locals:
real (kind=kind_phys), dimension(im) :: rho, &
& q0, qs1, albbcksol, &
& q0, qs1, albbcksol, srunoff_old, runoff_old, &
& tprcp_old, srflag_old, sr_old, canopy_old, wetness_old, &
! for land
& weasd_lnd_old, snwdph_lnd_old, tskin_lnd_old, &
Expand Down Expand Up @@ -684,6 +684,8 @@ subroutine lsm_ruc_run & ! inputs
snowmt_lnd_old(i) = snowmt_lnd(i)
acsnow_lnd_old(i) = acsnow_lnd(i)
snowfallac_lnd_old(i) = snowfallac_lnd(i)
srunoff_old(i) = srunoff(i)
runoff_old(i) = runoff(i)
! for ice
weasd_ice_old(i) = weasd_ice(i)
snwdph_ice_old(i) = snwdph_ice(i)
Expand Down Expand Up @@ -747,18 +749,20 @@ subroutine lsm_ruc_run & ! inputs
acceta(i,j) = 0.0
ssoil_lnd(i,j) = 0.0
ssoil_ice(i,j) = 0.0
snomlt_lnd(i,j) = 0.0
snomlt_ice(i,j) = 0.0
infiltr(i,j) = 0.0
runoff1(i,j) = 0.0
runoff2(i,j) = 0.0
acrunoff(i,j) = 0.0
snfallac_lnd(i,j) = 0.0
acsn_lnd(i,j) = 0.0
snfallac_ice(i,j) = 0.0
acsn_ice(i,j) = 0.0
precipfr(i,j) = 0.0
rhosnfr(i,j) = -1.e3
runoff1(i,j) = 0.0
runoff2(i,j) = 0.0
if(kdt == 1) then
acrunoff(i,j) = 0.0
snfallac_lnd(i,j) = 0.0
acsn_lnd(i,j) = 0.0
snfallac_ice(i,j) = 0.0
acsn_ice(i,j) = 0.0
snomlt_lnd(i,j) = 0.0
snomlt_ice(i,j) = 0.0
endif
endif
enddo ! i=1,im
enddo
Expand Down Expand Up @@ -1041,11 +1045,7 @@ subroutine lsm_ruc_run & ! inputs
sneqv_lnd(i,j) = weasd_lnd(i)
snowh_lnd(i,j) = snwdph_lnd(i) * 0.001 ! convert from mm to m

if(kdt == 1) then
snfallac_lnd(i,j) = 0.
acsn_lnd(i,j) = 0.
snomlt_lnd(i,j) = 0.
else
if(kdt > 1) then
!-- run-total accumulation
snfallac_lnd(i,j) = snowfallac_lnd(i)
acsn_lnd(i,j) = acsnow_lnd(i)
Expand Down Expand Up @@ -1294,7 +1294,8 @@ subroutine lsm_ruc_run & ! inputs

! --- ... accumulated total runoff and surface runoff
runoff(i) = runoff(i) + (drain(i)+runof(i)) * delt ! accum total kg m-2
srunoff(i) = srunoff(i) + runof(i) * delt ! accum surface kg m-2
!srunoff(i) = srunoff(i) + runof(i) * delt ! accum surface kg m-2
srunoff(i) = acrunoff(i,j) ! accum surface kg m-2

! --- ... accumulated frozen precipitation (accumulation in lsmruc)
snowfallac_lnd(i) = snfallac_lnd(i,j) ! accum kg m-2
Expand Down Expand Up @@ -1403,11 +1404,7 @@ subroutine lsm_ruc_run & ! inputs

snowh_ice(i,j) = snwdph_ice(i) * 0.001 ! convert from mm to m
sneqv_ice(i,j) = weasd_ice(i) ! [mm]
if(kdt == 1) then
snfallac_ice(i,j) = 0.
acsn_ice(i,j) = 0.
snomlt_ice(i,j) = 0.
else
if(kdt > 1) then
snfallac_ice(i,j) = snowfallac_ice(i)
acsn_ice(i,j) = acsnow_ice(i)
snomlt_ice(i,j) = snowmt_ice(i)
Expand All @@ -1431,6 +1428,9 @@ subroutine lsm_ruc_run & ! inputs
z0_ice(i,j) = z0rl_ice(i)/100.
znt_ice(i,j) = z0rl_ice(i)/100.

runoff1(i,j) = 0.
runoff2(i,j) = 0.

! Workaround needed for subnormal numbers. This should be
! done after all other sanity checks, in case a sanity check
! results in subnormal numbers.
Expand Down Expand Up @@ -1574,6 +1574,8 @@ subroutine lsm_ruc_run & ! inputs
z0rl_ice(i) = z0rl_ice_old(i)
sncovr1_ice(i) = sncovr1_ice_old(i)
snowmt_ice(i) = snowmt_ice_old(i)
srunoff(i) = srunoff_old(i)
runoff(i) = runoff_old(i)

do k = 1, lsoil_ruc
smois(i,k) = smois_old(i,k)
Expand Down
Loading

0 comments on commit a099ced

Please sign in to comment.