forked from NOAA-EMC/WW3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathw3srcxmd.ftn
More file actions
568 lines (568 loc) · 18 KB
/
Copy pathw3srcxmd.ftn
File metadata and controls
568 lines (568 loc) · 18 KB
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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
#include "w3macros.h"
!/ ------------------------------------------------------------------- /
MODULE W3SRCXMD
!/
!/ +-----------------------------------+
!/ | 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.
!/ 08-Oct-2007 : Adding dummy routine W3SPRX. ( version 3.13 )
!/ 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 input and whitecapping source terms.
! 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
! ----------------------------------------------------------------
! W3SPRX Subr. Public User supplied mean parameter routine.
! W3SINX Subr. Public User supplied input.
! INSINX Subr. Public Corresponding initialization routine.
! W3SDSX Subr. Public User supplied dissipation.
! INSDSX 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 :
!/
!/ ------------------------------------------------------------------- /
!/
PUBLIC
!/
CONTAINS
!/ ------------------------------------------------------------------- /
SUBROUTINE W3SPRX
!/
!/ +-----------------------------------+
!/ | WAVEWATCH III NOAA/NCEP |
!/ | H. L. Tolman |
!/ | FORTRAN 90 |
!/ | Last update : 08-Oct-2007 |
!/ +-----------------------------------+
!/
!/ 08-Oct-2007 : Origination. ( version 3.13 )
!/
! 1. Purpose :
!
! Slot for routine computing mean parameters.
!
! 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, 'W3SPRX')
!
! 0. Initializations ------------------------------------------------ *
!
!
! 1. .... ----------------------------------------------------------- *
!
WRITE (NDSE,*)
WRITE (NDSE,*) ' *** ROUTINE W3SPRX NOT YET AVAILABLE *** '
WRITE (NDSE,*)
CALL EXTCDE ( 99 )
!/
!/ End of W3SPRX ----------------------------------------------------- /
!/
END SUBROUTINE W3SPRX
!/ ------------------------------------------------------------------- /
SUBROUTINE W3SINX
!/
!/ +-----------------------------------+
!/ | 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 :
!
! Slot for user-supplied input 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, 'W3SINX')
!
! 0. Initializations ------------------------------------------------ *
!
! **********************************************************
! *** The initialization routine should include all ***
! *** initialization, including reading data from files. ***
! **********************************************************
!
IF ( FIRST ) THEN
CALL INSINX
FIRST = .FALSE.
END IF
!
! 1. .... ----------------------------------------------------------- *
!
WRITE (NDSE,*)
WRITE (NDSE,*) ' *** ROUTINE W3SINX NOT YET AVAILABLE *** '
WRITE (NDSE,*)
CALL EXTCDE ( 99 )
!/
!/ End of W3SINX ----------------------------------------------------- /
!/
END SUBROUTINE W3SINX
!/ ------------------------------------------------------------------- /
SUBROUTINE INSINX
!/
!/ +-----------------------------------+
!/ | 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
! ----------------------------------------------------------------
! W3SINX Subr. W3SRCXMD 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, 'INSINX')
!
! 1. .... ----------------------------------------------------------- *
!
!/
!/ End of INSINX ----------------------------------------------------- /
!/
END SUBROUTINE INSINX
!/
!/ ------------------------------------------------------------------- /
SUBROUTINE W3SDSX
!/
!/ +-----------------------------------+
!/ | 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 :
!
! Slot for user-supplied dissipation 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, 'W3SDSX')
!
! 0. Initializations ------------------------------------------------ *
!
! **********************************************************
! *** The initialization routine should include all ***
! *** initialization, including reading data from files. ***
! **********************************************************
!
IF ( FIRST ) THEN
CALL INSDSX
FIRST = .FALSE.
END IF
!
! 1. .... ----------------------------------------------------------- *
!
WRITE (NDSE,*)
WRITE (NDSE,*) ' *** ROUTINE W3SDSX NOT YET AVAILABLE *** '
WRITE (NDSE,*)
CALL EXTCDE ( 99 )
!/
!/ End of W3SDSX ----------------------------------------------------- /
!/
END SUBROUTINE W3SDSX
!/ ------------------------------------------------------------------- /
SUBROUTINE INSDSX
!/
!/ +-----------------------------------+
!/ | 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
! ----------------------------------------------------------------
! W3SINX Subr. W3SRCXMD 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, 'INSDSX')
!
! 1. .... ----------------------------------------------------------- *
!
!/
!/ End of INSDSX ----------------------------------------------------- /
!/
END SUBROUTINE INSDSX
!/
!/ End of module W3SRCXMD -------------------------------------------- /
!/
END MODULE W3SRCXMD