Skip to content

Commit eff6686

Browse files
new feature to output out_grd.ww3, out_pnt.ww3 and mod_def.ww3 both in binary and ascii format using switch ASCII. (#1089)
1 parent d22b7bb commit eff6686

File tree

15 files changed

+909
-10
lines changed

15 files changed

+909
-10
lines changed

model/src/cmake/switches.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,5 +813,15 @@
813813
"name": "B4B"
814814
}
815815
]
816+
},
817+
{
818+
"name": "ascii",
819+
"num_switches": "upto1",
820+
"description": "ASCII output for binary .ww3 file",
821+
"valid-options": [
822+
{
823+
"name": "ASCII"
824+
}
825+
]
816826
}
817827
]

model/src/w3gridmd.F90

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,9 @@ MODULE W3GRIDMD
586586
IY2, J, JJ, IXR(4), IYR(4), ISEAI(4),&
587587
IST, NKI, NTHI, NRIC, NRIS, I, IDFT, &
588588
NSTAT, NBT, NLAND, NOSW, NMAPB, IMAPB
589+
#ifdef W3_ASCII
590+
INTEGER :: NDSMA
591+
#endif
589592
#ifdef W3_NL2
590593
INTEGER :: IDEPTH
591594
#endif
@@ -5907,9 +5910,16 @@ SUBROUTINE W3GRID()
59075910
!10. Write model definition file.
59085911
!
59095912
WRITE (NDSO,999)
5910-
CALL W3IOGR ( 'WRITE', NDSM )
5913+
CALL W3IOGR ( 'WRITE', NDSM &
5914+
#ifdef W3_ASCII
5915+
,NDSA=NDSMA &
5916+
#endif
5917+
)
59115918
!
59125919
CLOSE (NDSM)
5920+
#ifdef W3_ASCII
5921+
CLOSE (NDSMA)
5922+
#endif
59135923
!
59145924
GOTO 2222
59155925
!

model/src/w3initmd.F90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ SUBROUTINE W3INIT ( IMOD, IsMulti, FEXT, MDS, MTRACE, ODAT, FLGRD, FLGR2, FLGD,
239239
! (first).
240240
! 11: Track information file unit number.
241241
! 12: Track output file unit number.
242+
! 13: Wave separation output file unit number.
243+
! 14: Grid output file unit number.
244+
! 15: Point output file unit number. ascii
242245
! MTRACE I.A. I Array with subroutine tracing information.
243246
! 1: Output unit number for trace.
244247
! 2: Maximum number of trace prints.

0 commit comments

Comments
 (0)