-
Notifications
You must be signed in to change notification settings - Fork 553
/
Copy pathw3gdatmd.F90
3498 lines (3469 loc) · 128 KB
/
w3gdatmd.F90
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
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "w3macros.h"
!/
!/ ------------------------------------------------------------------- /
!/ Macros for enabling test output
!/
#define TEST_W3GDATMD___disabled
#define TEST_W3GDATMD_W3NMOD___disabled
#define TEST_W3GDATMD_W3DIMX___disabled
#define TEST_W3GDATMD_W3DIMS___disabled
#define TEST_W3GDATMD_W3SETG___disabled
#define TEST_W3GDATMD_W3GNTX___disabled
#define TEST_W3GDATMD_W3DIMUG___disabled
#define TEST_W3GDATMD_W3SETREF___disabled
!/
!/ ------------------------------------------------------------------- /
MODULE W3GDATMD
!/
!/ +-----------------------------------+
!/ | WAVEWATCH III NOAA/NCEP |
!/ | H. L. Tolman |
!/ ! J. H. Alves !
!/ | F. Ardhuin |
!/ | FORTRAN 90 |
!/ | Last update : 15-Apr-2020 |
!/ +-----------------------------------+
!/
!/ 24-Jun-2005 : Origination. ( version 3.07 )
!/ 09-Nov-2005 : Remove soft boundary options. ( version 3.08 )
!/ 23-Jun-2006 : Add data for W3SLN1. ( version 3.09 )
!/ 18-Jul-2006 : Add input grids. ( version 3.10 )
!/ 05-Oct-2006 : Add filter to array pointers. ( version 3.10 )
!/ 02-Feb-2007 : Add FLAGST. ( version 3.10 )
!/ 14-Apr-2007 : Add Miche style limiter. ( version 3.11 )
!/ ( J. H. Alves )
!/ 25-Apr-2007 : Adding Battjes-Janssen Sdb. ( version 3.11 )
!/ ( J. H. Alves )
!/ 06-Aug-2007 : Fixing SLNP !/SEED bug. ( version 3.13 )
!/ 18-Sep-2007 : Adding WAM4 source terms. ( version 3.13 )
!/ ( F. Ardhuin )
!/ 15-Apr-2008 : Clean up for distribution. ( version 3.14 )
!/ 27-Jun-2008 : Expand WAM4 variants namelist ( version 3.14 )
!/ ( F. Ardhuin )
!/ 29-May-2009 : Preparing distribution version. ( version 3.14 )
!/ 30-Oct-2009 : Implement run-time grid selection. ( version 3.14 )
!/ (W. E. Rogers & T. J. Campbell, NRL)
!/ 30-Oct-2009 : Implement curvilinear grid type. ( version 3.14 )
!/ (W. E. Rogers & T. J. Campbell, NRL)
!/ 29-Oct-2010 : Implement unstructured grids ( version 3.14.1 )
!/ (A. Roland and F. Ardhuin)
!/ 06-Dec-2010 : Change from GLOBAL (logical) to ICLOSE (integer) to
!/ specify index closure for a grid. ( version 3.14 )
!/ (T. J. Campbell, NRL)
!/ 23-Dec-2010 : Fix HPFAC and HQFAC by including the COS(YGRD)
!/ factor with DXDP and DXDQ terms. ( version 3.14 )
!/ (T. J. Campbell, NRL)
!/ 05-Apr-2011 : Implement interations for DTMAX < 1s( version 3.14.1 )
!/ (F. Ardhuin)
!/ 01-Jul-2011 : Movable bed bottom friction BT4 ( version 4.01 )
!/ 03-Nov-2011 : Bug fix: GUGINIT initialization ( version 4.04 )
!/ 29-Nov-2011 : Adding ST6 source term option. ( version 4.04 )
!/ (S. Zieger)
!/ 14-Mar-2012 : Add PSIC for BT4 ( version 4.04 )
!/ 12-Jun-2012 : Add /RTD option or rotated grid variables.
!/ (Jian-Guo Li) ( version 4.06 )
!/ 13-Jul-2012 : Move data structures GMD (SNL3) and nonlinear
!/ filter (SNLS) from 3.15 (HLT). ( version 4.08 )
!/ 03-Sep-2012 : Clean up of UG grids ( version 4.08 )
!/ 12-Dec-2012 : Adding SMC grid. JG_Li ( version 4.09 )
!/ 16-Sep-2013 : Add Arctic part SMC grid. ( version 4.11 )
!/ 11-Nov-2013 : SMC and rotated grid incorporated in the main
!/ trunk ( version 4.13 )
!/ 16-Nov-2013 : Allows reflection on curvi grids ( version 4.14 )
!/ 26-Jul-2013 : Adding IG waves ( version 4.16 )
!/ 18-Dec-2013 : Moving FLAGLL into GRID TYPE ( version 4.16 )
!/ 11-Jun-2014 : Changed reflection for subgrid ( version 5.01 )
!/ 10-Dec-2014 : Add checks for allocate status ( version 5.04 )
!/ 21-Aug-2015 : Add SMC FUNO3, FVERG options. JGLi ( version 5.09 )
!/ 04-May-2016 : Add IICEDISP GB&FA ( version 5.10 )
!/ 20-Jan-2017 : Update to new W3GSRUMD APIs ( version 6.02 )
!/ 20-Jan-2017 : Change to preprocessor macros to enable test output.
!/ (T.J. Campbell, NRL) ( version 6.02 )
!/ 20-Jan-2017 : Change calculation of curvilinear grid metric and
!/ derivatives calculations to use W3GSRUMD:W3CGDM.
!/ (T.J. Campbell, NRL) ( version 6.02 )
!/ 07-Jan-2018 : Generalizes ICE100WIND to ICESCALES ( version 6.04 )
!/ 26-Mar-2018 : Add FSWND optional variable. JGLi ( version 6.02 )
!/ 05-Jun-2018 : Add PDLIB/DEBUGINIT and implcit scheme parameters
!/ for unstructured grids ( version 6.04 )
!/ 18-Aug-2018 : S_{ice} IC5 (Q. Liu) ( version 6.06 )
!/ 20-Aug-2018: Extra namelist variables for ST6 ( version 6.06)
!/ (Q. Liu, UoM)
!/ 26-Aug-2018 : UOST (Mentaschi et al. 2015, 2018) ( version 6.06 )
!/ 27-Aug-2018 : Add BTBETA parameter ( version 6.06 )
!/ 22-Feb-2020 : Add AIRGB and AIRCMIN ( version 7.06 )
!/ 15-Apr-2020 : Adds optional opt-out for CFL on BC ( version 7.08 )
!/ 06-May-2021 : Add SMCTYPE, ARCTC options. JGLi ( version 7.12 )
!/ 07-Jun-2021 : the GKE module (NL5, Q. Liu) ( version 7.12 )
!/
!/
!/ Copyright 2009-2013 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 :
!
! Define data structures to set up wave model grids and aliases
! to use individual grids transparently. Also includes subroutines
! to manage data structure and pointing to individual models.
! Definition of grids and model set up.
!
! 2. Variables and types :
!
! Name Type Scope Description
! ----------------------------------------------------------------
! NGRIDS Int. Public Number of grids, initialized at -1
! to check proper model initialization.
! NAUXGR Int. Public Auxiliary grids.
! IGRID Int. Public Selected spatial grid, init. at -1.
! ISGRD Int. Public Selected spectral grid, init. at -1.
! IPARS Int. Public Selected num. and ph. pars, init. at -1.
! RLGTYPE I.P. Public Named constant for rectilinear grid type
! CLGTYPE I.P. Public Named constant for curvilinear grid type
! UNGTYPE I.P. Public Named constant for Unstructured triangular grid
! SMCTYPE I.P. Public Named constant for unstructured SMC grid type
! FLAGLL Log. Public Flag to indicate coordinate system for all grids
! .TRUE.: Spherical (lon/lat in degrees)
! .FALSE.: Cartesian (meters)
! GRID TYPE Public Data structure defining grid.
! GRIDS GRID Public Array of grids.
! SGRD TYPE Public Data structure defining spectral grid.
! SGRDS GRID Public Array of spectral grids.
! MPAR TYPE Public Data structure with all other model
! parameters.
! MPARS GRID Public Array of MPAR.
! ----------------------------------------------------------------
!
! All elements of GRID are aliased to pointers with the same
! name. These pointers are defined as :
!
! Name Type Scope Description
! ----------------------------------------------------------------
! GTYPE Int. Public Flag for type of grid
! RLGTYPE: Rectilinear grid
! CLGTYPE: Curvilinear grid
! UNGTYPE: Unstructured triangular grid
! SMCTYPE: Unstructured SMC grid
! RSTYPE Int. Public Integer identifyng restart type
! ICLOSE Int. Public Parameter indicating type of index closure of grid.
! ICLOSE_NONE: No grid closure
! ICLOSE_SMPL: Simple grid closure
! Grid is periodic in the i-index and wraps at
! I=NX+1. In other words, (NX+1,J) => (1,J).
! ICLOSE_TRPL: Tripole grid closure
! Grid is periodic in the i-index and and wraps at
! I=NX+1 and has closure at J=NY+1. In other words,
! (NX+1,J<=NY) => (1,J) and
! (I,NY+1) => (MOD(NX-I+1,NX)+1,NY). The tripole
! closure requires that NX be even.
! NX, NY Int. Public Discrete dimensions of spatial grid.
! NSEA(L) Int. Public Number of sea points (local for MPP).
! NU/VFc Int. Public Number of U/V faces for SMC grid.
! NRLv Int. Public Number of refined levels for SMC grid.
! NGLO Int. Public Number of cells in global part for SMC grid.
! NARC Int. Public Number of cells in Arctic part for SMC grid.
! NBAC Int. Public Number of boundary cells in Arctic part.
! NBGL Int. Public Number of boundary cells in global part.
! NBSMC Int. Public Number of boundary cells for regional SMC grid.
! TRFLAG Int. Public Flag for use of transparencies
! 0: No sub-grid obstacles.
! 1: Obstructions at cell boundaries.
! 2: Obstructions at cell centers.
! 3: Like 1 with continuous ice.
! 4: Like 2 with continuous ice.
! MAPSTA I.A. Public Grid status map.
! MAPST2 I.A. Public Second grid status map.
! MAPxx I.A. Public Storage grid maps.
! IJKCel I.A. Public Cell info array for SMC grid.
! IJKU/VFc I.A. Public U/V-Face arrays for SMC grid.
! NLv* I.A. Public Cell, U/V-Face numbers of refine levels.
! ICLBAC I.A. Public Mapping index for Arctic boundary cells.
! ISMCBP I.A. Public List of SMC grid input boundary cell indexes.
! SX,SY Real Public Spatial (rectilinear) grid increments.
! X0,Y0 Real Public Lower left corner of spatial (rectilinear) grid.
! DTCFL Real Public Maximum CFL time step X-Y propagation.
! DTCFLI Real Public Id. intra-spectral.
! DTMAX Real Public Maximum overall time step.
! DTMIN Real Public Minimum dynamic time step for source
! NITERSEC1 Real Public Number of interations when DTMAX < 1s
! DMIN Real Public Minimum water depth.
! CTMAX Real Public Maximum CFL number for depth refr.
! FICE0/N Real Public Cut-off ice conc. for ice coverage.
! FICEL Real Public Length scale for sea ice damping
! IICEHMIN Real Public Minimum thickness of sea ice
! IICEHDISP Real Public Minimum thickness of sea ice in the dispersion relation before relaxing the conv. criterion
! IICEHFAC Real Public Scale factor for sea ice thickness
! IICEHINIT Real Public Initial value of ice thickness
! ICESCALES R.A. Publ. Scaling coefficient for source terms in the presence of ice
! Default is 1.0, meaning that 100% ice
! concentration result in zero source term
! If set to 0.0, then ice has no direct impact on Sln / Sin / Snl / Sds
! IC3PARS R.A. Public various parameters for use in IC4, handled as
! an array for simplicity
! IC4_KI R.A. Public KI (dissipation rate) values for use in IC4
! IC4_FC R.A. Public FC (frequency bin separators) for use in IC4
! PFMOVE Real Public Tunable parameter in GSE correction
! for moving grids.
! GRIDSHIFT Real Public Grid offset for multi-grid w/SCRIP
! CMPRTRCK Log. Public True for traditional compression of track output
! PoLat/Lon R.A. Public Rotated N-Pole standard latitude/longitude.
! AnglD R.A. Public Rotation angle in degree to turn rotated grid
! back to standard grid. JGLi12Jun2012
! FLAGUNR Log. Public True if rotating directions back to true north
! STEXU Real Public Length-scale (X) for space-time extreme averaging
! STEYU Real Public Length-scale (Y) for space-time extreme averaging
! STEDU Real Public Time-scale for space-time extreme averaging
! ZB R.A. Public Bottom levels on storage grid.
! CLATS(I) R.A. Public (Inverse) cosine of latitude at sea points.
! CTHG0S R.A. Public Constant in great-circle refr. term at sea points.
! TRNX/Y R.A. Public Transparencies in X/Y for sub-grid
! CTRNX/Y R.A. Public Sub-grid transparencies for SMC grid.
! ANGARC R.A. Public Rotation angle in degree for Arctic cells.
! SPCBAC R.A. Public Full 2-D spectra for Arctic boundary cells.
! X/YGRD R.A. Public Spatial grid coordinate arrays.
! SX/SYGRD R.A. Public Spatial grid increment arrays.
! GINIT Log. Public Flag identifying grid initialization.
! FLDRY Log. Public Flag for 'dry' run (IO and data
! processing only).
! FLCx Log. Public Flags for prop. is different spaces.
! FLSOU Log. Public Flag for source term calculation.
! FUNO3 Log. Public Flag for 3rd order UNO3 scheme on SMC grid.
! FVERG Log. Public Flag for 1-2-1 averaging smoothing on SMC grid.
! FSWND Log. Public Flag for sea-point only wind input on SMC grid.
! ARCTC Log. Public Flag to include Arctic polar part on SMC grid.
! FLAGST L.A. Public Flag for source term computations
! for individual grid points.
! IICEDISP Log. Public Flag for use of the ice covered dispertion relation.
! IICESMOOTH Log. Public Flag to smooth the ice covered dispertion relation in broken ice.
!
!
! GNAME C*30 Public Grid name.
! FILEXT C*13 Public Extension of WAVEWATCH III file names
! default in 'ww3'.
! BTBETA Real Public The constant used for separating wind sea
! and swell when we estimate WBT
! ----------------------------------------------------------------
!
! All elements of SGRD are aliased to pointers with the same
! name. These pointers are defined as :
!
! Name Type Scope Description
! ----------------------------------------------------------------
! NK Int. Public Number of discrete wavenumbers.
! NK2 Int. Public Extended wavenumber range.
! NTH Int. Public Number of discrete directions.
! NSPEC Int. Public Number of discrete spectral bins.
! MAPxx I.A. Public Spectral maps.
! DTH Real Public Directional increments (radians).
! XFR Real Public Frequency multiplication factor.
! FR1 Real Public Lowest frequency (Hz)
! FTE Real Public Factor in tail integration energy.
! FTF Real Public Id. frequency.
! FTWN Real Public Id. wavenumber.
! FTTR Real Public Id. wave period.
! FTWL Real Public Id. wave length.
! FACTIn Real Public Factors for obtaining integer cut-off
! frequency.
! FACHFx Real Public Factor for tail.
! TH R.A Public Directions (radians).
! ESIN R.A Public Sine of discrete directions.
! ECOS R.A Public Cosine of discrete directions.
! ES2, ESC, EC2
! R.A Public Sine and cosine products
! SIG R.A Public Relative frequencies (invariant
! in grid). (rad)
! SIG2 R.A Public Id. for full 2-D spectrum.
! DSIP R.A Public Frequency bandwidths (prop.) (rad)
! DSII R.A Public Frequency bandwidths (int.) (rad)
! DDEN R.A Public DSII * DTH * SIG (for integration
! based on energy)
! DDEN2 R.A Public Idem, full spectrum.
! SINIT Log. Public Flag identifying grid initialization.
! ----------------------------------------------------------------
!
! The structure MPAR contains all other model parameters for
! numerical methods and physical parameterizations. It contains
! itself several structures as outlined below.
!
! Name Type Scope Description
! ----------------------------------------------------------------
! PINIT Log. Public Flag identifying initialization.
! NPARS NPAR Public Numerical parameters,
! PROPS PROP Public Parameters propagatrion schemes.
! SFLPS SFLP Public Parameters for flux computation.
! SLNPS SLNP Public Parameters Sln.
! SRCPS SRCP Public Parameters Sin and Sds.
! SNLPS SNLP Public Parameters Snl.
! SBTPS SBTP Public Parameters Sbt.
! SDBPS SDBP Public Parameters Sdb.
! STRPS STRP Public Parameters Str.
! SBSPS SBSP Public Parameters Sbs.
! ----------------------------------------------------------------
!
! The structure NPAR contains numerical parameters and is aliased
! as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! FACP Real Public Constant in maximum par. change in
! dynamic integration scheme (depends
! upon Xp).
! XREL Real Public Id. relative change.
! XFLT Real Public Id. filter level.
! FXFM Real Public Constant for mean frequency in
! cut-off. (!/ST1)
! FXPM Real Public Id. PM.
! XFT Real Public Constant for cut-off freq. (!/ST2)
! XFC Real Public Id.
! FACSD Real Public Constant in seeding algorithm.
! FHMAX Real Public Hs/depth ratio in limiter (!/MLIM)
! RWINDC Real Public Coefficient for current in relative
! wind (!/RWND)
! WWCOR R.A. Public Wind correction factors (!/WCOR)
! ----------------------------------------------------------------
!
! The structure PROP contains parameters for the propagation
! schemes and is aliased as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! DTME Real Public Swell age in disp. corr. (!/PR2)
! CLATMN Real Public Id. minimum cosine of lat. (!/PR2)
! DTMS Real Public Swell age in disp. corr. (!/SMC)
!
! WDCG Real Public Factors in width of av. Cg. (!/PR3)
! WDTH Real Public Factors in width of av. Th. (!/PR3)
! ----------------------------------------------------------------
!
! The structure SFLP contains parameters for the fluxes
! and is aliased as above:
! ----------------------------------------------------------------
! (!/FLX2)
! NITTIN Int. Public Number of itterations for drag calc.
! CINXSI Real Public Constant in parametric description
! (!/FLX3)
! NITTIN Int. Public Number of itterations for drag calc.
! CAP_ID Int Public Type of cap used.
! CINXSI Real Public Constant in parametric description
! CD_MAX Real Public Cap on Cd.
! (!/FLX4)
! FLX4A0 Real Public Scaling value in parametric description
! ----------------------------------------------------------------
!
! The structure SLNP contains parameters for the linear input
! source terms and is aliased as above:
!
! ----------------------------------------------------------------
! (!/LN1)
! SLNC1 Real Public Proportionality and other constants in
! input source term.
! FSPM Real Public Factor for fPM in filter.
! FSHF Real Public Factor for fh in filter.
! ----------------------------------------------------------------
!
! The structure SRCP contains parameters for the input and dis,
! source terms and is aliased as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! WWNMEANPTAIL R Public Power of tail for WNMEAN calculation
! SSTXFTFTAIL R Public Tail factor for WNMEAN calculation
! (!/ST1)
! SINC1 Real Public Proportionality and other constants in
! input source term.
! SDSC1 Real Public Combined constant in dissipation
! source term.
! (!/ST2)
! ZWIND Real Public Height at which the wind is defined
! of drag.
! FSWELL Real Public Reduction factor of negative input
! for swell.
! SHSTAB, OFSTAB, CCNG, CCPS, FFNG, FFPS
! Real Public Factors in effective wind speed.
! CDSAn Real Public Constants in high-freq. dis.
! SDSALN Real Public Factor for nondimensional 1-D spectrum.
! CDSBn Real Public Constants in parameterization of PHI.
! XFH Real Public Constant for turbulent length scale.
! XFn Real Public Constants in combining low and high
! frequency dissipation.
! (!/ST3)
! ZZWND Real Public Height at which the wind is defined
! AALPHA Real Public Minimum value of charnock parameter
! BBETA Real Public Wind-wave coupling coefficient
! ZZALP Real Public Wave age tuning coefficient in Sin
! TTAUWSHELTER Real Public Sheltering coefficient for short waves
! ZZ0MAX Real Public Maximum value of air-side roughness
! ZZ0RAT Real Public ratio of roughness for mean and
! oscillatory flows
! SSINTHP Real Public Power in cosine of wind input
! SSWELLF R.A. Public Swell damping coefficients
! SSDSCn Real Public Dissipation parameters
! SSDSBR Real Public Threshold in saturation spectrum for Sds
! SSDSP Real Public Power of B(k) in Sds
! WWNMEANP Real Public Power that defines the mean wavenumber
! in Sds
! SSTXFTF, SSTXFTWN Real Public Tail constants
! SSDSC4, Real Public Threshold shift in saturation diss.
! SSDSC5, Real Public Wave-turbulence dissipation factor
! SSDSC6, Real Public dissipation parameter
! DDELTA1 Real Public Low-frequency dissipation coefficient
! in WAM4
! DDELTA2 Real Public High-frequency dissipation coefficient
! in WAM4
! SSDSDTH Real Public Maximum angular sector for saturation
! spectrum
! SSDSCOS Real Public Power of cosine in saturation integral
! SSDSISO Int. Public Choice of definition of the isotropic
! saturation
! ----------------------------------------------------------------
!
! The structure SNLP contains parameters for the nonl. inter.
! source term and is aliased as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! (!/NL1)
! SNLC1 Real Public Scaled proportionality constant.
! LAM Real Public Factor defining quadruplet.
! KDCON Real Public Conversion factor for relative depth.
! KDMN Real Public Minimum relative depth.
! SNLSn Real Public Constants in shallow water factor.
! (!/NL2)
! IQTPE Int. Public Type of depth treatment
! 1 : Deep water
! 2 : Deep water / WAM scaling
! 3 : Finite water depth
! NDPTHS Int. Public Number of depth for which integration
! space needs to be computed.
! NLTAIL Real Public Tail factor for parametric tail.
! DPTHNL R.A. Public Depths corresponding to NDPTHS.
! *** NOTE: This array is not allocated
! in the W3DIMP routine ***
! (!/NL3)
! NFR Int. Public Number of frequencies or wavenumbers
! in discrete spectral space (NFR=>NK).
! NFRMIN Int. Public Minimum discrete frequency in the
! expanded frequency space.
! NFRMAX Int. Public Idem maximum for first part.
! NFRCUT Int. Public Idem maximum for second part.
! NTHMAX Int. Public Extension of directional space.
! NTHEXP Int Public Number of bins in extended dir. space.
! NSPMIN, NSPMAX, NSPMX2
! Int. Public 1D spectral space range.
! FRQ R.A. Public Expanded frequency range (Hz).
! XSI R.A. Public Expanded frequency range (rad/s).
! NQA Int. Public Number of actual quadruplets.
! QST1 I.A. Public Spectral offsets for compuation of
! quadruplet spectral desnities.
! QST2 R.A. Public Idem weights.
! QST3 R.A. Public Proportionality constants and k factors
! in diagonal strength.
! QST4 I.A. Public Spectral offsets for combining of
! interactions and diagonal.
! QST5 R.A. Public Idem weights for interactions.
! QST6 R.A. Public Idem weights for diagonal.
! SNLNQ Int. Public Number of quadruplet definitions.
! SNLMSC Real Public Tuning power 'deep' scaling.
! SNLNSC Real Public Tuning power 'shallow' scaling.
! SNLSFD Real Public 'Deep' nondimensional filer freq.
! SNLSFS Real Public 'Shallow' nondimensional filer freq.
! SNLL R.A. Public Array with lambda for quadruplet.
! SNLM R.A. Public Array with mu for quadruplet.
! SNLT R.A. Public Array with Dtheta for quadruplet.
! SNLCD R.A. Public Array with Cd for quadruplet.
! SNLCS R.A. Public Array with Cs for quadruplet.
! (!/NL4)
! ITSA Int. Public Integer indicating TSA (1) or FBI (0)
! IALT Int. Public Integer determining alternating looping
! (!/NL5)
! QR5DPT Real Public Water depth for the GKE module
! QR5OML Real Public λ cut off value for quasi-resonant quartets
! QI5DIS Int. Public Method to discretize continuous spectrum
! QI5KEV Int. Public GKE (GS13 or J03)
! QI5NNZ Int. Public # of interactive quadruplets
! QI5IPL Int. Public Interp. method to get C₄
! QI5PMX Int. Public Phase mixing related parameter
! (!/NLS)
! NTHX Int. Public Expanded discrete direction range.
! NFRX Int. Public Expanded discrete frequency range.
! NSPL-H Int. Public Range of 1D spectrum.
! SNSST R.A. Public Array with interpolation weights.
! CNLSA Real Public a34 in quadruplet definition.
! CNLSC Real Public C in Snl definition.
! CNLSFM Real Public Maximum relative spectral change.
! CNLSC1/3 Real Public Constant in frequency filter.
! ----------------------------------------------------------------
!
! The structure SBTP contains parameters for the bottom friction
! source term and is aliased as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! SBTC1 Real Public Proportionality constant. (!/BT1)
! SBTCX R.A. Public Parameters for bottom fric. (!/BT4)
! ----------------------------------------------------------------
!
! The structure SDBP contains parameters for the depth incduced
! breaking source term and is aliased as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! SDBC1 Real Public Proportionality constant. (!/DB1)
! SDBC2 Real Public Hmax/d ratio. (!/DB1)
! FDONLY Log. Public Flag for checking depth only (!/DB1)
! otherwise Miche criterion.
! ----------------------------------------------------------------
!
! The structure STRP contains parameters for the triad interaction
! source term and is aliased as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! ----------------------------------------------------------------
!
! The structure SBSP contains parameters for the bottom scattering
! source term and is aliased as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! ----------------------------------------------------------------
!
! The structure SICP contains parameters for arbitrary source
! term and is aliased as above:
!
! Name Type Scope Description
! ----------------------------------------------------------------
! IS1C1 Real Public Scale factor for icecon. (!/ISx)
! IS1C2 Real Public Offset for ice concentration (!/ISx)
! ----------------------------------------------------------------
!
! 3. Subroutines and functions :
!
! Name Type Scope Description
! ----------------------------------------------------------------
! W3NMOD Subr. Public Set number of grids.
! W3DIMX Subr. Public Set dimensions of spatial grid.
! W3DIMS Subr. Public Set dimensions of spectral grid.
! W3SETG Subr. Public Point to selected grid / model.
! W3GNTX Subr. Public Construct grid arrays
! ----------------------------------------------------------------
!
! 4. Subroutines and functions used :
!
! Name Type Module Description
! ----------------------------------------------------------------
! STRACE Subr. W3SERVMD Subroutine tracing.
! EXTCDE Subr. W3SERVMD Abort program with exit code.
! ----------------------------------------------------------------
!
! 5. Remarks :
!
! - In model versions before 3.06 the parameters in the grid
! structure were stored in the module W3IOGR.
! - No subroutine DIMP is provided, instead, arrays are set
! one-by-one in W3IOGR.
!
! 6. Switches :
!
! See subroutine documentation.
!
! !/PRn Select propagation scheme
! !/SMC UNO2 propagation on SMC grid.
!
! !/LNn Select source terms
! !/STn
! !/NLn
! !/BTn
! !/DBn
! !/TRn
! !/BSn
! !/XXn
!
! !/S Enable subroutine tracing.
!
! 7. Source code :
!
!/ ------------------------------------------------------------------- /
!/
!/ Required modules
!/
USE W3GSRUMD
!/
!/ Specify default accessibility
!/
PUBLIC
!/
!/ Module private variable for checking error returns
!/
INTEGER, PRIVATE :: ISTAT
!/
!/ Conventional declarations
!/
INTEGER :: NGRIDS = -1, IGRID = -1, ISGRD = -1, &
IPARS = -1, NAUXGR
!
#ifdef W3_IC4
INTEGER, PARAMETER :: NIC4=10
#endif
INTEGER, PARAMETER :: RLGTYPE = 1
INTEGER, PARAMETER :: CLGTYPE = 2
INTEGER, PARAMETER :: UNGTYPE = 3
INTEGER, PARAMETER :: SMCTYPE = 4
INTEGER, PARAMETER :: ICLOSE_NONE = ICLO_NONE
INTEGER, PARAMETER :: ICLOSE_SMPL = ICLO_SMPL
INTEGER, PARAMETER :: ICLOSE_TRPL = ICLO_TRPL
!
! Dimensions of tables for pre-computing of dissipation
!
#ifdef W3_ST4
INTEGER, PARAMETER :: NKHS=2000, NKD=1300
INTEGER, PARAMETER :: NDTAB=2000
#endif
!/
!/ Data structures
!/
!/ Grid type
TYPE GRID ! this is the geographical grid with all associated parameters
INTEGER :: GTYPE
INTEGER :: RSTYPE = -1
INTEGER :: ICLOSE
INTEGER :: NX, NY, NSEA, NSEAL, TRFLAG
#ifdef W3_SEC1
INTEGER :: NITERSEC1
#endif
INTEGER, POINTER :: MAPSTA(:,:), MAPST2(:,:), &
MAPFS(:,:), MAPSF(:,:)
!
#ifdef W3_SMC
!!Li Cell and face arrays for SMC grid.
INTEGER :: NCel, NUFc, NVFc, NRLv, MRFct
INTEGER :: NGLO, NARC, NBGL, NBAC, NBSMC
INTEGER, POINTER :: NLvCel(:), NLvUFc(:), NLvVFc(:)
INTEGER, POINTER :: IJKCel(:,:), IJKUFc(:,:), IJKVFc(:,:)
INTEGER, POINTER :: ISMCBP(:), ICLBAC(:)
!/ Data duplicated for better performance
INTEGER, POINTER :: IJKCel3(:), IJKCel4(:), &
IJKVFc5(:), IJKVFc6(:), &
IJKUFc5(:), IJKUFc6(:)
#endif
!
REAL :: SX, SY, X0, Y0, DTCFL, DTCFLI, DTMAX, &
DTMIN, DMIN, CTMAX, FICE0, FICEN, FICEL, &
PFMOVE, STEXU, STEYU, STEDU, IICEHMIN, &
IICEHINIT, ICESCALES(4), IICEHFAC, IICEHDISP, &
IICEDDISP, IICEFDISP, BTBETA, AAIRCMIN, AAIRGB
REAL(8) :: GRIDSHIFT ! see notes in WMGHGH
#ifdef W3_RTD
REAL :: PoLat, PoLon ! Rotated N-Pole lat/lon
REAL, POINTER :: AnglD(:) ! Angle in degree
LOGICAL :: FLAGUNR
#endif
REAL , POINTER :: ZB(:) ! BOTTOM GRID, DEFINED ON ISEA
REAL , POINTER :: CLATS(:) ! COS(LAT), DEFINED ON SEA POINTS
REAL , POINTER :: CLATIS(:) ! INVERSE OF COS(LAT) DEFINED ON ISEA
REAL , POINTER :: CTHG0S(:) ! TAN(Y)/R, DEFINED ON ISEA
REAL , POINTER :: TRNX(:,:), TRNY(:,:) ! TRANSPARENCY INFORMATION ON IX,IY
#ifdef W3_SMC
REAL, POINTER :: CTRNX(:), CTRNY(:), CLATF(:)
#endif
REAL , POINTER :: SPCBAC(:,:), ANGARC(:)
DOUBLE PRECISION, POINTER :: XGRD(:,:), YGRD(:,:) ! X AND Y DEFINED ON IX,IY
REAL , POINTER :: DXDP(:,:), DXDQ(:,:) ! DX/DP & DX/DQ DEFINED ON IX,IY
REAL , POINTER :: DYDP(:,:), DYDQ(:,:) ! DY/DP & DY/DQ DEFINED ON IX,IY
REAL , POINTER :: DPDX(:,:), DPDY(:,:) ! DP/DX & DP/DY DEFINED ON IX,IY
REAL , POINTER :: DQDX(:,:), DQDY(:,:) ! DQ/DX & DQ/DY DEFINED ON IX,IY
REAL , POINTER :: GSQRT(:,:) ! SQRT(G) DEFINED ON IX,IY
REAL , POINTER :: HPFAC(:,:) ! H_P = SQRT(G_PP) DEFINED ON IX,IY
REAL , POINTER :: HQFAC(:,:) ! H_Q = SQRT(G_QQ) DEFINED ON IX,IY
LOGICAL :: GINIT, FLDRY, FLCX, FLCY, FLCTH, FLCK, FLSOU, IICEDISP,&
IICESMOOTH
LOGICAL :: FLAGLL
LOGICAL :: CMPRTRCK
LOGICAL, POINTER :: FLAGST(:)
CHARACTER(LEN=30):: GNAME
CHARACTER(LEN=13):: FILEXT
LOGICAL :: GUGINIT
#ifdef W3_REF1
REAL, POINTER :: REFLC(:,:) ! reflection coefficient
INTEGER, POINTER :: REFLD(:,:) ! reflection direction
#endif
INTEGER :: E3DF(3,5), P2MSF(3), US3DF(3), USSPF(2) ! freq. indices for 3D output
REAL :: USSP_WN(25) !Max set to 25 decay scales.
!
TYPE(T_GSU) :: GSU ! Grid search utility object
!
REAL :: FFACBERG ! mutiplicative factor for iceberg mask
#ifdef W3_BT4
REAL, POINTER :: SED_D50(:), SED_PSIC(:)
#endif
#ifdef W3_REF1
LOGICAL, POINTER :: RREF(:)
REAL, POINTER :: REFPARS(:)
#endif
#ifdef W3_IG1
REAL, POINTER :: IGPARS(:)
#endif
#ifdef W3_IC2
REAL, POINTER :: IC2PARS(:)
#endif
#ifdef W3_IC3
REAL, POINTER :: IC3PARS(:)
#endif
#ifdef W3_IC4
INTEGER, POINTER :: IC4PARS(:)
REAL, POINTER :: IC4_KI(:)
REAL, POINTER :: IC4_FC(:)
#endif
#ifdef W3_IC5
REAL, POINTER :: IC5PARS(:)
#endif
#ifdef W3_IS2
REAL, POINTER :: IS2PARS(:)
#endif
!
! unstructured data
!
INTEGER :: NTRI
INTEGER, POINTER :: TRIGP(:,:)
#ifdef W3_PDLIB
INTEGER :: NBND_MAP
INTEGER, POINTER :: INDEX_MAP(:)
INTEGER, POINTER :: MAPSTA_LOC(:)
INTEGER*1, POINTER :: IOBPD_LOC(:,:)
INTEGER*2, POINTER :: IOBP_LOC(:)
INTEGER*1, POINTER :: IOBDP_LOC(:)
INTEGER*1, POINTER :: IOBPA_LOC(:)
#endif
REAL(8), POINTER :: LEN(:,:),SI(:), IEN(:,:)
REAL :: MAXX, MAXY, DXYMAX
REAL, POINTER :: ANGLE(:,:),ANGLE0(:,:)
INTEGER :: COUNTRI,COUNTOT,NNZ, NBEDGE
INTEGER, POINTER :: CCON(:), COUNTCON(:), IE_CELL(:), &
POS_CELL(:), &
IAA(:), JAA(:), POSI(:,:), INDEX_CELL(:), &
I_DIAG(:), JA_IE(:,:,:)
INTEGER*2, POINTER :: IOBP(:)
INTEGER*1, POINTER :: IOBPD(:,:), IOBDP(:), IOBPA(:)
INTEGER, POINTER :: EDGES(:,:), NEIGH(:,:)
REAL(8), POINTER :: TRIA(:)
REAL, POINTER :: CROSSDIFF(:,:)
#ifdef W3_UOST
CHARACTER(LEN=256) :: UOSTFILELOCAL, UOSTFILESHADOW
LOGICAL, ALLOCATABLE :: UOST_LCL_OBSTRUCTED(:,:), UOST_SHD_OBSTRUCTED(:,:)
INTEGER*1, ALLOCATABLE :: UOSTLOCALALPHA(:,:,:,:), UOSTLOCALBETA(:,:,:,:)
INTEGER*1, ALLOCATABLE :: UOSTSHADOWALPHA(:,:,:,:), UOSTSHADOWBETA(:,:,:,:)
REAL*4, ALLOCATABLE :: UOSTCELLSIZE(:,:,:)
REAL :: UOSTABMULTFACTOR = 100
REAL :: UOSTCELLSIZEFACTOR = 1000
REAL :: UOSTLOCALFACTOR = 1
REAL :: UOSTSHADOWFACTOR = 1
LOGICAL :: UOSTENABLED = .true.
#endif
END TYPE GRID
!
TYPE SGRD ! this is the spectral grid with all parameters that vary with freq. and direction
INTEGER :: NK=0, NK2=0, NTH=0, NSPEC=0
INTEGER, POINTER :: MAPWN(:), MAPTH(:)
REAL :: DTH=0., XFR=0., FR1=0., FTE=0., FTF=0., FTWN=0., FTTR=0., &
FTWL=0., FACTI1=0., FACTI2=0., FACHFA=0., FACHFE=0.
REAL, POINTER :: TH(:), ESIN(:), ECOS(:), ES2(:), &
ESC(:), EC2(:), SIG(:), SIG2(:), &
DSIP(:), DSII(:), DDEN(:), DDEN2(:)
LOGICAL :: SINIT=.FALSE.
END TYPE SGRD
!
TYPE NPAR
REAL :: FACP, XREL, XFLT, FXFM, FXPM, &
XFT, XFC, FACSD, FHMAX
#ifdef W3_RWND
REAL :: RWINDC
#endif
#ifdef W3_WCOR
REAL :: WWCOR(2)
#endif
END TYPE NPAR
!
TYPE PROP
#ifdef W3_PR0
REAL :: DUMMY
#endif
#ifdef W3_PR1
REAL :: DUMMY
#endif
#ifdef W3_PR2
REAL :: DTME, CLATMN
#endif
#ifdef W3_PR3
REAL :: WDCG, WDTH
#endif
#ifdef W3_SMC
REAL :: DTMS, Refran
LOGICAL :: FUNO3, FVERG, FSWND, ARCTC
#endif
END TYPE PROP
!
TYPE FLDP
REAL :: DUMMY
#ifdef W3_FLD1
INTEGER :: Tail_ID
REAL :: Tail_Lev, TAIL_TRAN1, TAIL_TRAN2
#endif
#ifdef W3_FLD2
INTEGER :: Tail_ID
REAL :: Tail_Lev, TAIL_TRAN1, TAIL_TRAN2
#endif
END TYPE FLDP
TYPE SFLP
#ifdef W3_FLX0
REAL :: DUMMY
#endif
#ifdef W3_FLX1
REAL :: DUMMY
#endif
#ifdef W3_FLX2
INTEGER :: NITTIN
REAL :: CINXSI
#endif
#ifdef W3_FLX3
INTEGER :: NITTIN, CAP_ID
REAL :: CINXSI, CD_MAX
#endif
#ifdef W3_FLX4
REAL :: FLX4A0
#endif
END TYPE SFLP
!
TYPE SLNP
#ifdef W3_SEED
REAL :: DUMMY
#endif
#ifdef W3_LN0
REAL :: DUMMY
#endif
#ifdef W3_LN1
REAL :: SLNC1, FSPM, FSHF
#endif
END TYPE SLNP
!
TYPE SRCP
REAL :: WWNMEANPTAIL, SSTXFTFTAIL
#ifdef W3_ST1
REAL :: SINC1, SDSC1
#endif
#ifdef W3_ST2
REAL :: ZWIND, FSWELL, SHSTAB, &
OFSTAB, CCNG, CCPS, FFNG, FFPS, &
CDSA0, CDSA1, CDSA2, SDSALN, &
CDSB0, CDSB1, CDSB2, CDSB3, FPIMIN, &
XFH, XF1, XF2
#endif
#ifdef W3_ST3
INTEGER :: SSDSISO, SSDSBRFDF
REAL :: AALPHA, BBETA, ZZ0MAX, ZZ0RAT, ZZALP,&
SSINTHP, TTAUWSHELTER, SSWELLF(1:6), &
SSDSC1, SSDSC2, SSDSC3, SSDSBR, &
SSDSP, WWNMEANP, SSTXFTF, SSTXFTWN, &
FFXPM, FFXFM, &
SSDSC4, SSDSC5, SSDSC6, DDELTA1, &
DDELTA2, ZZWND
#endif
!
#ifdef W3_ST4
INTEGER :: SSWELLFPAR, SSDSISO, SSDSBRFDF
INTEGER, POINTER :: IKTAB(:,:), SATINDICES(:,:)
REAL, POINTER :: DCKI(:,:), SATWEIGHTS(:,:),CUMULW(:,:),QBI(:,:)
REAL :: AALPHA, BBETA, ZZ0MAX, ZZ0RAT, ZZALP,&
SSINTHP, TTAUWSHELTER, SSWELLF(1:7), &
SSDSC(1:21), SSDSBR, &
SSDSP, WWNMEANP, SSTXFTF, SSTXFTWN, &
FFXPM, FFXFM, FFXFA, &
SSDSBRF1, SSDSBRF2, SSDSBINT,SSDSBCK,&
SSDSHCK, SSDSABK, SSDSPBK, SSINBR
REAL :: ZZWND
REAL :: SSDSCOS, SSDSDTH, SSDSBT, SSDSBM(0:4)
#endif
!
#ifdef W3_ST6
REAL :: SIN6A0, SDS6A1, SDS6A2, SWL6B1, &
SIN6WS, SIN6FC
INTEGER :: SDS6P1, SDS6P2
LOGICAL :: SDS6ET, SWL6S6, SWL6CSTB1
#endif
END TYPE SRCP
!
TYPE SNLP
#ifdef W3_NL0
REAL :: DUMMY
#endif
#ifdef W3_NL1
REAL :: SNLC1, LAM, KDCON, KDMN, &
SNLS1, SNLS2, SNLS3
#endif
#ifdef W3_NL2
INTEGER :: IQTPE, NDPTHS
REAL :: NLTAIL
REAL, POINTER :: DPTHNL(:)
#endif
#ifdef W3_NL3
INTEGER :: NFRMIN, NFRMAX, NFRCUT, NTHMAX, &
NTHEXP, NSPMIN, NSPMAX, NSPMX2, &
NQA, SNLNQ
INTEGER, POINTER :: QST1(:,:,:), QST4(:,:,:)
REAL :: SNLMSC, SNLNSC, SNLSFD, SNLSFS
REAL, POINTER :: FRQ(:), XSI(:), &
QST2(:,:,:), QST3(:,:,:), &
QST5(:,:,:), QST6(:,:,:), &
SNLL(:), SNLM(:), SNLT(:), &
SNLCD(:), SNLCS(:)
#endif
#ifdef W3_NL4
INTEGER :: ITSA, IALT
#endif
#ifdef W3_NL5
REAL :: QR5DPT, QR5OML
INTEGER :: QI5DIS, QI5KEV, QI5IPL, QI5PMX
INTEGER(KIND=8) :: QI5NNZ
#endif
#ifdef W3_NLS
INTEGER :: NTHX, NFRX, NSPL, NSPH
REAL :: CNLSA, CNLSC, CNLSFM, &
CNLSC1, CNLSC2, CNLSC3
REAL, POINTER :: SNSST(:,:)
#endif
END TYPE SNLP
!
TYPE SBTP
#ifdef W3_BT0
REAL :: DUMMY
#endif
#ifdef W3_BT1
REAL :: SBTC1
#endif
#ifdef W3_BT4
REAL :: SBTCX(10)
#endif
#ifdef W3_BT8
REAL :: DUMMY
#endif
#ifdef W3_BT9
REAL :: DUMMY
#endif
END TYPE SBTP
!
TYPE SDBP
#ifdef W3_DB0
REAL :: DUMMY
#endif
#ifdef W3_DB1
REAL :: SDBC1, SDBC2
LOGICAL :: FDONLY
REAL :: SDBSC
#endif
END TYPE SDBP
#ifdef W3_UOST
TYPE UOSTP
CHARACTER(LEN=256) :: UOSTFILELOCAL, UOSTFILESHADOW
REAL :: UOSTFACTORLOCAL, UOSTFACTORSHADOW
END TYPE UOSTP
#endif
!
TYPE STRP
#ifdef W3_TR0
REAL :: DUMMY
#endif
#ifdef W3_TR1
REAL :: DUMMY
#endif
END TYPE STRP
!
TYPE SBSP
#ifdef W3_BS0
REAL :: DUMMY
#endif
#ifdef W3_BS1
REAL :: DUMMY
#endif