Skip to content

Commit

Permalink
more work on netcdf out
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Nov 8, 2023
1 parent 4c6ab0b commit 44a347b
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions model/src/w3iopomd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1030,16 +1030,34 @@ END SUBROUTINE W3IOPE
!> @param[in] NDSOP File unit number.
!> @param[out] IOTST Test indictor for reading.
!> @param[in] IMOD Model number for W3GDAT etc.
!> @param[in] filename Name of file to read.
!> @param[inout] ncerr Error code, 0 for success, netCDF error code
!> otherwise.
!>
!> @author Edward Hartnett @date 1-Nov-2023
!>
SUBROUTINE W3IOPON_READ (NDSOP, IOTST, IMOD)
SUBROUTINE W3IOPON_READ (NDSOP, IOTST, IMOD, filename, ncerr)
use netcdf
USE W3GDATMD, ONLY: NTH, NK, NSPEC, FILEXT
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
#ifdef W3_FLX5
USE W3ODATMD, ONLY: TAUAO, TAUDO, DAIRO
#endif
#ifdef W3_SETUP
USE W3ODATMD, ONLY: ZET_SETO
#endif
IMPLICIT NONE

INTEGER, INTENT(IN) :: NDSOP
INTEGER, INTENT(OUT) :: IOTST
INTEGER, INTENT(IN), OPTIONAL :: IMOD
character(*), intent(in) :: filename
integer, intent(inout) :: ncerr

ncerr = 0
IOTST = 0
END SUBROUTINE W3IOPON_READ

Expand Down Expand Up @@ -1288,7 +1306,7 @@ SUBROUTINE W3IOPON ( INXOUT, NDSOP, IOTST, IMOD &

! Do a read or a write of the point file.
IF (INXOUT .EQ. 'READ') THEN
CALL W3IOPON_READ(NDSOP, IOTST, IMOD)
CALL W3IOPON_READ(NDSOP, IOTST, IMOD, 'ww3_out_pnt.nc', ncerr)
ELSE
CALL W3IOPON_WRITE(NDSOP, IMOD, 'ww3_out_pnt.nc', ncerr)
ENDIF
Expand Down

0 comments on commit 44a347b

Please sign in to comment.