Skip to content

Commit

Permalink
initializing point data arrays on read
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Apr 15, 2024
1 parent 5b611d6 commit a816d94
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions model/src/w3iopomd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ SUBROUTINE W3IOPON_READ(IOTST, IMOD, filename, ncerr)
USE W3ODATMD, ONLY: NDST, NDSE, IPASS => IPASS2, NOPTS, IPTINT, &
IL, IW, II, PTLOC, PTIFAC, DPO, WAO, WDO, &
ASO, CAO, CDO, SPCO, PTNME, O2INIT, FNMPRE, &
GRDID, ICEO, ICEHO, ICEFO
GRDID, ICEO, ICEHO, ICEFO, W3DMO2
USE W3SERVMD, ONLY: EXTCDE
#ifdef W3_FLX5
USE W3ODATMD, ONLY: TAUAO, TAUDO, DAIRO
Expand Down Expand Up @@ -1197,6 +1197,7 @@ SUBROUTINE W3IOPON_READ(IOTST, IMOD, filename, ncerr)
if (nf90_err(ncerr) .ne. 0) return
ncerr = nf90_inquire_dimension(fh, d_nopts, len = d_nopts_len)
if (nf90_err(ncerr) .ne. 0) return
nopts = d_nopts_len

! Read the dimension information for NSPEC.
ncerr = nf90_inq_dimid(fh, DNAME_NSPEC, d_nspec)
Expand Down Expand Up @@ -1239,6 +1240,9 @@ SUBROUTINE W3IOPON_READ(IOTST, IMOD, filename, ncerr)
CALL EXTCDE ( 12 )
END IF

! Initialize an individual data storage for point output.
if (.not. o2init) call w3dmo2(imod, ndse, ndst, nopts)

! Read vars with nopts as a dimension.
ncerr = nf90_inq_varid(fh, VNAME_PTLOC, v_ptloc)
if (nf90_err(ncerr) .ne. 0) return
Expand Down Expand Up @@ -1865,8 +1869,8 @@ SUBROUTINE W3IOPON ( INXOUT, NDSOP, IOTST, IMOD &

900 FORMAT (/' *** WAVEWATCH III ERROR IN W3IOPO :'/ &
' ILEGAL INXOUT VALUE: ',A/)
901 FORMAT (/' *** WAVEWATCH III ERROR IN W3IOPO :'/ &
' MIXED READ/WRITE, LAST REQUEST: ',A/)
! 901 FORMAT (/' *** WAVEWATCH III ERROR IN W3IOPO :'/ &
! ' MIXED READ/WRITE, LAST REQUEST: ',A/)
END SUBROUTINE W3IOPON

!/ ------------------------------------------------------------------- /
Expand Down

0 comments on commit a816d94

Please sign in to comment.