Skip to content

Commit

Permalink
Set slmskl and slmskw for the fractional grid case.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Aug 30, 2021
1 parent fbb9c75 commit 505a392
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions sorc/global_cycle.fd/cycle.f90
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,13 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LSM,LENSFC,LSOIL,DELTSFC, &
! READ THE OROGRAPHY AND GRID POINT LAT/LONS FOR THE CUBED-SPHERE TILE.
!--------------------------------------------------------------------------------

CALL READ_LAT_LON_OROG(RLA,RLO,OROG,OROG_UF,TILE_NUM,IDIM,JDIM,LENSFC,LAND_FRAC=LAND_FRAC)
IF(FRAC_GRID) THEN
CALL READ_LAT_LON_OROG(RLA,RLO,OROG,OROG_UF,TILE_NUM,IDIM,JDIM,LENSFC,LAND_FRAC=LAND_FRAC)
print*,'got here land_frac ',maxval(land_frac),minval(land_frac)
ELSE
CALL READ_LAT_LON_OROG(RLA,RLO,OROG,OROG_UF,TILE_NUM,IDIM,JDIM,LENSFC)
ENDIF

print*,'got here land_frac ',maxval(land_frac),minval(land_frac)
stop

DO I = 1, IDIM
IDUM(I,:) = I
Expand Down Expand Up @@ -494,22 +497,40 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LSM,LENSFC,LSOIL,DELTSFC, &
IF (DO_SFCCYCLE) THEN
num_threads = num_parthds()
IF (FRAC_GRID) THEN
print*,'frac grid not yet. '
stop 33

DO I=1,LENSFC
IF (LAND_FRAC(I) > 0.0_KIND_IO8) then
SLMSKL(I) = CEILING(LAND_FRAC(I)-1.0E-6_KIND_IO8)
SLMSKW(I) = FLOOR(LAND_FRAC(I)+1.0E-6_KIND_IO8)
ELSE
IF (NINT(SLMASK(I)) == 1) THEN
SLMSKL(I) = 1.0_KIND_IO8
SLMSKW(I) = 1.0_KIND_IO8
ELSE
SLMSKL(I) = 0.0_KIND_IO8
SLMSKW(I) = 0.0_KIND_IO8
ENDIF
ENDIF
ENDDO

DEALLOCATE(LAND_FRAC)

ELSE

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

ENDIF

stop 6

min_seaice = 0.15
min_lakeice = 0.15
MIN_ICE = min_seaice
Expand Down

0 comments on commit 505a392

Please sign in to comment.