Skip to content

Commit

Permalink
Merge pull request NOAA-EMC#22 from climbfuji/sar_fix_hrrr_ics
Browse files Browse the repository at this point in the history
Bug fix in io/FV3GFS_io.F90 for RUC LSM with RAP/HRRR initial data
  • Loading branch information
climbfuji committed Dec 26, 2019
2 parents 6353b7c + fa72e2b commit e14e81f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions io/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,10 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta
#ifdef CCPP
if (Model%lsm == Model%lsm_ruc) then
if (allocated(sfc_name2)) then
if (size(sfc_var3,dim=3).ne.Model%lsoil_lsm) then
! Re-allocate if one or more of the dimensions don't match
if (size(sfc_name2).ne.nvar2m+nvar2o+nvar2mp+nvar2r .or. &
size(sfc_name3).ne.nvar3+nvar3mp .or. &
size(sfc_var3,dim=3).ne.Model%lsoil_lsm) then
!--- deallocate containers and free restart container
deallocate(sfc_name2)
deallocate(sfc_name3)
Expand Down Expand Up @@ -1679,17 +1682,19 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta

#ifdef CCPP
if (Model%lsm == Model%lsm_noah .or. Model%lsm == Model%lsm_noahmp) then
!--- names of the 2D variables to save
!--- names of the 3D variables to save
sfc_name3(1) = 'stc'
sfc_name3(2) = 'smc'
sfc_name3(3) = 'slc'
sfc_name3(4) = 'snicexy'
sfc_name3(5) = 'snliqxy'
sfc_name3(6) = 'tsnoxy'
sfc_name3(7) = 'smoiseq'
sfc_name3(8) = 'zsnsoxy'
if (Model%lsm == Model%lsm_noahmp) then
sfc_name3(4) = 'snicexy'
sfc_name3(5) = 'snliqxy'
sfc_name3(6) = 'tsnoxy'
sfc_name3(7) = 'smoiseq'
sfc_name3(8) = 'zsnsoxy'
endif
else if (Model%lsm == Model%lsm_ruc) then
!--- names of the 2D variables to save
!--- names of the 3D variables to save
sfc_name3(1) = 'tslb'
sfc_name3(2) = 'smois'
sfc_name3(3) = 'sh2o'
Expand Down

0 comments on commit e14e81f

Please sign in to comment.