-
Notifications
You must be signed in to change notification settings - Fork 0
/
w3sbtxmd.ftn
297 lines (297 loc) · 10.1 KB
/
w3sbtxmd.ftn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
#include "w3macros.h"
!/ ------------------------------------------------------------------- /
MODULE W3SBTXMD
!/
!/ +-----------------------------------+
!/ | WAVEWATCH III NOAA/NCEP |
!/ | H. L. Tolman |
!/ | FORTRAN 90 |
!/ | Last update : 29-May-2009 |
!/ +-----------------------------------+
!/
!/ 20-Dec-2004 : Origination. ( version 3.06 )
!/ 23-Jun-2006 : Formatted for submitting code for ( version 3.09 )
!/ inclusion in WAVEWATCH III.
!/ 29-May-2009 : Preparing distribution version. ( version 3.14 )
!/
!/ Copyright 2009 National Weather Service (NWS),
!/ National Oceanic and Atmospheric Administration. All rights
!/ reserved. WAVEWATCH III is a trademark of the NWS.
!/ No unauthorized use without permission.
!/
! 1. Purpose :
!
! Dummy slot for bottom friction source term.
! This module can be used to include user-defined source term(s),
! or to submit a source term to be included into the WAVEWATCH III
! distribution. See section 5 for requirements for submissions.
! Codes may be included in WAVEWATCH III as a standard option
! with it's own dedicated compile switch, or as a version of this
! module that can be plugged in by a user.
!
! 2. Variables and types :
!
! Name Type Scope Description
! ----------------------------------------------------------------
! ----------------------------------------------------------------
!
! 3. Subroutines and functions :
!
! Name Type Scope Description
! ----------------------------------------------------------------
! W3SBTX Subr. Public User supplied linear input.
! INSBTX Subr. Public Corresponding initialization routine.
! ----------------------------------------------------------------
!
! 4. Subroutines and functions used :
!
! Name Type Module Description
! ----------------------------------------------------------------
! STRACE Subr. W3SERVMD Subroutine tracing.
! ----------------------------------------------------------------
!
! 5. Remarks :
!
! WAVEWATCH III is designed as a highly plug-compatible code.
! Source term modules can be included as self-contained modules,
! with limited changes needed to the interface of routine calls
! in W3SRCE, and in the point postprocessing programs only.
! Codes submitted for inclusion in WAVEWATCH III should be
! self-contained in the way described below, and might be
! provided with distributions fully integrated in the data
! structure, or as an optional version of this module to be
! included by the user.
!
! Rules for preparing a module to be included in or distributed
! with WAVEWATCH III :
!
! - Fully document the code following the outline given in this
! file, and according to all other WAVEWATCH III routines.
! - Provide a file with necessary modifications to W3SRCE and
! all other routines that require modification.
! - Provide a test case with expected results.
! - It is strongly recommended that the programming style used
! in WAVEWATCH III is followed, in particular
! a) for readability, write as if in fixed FORTRAN format
! regarding column use, even though all files are F90
! free format.
! b) I prefer upper case programming for permanent code,
! as I use lower case in debugging and temporary code.
!
! This module needs to be self-contained in the following way.
!
! a) All saved variables connected with this source term need
! to be declared in the module header. Upon acceptance as
! permanent code, they will be converted to the WAVEWATCH III
! dynamic data structure.
! b) Provide a separate computation and initialization routine.
! In the submission, the initialization should be called
! from the computation routine upon the first call to the
! routine. Upon acceptance as permanent code, the
! initialization routine will be moved to a more appropriate
! location in the code (i.e., being absorbed in ww3_grid or
! being moved to W3IOGR).
!
! See notes in the file below where to add these elements.
!
! 6. Switches :
!
! !/S Enable subroutine tracing.
!
! 7. Source code :
!/
!/ ------------------------------------------------------------------- /
!/
! *****************************************
! *** Declare saved variables here ***
! *** public or private as appropriate ***
! *****************************************
!
PUBLIC
!/
CONTAINS
!/ ------------------------------------------------------------------- /
SUBROUTINE W3SBTX
!/
!/ +-----------------------------------+
!/ | WAVEWATCH III NOAA/NCEP |
!/ | H. L. Tolman |
!/ | FORTRAN 90 |
!/ | Last update : 23-Jun-2006 |
!/ +-----------------------------------+
!/
!/ 20-Dec-2004 : Origination. ( version 3.06
!/ 23-Jun-2006 : Formatted for submitting code for ( version 3.09 )
!/ inclusion in WAVEWATCH III.
!/
! 1. Purpose :
!
! Dummy slot for bottom friction source term.
!
! 2. Method :
!
! 3. Parameters :
!
! Parameter list
! ----------------------------------------------------------------
! ----------------------------------------------------------------
!
! 4. Subroutines used :
!
! Name Type Module Description
! ----------------------------------------------------------------
! STRACE Subr. W3SERVMD Subroutine tracing.
! ----------------------------------------------------------------
!
! 5. Called by :
!
! Name Type Module Description
! ----------------------------------------------------------------
! W3SRCE Subr. W3SRCEMD Source term integration.
! W3EXPO Subr. N/A Point output post-processor.
! GXEXPO Subr. N/A GrADS point output post-processor.
! ----------------------------------------------------------------
!
! 6. Error messages :
!
! None.
!
! 7. Remarks :
!
! 8. Structure :
!
! See source code.
!
! 9. Switches :
!
! !/S Enable subroutine tracing.
!
! 10. Source code :
!
!/ ------------------------------------------------------------------- /
USE W3ODATMD, ONLY: NDSE
USE W3SERVMD, ONLY: EXTCDE
!/S USE W3SERVMD, ONLY: STRACE
!/
IMPLICIT NONE
!/
!/ ------------------------------------------------------------------- /
!/ Parameter list
!/
!/
!/ ------------------------------------------------------------------- /
!/ Local parameters
!/
!/S INTEGER, SAVE :: IENT = 0
LOGICAL, SAVE :: FIRST = .TRUE.
!/
!/ ------------------------------------------------------------------- /
!/
!/S CALL STRACE (IENT, 'W3SBTX')
!
! 0. Initializations ------------------------------------------------ *
!
! **********************************************************
! *** The initialization routine should include all ***
! *** initialization, including reading data from files. ***
! **********************************************************
!
IF ( FIRST ) THEN
CALL INSBTX
FIRST = .FALSE.
END IF
!
! 1. .... ----------------------------------------------------------- *
!
WRITE (NDSE,*)
WRITE (NDSE,*) ' *** ROUTINE W3SBTX NOT YET AVAILABLE *** '
WRITE (NDSE,*)
CALL EXTCDE ( 99 )
!/
!/ End of W3SBTX ----------------------------------------------------- /
!/
END SUBROUTINE W3SBTX
!/ ------------------------------------------------------------------- /
SUBROUTINE INSBTX
!/
!/ +-----------------------------------+
!/ | WAVEWATCH III NOAA/NCEP |
!/ | H. L. Tolman |
!/ | FORTRAN 90 |
!/ | Last update : 23-Jun-2006 |
!/ +-----------------------------------+
!/
!/ 23-Jun-2006 : Origination. ( version 3.09 )
!/
! 1. Purpose :
!
! Initialization for source term routine.
!
! 2. Method :
!
! 3. Parameters :
!
! Parameter list
! ----------------------------------------------------------------
! ----------------------------------------------------------------
!
! 4. Subroutines used :
!
! Name Type Module Description
! ----------------------------------------------------------------
! STRACE Subr. W3SERVMD Subroutine tracing.
! ----------------------------------------------------------------
!
! 5. Called by :
!
! Name Type Module Description
! ----------------------------------------------------------------
! W3SBTX Subr. W3SBTXMD Corresponding source term.
! ----------------------------------------------------------------
!
! 6. Error messages :
!
! None.
!
! 7. Remarks :
!
! 8. Structure :
!
! See source code.
!
! 9. Switches :
!
! !/S Enable subroutine tracing.
!
! 10. Source code :
!
!/ ------------------------------------------------------------------- /
USE W3ODATMD, ONLY: NDSE
USE W3SERVMD, ONLY: EXTCDE
!/S USE W3SERVMD, ONLY: STRACE
!/
IMPLICIT NONE
!/
!/ ------------------------------------------------------------------- /
!/ Parameter list
!/
!/
!/ ------------------------------------------------------------------- /
!/ Local parameters
!/
!/S INTEGER, SAVE :: IENT = 0
!/
!/ ------------------------------------------------------------------- /
!/
!/S CALL STRACE (IENT, 'INSBTX')
!
! 1. .... ----------------------------------------------------------- *
!
!/
!/ End of INSBTX ----------------------------------------------------- /
!/
END SUBROUTINE INSBTX
!/
!/ End of module INSBTXMD -------------------------------------------- /
!/
END MODULE W3SBTXMD