Skip to content

Commit

Permalink
hard code BIN2NC switch for demonstration purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMeixner-NOAA committed May 10, 2024
1 parent f0bf8ca commit bbabe3a
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 66 deletions.
24 changes: 12 additions & 12 deletions model/src/gx_outp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ PROGRAM GXOUTP
#endif
USE W3ODATMD, ONLY: W3SETO, W3NOUT
USE W3IOGRMD, ONLY: W3IOGR
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
USE W3IOPOMD, ONLY: W3IOPON
#else
USE W3IOPOMD, ONLY: W3IOPO
#endif
!#else
! USE W3IOPOMD, ONLY: W3IOPO
!#endif
USE W3SERVMD, ONLY : ITRACE, NEXTLN, EXTCDE
#ifdef W3_S
USE W3SERVMD, ONLY : STRACE
Expand Down Expand Up @@ -281,11 +281,11 @@ PROGRAM GXOUTP
!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! 3. Read general data and first fields from file
!
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
ALLOCATE ( FLREQ(NOPTS) )
!
WRITE (NDSO,930)
Expand Down Expand Up @@ -377,11 +377,11 @@ PROGRAM GXOUTP
DO
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
IF ( IOTEST .EQ. -1 ) THEN
WRITE (NDSO,998)
EXIT
Expand Down
4 changes: 2 additions & 2 deletions model/src/w3iopomd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ SUBROUTINE W3IOPE ( A )
!/
END SUBROUTINE W3IOPE

#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
!> Handle netCDF return code.
!>
!> @param errcode NetCDF error code. 0 for no error.
Expand Down Expand Up @@ -1784,7 +1784,7 @@ SUBROUTINE W3IOPON ( INXOUT, NDSOP, IOTST, IMOD)
900 FORMAT (/' *** WAVEWATCH III ERROR IN W3IOPO :'/ &
' ILEGAL INXOUT VALUE: ',A/)
END SUBROUTINE W3IOPON
#endif
!#endif
!/ ------------------------------------------------------------------- /
!> Read or write point output.
!>
Expand Down
16 changes: 8 additions & 8 deletions model/src/w3wavemd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2601,15 +2601,15 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
! Gets the necessary spectral data
!
CALL W3IOPE ( VA )
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'WRITE', NDS(8), ITEST, IMOD )
#else
CALL W3IOPO ( 'WRITE', NDS(8), ITEST, IMOD &
#ifdef W3_ASCII
,NDS(15) &
#endif
)
#endif
!#else
! CALL W3IOPO ( 'WRITE', NDS(8), ITEST, IMOD &
!#ifdef W3_ASCII
! ,NDS(15) &
!#endif
! )
!#endif
END IF
!
ELSE IF ( J .EQ. 3 ) THEN
Expand Down
16 changes: 8 additions & 8 deletions model/src/wmiopomd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1175,15 +1175,15 @@ SUBROUTINE WMIOPO ( TOUT )
!
TIME = TOUT
!
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'WRITE', MDSUP, II, 0)
#else
CALL W3IOPO ( 'WRITE', MDSUP, II, 0 &
#ifdef W3_ASCII
,MDSUPA &
#endif
)
#endif
!#else
! CALL W3IOPO ( 'WRITE', MDSUP, II, 0 &
!#ifdef W3_ASCII
! ,MDSUPA &
!#endif
! )
!#endif
!
RETURN
!
Expand Down
40 changes: 20 additions & 20 deletions model/src/ww3_ounp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,11 @@ PROGRAM W3OUNP
!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! 3. Read general data and first fields from file
!
#if W3_BIN2NC
!#if W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
!
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,930)
DO I=1, NOPTS
Expand Down Expand Up @@ -608,11 +608,11 @@ PROGRAM W3OUNP
DO WHILE (DTEST.NE.0)
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
IF ( IOTEST .EQ. -1 ) THEN
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,949)
GOTO 888
Expand Down Expand Up @@ -1078,11 +1078,11 @@ PROGRAM W3OUNP
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
! reads TIME from out_pnt.ww3
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
IF ( IOTEST .EQ. -1 ) THEN
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,949)
GOTO 700
Expand Down Expand Up @@ -1227,11 +1227,11 @@ PROGRAM W3OUNP
! 7.3 Reinitiazes TIME (close open out_pnt.ww3) and TOUT to process a new bunch of stations
CLOSE(NDSOP) ! closes binary file out_pnt*
IPASS = 0 ! resets time counter for binary file out_pnt*
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
#ifdef W3_T
WRITE(NDSE,*) 'out_pnt* closed and reopened'
#endif
Expand All @@ -1244,11 +1244,11 @@ PROGRAM W3OUNP
DO WHILE (DTEST.NE.0)
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
IF ( IOTEST .EQ. -1 ) THEN
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,949)
GOTO 700
Expand Down
32 changes: 16 additions & 16 deletions model/src/ww3_outp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ PROGRAM W3OUTP
#endif
USE W3ODATMD, ONLY: W3SETO, W3NOUT
USE W3IOGRMD, ONLY: W3IOGR
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
USE W3IOPOMD, ONLY: W3IOPON, W3IOPON_READ, W3IOPON_WRITE
#else
USE W3IOPOMD, ONLY: W3IOPO
#endif
!#else
! USE W3IOPOMD, ONLY: W3IOPO
!#endif
USE W3SERVMD, ONLY : ITRACE, NEXTLN, EXTCDE
#ifdef W3_S
USE W3SERVMD, ONLY : STRACE
Expand Down Expand Up @@ -362,11 +362,11 @@ PROGRAM W3OUTP
!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! 3. Read general data and first fields from file
!
#if W3_BIN2NC
!#if W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
!
WRITE (NDSO,930)
DO I=1, NOPTS
Expand Down Expand Up @@ -464,11 +464,11 @@ PROGRAM W3OUTP
DO
CALL STME21 ( TIME , IDTIME )
WRITE (NDSO,948) IDTIME
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
IF ( IOTEST .EQ. -1 ) THEN
WRITE (NDSO,949)
GOTO 888
Expand Down Expand Up @@ -788,11 +788,11 @@ PROGRAM W3OUTP
DO
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
#ifdef W3_BIN2NC
!#ifdef W3_BIN2NC
CALL W3IOPON ( 'READ', NDSOP, IOTEST )
#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
#endif
!#else
! CALL W3IOPO ( 'READ', NDSOP, IOTEST )
!#endif
IF ( IOTEST .EQ. -1 ) THEN
WRITE (NDSO,949)
EXIT
Expand Down

0 comments on commit bbabe3a

Please sign in to comment.