Skip to content

Commit

Permalink
in w3iors use NSEA instead of NSEAL in serial write/read of VA (#954)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMeixner-NOAA authored May 3, 2023
1 parent 25bc4d7 commit 7229a4c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion model/src/w3iorsmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT )
! Original non-server version writing of spectra
!
IF ( .NOT.IOSFLG .OR. (NAPROC.EQ.1.AND.NAPRST.EQ.1) ) THEN
#ifdef W3_MPI
DO JSEA=1, NSEAL
CALL INIT_GET_ISEA(ISEA, JSEA)
NREC = ISEA + 2
Expand All @@ -636,6 +637,16 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT )
WRITEBUFF(1:NSPEC) = VA(1:NSPEC,JSEA)
WRITE (NDSR,POS=RPOS,ERR=803,IOSTAT=IERR) WRITEBUFF
END DO
#else
DO JSEA=1, NSEA
ISEA = JSEA
NREC = ISEA + 2
RPOS = 1_8 + LRECL*(NREC-1_8)
WRITEBUFF(:) = 0.
WRITEBUFF(1:NSPEC) = VA(1:NSPEC,JSEA)
WRITE (NDSR,POS=RPOS,ERR=803,IOSTAT=IERR) WRITEBUFF
END DO
#endif
!
! I/O server version writing of spectra ( !/MPI )
!
Expand Down Expand Up @@ -785,7 +796,7 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT )
ELSE
#endif
VA = 0.
DO JSEA=1, NSEAL
DO JSEA=1, NSEA
CALL INIT_GET_ISEA(ISEA, JSEA)
NREC = ISEA + 2
RPOS = 1_8 + LRECL*(NREC-1_8)
Expand Down

0 comments on commit 7229a4c

Please sign in to comment.