Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ascii #1089

Merged
merged 7 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions model/src/cmake/switches.json
Original file line number Diff line number Diff line change
Expand Up @@ -813,5 +813,15 @@
"name": "B4B"
}
]
},
{
"name": "ascii",
"num_switches": "upto1",
"description": "ASCII output for binary .ww3 file",
"valid-options": [
{
"name": "ASCII"
}
]
}
]
13 changes: 12 additions & 1 deletion model/src/w3gridmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ MODULE W3GRIDMD
IY2, J, JJ, IXR(4), IYR(4), ISEAI(4),&
IST, NKI, NTHI, NRIC, NRIS, I, IDFT, &
NSTAT, NBT, NLAND, NOSW, NMAPB, IMAPB
#ifdef W3_ASCII
INTEGER :: NDSMA
#endif
#ifdef W3_NL2
INTEGER :: IDEPTH
#endif
Expand Down Expand Up @@ -1158,6 +1161,7 @@ SUBROUTINE W3GRID()
NDSI = 10
NDSS = 99
NDSM = 20
NDSM = 21
MatthewMasarik-NOAA marked this conversation as resolved.
Show resolved Hide resolved
!
INQUIRE(FILE=TRIM(FNMPRE)//"ww3_grid.nml", EXIST=FLGNML)
IF (FLGNML) THEN
Expand Down Expand Up @@ -5907,9 +5911,16 @@ SUBROUTINE W3GRID()
!10. Write model definition file.
!
WRITE (NDSO,999)
CALL W3IOGR ( 'WRITE', NDSM )
CALL W3IOGR ( 'WRITE', NDSM &
#ifdef W3_ASCII
,NDSA=NDSMA &
#endif
)
!
CLOSE (NDSM)
#ifdef W3_ASCII
CLOSE (NDSMA)
#endif
!
GOTO 2222
!
Expand Down
3 changes: 3 additions & 0 deletions model/src/w3initmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ SUBROUTINE W3INIT ( IMOD, IsMulti, FEXT, MDS, MTRACE, ODAT, FLGRD, FLGR2, FLGD,
! (first).
! 11: Track information file unit number.
! 12: Track output file unit number.
! 13: Wave separation output file unit number.
! 14: Grid output file unit number.
! 15: Point output file unit number. ascii
! MTRACE I.A. I Array with subroutine tracing information.
! 1: Output unit number for trace.
! 2: Maximum number of trace prints.
Expand Down
Loading