Skip to content

Commit

Permalink
working on filename
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Nov 16, 2023
1 parent 427a686 commit d91d533
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions model/src/w3iopomd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,7 @@ SUBROUTINE W3IOPON ( INXOUT, NDSOP, IOTST, IMOD &
#endif

INTEGER :: IGRD, IERR, MK, MTH, I, J
character(len = 124) :: filename
integer :: ncerr

! Optimistically assume success.
Expand All @@ -1554,11 +1555,18 @@ SUBROUTINE W3IOPON ( INXOUT, NDSOP, IOTST, IMOD &
CALL EXTCDE(1)
END IF

! Determine filename.
I = LEN_TRIM(FILEXT)
J = LEN_TRIM(FNMPRE)
print *, FNMPRE(:J)//'out_pnt.'//FILEXT(:I)
filename = FNMPRE(:J)//'out_pnt_nc.'//FILEXT(:I)
print *, filename

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

0 comments on commit d91d533

Please sign in to comment.