Skip to content

Commit

Permalink
Update the gsi land increment file name to append the rank.
Browse files Browse the repository at this point in the history
Necessary, as global_workflow now calls global_cycle using NPES=number of ensemble members
Each task needs to read that ensemble member's increment file.
(previously global_cycle was called with NPES=number tiles=6, so each task read the same incement file.
  • Loading branch information
ClaraDraper-NOAA committed Jan 18, 2024
1 parent ce385ce commit ab9b0b9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sorc/global_cycle.fd/cycle.f90
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
!! file.
!! - $NST_FILE Gaussian GSI file which contains NSST
!! TREF increments
!! - $LND_SOI_FILE Gaussian GSI file which contains soil state
!! - $LND_SOI_FILE.$NNN Gaussian GSI file which contains soil state
!! increments
!! - xainc.$NNN The cubed-sphere increment file (contains
!! increments calculated by JEDI on the native
Expand Down Expand Up @@ -375,6 +375,7 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LENSFC,LSOIL,DELTSFC, &
INTEGER, DIMENSION(LENSFC) :: STC_UPDATED, SLC_UPDATED

LOGICAL :: FILE_EXISTS, DO_SOI_INC, DO_SNO_INC
CHARACTER(LEN=3) :: RANKCH

!--------------------------------------------------------------------------------
! NST_FILE is the path/name of the gaussian GSI file which contains NSST
Expand Down Expand Up @@ -444,7 +445,7 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LENSFC,LSOIL,DELTSFC, &
ENDIF

IF (DO_LNDINC) THEN
! identify variables to be updates, and allocate arrays.
! identify variables to be updated, and allocate arrays.
IF (TRIM(LND_SOI_FILE) .NE. "NULL") THEN
DO_SOI_INC = .TRUE.
PRINT*
Expand Down Expand Up @@ -665,6 +666,10 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LENSFC,LSOIL,DELTSFC, &
! read increments in
!--------------------------------------------------------------------------------

WRITE(RANKCH, '(I3.3)') (MYRANK+1)

LND_SOI_FILE = trim(LND_SOI_FILE) // "." // RANKCH

INQUIRE(FILE=trim(LND_SOI_FILE), EXIST=file_exists)
IF (.not. file_exists) then
print *, 'FATAL ERROR: land increment update requested, but file does not exist: ', &
Expand Down

0 comments on commit ab9b0b9

Please sign in to comment.