Skip to content

Commit

Permalink
Add some checks for missing LSOIL_INCR.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Feb 10, 2025
1 parent ebe1916 commit a2c7c8f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions sorc/global_cycle.fd/read_write_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,11 @@ SUBROUTINE READ_DATA(LSOIL,LENSFC,DO_NSST,IS_NOAHMP, &
ELSE
! THIS IS A REGRIDDED GSI FILE
IF (PRESENT(STCINC)) THEN
DO K = 1, LSOIL_INCR
IF (.NOT.PRESENT(LSOIL_INCR)) THEN
write(6,*)'FATAL ERROR variable lsoil_incr not declared.'
CALL MPI_ABORT(MPI_COMM_WORLD, 134, ERROR)
END IF
DO K = 1, LSOIL_INCR
WRITE(K_CH, '(I1)') K

INCVAR = "soilt"//K_CH//"_inc"
Expand All @@ -1630,10 +1634,14 @@ SUBROUTINE READ_DATA(LSOIL,LENSFC,DO_NSST,IS_NOAHMP, &
CALL NETCDF_ERR(ERROR, 'READING soilt*_inc increments')

STCINC(:,K) = RESHAPE(dummy, (/LENSFC/))
ENDDO
ENDDO
ENDIF
IF (PRESENT(SLCINC)) THEN
DO K = 1, LSOIL_INCR
IF (.NOT.PRESENT(LSOIL_INCR)) THEN
write(6,*)'FATAL ERROR variable lsoil_incr not declared.'
CALL MPI_ABORT(MPI_COMM_WORLD, 136, ERROR)
END IF
DO K = 1, LSOIL_INCR
WRITE(K_CH, '(I1)') K

INCVAR = "slc"//K_CH//"_inc"
Expand All @@ -1644,7 +1652,7 @@ SUBROUTINE READ_DATA(LSOIL,LENSFC,DO_NSST,IS_NOAHMP, &
CALL NETCDF_ERR(ERROR, 'READING slc*_inc increments')

SLCINC(:,K) = RESHAPE(dummy, (/LENSFC/))
ENDDO
ENDDO
ENDIF
ENDIF

Expand Down

0 comments on commit a2c7c8f

Please sign in to comment.