Skip to content

Commit

Permalink
Update cycle.f90 for new sfcsub.F interface. Initially,
Browse files Browse the repository at this point in the history
only consider the case when 'frac_grid' is false.

Fixes #549.
  • Loading branch information
GeorgeGayno-NOAA committed Aug 19, 2021
1 parent 9db8cf9 commit 6c98ecd
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions sorc/global_cycle.fd/cycle.f90
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,11 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LSM,LENSFC,LSOIL,DELTSFC, &
INTEGER :: IDUM(IDIM,JDIM)
integer :: num_parthds, num_threads

logical :: lake(lensfc)
real(kind=kind_io8) :: min_lakeice, min_seaice
logical :: frac_grid
real(kind=kind_io8) :: min_seaice, min_lakeice, min_ice(lensfc)

REAL :: SLMASK(LENSFC), OROG(LENSFC)
REAL :: SLMSKL(LENSFC), SLMSKW(LENSFC)
REAL :: SIHFCS(LENSFC), SICFCS(LENSFC)
REAL :: SITFCS(LENSFC), TSFFCS(LENSFC)
REAL :: SNOFCS(LENSFC), ZORFCS(LENSFC)
Expand Down Expand Up @@ -482,24 +483,44 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LSM,LENSFC,LSOIL,DELTSFC, &
! UPDATE SURFACE FIELDS.
!--------------------------------------------------------------------------------

frac_grid = .false.

IF (DO_SFCCYCLE) THEN
num_threads = num_parthds()
lake = .false.
IF (FRAC_GRID) THEN
print*,'frac grid not yet. '
stop 33
ELSE

DO I=1,LENSFC
IF (NINT(SLMASK(I)) == 1) THEN
SLMSKL(I) = 1.0_8
SLMSKW(I) = 1.0_8
ELSE
SLMSKL(I) = 0.0_8
SLMSKW(I) = 0.0_8
ENDIF
ENDDO

ENDIF

min_seaice = 0.15
min_lakeice = 0.15
MIN_ICE = min_seaice

PRINT*
PRINT*,"CALL SFCCYCLE TO UPDATE SURFACE FIELDS."
CALL SFCCYCLE(LUGB,LENSFC,LSOIL,SIG1T,DELTSFC, &
IY,IM,ID,IH,FH,RLA,RLO, &
SLMASK,OROG, OROG_UF, USE_UFO, DO_NSST, &
SLMSKL,SLMSKW,OROG, OROG_UF, USE_UFO, DO_NSST, &
SIHFCS,SICFCS,SITFCS,SWDFCS,SLCFCS, &
VMNFCS,VMXFCS,SLPFCS,ABSFCS, &
TSFFCS,SNOFCS,ZORFCS,ALBFCS,TG3FCS, &
CNPFCS,SMCFCS,STCFCS,SLIFCS,AISFCS, &
VEGFCS,VETFCS,SOTFCS,ALFFCS, &
CVFCS,CVBFCS,CVTFCS,MYRANK,num_threads, NLUNIT, &
SZ_NML, INPUT_NML_FILE, &
lake, min_lakeice, min_seaice, &
min_ice, &
IALB,ISOT,IVEGSRC,TILE_NUM,I_INDEX,J_INDEX)
ENDIF

Expand Down

0 comments on commit 6c98ecd

Please sign in to comment.