Page 1 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 1 !/ ------------------------------------------------------------------- / 2 MODULE W3GDATMD 3 !/ 4 !/ +-----------------------------------+ 5 !/ | WAVEWATCH III NOAA/NCEP | 6 !/ | H. L. Tolman | 7 !/ ! J. H. Alves ! 8 !/ | F. Ardhuin | 9 !/ | FORTRAN 90 | 10 !/ | Last update : 16-Nov-2013 | 11 !/ +-----------------------------------+ 12 !/ 13 !/ 24-Jun-2005 : Origination. ( version 3.07 ) 14 !/ 09-Nov-2005 : Remove soft boundary options. ( version 3.08 ) 15 !/ 23-Jun-2006 : Add data for W3SLN1. ( version 3.09 ) 16 !/ 18-Jul-2006 : Add input grids. ( version 3.10 ) 17 !/ 05-Oct-2006 : Add filter to array pointers. ( version 3.10 ) 18 !/ 02-Feb-2007 : Add FLAGST. ( version 3.10 ) 19 !/ 14-Apr-2007 : Add Miche style limiter. ( version 3.11 ) 20 !/ ( J. H. Alves ) 21 !/ 25-Apr-2007 : Adding Battjes-Janssen Sdb. ( version 3.11 ) 22 !/ ( J. H. Alves ) 23 !/ 06-Aug-2007 : Fixing SLNP !/SEED bug. ( version 3.13 ) 24 !/ 18-Sep-2007 : Adding WAM4 source terms. ( version 3.13 ) 25 !/ ( F. Ardhuin ) 26 !/ 15-Apr-2008 : Clean up for distribution. ( version 3.14 ) 27 !/ 27-Jun-2008 : Expand WAM4 variants namelist ( version 3.14 ) 28 !/ ( F. Ardhuin ) 29 !/ 29-May-2009 : Preparing distribution version. ( version 3.14 ) 30 !/ 30-Oct-2009 : Implement run-time grid selection. ( version 3.14 ) 31 !/ (W. E. Rogers & T. J. Campbell, NRL) 32 !/ 30-Oct-2009 : Implement curvilinear grid type. ( version 3.14 ) 33 !/ (W. E. Rogers & T. J. Campbell, NRL) 34 !/ 29-Oct-2010 : Implement unstructured grids ( version 3.14.1 ) 35 !/ (A. Roland and F. Ardhuin) 36 !/ 06-Dec-2010 : Change from GLOBAL (logical) to ICLOSE (integer) to 37 !/ specify index closure for a grid. ( version 3.14 ) 38 !/ (T. J. Campbell, NRL) 39 !/ 23-Dec-2010 : Fix HPFAC and HQFAC by including the COS(YGRD) 40 !/ factor with DXDP and DXDQ terms. ( version 3.14 ) 41 !/ (T. J. Campbell, NRL) 42 !/ 05-Apr-2011 : Implement interations for DTMAX < 1s( version 3.14.1 ) 43 !/ (F. Ardhuin) 44 !/ 01-Jul-2011 : Movable bed bottom friction BT4 ( version 4.01 ) 45 !/ 03-Nov-2011 : Bug fix: GUGINIT initialization ( version 4.04 ) 46 !/ 29-Nov-2011 : Adding ST6 source term option. ( version 4.04 ) 47 !/ (S. Zieger) 48 !/ 14-Mar-2012 : Add PSIC for BT4 ( version 4.04 ) 49 !/ 12-Jun-2012 : Add /RTD option or rotated grid variables. 50 !/ (Jian-Guo Li) ( version 4.06 ) 51 !/ 13-Jul-2012 : Move data structures GMD (SNL3) and nonlinear 52 !/ filter (SNLS) from 3.15 (HLT). ( version 4.08 ) 53 !/ 03-Sep-2012 : Clean up of UG grids ( version 4.08 ) 54 !/ 12-Dec-2012 : Adding SMC grid. JG_Li ( version 4.09 ) 55 !/ 16-Sep-2013 : Add Arctic part SMC grid. ( version 4.11 ) 56 !/ 11-Nov-2013 : SMC and rotated grid incorporated in the main 57 !/ trunk ( version 4.13 ) Page 2 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 58 !/ 16-Nov-2013 : Allows reflection on curvi grids ( version 4.15 ) 59 !/ 60 !/ Copyright 2009-2013 National Weather Service (NWS), 61 !/ National Oceanic and Atmospheric Administration. All rights 62 !/ reserved. WAVEWATCH III is a trademark of the NWS. 63 !/ No unauthorized use without permission. 64 !/ 65 ! 1. Purpose : 66 ! 67 ! Define data structures to set up wave model grids and aliases 68 ! to use individual grids transparently. Also includes subroutines 69 ! to manage data structure and pointing to individual models. 70 ! Definition of grids and model set up. 71 ! 72 ! 2. Variables and types : 73 ! 74 ! Name Type Scope Description 75 ! ---------------------------------------------------------------- 76 ! NGRIDS Int. Public Number of grids, initialized at -1 77 ! to check proper model initialization. 78 ! NAUXGR Int. Public Auxiliary grids. 79 ! IGRID Int. Public Selected spatial grid, init. at -1. 80 ! ISGRD Int. Public Selected spectral grid, init. at -1. 81 ! IPARS Int. Public Selected num. and ph. pars, init. at -1. 82 ! RLGTYPE I.P. Public Named constant for rectilinear grid type 83 ! CLGTYPE I.P. Public Named constant for curvilinear grid type 84 ! FLAGLL Log. Public Flag to indicate coordinate system for all grids 85 ! .TRUE.: Spherical (lon/lat in degrees) 86 ! .FALSE.: Cartesian (meters) 87 ! GRID TYPE Public Data structure defining grid. 88 ! GRIDS GRID Public Array of grids. 89 ! SGRD TYPE Public Data structure defining spectral grid. 90 ! SGRDS GRID Public Array of spectral grids. 91 ! MPAR TYPE Public Data structure with all other model 92 ! parameters. 93 ! MPARS GRID Public Array of MPAR. 94 ! ---------------------------------------------------------------- 95 ! 96 ! All elements of GRID are aliased to pointers with the same 97 ! name. These pointers are defined as : 98 ! 99 ! Name Type Scope Description 100 ! ---------------------------------------------------------------- 101 ! GTYPE Int. Public Flag for type of grid 102 ! RLGTYPE: Rectilinear grid 103 ! CLGTYPE: Curvilinear grid 104 ! UNGTYPE: Unstructured triangular grid 105 ! ICLOSE Int. Public Parameter indicating type of index closure of grid. 106 ! ICLOSE_NONE: No grid closure 107 ! ICLOSE_SMPL: Simple grid closure 108 ! Grid is periodic in the i-index and wraps at 109 ! I=NX+1. In other words, (NX+1,J) => (1,J). 110 ! ICLOSE_TRPL: Tripole grid closure 111 ! Grid is periodic in the i-index and and wraps at 112 ! I=NX+1 and has closure at J=NY+1. In other words, 113 ! (NX+1,J<=NY) => (1,J) and 114 ! (I,NY+1) => (MOD(NX-I+1,NX)+1,NY). The tripole Page 3 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 115 ! closure requires that NX be even. 116 ! NX, NY Int. Public Discrete dimensions of spatial grid. 117 ! NSEA(L) Int. Public Number of sea points (local for MPP). 118 ! NU/VFc Int. Public Number of U/V faces for SMC grid. 119 ! NRLv Int. Public Number of refined levels for SMC grid. 120 ! NGLO Int. Public Number of cells in global part for SMC grid. 121 ! NARC Int. Public Number of cells in Arctic part for SMC grid. 122 ! NBAC Int. Public Number of boundary cells in Arctic part. 123 ! NBGL Int. Public Number of boundary cells in global part. 124 ! TRFLAG Int. Public Flag for use of transparencies 125 ! 0: No sub-grid obstacles. 126 ! 1: Obstructions at cell boundaries. 127 ! 2: Obstructions at cell centers. 128 ! 3: Like 1 with continuous ice. 129 ! 4: Like 2 with continuous ice. 130 ! MAPSTA I.A. Public Grid status map. 131 ! MAPST2 I.A. Public Second grid status map. 132 ! MAPxx I.A. Public Storage grid maps. 133 ! IJKCel I.A. Public Cell info array for SMC grid. 134 ! IJKU/VFc I.A. Public U/V-Face arrays for SMC grid. 135 ! NLv* I.A. Public Cell, U/V-Face numbers of refine levels. 136 ! ICLBAC I.A. Public Mapping index for Arctic boundary cells. 137 ! SX,SY Real Public Spatial (rectilinear) grid increments. 138 ! X0,Y0 Real Public Lower left corner of spatial (rectilinear) grid. 139 ! DTCFL Real Public Maximum CFL time step X-Y propagation. 140 ! DTCFLI Real Public Id. intra-spectral. 141 ! DTMAX Real Public Maximum overall time step. 142 ! DTMIN Real Public Minimum dynamic time step for source 143 ! NITERSEC1 Real Public Number of interations when DTMAX < 1s 144 ! DMIN Real Public Minimum water depth. 145 ! CTMAX Real Public Maximum CFL number for depth refr. 146 ! FICE0/N Real Public Cut-off ice conc. for ice coverage. 147 ! FICEL Real Public Length scale for sea ice damping 148 ! PFMOVE Real Public Tunable parameter in GSE correction 149 ! for moving grids. 150 ! GRIDSHIFT Real Public Grid offset for multi-grid w/SCRIP 151 ! PoLat/Lon R.A. Public Rotated N-Pole standard latitude/longitude. 152 ! AnglD R.A. Public Rotation angle in degree to turn rotated grid 153 ! back to standard grid. JGLi12Jun2012 154 ! ZB R.A. Public Bottom levels on storage grid. 155 ! CLATS(I) R.A. Public (Inverse) cosine of latitude at sea points. 156 ! CTHG0S R.A. Public Constant in great-circle refr. term at sea points. 157 ! TRNX/Y R.A. Public Transparencies in X/Y for sub-grid 158 ! CTRNX/Y R.A. Public Sub-grid transparencies for SMC grid. 159 ! ANGARC R.A. Public Rotation angle in degree for Arctic cells. 160 ! SPCBAC R.A. Public Full 2-D spectra for Arctic boundary cells. 161 ! X/YGRD R.A. Public Spatial grid coordinate arrays. 162 ! SX/SYGRD R.A. Public Spatial grid increment arrays. 163 ! GINIT Log. Public Flag identifying grid initialization. 164 ! FLDRY Log. Public Flag for 'dry' run (IO and data 165 ! processing only). 166 ! FLCx Log. Public Flags for prop. is different spaces. 167 ! FLSOU Log. Public Flag for source term calcualtion. 168 ! FLAGST L.A. Public Flag for source term computations 169 ! for individual grid points. 170 ! 171 ! GNAME C*30 Public Grid name. Page 4 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 172 ! FILEXT C*10 Public Extension of WAVEWATCH III file names 173 ! default in 'ww3'. 174 ! ---------------------------------------------------------------- 175 ! 176 ! All elements of SGRD are aliased to pointers with the same 177 ! name. These pointers are defined as : 178 ! 179 ! Name Type Scope Description 180 ! ---------------------------------------------------------------- 181 ! NK Int. Public Number of discrete wavenumbers. 182 ! NK2 Int. Public Extended wavenumber range. 183 ! NTH Int. Public Number of discrete directions. 184 ! NSPEC Int. Public Number of discrete spectral bins. 185 ! MAPxx I.A. Public Spectral maps. 186 ! DTH Real Public Directional increments (radians). 187 ! XFR Real Public Frequency multiplication factor. 188 ! FR1 Real Public Lowest frequency (Hz) 189 ! FTE Real Public Factor in tail integration energy. 190 ! FTF Real Public Id. frequency. 191 ! FTWN Real Public Id. wavenumber. 192 ! FTTR Real Public Id. wave period. 193 ! FTWL Real Public Id. wave length. 194 ! FACTIn Real Public Factors for obtaining integer cut-off 195 ! frequency. 196 ! FACHFx Real Public Factor for tail. 197 ! TH R.A Public Directions (radians). 198 ! ESIN R.A Public Sine of discrete directions. 199 ! ECOS R.A Public Cosine of discrete directions. 200 ! ES2, ESC, EC2 201 ! R.A Public Sine and cosine products 202 ! SIG R.A Public Relative frequencies (invariant 203 ! in grid). (rad) 204 ! SIG2 R.A Public Id. for full 2-D spectrum. 205 ! DSIP R.A Public Frequency bandwidths (prop.) (rad) 206 ! DSII R.A Public Frequency bandwidths (int.) (rad) 207 ! DDEN R.A Public DSII * DTH * SIG (for integration 208 ! based on energy) 209 ! DDEN2 R.A Public Idem, full spectrum. 210 ! SINIT Log. Public Flag identifying grid initialization. 211 ! ---------------------------------------------------------------- 212 ! 213 ! The structure MPAR contains all other model parameters for 214 ! numerical methods and physical parameterizations. It contains 215 ! itself several structures as outlined below. 216 ! 217 ! Name Type Scope Description 218 ! ---------------------------------------------------------------- 219 ! PINIT Log. Public Flag identifying initialization. 220 ! NPARS NPAR Public Numerical parameters, 221 ! PROPS PROP Public Parameters propagatrion schemes. 222 ! SFLPS SFLP Public Parameters for flux computation. 223 ! SLNPS SLNP Public Parameters Sln. 224 ! SRCPS SRCP Public Parameters Sin and Sds. 225 ! SNLPS SNLP Public Parameters Snl. 226 ! SBTPS SBTP Public Parameters Sbt. 227 ! SDBPS SDBP Public Parameters Sdb. 228 ! STRPS STRP Public Parameters Str. Page 5 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 229 ! SBSPS SBSP Public Parameters Sbs. 230 ! SXXPS SXXP Public Parameters Sxx. 231 ! ---------------------------------------------------------------- 232 ! 233 ! The structure NPAR contains numerical parameters and is aliased 234 ! as above: 235 ! 236 ! Name Type Scope Description 237 ! ---------------------------------------------------------------- 238 ! FACP Real Public Constant in maximum par. change in 239 ! dynamic integration scheme (depends 240 ! upon Xp). 241 ! XREL Real Public Id. relative change. 242 ! XFLT Real Public Id. filter level. 243 ! FXFM Real Public Constant for mean frequency in 244 ! cut-off. (!/ST1) 245 ! FXPM Real Public Id. PM. 246 ! XFT Real Public Constant for cut-off freq. (!/ST2) 247 ! XFC Real Public Id. 248 ! FACSD Real Public Constant in seeding algorithm. 249 ! FHMAX Real Public Hs/depth ratio in limiter (!/MLIM) 250 ! RWINDC Real Public Coefficient for current in relative 251 ! wind (!/RWND) 252 ! ---------------------------------------------------------------- 253 ! 254 ! The structure PROP contains parameters for the propagation 255 ! schemes and is aliased as above: 256 ! 257 ! Name Type Scope Description 258 ! ---------------------------------------------------------------- 259 ! DTME Real Public Swell age in disp. corr. (!/PR2) 260 ! CLATMN Real Public Id. minimum cosine of lat. (!/PR2) 261 ! 262 ! WDCG Real Public Factors in width of av. Cg. (!/PR3) 263 ! WDTH Real Public Factors in width of av. Th. (!/PR3) 264 ! ---------------------------------------------------------------- 265 ! 266 ! The structure SFLP contains parameters for the fluxes 267 ! and is aliased as above: 268 ! ---------------------------------------------------------------- 269 ! (!/FLX2) 270 ! NITTIN Int. Public Number of itterations for drag calc. 271 ! CINXSI Real Public Constant in parametric description 272 ! (!/FLX3) 273 ! NITTIN Int. Public Number of itterations for drag calc. 274 ! CAP_ID Int Public Type of cap used. 275 ! CINXSI Real Public Constant in parametric description 276 ! CD_MAX Real Public Cap on Cd. 277 ! (!/FLX4) 278 ! FLX4A0 Real Public Scaling value in parametric description 279 ! ---------------------------------------------------------------- 280 ! 281 ! The structure SLNP contains parameters for the linear input 282 ! source terms and is aliased as above: 283 ! 284 ! ---------------------------------------------------------------- 285 ! (!/LN1) Page 6 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 286 ! SLNC1 Real Public Proportionality and other constants in 287 ! input source term. 288 ! FSPM Real Public Factor for fPM in filter. 289 ! FSHF Real Public Factor for fh in filter. 290 ! ---------------------------------------------------------------- 291 ! 292 ! The structure SRCP contains parameters for the input and dis, 293 ! source terms and is aliased as above: 294 ! 295 ! Name Type Scope Description 296 ! ---------------------------------------------------------------- 297 ! WWNMEANPTAIL R Public Power of tail for WNMEAN calculation 298 ! SSTXFTFTAIL R Public Tail factor for WNMEAN calculation 299 ! (!/ST1) 300 ! SINC1 Real Public Proportionality and other constants in 301 ! input source term. 302 ! SDSC1 Real Public Combined constant in dissipation 303 ! source term. 304 ! (!/ST2) 305 ! ZWIND Real Public Height at which the wind is defined 306 ! of drag. 307 ! FSWELL Real Public Reduction factor of negative input 308 ! for swell. 309 ! SHSTAB, OFSTAB, CCNG, CCPS, FFNG, FFPS 310 ! Real Public Factors in effective wind speed. 311 ! CDSAn Real Public Constants in high-freq. dis. 312 ! SDSALN Real Public Factor for nondimensional 1-D spectrum. 313 ! CDSBn Real Public Constants in parameterization of PHI. 314 ! XFH Real Public Constant for turbulent length scale. 315 ! XFn Real Public Constants in combining low and high 316 ! frequency dissipation. 317 ! (!/ST3) 318 ! ZZWND Real Public Height at which the wind is defined 319 ! AALPHA Real Public Minimum value of charnock parameter 320 ! BBETA Real Public Wind-wave coupling coefficient 321 ! ZZALP Real Public Wave age tuning coefficient in Sin 322 ! TTAUWSHELTER Real Public Sheltering coefficient for short waves 323 ! ZZ0MAX Real Public Maximum value of air-side roughness 324 ! ZZ0RAT Real Public ratio of roughness for mean and 325 ! oscillatory flows 326 ! SSINTHP Real Public Power in cosine of wind input 327 ! SSWELLF R.A. Public Swell damping coefficients 328 ! SSDSCn Real Public Dissipation parameters 329 ! SSDSBR Real Public Threshold in saturation spectrum for Sds 330 ! SSDSP Real Public Power of B(k) in Sds 331 ! WWNMEANP Real Public Power that defines the mean wavenumber 332 ! in Sds 333 ! SSTXFTF, SSTXFTWN Real Public Tail constants 334 ! SSDSC4, Real Public Threshold shift in saturation diss. 335 ! SSDSC5, Real Public Wave-turbulence dissipation factor 336 ! SSDSC6, Real Public dissipation parameter 337 ! DDELTA1 Real Public Low-frequency dissipation coefficient 338 ! in WAM4 339 ! DDELTA2 Real Public High-frequency dissipation coefficient 340 ! in WAM4 341 ! SSDSDTH Real Public Maximum angular sector for saturation 342 ! spectrum Page 7 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 343 ! SSDSCOS Real Public Power of cosine in saturation integral 344 ! SSDSISO Int. Public Choice of definition of the isotropic 345 ! saturation 346 ! ---------------------------------------------------------------- 347 ! 348 ! The structure SNLP contains parameters for the nonl. inter. 349 ! source term and is aliased as above: 350 ! 351 ! Name Type Scope Description 352 ! ---------------------------------------------------------------- 353 ! (!/NL1) 354 ! SNLC1 Real Public Scaled proportionality constant. 355 ! LAM Real Public Factor defining quadruplet. 356 ! KDCON Real Public Conversion factor for relative depth. 357 ! KDMN Real Public Minimum relative depth. 358 ! SNLSn Real Public Constants in shallow water factor. 359 ! (!/NL2) 360 ! IQTPE Int. Public Type of depth treatment 361 ! 1 : Deep water 362 ! 2 : Deep water / WAM scaling 363 ! 3 : Finite water depth 364 ! NDPTHS Int. Public Number of depth for which integration 365 ! space needs to be computed. 366 ! NLTAIL Real Public Tail factor for parametric tail. 367 ! DPTHNL R.A. Public Depths corresponding to NDPTHS. 368 ! *** NOTE: This array is not allocated 369 ! in the W3DIMP routine *** 370 ! (!/NL3) 371 ! NFR Int. Public Number of frequencies or wavenumbers 372 ! in discrete spectral space (NFR=>NK). 373 ! NFRMIN Int. Public Minimum discrete frequency in the 374 ! expanded frequency space. 375 ! NFRMAX Int. Public Idem maximum for first part. 376 ! NFRCUT Int. Public Idem maximum for second part. 377 ! NTHMAX Int. Public Extension of directional space. 378 ! NTHEXP Int Public Number of bins in extended dir. space. 379 ! NSPMIN, NSPMAX, NSPMX2 380 ! Int. Public 1D spectral space range. 381 ! FRQ R.A. Public Expanded frequency range (Hz). 382 ! XSI R.A. Public Expanded frequency range (rad/s). 383 ! NQA Int. Public Number of actual quadruplets. 384 ! QST1 I.A. Public Spectral offsets for compuation of 385 ! quadruplet spectral desnities. 386 ! QST2 R.A. Public Idem weights. 387 ! QST3 R.A. Public Proportionality constants and k factors 388 ! in diagonal strength. 389 ! QST4 I.A. Public Spectral offsets for combining of 390 ! interactions and diagonal. 391 ! QST5 R.A. Public Idem weights for interactions. 392 ! QST6 R.A. Public Idem weights for diagonal. 393 ! SNLNQ Int. Public Number of quadruplet definitions. 394 ! SNLMSC Real Public Tuning power 'deep' scaling. 395 ! SNLNSC Real Public Tuning power 'shallow' scaling. 396 ! SNLSFD Real Public 'Deep' nondimensional filer freq. 397 ! SNLSFS Real Public 'Shallow' nondimensional filer freq. 398 ! SNLL R.A. Public Array with lambda for quadruplet. 399 ! SNLM R.A. Public Array with mu for quadruplet. Page 8 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 400 ! SNLT R.A. Public Array with Dtheta for quadruplet. 401 ! SNLCD R.A. Public Array with Cd for quadruplet. 402 ! SNLCS R.A. Public Array with Cs for quadruplet. 403 ! (!/NLS) 404 ! NTHX Int. Public Expanded discrete direction range. 405 ! NFRX Int. Public Expanded discrete frequency range. 406 ! NSPL-H Int. Public Range of 1D spectrum. 407 ! SNSST R.A. Public Array with interpolation weights. 408 ! CNLSA Real Public a34 in quadruplet definition. 409 ! CNLSC Real Public C in Snl definition. 410 ! CNLSFM Real Public Maximum relative spectral change. 411 ! CNLSC1/3 Real Public Constant in frequency filter. 412 ! ---------------------------------------------------------------- 413 ! 414 ! The structure SBTP contains parameters for the bottom friction 415 ! source term and is aliased as above: 416 ! 417 ! Name Type Scope Description 418 ! ---------------------------------------------------------------- 419 ! SBTC1 Real Public Proportionality constant. (!/BT1) 420 ! SBTCX R.A. Public Parameters for bottom fric. (!/BT4) 421 ! ---------------------------------------------------------------- 422 ! 423 ! The structure SDBP contains parameters for the depth incduced 424 ! breaking source term and is aliased as above: 425 ! 426 ! Name Type Scope Description 427 ! ---------------------------------------------------------------- 428 ! SDBC1 Real Public Proportionality constant. (!/DB1) 429 ! SDBC2 Real Public Hmax/d ratio. (!/DB1) 430 ! FDONLY Log. Public Flag for checking depth only (!/DB1) 431 ! otherwise Miche criterion. 432 ! ---------------------------------------------------------------- 433 ! 434 ! The structure STRP contains parameters for the triad interaction 435 ! source term and is aliased as above: 436 ! 437 ! Name Type Scope Description 438 ! ---------------------------------------------------------------- 439 ! ---------------------------------------------------------------- 440 ! 441 ! The structure SBSP contains parameters for the bottom scattering 442 ! source term and is aliased as above: 443 ! 444 ! Name Type Scope Description 445 ! ---------------------------------------------------------------- 446 ! ---------------------------------------------------------------- 447 ! 448 ! The structure SXXP contains parameters for arbitrary source 449 ! term and is aliased as above: 450 ! 451 ! Name Type Scope Description 452 ! ---------------------------------------------------------------- 453 ! ---------------------------------------------------------------- 454 ! 455 ! 3. Subroutines and functions : 456 ! Page 9 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 457 ! Name Type Scope Description 458 ! ---------------------------------------------------------------- 459 ! W3NMOD Subr. Public Set number of grids. 460 ! W3DIMX Subr. Public Set dimensions of spatial grid. 461 ! W3DIMS Subr. Public Set dimensions of spectral grid. 462 ! W3SETG Subr. Public Point to selected grid / model. 463 ! W3GNTX Subr. Public Construct grid arrays 464 ! ---------------------------------------------------------------- 465 ! 466 ! 4. Subroutines and functions used : 467 ! 468 ! Name Type Module Description 469 ! ---------------------------------------------------------------- 470 ! STRACE Subr. W3SERVMD Subroutine tracing. 471 ! EXTCDE Subr. W3SERVMD Abort program with exit code. 472 ! ---------------------------------------------------------------- 473 ! 474 ! 5. Remarks : 475 ! 476 ! - In model versions before 3.06 the parameters in the grid 477 ! structure were stored in the module W3IOGR. 478 ! - No subroutine DIMP is provided, instead, arrays are set 479 ! one-by-one in W3IOGR. 480 ! 481 ! 6. Switches : 482 ! 483 ! !/PRn Select propagation scheme 484 ! !/SMC UNO2 propagation on SMC grid. 485 ! 486 ! !/LNn Select source terms 487 ! !/STn 488 ! !/NLn 489 ! !/BTn 490 ! !/DBn 491 ! !/TRn 492 ! !/BSn 493 ! !/XXn 494 ! 495 ! !/S Enable subroutine tracing. 496 ! !/T Enable test output 497 ! 498 ! 7. Source code : 499 ! 500 !/ ------------------------------------------------------------------- / 501 !/ 502 !/ Required modules 503 !/ 504 USE W3GSRUMD 505 !/ 506 !/ Specify default accessibility 507 !/ 508 PUBLIC 509 !/ 510 !/ Conventional declarations 511 !/ 512 INTEGER :: NGRIDS = -1, IGRID = -1, ISGRD = -1, & 513 IPARS = -1, NAUXGR Page 10 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 514 ! 515 INTEGER, PARAMETER :: RLGTYPE = 1 516 INTEGER, PARAMETER :: CLGTYPE = 2 517 INTEGER, PARAMETER :: UNGTYPE = 3 518 519 INTEGER, PARAMETER :: ICLOSE_NONE = ICLO_NONE 520 INTEGER, PARAMETER :: ICLOSE_SMPL = ICLO_SMPL 521 INTEGER, PARAMETER :: ICLOSE_TRPL = ICLO_TRPL 522 523 LOGICAL :: FLAGLL 524 ! 525 ! Dimensions of tables for pre-computing of dissipation 526 ! 527 INTEGER, PARAMETER :: NKHS=2000, NKD=1300 528 INTEGER, PARAMETER :: NDTAB=2000 529 !/ 530 !/ Data structures 531 !/ 532 !/ Grid type 533 TYPE GRID ! this is the geographical grid with all associated parameters 534 INTEGER :: GTYPE 535 INTEGER :: ICLOSE 536 INTEGER :: NX, NY, NSEA, NSEAL, TRFLAG 537 INTEGER, POINTER :: MAPSTA(:,:), MAPST2(:,:), & 538 MAPFS(:,:), MAPSF(:,:) 539 ! 540 REAL :: SX, SY, X0, Y0, DTCFL, DTCFLI, & 541 DTMAX, DTMIN, DMIN, CTMAX, & 542 FICE0, FICEN, FICEL, PFMOVE 543 REAL(8) :: GRIDSHIFT ! see notes in WMGHGH 544 545 546 REAL , POINTER :: ZB(:) ! BOTTOM GRID, DEFINED ON ISEA 547 REAL , POINTER :: CLATS(:) ! COS(LAT), DEFINED ON SEA POINTS 548 REAL , POINTER :: CLATIS(:) ! INVERSE OF COS(LAT) DEFINED ON ISEA 549 REAL , POINTER :: CTHG0S(:) ! TAN(Y)/R, DEFINED ON ISEA 550 551 REAL , POINTER :: TRNX(:,:), TRNY(:,:) ! TRANSPARENCY INFORMATION ON IX,IY 552 REAL , POINTER :: XGRD(:,:), YGRD(:,:) ! X AND Y DEFINED ON IX,IY 553 REAL , POINTER :: DXDP(:,:), DXDQ(:,:) ! DX/DP & DX/DQ DEFINED ON IX,IY 554 REAL , POINTER :: DYDP(:,:), DYDQ(:,:) ! DY/DP & DY/DQ DEFINED ON IX,IY 555 REAL , POINTER :: DPDX(:,:), DPDY(:,:) ! DP/DX & DP/DY DEFINED ON IX,IY 556 REAL , POINTER :: DQDX(:,:), DQDY(:,:) ! DQ/DX & DQ/DY DEFINED ON IX,IY 557 REAL , POINTER :: GSQRT(:,:) ! SQRT(G) DEFINED ON IX,IY 558 REAL , POINTER :: HPFAC(:,:) ! H_P = SQRT(G_PP) DEFINED ON IX,IY 559 REAL , POINTER :: HQFAC(:,:) ! H_Q = SQRT(G_QQ) DEFINED ON IX,IY 560 561 LOGICAL :: GINIT, FLDRY, FLCX, FLCY, FLCTH, FLCK, FLSOU 562 LOGICAL, POINTER :: FLAGST(:) 563 CHARACTER(LEN=30):: GNAME 564 CHARACTER(LEN=10):: FILEXT 565 LOGICAL :: GUGINIT 566 REAL, POINTER :: REFLC(:,:) ! reflection coefficient 567 INTEGER, POINTER :: REFLD(:,:) ! reflection direction 568 INTEGER :: E3DF(3,5), P2MSF(3), US3DF(3) ! freq. indices for 3D output 569 ! 570 TYPE(T_GSU) :: GSU ! Grid search utility object Page 11 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 571 ! 572 LOGICAL :: FLICES ! flag for source terms in sea ice 573 REAL :: FFACBERG ! mutiplicative factor for iceberg mask 574 ! 575 ! unstructured data 576 ! 577 INTEGER :: NTRI 578 DOUBLE PRECISION, POINTER :: XYB(:,:) 579 INTEGER, POINTER :: TRIGP(:,:) 580 REAL, POINTER :: LEN(:,:),SI(:), IEN(:,:) 581 582 REAL :: MAXX, MAXY, DXYMAX 583 REAL, POINTER :: ANGLE(:,:),ANGLE0(:,:) 584 INTEGER :: COUNTRI,COUNTOT,NNZ 585 INTEGER, POINTER :: CCON(:), COUNTCON(:), IE_CELL(:), VNEIGH(:,:), & 586 POS_CELL(:), IOBP(:), IOBPD(:,:), & 587 IAA(:), JAA(:), POSI(:,:), INDEX_CELL(:) 588 REAL, POINTER :: TRIA(:) 589 REAL, POINTER :: CROSSDIFF(:,:) 590 END TYPE GRID 591 ! 592 TYPE SGRD ! this is the spectral grid with all parameters that vary with freq. and direction 593 INTEGER :: NK, NK2, NTH, NSPEC 594 INTEGER, POINTER :: MAPWN(:), MAPTH(:) 595 REAL :: DTH, XFR, FR1, FTE, FTF, FTWN, FTTR, & 596 FTWL, FACTI1, FACTI2, FACHFA, FACHFE 597 REAL, POINTER :: TH(:), ESIN(:), ECOS(:), ES2(:), & 598 ESC(:), EC2(:), SIG(:), SIG2(:), & 599 DSIP(:), DSII(:), DDEN(:), DDEN2(:) 600 LOGICAL :: SINIT 601 END TYPE SGRD 602 ! 603 TYPE NPAR 604 REAL :: FACP, XREL, XFLT, FXFM, FXPM, & 605 XFT, XFC, FACSD, FHMAX 606 END TYPE NPAR 607 ! 608 TYPE PROP 609 REAL :: WDCG, WDTH 610 END TYPE PROP 611 ! 612 TYPE SFLP 613 REAL :: DUMMY 614 END TYPE SFLP 615 ! 616 TYPE SLNP 617 REAL :: SLNC1, FSPM, FSHF 618 END TYPE SLNP 619 ! 620 TYPE SRCP 621 REAL :: WWNMEANPTAIL, SSTXFTFTAIL 622 ! 623 INTEGER :: SSWELLFPAR, SSDSISO, SSDSBRFDF 624 INTEGER, POINTER :: IKTAB(:,:), SATINDICES(:,:) 625 REAL, POINTER :: DCKI(:,:), SATWEIGHTS(:,:),CUMULW(:,:),QBI(:,:) 626 REAL :: AALPHA, BBETA, ZZ0MAX, ZZ0RAT, ZZALP,& 627 SSINTHP, TTAUWSHELTER, SSWELLF(1:7), & Page 12 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 628 SSDSC(1:7), SSDSBR, & 629 SSDSP, WWNMEANP, SSTXFTF, SSTXFTWN, & 630 FFXPM, FFXFM, SSDSBRF1, SSDSBRF2, & 631 SSDSBINT,SSDSBCK,SSDSHCK, SSDSABK, & 632 SSDSPBK 633 REAL :: ZZWND 634 REAL :: SSDSCOS, SSDSDTH, SSDSBR2, SSDSBM(0:4) 635 ! 636 END TYPE SRCP 637 ! 638 TYPE SNLP 639 REAL :: SNLC1, LAM, KDCON, KDMN, & 640 SNLS1, SNLS2, SNLS3 641 642 END TYPE SNLP 643 ! 644 TYPE SBTP 645 REAL :: SBTC1 646 END TYPE SBTP 647 ! 648 TYPE SDBP 649 REAL :: SDBC1, SDBC2 650 LOGICAL :: FDONLY 651 END TYPE SDBP 652 ! 653 TYPE STRP 654 REAL :: DUMMY 655 END TYPE STRP 656 ! 657 TYPE SBSP 658 REAL :: DUMMY 659 END TYPE SBSP 660 ! 661 TYPE SXXP 662 REAL :: DUMMY 663 END TYPE SXXP 664 665 ! specific type for unstructured scheme 666 TYPE SCHM 667 LOGICAL :: FSN,FSPSI,FSFCT,FSNIMP 668 END TYPE SCHM 669 ! 670 TYPE MPAR 671 LOGICAL :: PINIT 672 TYPE(NPAR) :: NPARS 673 TYPE(PROP) :: PROPS 674 TYPE(SFLP) :: SFLPS 675 TYPE(SLNP) :: SLNPS 676 TYPE(SRCP) :: SRCPS 677 TYPE(SNLP) :: SNLPS 678 TYPE(SBTP) :: SBTPS 679 TYPE(SDBP) :: SDBPS 680 TYPE(STRP) :: STRPS 681 TYPE(SBSP) :: SBSPS 682 TYPE(SXXP) :: SXXPS 683 TYPE(SCHM) :: SCHMS 684 END TYPE MPAR Page 13 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 685 !/ 686 !/ Data storage 687 !/ 688 TYPE(GRID), TARGET, ALLOCATABLE :: GRIDS(:) 689 TYPE(SGRD), TARGET, ALLOCATABLE :: SGRDS(:) 690 TYPE(MPAR), TARGET, ALLOCATABLE :: MPARS(:) 691 !/ 692 !/ Data aliasses for structure GRID(S) 693 !/ 694 INTEGER, POINTER :: GTYPE 695 INTEGER, POINTER :: ICLOSE 696 INTEGER, POINTER :: NX, NY, NSEA, NSEAL, TRFLAG 697 INTEGER, POINTER :: E3DF(:,:), P2MSF(:), US3DF(:) 698 REAL, POINTER :: REFLC(:,:) 699 INTEGER, POINTER :: REFLD(:,:) 700 ! 701 ! Variables for unstructured grids 702 ! 703 INTEGER, POINTER :: NTRI,COUNTRI,COUNTOT,NNZ 704 ! XYB may not be necessary now that we have XGRD and YGRD 705 ! but these XGRD and YGRD should probably be double precision 706 DOUBLE PRECISION, POINTER :: XYB(:,:) 707 INTEGER, POINTER :: TRIGP(:,:) 708 REAL, POINTER :: IEN(:,:), LEN(:,:), SI(:) 709 REAL, POINTER :: ANGLE(:,:),ANGLE0(:,:) 710 INTEGER, POINTER :: CCON(:), COUNTCON(:), IE_CELL(:), & 711 POS_CELL(:), IOBP(:), IOBPD(:,:), & 712 IAA(:), JAA(:), POSI(:,:), & 713 VNEIGH(:,:), INDEX_CELL(:) 714 REAL, POINTER :: TRIA(:) 715 REAL, POINTER :: CROSSDIFF(:,:) 716 REAL,POINTER :: MAXX, MAXY, DXYMAX 717 LOGICAL, POINTER :: GUGINIT 718 ! 719 LOGICAL, POINTER :: FLICES 720 REAL, POINTER :: FFACBERG 721 REAL, POINTER :: REFPARS(:) 722 INTEGER, POINTER :: MAPSTA(:,:), MAPST2(:,:), & 723 MAPFS(:,:), MAPSF(:,:) 724 ! 725 REAL, POINTER :: SX, SY, X0, Y0, DTCFL, DTCFLI, & 726 DTMAX, DTMIN, DMIN, CTMAX, & 727 FICE0, FICEN, FICEL, PFMOVE 728 REAL(8),POINTER :: GRIDSHIFT ! see notes in WMGHGH 729 REAL, POINTER :: ZB(:), CLATS(:) 730 REAL , POINTER :: CLATIS(:) ! INVERSE OF COS(LAT) DEFINED ON ISEA 731 REAL , POINTER :: CTHG0S(:) ! TAN(Y)/R, DEFINED ON ISEA 732 733 REAL , POINTER :: TRNX(:,:), TRNY(:,:) ! TRANSPARENCY INFORMATION ON IX,IY 734 REAL , POINTER :: XGRD(:,:), YGRD(:,:) ! X AND Y DEFINED ON IX,IY 735 REAL , POINTER :: DXDP(:,:), DXDQ(:,:) ! DX/DP & DX/DQ DEFINED ON IX,IY 736 REAL , POINTER :: DYDP(:,:), DYDQ(:,:) ! DY/DP & DY/DQ DEFINED ON IX,IY 737 REAL , POINTER :: DPDX(:,:), DPDY(:,:) ! DP/DX & DP/DY DEFINED ON IX,IY 738 REAL , POINTER :: DQDX(:,:), DQDY(:,:) ! DQ/DX & DQ/DY DEFINED ON IX,IY 739 REAL , POINTER :: GSQRT(:,:) ! SQRT(G) DEFINED ON IX,IY 740 REAL , POINTER :: HPFAC(:,:) ! H_P = SQRT(G_PP) DEFINED ON IX,IY 741 REAL , POINTER :: HQFAC(:,:) ! H_Q = SQRT(G_QQ) DEFINED ON IX,IY Page 14 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 742 743 LOGICAL, POINTER :: GINIT, FLDRY, FLCX, FLCY, FLCTH, FLCK, FLSOU 744 LOGICAL, POINTER :: FLAGST(:) 745 746 CHARACTER(LEN=30), POINTER :: GNAME 747 CHARACTER(LEN=10), POINTER :: FILEXT 748 749 TYPE(T_GSU), POINTER :: GSU ! Grid search utility object 750 !/ 751 !/ Data aliasses for structure SGRD(S) 752 !/ 753 INTEGER, POINTER :: NK, NK2, NTH, NSPEC 754 INTEGER, POINTER :: MAPWN(:), MAPTH(:) 755 REAL, POINTER :: DTH, XFR, FR1, FTE, FTF, FTWN, FTTR, & 756 FTWL, FACTI1, FACTI2, FACHFA, FACHFE 757 REAL, POINTER :: TH(:), ESIN(:), ECOS(:), ES2(:), & 758 ESC(:), EC2(:), SIG(:), SIG2(:), & 759 DSIP(:), DSII(:), DDEN(:), DDEN2(:) 760 LOGICAL, POINTER :: SINIT 761 !/ 762 !/ Data aliasses for structure MPAR(S) 763 !/ 764 LOGICAL, POINTER :: PINIT 765 !/ 766 !/ Data aliasses for structure NPAR(S) 767 !/ 768 REAL, POINTER :: FACP, XREL, XFLT, FXFM, FXPM, & 769 XFT, XFC, FACSD, FHMAX 770 !/ 771 !/ Data aliasses for structure PROP(S) 772 !/ 773 REAL, POINTER :: WDCG, WDTH 774 !/ 775 !/ Data aliasses for structure SFLP(S) 776 !/ 777 !/ 778 !/ Data aliasses for structure SLNP(S) 779 !/ 780 REAL, POINTER :: SLNC1, FSPM, FSHF 781 !/ 782 !/ Data aliasses for structure SRCP(S) 783 !/ 784 INTEGER, POINTER :: SSWELLFPAR, SSDSISO,SSDSBRFDF, & 785 IKTAB(:,:), SATINDICES(:,:) 786 REAL, POINTER :: DCKI(:,:), SATWEIGHTS(:,:),CUMULW(:,:),QBI(:,:) 787 REAL, POINTER :: ZZWND, AALPHA, BBETA, ZZ0MAX, ZZ0RAT, ZZALP, & 788 FFXFM, FFXPM,SSDSBRF1, SSDSBRF2, & 789 SSDSBINT, SSDSBCK, SSDSHCK, SSDSABK, SSDSPBK, & 790 SSINTHP, TTAUWSHELTER, SSWELLF(:), & 791 SSDSC(:), SSDSBR, & 792 SSDSP, WWNMEANP, SSTXFTF, SSTXFTWN, & 793 SSDSBR2, SSDSCOS, SSDSDTH, SSDSBM(:) 794 REAL, POINTER :: WWNMEANPTAIL, SSTXFTFTAIL 795 !/ 796 !/ Data aliasses for structure SNLP(S) 797 !/ 798 REAL, POINTER :: SNLC1, LAM, KDCON, KDMN, & Page 15 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 799 SNLS1, SNLS2, SNLS3 800 !/ 801 !/ Data aliasses for structure SBTP(S) 802 !/ 803 REAL, POINTER :: SBTC1 804 !/ 805 !/ Data aliasses for structure SDBP(S) 806 !/ 807 REAL, POINTER :: SDBC1, SDBC2 808 LOGICAL, POINTER :: FDONLY 809 !/ 810 !/ Data aliasing for structure SCHM(S) 811 LOGICAL, POINTER :: FSN,FSPSI,FSFCT,FSNIMP 812 !/ 813 CONTAINS 814 !/ ------------------------------------------------------------------- / 815 SUBROUTINE W3NMOD ( NUMBER, NDSE, NDST, NAUX ) 816 !/ 817 !/ +-----------------------------------+ 818 !/ | WAVEWATCH III NOAA/NCEP | 819 !/ | H. L. Tolman | 820 !/ | FORTRAN 90 | 821 !/ | Last update : 18-Jul-2006 ! 822 !/ +-----------------------------------+ 823 !/ 824 !/ 24-Feb-2004 : Origination. ( version 3.06 ) 825 !/ 18-Jul-2006 : Add input grids. ( version 3.10 ) 826 !/ 827 ! 1. Purpose : 828 ! 829 ! Set up the number of grids to be used. 830 ! 831 ! 2. Method : 832 ! 833 ! Store in NGRIDS and allocate GRIDS. 834 ! 835 ! 3. Parameters : 836 ! 837 ! Parameter list 838 ! ---------------------------------------------------------------- 839 ! NUMBER Int. I Number of grids to be used. 840 ! NDSE Int. I Error output unit number. 841 ! NDST Int. I Test output unit number. 842 ! NAUX Int. I Number of auxiliary grids to be used. 843 ! Grids -NAUX:NUBMER are defined, optional 844 ! parameters. 845 ! ---------------------------------------------------------------- 846 ! 847 ! 4. Subroutines used : 848 ! 849 ! See module documentation. 850 ! 851 ! 5. Called by : 852 ! 853 ! Any program that uses this grid structure. 854 ! 855 ! 6. Error messages : Page 16 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 856 ! 857 ! - Error checks on previous setting of variable. 858 ! 859 ! 7. Remarks : 860 ! 861 ! 8. Structure : 862 ! 863 ! 9. Switches : 864 ! 865 ! !/S Enable subroutine tracing. 866 ! !/T Enable test output 867 ! 868 ! 10. Source code : 869 ! 870 !/ ------------------------------------------------------------------- / 871 USE W3SERVMD, ONLY: EXTCDE 872 ! 873 IMPLICIT NONE 874 !/ 875 !/ ------------------------------------------------------------------- / 876 !/ Parameter list 877 !/ 878 INTEGER, INTENT(IN) :: NUMBER, NDSE, NDST 879 INTEGER, INTENT(IN), OPTIONAL :: NAUX 880 !/ 881 !/ ------------------------------------------------------------------- / 882 !/ Local parameters 883 !/ 884 INTEGER :: I, NLOW 885 !/ 886 ! 887 ! -------------------------------------------------------------------- / 888 ! 1. Test input and module status 889 ! 890 IF ( NGRIDS .NE. -1 ) THEN 891 WRITE (NDSE,1001) NGRIDS 892 CALL EXTCDE (1) 893 END IF 894 ! 895 IF ( NUMBER .LT. 1 ) THEN 896 WRITE (NDSE,1002) NUMBER 897 CALL EXTCDE (2) 898 END IF 899 ! 900 IF ( PRESENT(NAUX) ) THEN 901 NLOW = -NAUX 902 ELSE 903 NLOW = 1 904 END IF 905 ! 906 IF ( NLOW .GT. 1 ) THEN 907 WRITE (NDSE,1003) -NLOW 908 CALL EXTCDE (3) 909 END IF 910 ! 911 ! -------------------------------------------------------------------- / 912 ! 1. Set variable and allocate arrays Page 17 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 913 ! 914 NGRIDS = NUMBER 915 NAUXGR = - NLOW 916 ALLOCATE ( GRIDS(NLOW:NUMBER) ) 917 ALLOCATE ( SGRDS(NLOW:NUMBER) ) 918 ALLOCATE ( MPARS(NLOW:NUMBER) ) 919 ! 920 ! -------------------------------------------------------------------- / 921 ! 2. Initialize GINIT adn SINIT 922 ! 923 DO I=NLOW, NUMBER 924 GRIDS(I)%GINIT = .FALSE. 925 GRIDS(I)%GUGINIT = .FALSE. 926 SGRDS(I)%SINIT = .FALSE. 927 MPARS(I)%PINIT = .FALSE. 928 END DO 929 ! 930 RETURN 931 ! 932 ! Formats 933 ! 934 1001 FORMAT (/' *** ERROR W3NMOD : GRIDS ALREADY INITIALIZED *** '/ & 935 ' NGRIDS = ',I10/) 936 1002 FORMAT (/' *** ERROR W3NMOD : ILLEGAL NUMBER OF GRIDS *** '/ & 937 ' NUMBER = ',I10/) 938 1003 FORMAT (/' *** ERROR W3NMOD : ILLEGAL NUMBER OF AUX GRIDS *** '/& 939 ' NUMBER = ',I10/) 940 ! 941 !/ 942 !/ End of W3NMOD ----------------------------------------------------- / 943 !/ 944 END SUBROUTINE W3NMOD Page 18 Source Listing W3NMOD 2014-09-16 16:59 Entry Points w3gdatmd.f90 ENTRY POINTS Name w3gdatmd_mp_w3nmod_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References 1001 Label 934 891 1002 Label 936 896 1003 Label 938 907 EXTCDE Subr 871 871,892,897,908 GINIT Local 924 L(4) 4 scalar TGT 924,1056,1092,1453 GRIDS Local 916 RECORD 4376 1 1 ALC,TGT 916,924,925,1056,1066,1067,1068,10 69,1070,1071,1072,1073,1074,1075,1 076,1077,1078,1079,1080,1081,1082, 1083,1084,1085,1086,1087,1088,1089 ,1091,1092,1093,1094,1099,1100,110 1,1420,1421,1423,1424,1425,1426,14 27,1429,1430,1431,1432,1433,1434,1 435,1436,1437,1438,1439,1441,1442, 1443,1444,1445,1446,1447,1448,1449 ,1450,1451,1453,1454,1455,1456,145 7,1458,1459,1460,1462,1463,1464,14 65,1466,1467,1468,1469,1470,1471,1 472,1473,1474,1475,1476,1477,1478, 1479,1480,1481,1482,1483,1484,1485 ,1486,1487,1488,1489,1490,1495,149 6,1497,1498,1499,1501,1502,1503,15 04,1505,1506,1508,1509,1510,1511,1 512,1513,1514,1515,1516,1517,1518, 1519,1520,1522,1784,1785,1786,1938 ,2089,2097,2098,2099,2100,2101,210 2,2103,2104,2105,2106,2107,2108,21 09,2110,2111,2112,2113,2114,2115,2 116 GUGINIT Local 925 L(4) 4 scalar TGT 925,1454,2089 I Local 884 I(4) 4 scalar 923,924,925,926,927 MPARS Local 918 RECORD 912 1 1 ALC,TGT 918,927,1257,1258,1259,1261,1262,1 263,1572,1576,1577,1578,1579,1580, 1581,1582,1583,1584,1588,1589,1595 ,1596,1597,1601,1602,1604,1605,160 6,1607,1608,1609,1610,1611,1612,16 13,1614,1615,1616,1617,1618,1619,1 620,1621,1622,1623,1624,1625,1626, 1627,1628,1629,1630,1631,1632,1633 ,1634,1635,1636,1637,1638,1639,164 0,1644,1645,1646,1647,1648,1649,16 50,1654,1658,1659,1660,1662,1663,1 664,1665 NAUX Dummy 815 I(4) 4 scalar ARG,IN 900,901 NAUXGR Local 915 I(4) 4 scalar 915,1046,1047,1222,1223,1405,1406, Page 19 Source Listing W3NMOD 2014-09-16 16:59 Symbol Table w3gdatmd.f90 Name Object Declared Type Bytes Dimen Elements Attributes References 1776,1777 NDSE Dummy 815 I(4) 4 scalar ARG,IN 891,896,907 NDST Dummy 815 I(4) 4 scalar ARG,IN NGRIDS Local 890 I(4) 4 scalar 512,890,891,914,1041,1046,1047,121 7,1222,1223,1400,1405,1406,1771,17 76,1777,2080,2085,2086 NLOW Local 884 I(4) 4 scalar 901,903,906,907,915,916,917,918,92 3 NUMBER Dummy 815 I(4) 4 scalar ARG,IN 895,896,914,916,917,918,923 PINIT Local 927 L(4) 4 scalar TGT 927,1572 PRESENT Func 900 scalar 900 SGRDS Local 917 RECORD 1080 1 1 ALC,TGT 917,926,1232,1243,1244,1245,1246,1 247,1248,1249,1250,1251,1252,1253, 1254,1255,1256,1265,1529,1530,1531 ,1532,1534,1535,1536,1537,1538,153 9,1540,1541,1542,1543,1544,1545,15 47,1551,1552,1554,1555,1556,1557,1 558,1559,1560,1561,1562,1563,1564, 1565 SINIT Local 926 L(4) 4 scalar TGT 926,1232,1265,1547 W3NMOD Subr 815 W3SERVMD Module 871 871 Page 20 Source Listing W3NMOD 2014-09-16 16:59 w3gdatmd.f90 945 !/ ------------------------------------------------------------------- / 946 SUBROUTINE W3DIMX ( IMOD, MX, MY, MSEA, NDSE, NDST & 947 ) 948 !/ 949 !/ +-----------------------------------+ 950 !/ | WAVEWATCH III NOAA/NCEP | 951 !/ | H. L. Tolman | 952 !/ | FORTRAN 90 | 953 !/ | Last update : 03-Sep-2012 | 954 !/ +-----------------------------------+ 955 !/ 956 !/ 24-Jun-2005 : Origination. ( version 3.07 ) 957 !/ 18-Jul-2006 : Add input grids. ( version 3.10 ) 958 !/ 05-Oct-2006 : Add filter to array pointers. ( version 3.10 ) 959 !/ 02-Feb-2007 : Add FLAGST. ( version 3.10 ) 960 !/ 30-Oct-2009 : Implement run-time grid selection. ( version 3.14 ) 961 !/ (W. E. Rogers & T. J. Campbell, NRL) 962 !/ 30-Oct-2009 : Implement curvilinear grid type. ( version 3.14 ) 963 !/ (W. E. Rogers & T. J. Campbell, NRL) 964 !/ 30-Oct-2009 : Implement unstructured grids ( version 3.14.1) 965 !/ 03-Sep-2012 : Clean up of UG grids ( version 4.08 ) 966 !/ 967 ! 1. Purpose : 968 ! 969 ! Initialize an individual spatial grid at the proper dimensions. 970 ! 971 ! 2. Method : 972 ! 973 ! Allocate directly into the structure array GRIDS. Note that 974 ! this cannot be done through the pointer alias! 975 ! 976 ! 3. Parameters : 977 ! 978 ! Parameter list 979 ! ---------------------------------------------------------------- 980 ! IMOD Int. I Model number to point to. 981 ! NDSE Int. I Error output unit number. 982 ! NDST Int. I Test output unit number. 983 ! MX, MY, MSEA Like NX, NY, NSEA in data structure. 984 ! ---------------------------------------------------------------- 985 ! 986 ! 4. Subroutines used : 987 ! 988 ! See module documentation. 989 ! 990 ! 5. Called by : 991 ! 992 ! Name Type Module Description 993 ! ---------------------------------------------------------------- 994 ! W3IOGR Subr. W3IOGRMD Model definition file IO program. 995 ! WW3_GRID Prog. N/A Model set up program. 996 ! ---------------------------------------------------------------- 997 ! 998 ! 6. Error messages : 999 ! 1000 ! - Check on input parameters. 1001 ! - Check on previous allocation. Page 21 Source Listing W3DIMX 2014-09-16 16:59 w3gdatmd.f90 1002 ! 1003 ! 7. Remarks : 1004 ! 1005 ! - Grid dimensions apre passed through parameter list and then 1006 ! locally stored to assure consistency between allocation and 1007 ! data in structure. 1008 ! - W3SETG needs to be called after allocation to point to 1009 ! proper allocated arrays. 1010 ! 1011 ! 8. Structure : 1012 ! 1013 ! See source code. 1014 ! 1015 ! 9. Switches : 1016 ! 1017 ! !/S Enable subroutine tracing. 1018 ! !/T Enable test output 1019 ! 1020 ! 10. Source code : 1021 ! 1022 !/ ------------------------------------------------------------------- / 1023 USE W3SERVMD, ONLY: EXTCDE 1024 ! 1025 IMPLICIT NONE 1026 ! 1027 !/ 1028 !/ ------------------------------------------------------------------- / 1029 !/ Parameter list 1030 !/ 1031 INTEGER, INTENT(IN) :: IMOD, MX, MY, MSEA, NDSE, NDST 1032 !/ 1033 !/ ------------------------------------------------------------------- / 1034 !/ Local parameters 1035 !/ 1036 !/ 1037 ! 1038 ! -------------------------------------------------------------------- / 1039 ! 1. Test input and module status 1040 ! 1041 IF ( NGRIDS .EQ. -1 ) THEN 1042 WRITE (NDSE,1001) 1043 CALL EXTCDE (1) 1044 END IF 1045 ! 1046 IF ( IMOD.LT.-NAUXGR .OR. IMOD.GT.NGRIDS ) THEN 1047 WRITE (NDSE,1002) IMOD, -NAUXGR, NGRIDS 1048 CALL EXTCDE (2) 1049 END IF 1050 ! 1051 IF ( MX.LT.3 .OR. (MY.LT.3.AND.GTYPE.NE.UNGTYPE) .OR. MSEA.LT.1 ) THEN 1052 WRITE (NDSE,1003) MX, MY, MSEA, GTYPE 1053 CALL EXTCDE (3) 1054 END IF 1055 ! 1056 IF ( GRIDS(IMOD)%GINIT ) THEN 1057 WRITE (NDSE,1004) 1058 CALL EXTCDE (4) Page 22 Source Listing W3DIMX 2014-09-16 16:59 w3gdatmd.f90 1059 END IF 1060 ! 1061 ! -------------------------------------------------------------------- / 1062 ! 2. Allocate arrays 1063 ! 1064 ! NB: Some array start at 0 becase MAPFS(IY,IX)=0 for missing points 1065 ! 1066 ALLOCATE ( GRIDS(IMOD)%MAPSTA(MY,MX), & 1067 GRIDS(IMOD)%MAPST2(MY,MX), & 1068 GRIDS(IMOD)%MAPFS(MY,MX), & 1069 GRIDS(IMOD)%MAPSF(MSEA,3), & 1070 GRIDS(IMOD)%FLAGST(MSEA), & 1071 GRIDS(IMOD)%ZB(MSEA), & 1072 GRIDS(IMOD)%CLATS(0:MSEA), & 1073 GRIDS(IMOD)%CLATIS(0:MSEA), & 1074 GRIDS(IMOD)%CTHG0S(0:MSEA), & 1075 GRIDS(IMOD)%TRNX(MY,MX), & 1076 GRIDS(IMOD)%TRNY(MY,MX), & 1077 GRIDS(IMOD)%XGRD(MY,MX), & 1078 GRIDS(IMOD)%YGRD(MY,MX), & 1079 GRIDS(IMOD)%DXDP(MY,MX), & 1080 GRIDS(IMOD)%DXDQ(MY,MX), & 1081 GRIDS(IMOD)%DYDP(MY,MX), & 1082 GRIDS(IMOD)%DYDQ(MY,MX), & 1083 GRIDS(IMOD)%DPDX(MY,MX), & 1084 GRIDS(IMOD)%DPDY(MY,MX), & 1085 GRIDS(IMOD)%DQDX(MY,MX), & 1086 GRIDS(IMOD)%DQDY(MY,MX), & 1087 GRIDS(IMOD)%GSQRT(MY,MX), & 1088 GRIDS(IMOD)%HPFAC(MY,MX), & 1089 GRIDS(IMOD)%HQFAC(MY,MX) ) 1090 ! 1091 GRIDS(IMOD)%FLAGST = .TRUE. 1092 GRIDS(IMOD)%GINIT = .TRUE. 1093 GRIDS(IMOD)%CLATS(0)=1. 1094 GRIDS(IMOD)%CLATIS(0)=1. 1095 ! 1096 ! -------------------------------------------------------------------- / 1097 ! 2. Update counters in grid 1098 ! 1099 GRIDS(IMOD)%NX = MX 1100 GRIDS(IMOD)%NY = MY 1101 GRIDS(IMOD)%NSEA = MSEA 1102 ! 1103 ! -------------------------------------------------------------------- / 1104 ! 3. Point to allocated arrays 1105 ! 1106 CALL W3SETG ( IMOD, NDSE, NDST ) 1107 ! 1108 RETURN 1109 ! 1110 ! Formats 1111 ! 1112 1001 FORMAT (/' *** ERROR W3DIMX : GRIDS NOT INITIALIZED *** '/ & 1113 ' RUN W3NMOD FIRST '/) 1114 1002 FORMAT (/' *** ERROR W3DIMX : ILLEGAL MODEL NUMBER *** '/ & 1115 ' IMOD = ',I10/ & Page 23 Source Listing W3DIMX 2014-09-16 16:59 w3gdatmd.f90 1116 ' NAUXGR = ',I10/ & 1117 ' NGRIDS = ',I10/) 1118 1003 FORMAT (/' *** ERROR W3DIMX : ILLEGAL GRID DIMENSION(S) *** '/ & 1119 ' INPUT = ',4I10 /) 1120 1004 FORMAT (/' *** ERROR W3DIMX : ARRAY(S) ALREADY ALLOCATED *** ') 1121 ! 1122 !/ 1123 !/ End of W3DIMX ----------------------------------------------------- / 1124 !/ 1125 END SUBROUTINE W3DIMX ENTRY POINTS Name w3gdatmd_mp_w3dimx_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References 1001 Label 1112 1042 1002 Label 1114 1047 1003 Label 1118 1052 1004 Label 1120 1057 CLATIS Local 1073 R(4) 4 1 1 PTR 1073,1094,1503 CLATS Local 1072 R(4) 4 1 1 PTR 1072,1093,1502 CTHG0S Local 1074 R(4) 4 1 1 PTR 1074,1504 DPDX Local 1083 R(4) 4 2 1 PTR 1083,1514 DPDY Local 1084 R(4) 4 2 1 PTR 1084,1515 DQDX Local 1085 R(4) 4 2 1 PTR 1085,1516 DQDY Local 1086 R(4) 4 2 1 PTR 1086,1517 DXDP Local 1079 R(4) 4 2 1 PTR 1079,1510 DXDQ Local 1080 R(4) 4 2 1 PTR 1080,1511 DYDP Local 1081 R(4) 4 2 1 PTR 1081,1512 DYDQ Local 1082 R(4) 4 2 1 PTR 1082,1513 EXTCDE Subr 1023 1023,1043,1048,1053,1058 FLAGST Local 1070 L(4) 4 1 1 PTR 1070,1091,1499 GSQRT Local 1087 R(4) 4 2 1 PTR 1087,1518 GTYPE Local 1051 I(4) 4 scalar PTR 1051,1052,1420 HPFAC Local 1088 R(4) 4 2 1 PTR 1088,1519 HQFAC Local 1089 R(4) 4 2 1 PTR 1089,1520 IMOD Dummy 946 I(4) 4 scalar ARG,IN 1046,1047,1056,1066,1067,1068,1069 ,1070,1071,1072,1073,1074,1075,107 6,1077,1078,1079,1080,1081,1082,10 83,1084,1085,1086,1087,1088,1089,1 091,1092,1093,1094,1099,1100,1101, 1106 MAPFS Local 1068 I(4) 4 2 1 PTR 1068,1497 MAPSF Local 1069 I(4) 4 2 1 PTR 1069,1498 MAPST2 Local 1067 I(4) 4 2 1 PTR 1067,1496 MAPSTA Local 1066 I(4) 4 2 1 PTR 1066,1495 MSEA Dummy 946 I(4) 4 scalar ARG,IN 1051,1052,1069,1070,1071,1072,1073 ,1074,1101 MX Dummy 946 I(4) 4 scalar ARG,IN 1051,1052,1066,1067,1068,1075,1076 Page 24 Source Listing W3DIMX 2014-09-16 16:59 Symbol Table w3gdatmd.f90 Name Object Declared Type Bytes Dimen Elements Attributes References ,1077,1078,1079,1080,1081,1082,108 3,1084,1085,1086,1087,1088,1089,10 99 MY Dummy 946 I(4) 4 scalar ARG,IN 1051,1052,1066,1067,1068,1075,1076 ,1077,1078,1079,1080,1081,1082,108 3,1084,1085,1086,1087,1088,1089,11 00 NDSE Dummy 946 I(4) 4 scalar ARG,IN 1042,1047,1052,1057,1106 NDST Dummy 946 I(4) 4 scalar ARG,IN 1106 NSEA Local 1101 I(4) 4 scalar TGT 1101,1425 NX Local 1099 I(4) 4 scalar TGT 1099,1423,1785 NY Local 1100 I(4) 4 scalar TGT 1100,1424,1785 TRNX Local 1075 R(4) 4 2 1 PTR 1075,1505 TRNY Local 1076 R(4) 4 2 1 PTR 1076,1506 UNGTYPE Param 1051 I(4) 4 scalar 1051 W3DIMX Subr 946 W3SERVMD Module 1023 1023 XGRD Local 1077 R(4) 4 2 1 PTR 1077,1508,1786 YGRD Local 1078 R(4) 4 2 1 PTR 1078,1509,1786 ZB Local 1071 R(4) 4 1 1 PTR 1071,1501 Page 25 Source Listing W3DIMX 2014-09-16 16:59 w3gdatmd.f90 1126 !/ ------------------------------------------------------------------- / 1127 SUBROUTINE W3DIMS ( IMOD, MK, MTH, NDSE, NDST ) 1128 !/ 1129 !/ +-----------------------------------+ 1130 !/ | WAVEWATCH III NOAA/NCEP | 1131 !/ | H. L. Tolman | 1132 !/ | FORTRAN 90 | 1133 !/ | Last update : 05-Oct-2006 ! 1134 !/ +-----------------------------------+ 1135 !/ 1136 !/ 19-Feb-2004 : Origination. ( version 3.06 ) 1137 !/ 18-Jul-2006 : Add input grids. ( version 3.10 ) 1138 !/ 05-Oct-2006 : Add filter to array pointers. ( version 3.10 ) 1139 !/ 1140 ! 1. Purpose : 1141 ! 1142 ! Initialize an individual spatial grid at the proper dimensions. 1143 ! 1144 ! 2. Method : 1145 ! 1146 ! Allocate directly into the structure array GRIDS. Note that 1147 ! this cannot be done through the pointer alias! 1148 ! 1149 ! 3. Parameters : 1150 ! 1151 ! Parameter list 1152 ! ---------------------------------------------------------------- 1153 ! IMOD Int. I Model number to point to. 1154 ! NDSE Int. I Error output unit number. 1155 ! MK,MTH Int. I Spectral dimensions. 1156 ! NDST Int. I Test output unit number. 1157 ! ---------------------------------------------------------------- 1158 ! 1159 ! 4. Subroutines used : 1160 ! 1161 ! See module documentation. 1162 ! 1163 ! 5. Called by : 1164 ! 1165 ! Name Type Module Description 1166 ! ---------------------------------------------------------------- 1167 ! W3IOGR Subr. W3IOGRMD Model definition file IO program. 1168 ! WW3_GRID Prog. N/A Model set up program. 1169 ! ---------------------------------------------------------------- 1170 ! 1171 ! 6. Error messages : 1172 ! 1173 ! - Check on input parameters. 1174 ! - Check on previous allocation. 1175 ! 1176 ! 7. Remarks : 1177 ! 1178 ! - Grid dimensions apre passed through parameter list and then 1179 ! locally stored to assure consistency between allocation and 1180 ! data in structure. 1181 ! - W3SETG needs to be called after allocation to point to 1182 ! proper allocated arrays. Page 26 Source Listing W3DIMS 2014-09-16 16:59 w3gdatmd.f90 1183 ! 1184 ! 8. Structure : 1185 ! 1186 ! See source code. 1187 ! 1188 ! 9. Switches : 1189 ! 1190 ! !/S Enable subroutine tracing. 1191 ! !/T Enable test output 1192 ! 1193 ! 10. Source code : 1194 ! 1195 !/ ------------------------------------------------------------------- / 1196 USE W3SERVMD, ONLY: EXTCDE 1197 USE CONSTANTS, ONLY: RADE 1198 ! 1199 IMPLICIT NONE 1200 ! 1201 !/ 1202 !/ ------------------------------------------------------------------- / 1203 !/ Parameter list 1204 !/ 1205 INTEGER, INTENT(IN) :: IMOD, MK, MTH, NDSE, NDST 1206 !/ 1207 !/ ------------------------------------------------------------------- / 1208 !/ Local parameters 1209 !/ 1210 INTEGER, SAVE :: MK2, MSPEC 1211 INTEGER :: SDSNTH 1212 !/ 1213 ! 1214 ! -------------------------------------------------------------------- / 1215 ! 1. Test input and module status 1216 ! 1217 IF ( NGRIDS .EQ. -1 ) THEN 1218 WRITE (NDSE,1001) 1219 CALL EXTCDE (1) 1220 END IF 1221 ! 1222 IF ( IMOD.LT.-NAUXGR .OR. IMOD.GT.NGRIDS ) THEN 1223 WRITE (NDSE,1002) IMOD, -NAUXGR, NGRIDS 1224 CALL EXTCDE (2) 1225 END IF 1226 ! 1227 IF ( MK.LT.3 .OR. MTH.LT.4 ) THEN 1228 WRITE (NDSE,1003) MK, MTH 1229 CALL EXTCDE (3) 1230 END IF 1231 ! 1232 IF ( SGRDS(IMOD)%SINIT ) THEN 1233 WRITE (NDSE,1004) 1234 CALL EXTCDE (4) 1235 END IF 1236 ! 1237 MK2 = MK + 2 1238 MSPEC = MK * MTH 1239 ! Page 27 Source Listing W3DIMS 2014-09-16 16:59 w3gdatmd.f90 1240 ! -------------------------------------------------------------------- / 1241 ! 2. Allocate arrays 1242 ! 1243 ALLOCATE ( SGRDS(IMOD)%MAPWN(MSPEC+MTH), & 1244 SGRDS(IMOD)%MAPTH(MSPEC+MTH), & 1245 SGRDS(IMOD)%TH(MTH), & 1246 SGRDS(IMOD)%ESIN(MSPEC+MTH), & 1247 SGRDS(IMOD)%ECOS(MSPEC+MTH), & 1248 SGRDS(IMOD)%ES2(MSPEC+MTH), & 1249 SGRDS(IMOD)%ESC(MSPEC+MTH), & 1250 SGRDS(IMOD)%EC2(MSPEC+MTH), & 1251 SGRDS(IMOD)%SIG(0:MK+1), & 1252 SGRDS(IMOD)%SIG2(MSPEC), & 1253 SGRDS(IMOD)%DSIP(0:MK+1), & 1254 SGRDS(IMOD)%DSII(MK), & 1255 SGRDS(IMOD)%DDEN(MK), & 1256 SGRDS(IMOD)%DDEN2(MSPEC) ) 1257 ALLOCATE(MPARS(IMOD)%SRCPS%IKTAB(MK,NDTAB)) 1258 ALLOCATE(MPARS(IMOD)%SRCPS%DCKI(NKHS,NKD)) 1259 ALLOCATE(MPARS(IMOD)%SRCPS%QBI(NKHS,NKD)) 1260 SDSNTH = MTH/2-1 !MIN(NINT(SSDSDTH/(DTH*RADE)),MTH/2-1) 1261 ALLOCATE(MPARS(IMOD)%SRCPS%SATINDICES(2*SDSNTH+1,MTH)) 1262 ALLOCATE(MPARS(IMOD)%SRCPS%SATWEIGHTS(2*SDSNTH+1,MTH)) 1263 ALLOCATE(MPARS(IMOD)%SRCPS%CUMULW(MSPEC,MSPEC)) 1264 ! 1265 SGRDS(IMOD)%SINIT = .TRUE. 1266 ! 1267 ! -------------------------------------------------------------------- / 1268 ! 3. Point to allocated arrays 1269 ! 1270 CALL W3SETG ( IMOD, NDSE, NDST ) 1271 ! 1272 ! -------------------------------------------------------------------- / 1273 ! 4. Update counters in grid 1274 ! 1275 NK = MK 1276 NK2 = MK + 2 1277 NTH = MTH 1278 NSPEC = MK * MTH 1279 ! 1280 RETURN 1281 ! 1282 ! Formats 1283 ! 1284 1001 FORMAT (/' *** ERROR W3DIMS : GRIDS NOT INITIALIZED *** '/ & 1285 ' RUN W3NMOD FIRST '/) 1286 1002 FORMAT (/' *** ERROR W3DIMS : ILLEGAL MODEL NUMBER *** '/ & 1287 ' IMOD = ',I10/ & 1288 ' NAUXGR = ',I10/ & 1289 ' NGRIDS = ',I10/) 1290 1003 FORMAT (/' *** ERROR W3DIMS : ILLEGAL GRID DIMENSION(S) *** '/ & 1291 ' INPUT = ',4I10/) 1292 1004 FORMAT (/' *** ERROR W3DIMS : ARRAY(S) ALREADY ALLOCATED *** ') 1293 ! 1294 !/ 1295 !/ End of W3DIMS ----------------------------------------------------- / 1296 !/ Page 28 Source Listing W3DIMS 2014-09-16 16:59 w3gdatmd.f90 1297 END SUBROUTINE W3DIMS ENTRY POINTS Name w3gdatmd_mp_w3dims_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References 1001 Label 1284 1218 1002 Label 1286 1223 1003 Label 1290 1228 1004 Label 1292 1233 CONSTANTS Module 1197 1197 CUMULW Local 1263 R(4) 4 2 1 PTR 1263,1638 DCKI Local 1258 R(4) 4 2 1 PTR 1258,1636 DDEN Local 1255 R(4) 4 1 1 PTR 1255,1564 DDEN2 Local 1256 R(4) 4 1 1 PTR 1256,1565 DSII Local 1254 R(4) 4 1 1 PTR 1254,1563 DSIP Local 1253 R(4) 4 1 1 PTR 1253,1562 EC2 Local 1250 R(4) 4 1 1 PTR 1250,1559 ECOS Local 1247 R(4) 4 1 1 PTR 1247,1556 ES2 Local 1248 R(4) 4 1 1 PTR 1248,1557 ESC Local 1249 R(4) 4 1 1 PTR 1249,1558 ESIN Local 1246 R(4) 4 1 1 PTR 1246,1555 EXTCDE Subr 1196 1196,1219,1224,1229,1234 IKTAB Local 1257 I(4) 4 2 1 PTR 1257,1635 IMOD Dummy 1127 I(4) 4 scalar ARG,IN 1222,1223,1232,1243,1244,1245,1246 ,1247,1248,1249,1250,1251,1252,125 3,1254,1255,1256,1257,1258,1259,12 61,1262,1263,1265,1270 MAPTH Local 1244 I(4) 4 1 1 PTR 1244,1552 MAPWN Local 1243 I(4) 4 1 1 PTR 1243,1551 MK Dummy 1127 I(4) 4 scalar ARG,IN 1227,1228,1237,1238,1251,1253,1254 ,1255,1257,1275,1276,1278 MK2 Local 1210 I(4) 4 scalar 1237 MSPEC Local 1210 I(4) 4 scalar 1238,1243,1244,1246,1247,1248,1249 ,1250,1252,1256,1263 MTH Dummy 1127 I(4) 4 scalar ARG,IN 1227,1228,1238,1243,1244,1245,1246 ,1247,1248,1249,1250,1260,1261,126 2,1277,1278 NDSE Dummy 1127 I(4) 4 scalar ARG,IN 1218,1223,1228,1233,1270 NDST Dummy 1127 I(4) 4 scalar ARG,IN 1270 NDTAB Param 1257 I(4) 4 scalar 1257 NK Local 1275 I(4) 4 scalar PTR 1275,1529 NK2 Local 1276 I(4) 4 scalar PTR 1276,1530 NKD Param 1258 I(4) 4 scalar 1258,1259 NKHS Param 1258 I(4) 4 scalar 1258,1259 NSPEC Local 1278 I(4) 4 scalar PTR 1278,1532 NTH Local 1277 I(4) 4 scalar PTR 1277,1531,2116 QBI Local 1259 R(4) 4 2 1 PTR 1259,1637 RADE Param 1197 R(4) 4 scalar 1197 Page 29 Source Listing W3DIMS 2014-09-16 16:59 Symbol Table w3gdatmd.f90 Name Object Declared Type Bytes Dimen Elements Attributes References SATINDICES Local 1261 I(4) 4 2 1 PTR 1261,1639 SATWEIGHTS Local 1262 R(4) 4 2 1 PTR 1262,1640 SDSNTH Local 1211 I(4) 4 scalar 1260,1261,1262 SIG Local 1251 R(4) 4 1 1 PTR 1251,1560 SIG2 Local 1252 R(4) 4 1 1 PTR 1252,1561 SRCPS Local 1257 SRCP 776 scalar 1257,1258,1259,1261,1262,1263,1601 ,1602,1604,1605,1606,1607,1608,160 9,1610,1611,1612,1613,1614,1615,16 16,1617,1618,1619,1620,1621,1622,1 623,1624,1625,1626,1627,1628,1629, 1630,1631,1632,1633,1634,1635,1636 ,1637,1638,1639,1640 TH Local 1245 R(4) 4 1 1 PTR 1245,1554 W3DIMS Subr 1127 W3SERVMD Module 1196 1196 Page 30 Source Listing W3DIMS 2014-09-16 16:59 w3gdatmd.f90 1298 !/ ------------------------------------------------------------------- / 1299 SUBROUTINE W3SETG ( IMOD, NDSE, NDST ) 1300 !/ 1301 !/ +-----------------------------------+ 1302 !/ | WAVEWATCH III NOAA/NCEP | 1303 !/ | H. L. Tolman | 1304 !/ ! J. H. Alves ! 1305 !/ | FORTRAN 90 | 1306 !/ | Last update : 03-Sep-2012 | 1307 !/ +-----------------------------------+ 1308 !/ 1309 !/ 24-Jun-2005 : Origination. ( version 3.07 ) 1310 !/ 09-Nov-2005 : Remove soft boundary options. ( version 3.08 ) 1311 !/ 23-Jun-2006 : Add data for W3SLN1. ( version 3.09 ) 1312 !/ 18-Jul-2006 : Add input grids. ( version 3.10 ) 1313 !/ 05-Oct-2006 : Add filter to array pointers. ( version 3.10 ) 1314 !/ 02-Feb-2007 : Add FLAGST. ( version 3.10 ) 1315 !/ 14-Apr-2007 : Add Miche style limiter. ( version 3.11 ) 1316 !/ ( J. H. Alves ) 1317 !/ 25-Apr-2007 : Adding Battjes-Janssen Sdb. ( version 3.11 ) 1318 !/ ( J. H. Alves ) 1319 !/ 18-Sep-2007 : Adding WAM4 source terms. ( version 3.13 ) 1320 !/ ( F. Ardhuin ) 1321 !/ 27-Jun-2008 : Expand WAM4 variants namelist ( version 3.14 ) 1322 !/ ( F. Ardhuin ) 1323 !/ 30-Oct-2009 : Implement run-time grid selection. ( version 3.14 ) 1324 !/ (W. E. Rogers & T. J. Campbell, NRL) 1325 !/ 30-Oct-2009 : Implement curvilinear grid type. ( version 3.14 ) 1326 !/ (W. E. Rogers & T. J. Campbell, NRL) 1327 !/ 06-Dec-2010 : Change from GLOBAL (logical) to ICLOSE (integer) to 1328 !/ specify index closure for a grid. ( version 3.14 ) 1329 !/ (T. J. Campbell, NRL) 1330 !/ 13-Jul-2012 : Move data structures GMD (SNL3) and nonlinear 1331 !/ filter (SNLS) from 3.15 (HLT). ( version 4.08 ) 1332 !/ 03-Sep-2012 : Clean up of UG grids ( version 4.08 ) 1333 !/ 1334 ! 1. Purpose : 1335 ! 1336 ! Select one of the WAVEWATCH III grids / models. 1337 ! 1338 ! 2. Method : 1339 ! 1340 ! Point pointers to the proper variables in the proper element of 1341 ! the GRIDS array. 1342 ! 1343 ! 3. Parameters : 1344 ! 1345 ! Parameter list 1346 ! ---------------------------------------------------------------- 1347 ! IMOD Int. I Model number to point to. 1348 ! NDSE Int. I Error output unit number. 1349 ! NDST Int. I Test output unit number. 1350 ! ---------------------------------------------------------------- 1351 ! 1352 ! 4. Subroutines used : 1353 ! 1354 ! See module documentation. Page 31 Source Listing W3SETG 2014-09-16 16:59 w3gdatmd.f90 1355 ! 1356 ! 5. Called by : 1357 ! 1358 ! Many subroutines in eth WAVEWATCH system. 1359 ! 1360 ! 6. Error messages : 1361 ! 1362 ! Checks on parameter list IMOD. 1363 ! 1364 ! 7. Remarks : 1365 ! 1366 ! 8. Structure : 1367 ! 1368 ! 9. Switches : 1369 ! 1370 ! !/PRn Select propagation scheme 1371 ! 1372 ! !/STn Select source terms 1373 ! !/NLn 1374 ! !/BTn 1375 ! 1376 ! !/S Enable subroutine tracing. 1377 ! !/T Enable test output 1378 ! 1379 ! 10. Source code : 1380 ! 1381 !/ ------------------------------------------------------------------- / 1382 USE W3SERVMD, ONLY: EXTCDE 1383 ! 1384 IMPLICIT NONE 1385 ! 1386 !/ 1387 !/ ------------------------------------------------------------------- / 1388 !/ Parameter list 1389 !/ 1390 INTEGER, INTENT(IN) :: IMOD, NDSE, NDST 1391 !/ 1392 !/ ------------------------------------------------------------------- / 1393 !/ Local parameters 1394 !/ 1395 !/ 1396 ! 1397 ! -------------------------------------------------------------------- / 1398 ! 1. Test input and module status 1399 ! 1400 IF ( NGRIDS .EQ. -1 ) THEN 1401 WRITE (NDSE,1001) 1402 CALL EXTCDE (1) 1403 END IF 1404 ! 1405 IF ( IMOD.LT.-NAUXGR .OR. IMOD.GT.NGRIDS ) THEN 1406 WRITE (NDSE,1002) IMOD, -NAUXGR, NGRIDS 1407 CALL EXTCDE (2) 1408 END IF 1409 ! 1410 ! -------------------------------------------------------------------- / 1411 ! 2. Set model numbers Page 32 Source Listing W3SETG 2014-09-16 16:59 w3gdatmd.f90 1412 ! 1413 IGRID = IMOD 1414 ISGRD = IMOD 1415 IPARS = IMOD 1416 ! 1417 ! -------------------------------------------------------------------- / 1418 ! 3. Set pointers in structure GRID 1419 ! 1420 GTYPE => GRIDS(IMOD)%GTYPE 1421 ICLOSE => GRIDS(IMOD)%ICLOSE 1422 ! 1423 NX => GRIDS(IMOD)%NX 1424 NY => GRIDS(IMOD)%NY 1425 NSEA => GRIDS(IMOD)%NSEA 1426 NSEAL => GRIDS(IMOD)%NSEAL 1427 TRFLAG => GRIDS(IMOD)%TRFLAG 1428 ! 1429 E3DF => GRIDS(IMOD)%E3DF 1430 P2MSF => GRIDS(IMOD)%P2MSF 1431 US3DF => GRIDS(IMOD)%US3DF 1432 REFLC => GRIDS(IMOD)%REFLC 1433 REFLD => GRIDS(IMOD)%REFLD 1434 FLICES => GRIDS(IMOD)%FLICES 1435 FFACBERG => GRIDS(IMOD)%FFACBERG 1436 SX => GRIDS(IMOD)%SX 1437 SY => GRIDS(IMOD)%SY 1438 X0 => GRIDS(IMOD)%X0 1439 Y0 => GRIDS(IMOD)%Y0 1440 ! 1441 DTCFL => GRIDS(IMOD)%DTCFL 1442 DTCFLI => GRIDS(IMOD)%DTCFLI 1443 DTMAX => GRIDS(IMOD)%DTMAX 1444 DTMIN => GRIDS(IMOD)%DTMIN 1445 DMIN => GRIDS(IMOD)%DMIN 1446 CTMAX => GRIDS(IMOD)%CTMAX 1447 FICE0 => GRIDS(IMOD)%FICE0 1448 GRIDSHIFT => GRIDS(IMOD)%GRIDSHIFT 1449 FICEN => GRIDS(IMOD)%FICEN 1450 FICEL => GRIDS(IMOD)%FICEL 1451 PFMOVE => GRIDS(IMOD)%PFMOVE 1452 ! 1453 GINIT => GRIDS(IMOD)%GINIT 1454 GUGINIT => GRIDS(IMOD)%GUGINIT 1455 FLDRY => GRIDS(IMOD)%FLDRY 1456 FLCX => GRIDS(IMOD)%FLCX 1457 FLCY => GRIDS(IMOD)%FLCY 1458 FLCTH => GRIDS(IMOD)%FLCTH 1459 FLCK => GRIDS(IMOD)%FLCK 1460 FLSOU => GRIDS(IMOD)%FLSOU 1461 ! 1462 GNAME => GRIDS(IMOD)%GNAME 1463 FILEXT => GRIDS(IMOD)%FILEXT 1464 XYB => GRIDS(IMOD)%XYB 1465 TRIGP => GRIDS(IMOD)%TRIGP 1466 NTRI => GRIDS(IMOD)%NTRI 1467 COUNTRI => GRIDS(IMOD)%COUNTRI 1468 SI => GRIDS(IMOD)%SI Page 33 Source Listing W3SETG 2014-09-16 16:59 w3gdatmd.f90 1469 COUNTOT => GRIDS(IMOD)%COUNTOT 1470 IEN => GRIDS(IMOD)%IEN 1471 LEN => GRIDS(IMOD)%LEN 1472 ANGLE => GRIDS(IMOD)%ANGLE 1473 ANGLE0 => GRIDS(IMOD)%ANGLE0 1474 CCON => GRIDS(IMOD)%CCON 1475 COUNTCON => GRIDS(IMOD)%COUNTCON 1476 VNEIGH => GRIDS(IMOD)%VNEIGH 1477 INDEX_CELL => GRIDS(IMOD)%INDEX_CELL 1478 IE_CELL => GRIDS(IMOD)%IE_CELL 1479 POS_CELL => GRIDS(IMOD)%POS_CELL 1480 IOBP => GRIDS(IMOD)%IOBP 1481 IAA => GRIDS(IMOD)%IAA 1482 JAA => GRIDS(IMOD)%JAA 1483 POSI => GRIDS(IMOD)%POSI 1484 NNZ => GRIDS(IMOD)%NNZ 1485 IOBPD => GRIDS(IMOD)%IOBPD 1486 TRIA => GRIDS(IMOD)%TRIA 1487 CROSSDIFF => GRIDS(IMOD)%CROSSDIFF 1488 MAXX => GRIDS(IMOD)%MAXX 1489 MAXY => GRIDS(IMOD)%MAXY 1490 DXYMAX => GRIDS(IMOD)%DXYMAX 1491 1492 ! 1493 IF ( GINIT ) THEN 1494 ! 1495 MAPSTA => GRIDS(IMOD)%MAPSTA 1496 MAPST2 => GRIDS(IMOD)%MAPST2 1497 MAPFS => GRIDS(IMOD)%MAPFS 1498 MAPSF => GRIDS(IMOD)%MAPSF 1499 FLAGST => GRIDS(IMOD)%FLAGST 1500 ! 1501 ZB => GRIDS(IMOD)%ZB 1502 CLATS => GRIDS(IMOD)%CLATS 1503 CLATIS => GRIDS(IMOD)%CLATIS 1504 CTHG0S => GRIDS(IMOD)%CTHG0S 1505 TRNX => GRIDS(IMOD)%TRNX 1506 TRNY => GRIDS(IMOD)%TRNY 1507 ! 1508 XGRD => GRIDS(IMOD)%XGRD 1509 YGRD => GRIDS(IMOD)%YGRD 1510 DXDP => GRIDS(IMOD)%DXDP 1511 DXDQ => GRIDS(IMOD)%DXDQ 1512 DYDP => GRIDS(IMOD)%DYDP 1513 DYDQ => GRIDS(IMOD)%DYDQ 1514 DPDX => GRIDS(IMOD)%DPDX 1515 DPDY => GRIDS(IMOD)%DPDY 1516 DQDX => GRIDS(IMOD)%DQDX 1517 DQDY => GRIDS(IMOD)%DQDY 1518 GSQRT => GRIDS(IMOD)%GSQRT 1519 HPFAC => GRIDS(IMOD)%HPFAC 1520 HQFAC => GRIDS(IMOD)%HQFAC 1521 ! 1522 GSU => GRIDS(IMOD)%GSU 1523 ! 1524 END IF 1525 ! Page 34 Source Listing W3SETG 2014-09-16 16:59 w3gdatmd.f90 1526 ! -------------------------------------------------------------------- / 1527 ! 4. Set pointers in structure SGRD 1528 ! 1529 NK => SGRDS(IMOD)%NK 1530 NK2 => SGRDS(IMOD)%NK2 1531 NTH => SGRDS(IMOD)%NTH 1532 NSPEC => SGRDS(IMOD)%NSPEC 1533 ! 1534 DTH => SGRDS(IMOD)%DTH 1535 XFR => SGRDS(IMOD)%XFR 1536 FR1 => SGRDS(IMOD)%FR1 1537 FTE => SGRDS(IMOD)%FTE 1538 FTF => SGRDS(IMOD)%FTF 1539 FTWN => SGRDS(IMOD)%FTWN 1540 FTTR => SGRDS(IMOD)%FTTR 1541 FTWL => SGRDS(IMOD)%FTWL 1542 FACTI1 => SGRDS(IMOD)%FACTI1 1543 FACTI2 => SGRDS(IMOD)%FACTI2 1544 FACHFA => SGRDS(IMOD)%FACHFA 1545 FACHFE => SGRDS(IMOD)%FACHFE 1546 ! 1547 SINIT => SGRDS(IMOD)%SINIT 1548 ! 1549 IF ( SINIT ) THEN 1550 ! 1551 MAPWN => SGRDS(IMOD)%MAPWN 1552 MAPTH => SGRDS(IMOD)%MAPTH 1553 ! 1554 TH => SGRDS(IMOD)%TH 1555 ESIN => SGRDS(IMOD)%ESIN 1556 ECOS => SGRDS(IMOD)%ECOS 1557 ES2 => SGRDS(IMOD)%ES2 1558 ESC => SGRDS(IMOD)%ESC 1559 EC2 => SGRDS(IMOD)%EC2 1560 SIG => SGRDS(IMOD)%SIG 1561 SIG2 => SGRDS(IMOD)%SIG2 1562 DSIP => SGRDS(IMOD)%DSIP 1563 DSII => SGRDS(IMOD)%DSII 1564 DDEN => SGRDS(IMOD)%DDEN 1565 DDEN2 => SGRDS(IMOD)%DDEN2 1566 ! 1567 END IF 1568 ! 1569 ! -------------------------------------------------------------------- / 1570 ! 5. Set pointers in structure MPAR 1571 ! 1572 PINIT => MPARS(IMOD)%PINIT 1573 ! 1574 ! Structure NPARS 1575 ! 1576 FACP => MPARS(IMOD)%NPARS%FACP 1577 XREL => MPARS(IMOD)%NPARS%XREL 1578 XFLT => MPARS(IMOD)%NPARS%XFLT 1579 FXFM => MPARS(IMOD)%NPARS%FXFM 1580 FXPM => MPARS(IMOD)%NPARS%FXPM 1581 XFT => MPARS(IMOD)%NPARS%XFT 1582 XFC => MPARS(IMOD)%NPARS%XFC Page 35 Source Listing W3SETG 2014-09-16 16:59 w3gdatmd.f90 1583 FACSD => MPARS(IMOD)%NPARS%FACSD 1584 FHMAX => MPARS(IMOD)%NPARS%FHMAX 1585 ! 1586 ! Structure PROPS 1587 ! 1588 WDCG => MPARS(IMOD)%PROPS%WDCG 1589 WDTH => MPARS(IMOD)%PROPS%WDTH 1590 ! 1591 ! Structure SFLPS 1592 ! 1593 ! Structure SLNPS 1594 ! 1595 SLNC1 => MPARS(IMOD)%SLNPS%SLNC1 1596 FSPM => MPARS(IMOD)%SLNPS%FSPM 1597 FSHF => MPARS(IMOD)%SLNPS%FSHF 1598 ! 1599 ! Structure SRCPS 1600 ! 1601 WWNMEANPTAIL=> MPARS(IMOD)%SRCPS%WWNMEANPTAIL 1602 SSTXFTFTAIL => MPARS(IMOD)%SRCPS%SSTXFTFTAIL 1603 ! 1604 ZZWND => MPARS(IMOD)%SRCPS%ZZWND 1605 AALPHA => MPARS(IMOD)%SRCPS%AALPHA 1606 BBETA => MPARS(IMOD)%SRCPS%BBETA 1607 SSINTHP => MPARS(IMOD)%SRCPS%SSINTHP 1608 ZZ0MAX => MPARS(IMOD)%SRCPS%ZZ0MAX 1609 ZZ0RAT => MPARS(IMOD)%SRCPS%ZZ0RAT 1610 ZZALP => MPARS(IMOD)%SRCPS%ZZALP 1611 TTAUWSHELTER => MPARS(IMOD)%SRCPS%TTAUWSHELTER 1612 SSWELLFPAR => MPARS(IMOD)%SRCPS%SSWELLFPAR 1613 SSWELLF => MPARS(IMOD)%SRCPS%SSWELLF 1614 SSDSC => MPARS(IMOD)%SRCPS%SSDSC 1615 SSDSBR => MPARS(IMOD)%SRCPS%SSDSBR 1616 SSDSBR2 => MPARS(IMOD)%SRCPS%SSDSBR2 1617 SSDSBRF1 => MPARS(IMOD)%SRCPS%SSDSBRF1 1618 SSDSBRF2 => MPARS(IMOD)%SRCPS%SSDSBRF2 1619 SSDSBRFDF => MPARS(IMOD)%SRCPS%SSDSBRFDF 1620 SSDSBM => MPARS(IMOD)%SRCPS%SSDSBM 1621 SSDSBCK => MPARS(IMOD)%SRCPS%SSDSBCK 1622 SSDSABK => MPARS(IMOD)%SRCPS%SSDSABK 1623 SSDSPBK => MPARS(IMOD)%SRCPS%SSDSPBK 1624 SSDSHCK => MPARS(IMOD)%SRCPS%SSDSHCK 1625 SSDSBINT => MPARS(IMOD)%SRCPS%SSDSBINT 1626 SSDSP => MPARS(IMOD)%SRCPS%SSDSP 1627 WWNMEANP => MPARS(IMOD)%SRCPS%WWNMEANP 1628 FFXFM => MPARS(IMOD)%SRCPS%FFXFM 1629 FFXPM => MPARS(IMOD)%SRCPS%FFXPM 1630 SSDSDTH => MPARS(IMOD)%SRCPS%SSDSDTH 1631 SSTXFTF => MPARS(IMOD)%SRCPS%SSTXFTF 1632 SSTXFTWN => MPARS(IMOD)%SRCPS%SSTXFTWN 1633 SSDSCOS => MPARS(IMOD)%SRCPS%SSDSCOS 1634 SSDSISO => MPARS(IMOD)%SRCPS%SSDSISO 1635 IKTAB => MPARS(IMOD)%SRCPS%IKTAB 1636 DCKI => MPARS(IMOD)%SRCPS%DCKI 1637 QBI => MPARS(IMOD)%SRCPS%QBI 1638 CUMULW => MPARS(IMOD)%SRCPS%CUMULW 1639 SATINDICES => MPARS(IMOD)%SRCPS%SATINDICES Page 36 Source Listing W3SETG 2014-09-16 16:59 w3gdatmd.f90 1640 SATWEIGHTS => MPARS(IMOD)%SRCPS%SATWEIGHTS 1641 ! 1642 ! Structure SRNLS 1643 ! 1644 SNLC1 => MPARS(IMOD)%SNLPS%SNLC1 1645 LAM => MPARS(IMOD)%SNLPS%LAM 1646 KDCON => MPARS(IMOD)%SNLPS%KDCON 1647 KDMN => MPARS(IMOD)%SNLPS%KDMN 1648 SNLS1 => MPARS(IMOD)%SNLPS%SNLS1 1649 SNLS2 => MPARS(IMOD)%SNLPS%SNLS2 1650 SNLS3 => MPARS(IMOD)%SNLPS%SNLS3 1651 ! 1652 ! Structure SBTPS 1653 ! 1654 SBTC1 => MPARS(IMOD)%SBTPS%SBTC1 1655 ! 1656 ! Structure SDBPS 1657 ! 1658 SDBC1 => MPARS(IMOD)%SDBPS%SDBC1 1659 SDBC2 => MPARS(IMOD)%SDBPS%SDBC2 1660 FDONLY => MPARS(IMOD)%SDBPS%FDONLY 1661 ! Structure SCHM 1662 FSN => MPARS(IMOD)%SCHMS%FSN 1663 FSPSI => MPARS(IMOD)%SCHMS%FSPSI 1664 FSFCT => MPARS(IMOD)%SCHMS%FSFCT 1665 FSNIMP => MPARS(IMOD)%SCHMS%FSNIMP 1666 1667 RETURN 1668 ! 1669 ! Formats 1670 ! 1671 1001 FORMAT (/' *** ERROR W3SETG : GRIDS NOT INITIALIZED *** '/ & 1672 ' RUN W3NMOD FIRST '/) 1673 1002 FORMAT (/' *** ERROR W3SETG : ILLEGAL MODEL NUMBER *** '/ & 1674 ' IMOD = ',I10/ & 1675 ' NAUXGR = ',I10/ & 1676 ' NGRIDS = ',I10/) 1677 ! 1678 !/ 1679 !/ End of W3SETG ----------------------------------------------------- / 1680 !/ 1681 END SUBROUTINE W3SETG Page 37 Source Listing W3SETG 2014-09-16 16:59 Entry Points w3gdatmd.f90 ENTRY POINTS Name w3gdatmd_mp_w3setg_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References 1001 Label 1671 1401 1002 Label 1673 1406 AALPHA Local 1605 R(4) 4 scalar PTR,TGT 1605 ANGLE Local 1472 R(4) 4 2 1 PTR 1472,2104 ANGLE0 Local 1473 R(4) 4 2 1 PTR 1473,2105 BBETA Local 1606 R(4) 4 scalar PTR,TGT 1606 CCON Local 1474 I(4) 4 1 1 PTR 1474,2106 CLATIS Local 1503 R(4) 4 1 1 PTR 1503 CLATS Local 1502 R(4) 4 1 1 PTR 1502 COUNTCON Local 1475 I(4) 4 1 1 PTR 1475,2107 COUNTOT Local 1469 I(4) 4 scalar PTR,TGT 1469,2129 COUNTRI Local 1467 I(4) 4 scalar PTR,TGT 1467,2108 CROSSDIFF Local 1487 R(4) 4 2 1 PTR 1487,2101 CTHG0S Local 1504 R(4) 4 1 1 PTR 1504 CTMAX Local 1446 R(4) 4 scalar PTR,TGT 1446 CUMULW Local 1638 R(4) 4 2 1 PTR 1638 DCKI Local 1636 R(4) 4 2 1 PTR 1636 DDEN Local 1564 R(4) 4 1 1 PTR 1564 DDEN2 Local 1565 R(4) 4 1 1 PTR 1565 DMIN Local 1445 R(4) 4 scalar PTR,TGT 1445 DPDX Local 1514 R(4) 4 2 1 PTR 1514,1963 DPDY Local 1515 R(4) 4 2 1 PTR 1515,1964 DQDX Local 1516 R(4) 4 2 1 PTR 1516,1965 DQDY Local 1517 R(4) 4 2 1 PTR 1517,1966 DSII Local 1563 R(4) 4 1 1 PTR 1563 DSIP Local 1562 R(4) 4 1 1 PTR 1562 DTCFL Local 1441 R(4) 4 scalar PTR,TGT 1441 DTCFLI Local 1442 R(4) 4 scalar PTR,TGT 1442 DTH Local 1534 R(4) 4 scalar PTR,TGT 1534 DTMAX Local 1443 R(4) 4 scalar PTR,TGT 1443 DTMIN Local 1444 R(4) 4 scalar PTR,TGT 1444 DXDP Local 1510 R(4) 4 2 1 PTR 1510,1826,1829,1843,1846,1861,1864 ,1939,1956,1966 DXDQ Local 1511 R(4) 4 2 1 PTR 1511,1884,1887,1901,1904,1918,1921 ,1940,1956,1964 DXYMAX Local 1490 R(4) 4 scalar PTR,TGT 1490 DYDP Local 1512 R(4) 4 2 1 PTR 1512,1831,1848,1867,1941,1956,1965 DYDQ Local 1513 R(4) 4 2 1 PTR 1513,1889,1906,1923,1942,1956,1963 E3DF Local 1429 I(4) 4 2 1 PTR 1429 E3DF Local 1429 I(4) 4 2 15 1429 EC2 Local 1559 R(4) 4 1 1 PTR 1559 ECOS Local 1556 R(4) 4 1 1 PTR 1556 ES2 Local 1557 R(4) 4 1 1 PTR 1557 ESC Local 1558 R(4) 4 1 1 PTR 1558 Page 38 Source Listing W3SETG 2014-09-16 16:59 Symbol Table w3gdatmd.f90 Name Object Declared Type Bytes Dimen Elements Attributes References ESIN Local 1555 R(4) 4 1 1 PTR 1555 EXTCDE Subr 1382 1382,1402,1407 FACHFA Local 1544 R(4) 4 scalar PTR,TGT 1544 FACHFE Local 1545 R(4) 4 scalar PTR,TGT 1545 FACP Local 1576 R(4) 4 scalar PTR,TGT 1576 FACSD Local 1583 R(4) 4 scalar PTR,TGT 1583 FACTI1 Local 1542 R(4) 4 scalar PTR,TGT 1542 FACTI2 Local 1543 R(4) 4 scalar PTR,TGT 1543 FDONLY Local 1660 L(4) 4 scalar PTR,TGT 1660 FFACBERG Local 1435 R(4) 4 scalar PTR,TGT 1435 FFXFM Local 1628 R(4) 4 scalar PTR,TGT 1628 FFXPM Local 1629 R(4) 4 scalar PTR,TGT 1629 FHMAX Local 1584 R(4) 4 scalar PTR,TGT 1584 FICE0 Local 1447 R(4) 4 scalar PTR,TGT 1447 FICEL Local 1450 R(4) 4 scalar PTR,TGT 1450 FICEN Local 1449 R(4) 4 scalar PTR,TGT 1449 FILEXT Local 1463 CHAR 10 scalar PTR,TGT 1463 FLAGST Local 1499 L(4) 4 1 1 PTR 1499 FLCK Local 1459 L(4) 4 scalar PTR,TGT 1459 FLCTH Local 1458 L(4) 4 scalar PTR,TGT 1458 FLCX Local 1456 L(4) 4 scalar PTR,TGT 1456 FLCY Local 1457 L(4) 4 scalar PTR,TGT 1457 FLDRY Local 1455 L(4) 4 scalar PTR,TGT 1455 FLICES Local 1434 L(4) 4 scalar PTR,TGT 1434 FLSOU Local 1460 L(4) 4 scalar PTR,TGT 1460 FR1 Local 1536 R(4) 4 scalar PTR,TGT 1536 FSFCT Local 1664 L(4) 4 scalar PTR,TGT 1664 FSHF Local 1597 R(4) 4 scalar PTR,TGT 1597 FSN Local 1662 L(4) 4 scalar PTR,TGT 1662 FSNIMP Local 1665 L(4) 4 scalar PTR,TGT 1665 FSPM Local 1596 R(4) 4 scalar PTR,TGT 1596 FSPSI Local 1663 L(4) 4 scalar PTR,TGT 1663 FTE Local 1537 R(4) 4 scalar PTR,TGT 1537 FTF Local 1538 R(4) 4 scalar PTR,TGT 1538 FTTR Local 1540 R(4) 4 scalar PTR,TGT 1540 FTWL Local 1541 R(4) 4 scalar PTR,TGT 1541 FTWN Local 1539 R(4) 4 scalar PTR,TGT 1539 FXFM Local 1579 R(4) 4 scalar PTR,TGT 1579 FXPM Local 1580 R(4) 4 scalar PTR,TGT 1580 GINIT Local 1453 L(4) 4 scalar PTR 1453,1493 GNAME Local 1462 CHAR 30 scalar PTR,TGT 1462 GRIDSHIFT Local 1448 R(8) 8 scalar PTR,TGT 1448 GSQRT Local 1518 R(4) 4 2 1 PTR 1518,1956,1963,1964,1965,1966 GSU Local 1522 T_GSU 8 scalar PTR,TGT 1522,1784 GTYPE Local 1420 I(4) 4 scalar TGT 1420,1938 GUGINIT Local 1454 L(4) 4 scalar PTR 1454,2130 HPFAC Local 1519 R(4) 4 2 1 PTR 1519,1833,1850,1869 HQFAC Local 1520 R(4) 4 2 1 PTR 1520,1891,1908,1925 IAA Local 1481 I(4) 4 1 1 PTR 1481,2112 ICLOSE Local 1421 I(4) 4 scalar PTR,TGT 1421,1784 IEN Local 1470 R(4) 4 2 1 PTR 1470,2102 IE_CELL Local 1478 I(4) 4 1 1 PTR 1478,2110 IGRID Local 1413 I(4) 4 scalar 512,1413 IKTAB Local 1635 I(4) 4 2 1 PTR 1635 IMOD Dummy 1299 I(4) 4 scalar ARG,IN 1405,1406,1413,1414,1415,1420,1421 Page 39 Source Listing W3SETG 2014-09-16 16:59 Symbol Table w3gdatmd.f90 Name Object Declared Type Bytes Dimen Elements Attributes References ,1423,1424,1425,1426,1427,1429,143 0,1431,1432,1433,1434,1435,1436,14 37,1438,1439,1441,1442,1443,1444,1 445,1446,1447,1448,1449,1450,1451, 1453,1454,1455,1456,1457,1458,1459 ,1460,1462,1463,1464,1465,1466,146 7,1468,1469,1470,1471,1472,1473,14 74,1475,1476,1477,1478,1479,1480,1 481,1482,1483,1484,1485,1486,1487, 1488,1489,1490,1495,1496,1497,1498 ,1499,1501,1502,1503,1504,1505,150 6,1508,1509,1510,1511,1512,1513,15 14,1515,1516,1517,1518,1519,1520,1 522,1529,1530,1531,1532,1534,1535, 1536,1537,1538,1539,1540,1541,1542 ,1543,1544,1545,1547,1551,1552,155 4,1555,1556,1557,1558,1559,1560,15 61,1562,1563,1564,1565,1572,1576,1 577,1578,1579,1580,1581,1582,1583, 1584,1588,1589,1595,1596,1597,1601 ,1602,1604,1605,1606,1607,1608,160 9,1610,1611,1612,1613,1614,1615,16 16,1617,1618,1619,1620,1621,1622,1 623,1624,1625,1626,1627,1628,1629, 1630,1631,1632,1633,1634,1635,1636 ,1637,1638,1639,1640,1644,1645,164 6,1647,1648,1649,1650,1654,1658,16 59,1660,1662,1663,1664,1665 INDEX_CELL Local 1477 I(4) 4 1 1 PTR 1477,2109 IOBP Local 1480 I(4) 4 1 1 PTR 1480,2115 IOBPD Local 1485 I(4) 4 2 1 PTR 1485,2116 IPARS Local 1415 I(4) 4 scalar 513,1415 ISGRD Local 1414 I(4) 4 scalar 512,1414 JAA Local 1482 I(4) 4 1 1 PTR 1482,2113 KDCON Local 1646 R(4) 4 scalar PTR,TGT 1646 KDMN Local 1647 R(4) 4 scalar PTR,TGT 1647 LAM Local 1645 R(4) 4 scalar PTR,TGT 1645 LEN Local 1471 R(4) 4 2 1 PTR 1471,2103 MAPFS Local 1497 I(4) 4 2 1 PTR 1497 MAPSF Local 1498 I(4) 4 2 1 PTR 1498 MAPST2 Local 1496 I(4) 4 2 1 PTR 1496 MAPSTA Local 1495 I(4) 4 2 1 PTR 1495 MAPTH Local 1552 I(4) 4 1 1 PTR 1552 MAPWN Local 1551 I(4) 4 1 1 PTR 1551 MAXX Local 1488 R(4) 4 scalar PTR,TGT 1488 MAXY Local 1489 R(4) 4 scalar PTR,TGT 1489 NDSE Dummy 1299 I(4) 4 scalar ARG,IN 1401,1406 NDST Dummy 1299 I(4) 4 scalar ARG,IN NK Local 1529 I(4) 4 scalar TGT 1529 NK2 Local 1530 I(4) 4 scalar TGT 1530 NNZ Local 1484 I(4) 4 scalar PTR,TGT 1484 NPARS Local 1576 NPAR 36 scalar 1576,1577,1578,1579,1580,1581,1582 ,1583,1584 NSEA Local 1425 I(4) 4 scalar PTR 1425 NSEAL Local 1426 I(4) 4 scalar PTR,TGT 1426 Page 40 Source Listing W3SETG 2014-09-16 16:59 Symbol Table w3gdatmd.f90 Name Object Declared Type Bytes Dimen Elements Attributes References NSPEC Local 1532 I(4) 4 scalar TGT 1532 NTH Local 1531 I(4) 4 scalar TGT 1531 NTRI Local 1466 I(4) 4 scalar PTR,TGT 1466,2128 NX Local 1423 I(4) 4 scalar PTR 1423,1837,1854,1880,1890,1897,1907 ,1914,1924,2112,2213 NY Local 1424 I(4) 4 scalar PTR 1424,1822,1832,1839,1849,1857,1868 ,1895,1912,2213 P2MSF Local 1430 I(4) 4 1 1 PTR 1430 P2MSF Local 1430 I(4) 4 1 3 1430 PFMOVE Local 1451 R(4) 4 scalar PTR,TGT 1451 PINIT Local 1572 L(4) 4 scalar PTR 1572 POSI Local 1483 I(4) 4 2 1 PTR 1483,2114 POS_CELL Local 1479 I(4) 4 1 1 PTR 1479,2111 PROPS Local 1588 PROP 8 scalar 1588,1589 QBI Local 1637 R(4) 4 2 1 PTR 1637 REFLC Local 1432 R(4) 4 2 1 PTR 1432 REFLD Local 1433 I(4) 4 2 1 PTR 1433 SATINDICES Local 1639 I(4) 4 2 1 PTR 1639 SATWEIGHTS Local 1640 R(4) 4 2 1 PTR 1640 SBTC1 Local 1654 R(4) 4 scalar PTR,TGT 1654 SBTPS Local 1654 SBTP 4 scalar 1654 SCHMS Local 1662 SCHM 16 scalar 1662,1663,1664,1665 SDBC1 Local 1658 R(4) 4 scalar PTR,TGT 1658 SDBC2 Local 1659 R(4) 4 scalar PTR,TGT 1659 SDBPS Local 1658 SDBP 12 scalar 1658,1659,1660 SI Local 1468 R(4) 4 1 1 PTR 1468,2099 SIG Local 1560 R(4) 4 1 1 PTR 1560 SIG2 Local 1561 R(4) 4 1 1 PTR 1561 SINIT Local 1547 L(4) 4 scalar PTR 1547,1549 SLNC1 Local 1595 R(4) 4 scalar PTR,TGT 1595 SLNPS Local 1595 SLNP 12 scalar 1595,1596,1597 SNLC1 Local 1644 R(4) 4 scalar PTR,TGT 1644 SNLPS Local 1644 SNLP 28 scalar 1644,1645,1646,1647,1648,1649,1650 SNLS1 Local 1648 R(4) 4 scalar PTR,TGT 1648 SNLS2 Local 1649 R(4) 4 scalar PTR,TGT 1649 SNLS3 Local 1650 R(4) 4 scalar PTR,TGT 1650 SSDSABK Local 1622 R(4) 4 scalar PTR,TGT 1622 SSDSBCK Local 1621 R(4) 4 scalar PTR,TGT 1621 SSDSBINT Local 1625 R(4) 4 scalar PTR,TGT 1625 SSDSBM Local 1620 R(4) 4 1 1 PTR 1620 SSDSBM Local 1620 R(4) 4 1 5 1620 SSDSBR Local 1615 R(4) 4 scalar PTR,TGT 1615 SSDSBR2 Local 1616 R(4) 4 scalar PTR,TGT 1616 SSDSBRF1 Local 1617 R(4) 4 scalar PTR,TGT 1617 SSDSBRF2 Local 1618 R(4) 4 scalar PTR,TGT 1618 SSDSBRFDF Local 1619 I(4) 4 scalar PTR,TGT 1619 SSDSC Local 1614 R(4) 4 1 1 PTR 1614 SSDSC Local 1614 R(4) 4 1 7 1614 SSDSCOS Local 1633 R(4) 4 scalar PTR,TGT 1633 SSDSDTH Local 1630 R(4) 4 scalar PTR,TGT 1630 SSDSHCK Local 1624 R(4) 4 scalar PTR,TGT 1624 SSDSISO Local 1634 I(4) 4 scalar PTR,TGT 1634 SSDSP Local 1626 R(4) 4 scalar PTR,TGT 1626 SSDSPBK Local 1623 R(4) 4 scalar PTR,TGT 1623 SSINTHP Local 1607 R(4) 4 scalar PTR,TGT 1607 Page 41 Source Listing W3SETG 2014-09-16 16:59 Symbol Table w3gdatmd.f90 Name Object Declared Type Bytes Dimen Elements Attributes References SSTXFTF Local 1631 R(4) 4 scalar PTR,TGT 1631 SSTXFTFTAIL Local 1602 R(4) 4 scalar PTR,TGT 1602 SSTXFTWN Local 1632 R(4) 4 scalar PTR,TGT 1632 SSWELLF Local 1613 R(4) 4 1 1 PTR 1613 SSWELLF Local 1613 R(4) 4 1 7 1613 SSWELLFPAR Local 1612 I(4) 4 scalar PTR,TGT 1612 SX Local 1436 R(4) 4 scalar PTR,TGT 1436,1939 SY Local 1437 R(4) 4 scalar PTR,TGT 1437,1942 TH Local 1554 R(4) 4 1 1 PTR 1554 TRFLAG Local 1427 I(4) 4 scalar PTR,TGT 1427 TRIA Local 1486 R(4) 4 1 1 PTR 1486,2100 TRIGP Local 1465 I(4) 4 2 1 PTR 1465,2097 TRNX Local 1505 R(4) 4 2 1 PTR 1505 TRNY Local 1506 R(4) 4 2 1 PTR 1506 TTAUWSHELTER Local 1611 R(4) 4 scalar PTR,TGT 1611 US3DF Local 1431 I(4) 4 1 1 PTR 1431 US3DF Local 1431 I(4) 4 1 3 1431 VNEIGH Local 1476 I(4) 4 2 1 PTR 1476,2108 W3SERVMD Module 1382 1382 W3SETG Subr 1299 1106,1270,1792,2123 WDCG Local 1588 R(4) 4 scalar PTR,TGT 1588 WDTH Local 1589 R(4) 4 scalar PTR,TGT 1589 WWNMEANP Local 1627 R(4) 4 scalar PTR,TGT 1627 WWNMEANPTAIL Local 1601 R(4) 4 scalar PTR,TGT 1601 X0 Local 1438 R(4) 4 scalar PTR,TGT 1438 XFC Local 1582 R(4) 4 scalar PTR,TGT 1582 XFLT Local 1578 R(4) 4 scalar PTR,TGT 1578 XFR Local 1535 R(4) 4 scalar PTR,TGT 1535 XFT Local 1581 R(4) 4 scalar PTR,TGT 1581 XGRD Local 1508 R(4) 4 2 1 PTR 1508,1823,1824,1825,1829,1833,1834 ,1840,1841,1842,1846,1850,1851,185 8,1859,1860,1864,1869,1870,1881,18 82,1883,1887,1891,1892,1898,1899,1 900,1904,1908,1909,1915,1916,1917, 1921,1925,1926 XREL Local 1577 R(4) 4 scalar PTR,TGT 1577 XYB Local 1464 R(8) 8 2 1 PTR 1464,2098 Y0 Local 1439 R(4) 4 scalar PTR,TGT 1439 YGRD Local 1509 R(4) 4 2 1 PTR 1509,1831,1833,1834,1848,1850,1851 ,1867,1869,1870,1889,1891,1892,190 6,1908,1909,1923,1925,1926 ZB Local 1501 R(4) 4 1 1 PTR 1501 ZZ0MAX Local 1608 R(4) 4 scalar PTR,TGT 1608 ZZ0RAT Local 1609 R(4) 4 scalar PTR,TGT 1609 ZZALP Local 1610 R(4) 4 scalar PTR,TGT 1610 ZZWND Local 1604 R(4) 4 scalar PTR,TGT 1604 Page 42 Source Listing W3SETG 2014-09-16 16:59 w3gdatmd.f90 1682 !/ ------------------------------------------------------------------- / 1683 SUBROUTINE W3GNTX ( IMOD, NDSE, NDST ) 1684 !/ 1685 !/ +-----------------------------------+ 1686 !/ | WAVEWATCH-III NOAA/NCEP | 1687 !/ | T. J. Campbell | 1688 !/ | FORTRAN 90 | 1689 !/ | Last update : 23-Dec-2010 | 1690 !/ +-----------------------------------+ 1691 !/ 1692 !/ 30-Oct-2009 : Origination. ( version 3.13 ) 1693 !/ 06-Dec-2010 : Change from GLOBAL (logical) to ICLOSE (integer) to 1694 !/ specify index closure for a grid. ( version 3.14 ) 1695 !/ (T. J. Campbell, NRL) 1696 !/ 23-Dec-2010 : Fix HPFAC and HQFAC by including the COS(YGRD) 1697 !/ factor with DXDP and DXDQ terms. ( version 3.14 ) 1698 !/ (T. J. Campbell, NRL) 1699 !/ 20-Jul-2011 : HPFAC and HQFAC are now calculated using W3DIST. 1700 !/ Result should be very similar except near pole. 1701 !/ Due to precision issues, HPFAC and HQFAC revert 1702 !/ to SX and SY in case of regular grids. 1703 !/ (W. E. Rogers, NRL) ( version 3.14 ) 1704 !/ 1705 ! 1. Purpose : 1706 ! 1707 ! Construct required spatial grid quantities for curvilinear grids. 1708 ! 1709 ! 2. Method : 1710 ! 1711 ! 3. Parameters : 1712 ! 1713 ! Parameter list 1714 ! ---------------------------------------------------------------- 1715 ! IMOD Int. I Model number to point to. 1716 ! NDSE Int. I Error output unit number. 1717 ! ---------------------------------------------------------------- 1718 ! 1719 ! 4. Subroutines used : 1720 ! 1721 ! See module documentation. 1722 ! 1723 ! 5. Called by : 1724 ! 1725 ! Any program that uses this grid structure. 1726 ! 1727 ! 6. Error messages : 1728 ! 1729 ! - Check on previous initialization of grids. 1730 ! 1731 ! 7. Remarks : 1732 ! 1733 ! 8. Structure : 1734 ! 1735 ! 9. Switches : 1736 ! 1737 ! !/S Enable subroutine tracing. 1738 ! !/T Enable test output Page 43 Source Listing W3GNTX 2014-09-16 16:59 w3gdatmd.f90 1739 ! 1740 ! 10. Source code : 1741 ! 1742 !/ ------------------------------------------------------------------- / 1743 USE W3SERVMD, ONLY: EXTCDE 1744 ! 1745 IMPLICIT NONE 1746 !/ 1747 !/ ------------------------------------------------------------------- / 1748 !/ Parameter list 1749 !/ 1750 INTEGER, INTENT(IN) :: IMOD, NDSE, NDST 1751 !/ 1752 !/ ------------------------------------------------------------------- / 1753 !/ Local parameters 1754 !/ 1755 REAL(8), PARAMETER :: PI = 3.14159265358979323846D0 1756 REAL(8), PARAMETER :: D360 = 360D0 1757 REAL(8), PARAMETER :: D180 = 180D0 1758 REAL(8), PARAMETER :: D2R = PI/D180 1759 REAL(8), PARAMETER :: R2D = 1D0/D2R 1760 REAL(8), PARAMETER :: HALF = 0.5D0 1761 REAL(8) :: DXCIRC(3) 1762 INTEGER :: IX, IY 1763 ! REAL :: UVECPX(NY,NX), UVECPY(NY,NX) 1764 ! REAL :: UVECQX(NY,NX), UVECQY(NY,NX) 1765 1766 !/ 1767 ! 1768 ! -------------------------------------------------------------------- / 1769 ! 1. Test input and module status 1770 ! 1771 IF ( NGRIDS .EQ. -1 ) THEN 1772 WRITE (NDSE,1001) 1773 CALL EXTCDE (1) 1774 END IF 1775 ! 1776 IF ( IMOD.LT.-NAUXGR .OR. IMOD.GT.NGRIDS ) THEN 1777 WRITE (NDSE,1002) IMOD, -NAUXGR, NGRIDS 1778 CALL EXTCDE (2) 1779 END IF 1780 ! 1781 ! -------------------------------------------------------------------- / 1782 ! 2. Create grid search utility object 1783 ! 1784 GRIDS(IMOD)%GSU = W3GSUC( .FALSE., FLAGLL, GRIDS(IMOD)%ICLOSE, & 1785 GRIDS(IMOD)%NX, GRIDS(IMOD)%NY, & 1786 GRIDS(IMOD)%XGRD, GRIDS(IMOD)%YGRD ) 1787 1788 ! 1789 ! -------------------------------------------------------------------- / 1790 ! 3. Reset grid pointers 1791 ! 1792 CALL W3SETG ( IMOD, NDSE, NDST ) 1793 ! 1794 ! -------------------------------------------------------------------- / 1795 ! 4. Construct curvilinear grid derivatives and metric Page 44 Source Listing W3GNTX 2014-09-16 16:59 w3gdatmd.f90 1796 ! 1797 ! x = x(p,q); y = y(p,q); dp = dq = 1; 1798 ! 1799 ! When using spherical coordinates x = longitude and y = latitude. 1800 ! Also, the derivatives with respect to p are adjusted by the spherical 1801 ! coordinate metric. In other words (with radius = 1), 1802 ! 1803 ! dx/dp <= cos(y)*(dx/dp) and dy/dp <= cos(y)*(dy/dp). 1804 ! 1805 ! The 2D curvilinear coordinates metric is 1806 ! 1807 ! g_pq = (dx/dp)*(dx/dq) + (dy/dp)*(dy/dq), 1808 ! g_pp = (dx/dp)*(dx/dp) + (dy/dp)*(dy/dp), 1809 ! g_qq = (dx/dq)*(dx/dq) + (dy/dq)*(dy/dq). 1810 ! 1811 ! Derivatives are computed with central differences for all non-boundary 1812 ! cells. One-sided differences are used at boundary cells. If the grid 1813 ! is a global grid, then the i-differences at the i=1 and i=nx boundary 1814 ! cells are computed with central differences using the wrapped cell 1815 ! x-coordinates. 1816 1817 ! 1818 ! Compute dx/dp & dy/dp & dm/dp 1819 1820 IX = 1 1821 IF(FLAGLL)THEN 1822 DO IY=1,NY 1823 DXCIRC(1)= ( XGRD(IY ,IX+1) - XGRD(IY ,IX ) )-D360 1824 DXCIRC(2)= ( XGRD(IY ,IX+1) - XGRD(IY ,IX ) ) 1825 DXCIRC(3)= ( XGRD(IY ,IX+1) - XGRD(IY ,IX ) )+D360 1826 DXDP(IY,IX)=DXCIRC(MINLOC(ABS(DXCIRC),1)) 1827 END DO 1828 ELSE 1829 DXDP(: ,IX) = ( XGRD(: ,IX+1) - XGRD(: ,IX ) ) 1830 ENDIF 1831 DYDP(: ,IX) = ( YGRD(: ,IX+1) - YGRD(: ,IX ) ) 1832 DO IY=1,NY 1833 HPFAC(IY,IX)=W3DIST(FLAGLL,XGRD(IY,IX+1),YGRD(IY,IX+1), & 1834 XGRD(IY,IX),YGRD(IY,IX)) 1835 END DO 1836 1837 IX = NX 1838 IF(FLAGLL)THEN 1839 DO IY=1,NY 1840 DXCIRC(1)= ( XGRD(IY ,IX ) - XGRD(IY ,IX-1) )-D360 1841 DXCIRC(2)= ( XGRD(IY ,IX ) - XGRD(IY ,IX-1) ) 1842 DXCIRC(3)= ( XGRD(IY ,IX ) - XGRD(IY ,IX-1) )+D360 1843 DXDP(IY,IX)=DXCIRC(MINLOC(ABS(DXCIRC),1)) 1844 END DO 1845 ELSE 1846 DXDP(: ,IX) = ( XGRD(: ,IX ) - XGRD(: ,IX-1) ) 1847 ENDIF 1848 DYDP(: ,IX) = ( YGRD(: ,IX ) - YGRD(: ,IX-1) ) 1849 DO IY=1,NY 1850 HPFAC(IY,IX)=W3DIST(FLAGLL,XGRD(IY,IX),YGRD(IY,IX), & 1851 XGRD(IY,IX-1),YGRD(IY,IX-1)) 1852 END DO Page 45 Source Listing W3GNTX 2014-09-16 16:59 w3gdatmd.f90 1853 1854 DO IX=2, NX-1 1855 1856 IF(FLAGLL)THEN 1857 DO IY=1,NY 1858 DXCIRC(1)= ( XGRD(IY ,IX+1) - XGRD(IY ,IX-1) )-D360 1859 DXCIRC(2)= ( XGRD(IY ,IX+1) - XGRD(IY ,IX-1) ) 1860 DXCIRC(3)= ( XGRD(IY ,IX+1) - XGRD(IY ,IX-1) )+D360 1861 DXDP(IY,IX)=HALF * DXCIRC(MINLOC(ABS(DXCIRC),1)) 1862 END DO 1863 ELSE 1864 DXDP(: ,IX) = HALF * ( XGRD(: ,IX+1) - XGRD(: ,IX-1) ) 1865 ENDIF 1866 1867 DYDP(: ,IX) = HALF * ( YGRD(: ,IX+1) - YGRD(: ,IX-1) ) 1868 DO IY=1,NY 1869 HPFAC(IY,IX)=W3DIST(FLAGLL,XGRD(IY,IX+1),YGRD(IY,IX+1), & 1870 XGRD(IY,IX-1),YGRD(IY,IX-1))*HALF 1871 END DO 1872 1873 END DO 1874 1875 ! 1876 ! Compute dx/dq & dy/dq & dm/dq 1877 1878 IY = 1 1879 IF(FLAGLL)THEN 1880 DO IX=1,NX 1881 DXCIRC(1)= ( XGRD(IY+1,IX) - XGRD(IY ,IX) )-D360 1882 DXCIRC(2)= ( XGRD(IY+1,IX) - XGRD(IY ,IX) ) 1883 DXCIRC(3)= ( XGRD(IY+1,IX) - XGRD(IY ,IX) )+D360 1884 DXDQ(IY,IX)=DXCIRC(MINLOC(ABS(DXCIRC),1)) 1885 END DO 1886 ELSE 1887 DXDQ(IY,: ) = ( XGRD(IY+1,: ) - XGRD(IY ,: ) ) 1888 ENDIF 1889 DYDQ(IY,: ) = ( YGRD(IY+1,: ) - YGRD(IY ,: ) ) 1890 DO IX=1,NX 1891 HQFAC(IY,IX)=W3DIST(FLAGLL,XGRD(IY+1,IX),YGRD(IY+1,IX), & 1892 XGRD(IY,IX),YGRD(IY,IX)) 1893 END DO 1894 1895 IY = NY 1896 IF(FLAGLL)THEN 1897 DO IX=1,NX 1898 DXCIRC(1)= ( XGRD(IY ,IX) - XGRD(IY-1,IX) )-D360 1899 DXCIRC(2)= ( XGRD(IY ,IX) - XGRD(IY-1,IX) ) 1900 DXCIRC(3)= ( XGRD(IY ,IX) - XGRD(IY-1,IX) )+D360 1901 DXDQ(IY,IX)=DXCIRC(MINLOC(ABS(DXCIRC),1)) 1902 END DO 1903 ELSE 1904 DXDQ(IY,: ) = ( XGRD(IY ,: ) - XGRD(IY-1,: ) ) 1905 ENDIF 1906 DYDQ(IY,: ) = ( YGRD(IY ,: ) - YGRD(IY-1,: ) ) 1907 DO IX=1,NX 1908 HQFAC(IY,IX)=W3DIST(FLAGLL,XGRD(IY,IX),YGRD(IY,IX), & 1909 XGRD(IY-1,IX),YGRD(IY-1,IX)) Page 46 Source Listing W3GNTX 2014-09-16 16:59 w3gdatmd.f90 1910 END DO 1911 1912 DO IY=2, NY-1 1913 IF(FLAGLL)THEN 1914 DO IX=1,NX 1915 DXCIRC(1)= ( XGRD(IY+1,IX) - XGRD(IY-1,IX) )-D360 1916 DXCIRC(2)= ( XGRD(IY+1,IX) - XGRD(IY-1,IX) ) 1917 DXCIRC(3)= ( XGRD(IY+1,IX) - XGRD(IY-1,IX) )+D360 1918 DXDQ(IY,IX)=HALF * DXCIRC(MINLOC(ABS(DXCIRC),1)) 1919 END DO 1920 ELSE 1921 DXDQ(IY,: ) = HALF * ( XGRD(IY+1,: ) - XGRD(IY-1,: ) ) 1922 ENDIF 1923 DYDQ(IY,: ) = HALF * ( YGRD(IY+1,: ) - YGRD(IY-1,: ) ) 1924 DO IX=1,NX 1925 HQFAC(IY,IX)=W3DIST(FLAGLL,XGRD(IY+1,IX),YGRD(IY+1,IX), & 1926 XGRD(IY-1,IX),YGRD(IY-1,IX))*HALF 1927 END DO 1928 END DO 1929 1930 !......notes: Though we *should* recover SX and SY using calculations on XGRD and YGRD, 1931 !.............it turns out that there are small differences which cause problems for 1932 !.............SCRIP. Therefore, we add the if-then here to use SX and SY in case of 1933 !.............regular grids, to overwrite DXDP etc. calculated above. 1934 !.............Note 1: that this may be unnecessary if we go to double precision. 1935 !.............Note 2: HQFAC calculated above is still used. Thus, we don't have the entire 1936 !.....................block of code above inside an "if not regular grid" 1937 1938 IF(GRIDS(IMOD)%GTYPE.EQ.RLGTYPE)THEN 1939 DXDP=SX 1940 DXDQ=0.0D0 1941 DYDP=0.0D0 1942 DYDQ=SY 1943 ENDIF ! IF(GRIDS(IMOD)%GTYPE.EQ.RLGTYPE)THEN 1944 1945 ! 1946 ! Account for spherical metric if lat/lon grid (only if the metric 1947 ! is to be w.r.t. the Cartesian space) 1948 ! IF ( FLAGLL ) THEN 1949 ! DXDP = DXDP * COS(YGRD*D2R) 1950 ! DXDQ = DXDQ * COS(YGRD*D2R) 1951 ! END IF 1952 ! If we do this, then the COS(YGRD*D2R) factor must be removed from 1953 ! the HPFAC & HQFAC. 1954 ! 1955 ! GSQRT: sqrt(g) = (dx/dp)(dy/dq) - (dx/dq)(dy/dp) 1956 GSQRT = DXDP*DYDQ - DXDQ*DYDP 1957 ! 1958 ! Compute curvilinear derivatives 1959 ! DPDX: dp/dx = (1/sqrt(g))*(dy/dq) 1960 ! DPDY: dp/dy = -(1/sqrt(g))*(dx/dq) 1961 ! DQDX: dq/dx = -(1/sqrt(g))*(dy/dp) 1962 ! DQDY: dq/dy = (1/sqrt(g))*(dx/dp) 1963 DPDX = DYDQ / GSQRT 1964 DPDY = -DXDQ / GSQRT 1965 DQDX = -DYDP / GSQRT 1966 DQDY = DXDP / GSQRT Page 47 Source Listing W3GNTX 2014-09-16 16:59 w3gdatmd.f90 1967 ! 1968 ! Check orthogonality of grid by computing angle between the 1969 ! curvilinear coordinate unit vectors. 1970 ! cos(a) = uvec_p \dot uvec_q = g_pq/sqrt(g_pp*g_qq) 1971 ! 1972 ! Compute cell unit vectors 1973 ! uvec_p = (1/h_p)*(dx/dp)*uvec_x + (1/h_p)*(dy/dp)*uvec_y 1974 ! uvec_q = (1/h_q)*(dx/dq)*uvec_x + (1/h_q)*(dy/dq)*uvec_y 1975 ! UVECPX = DXDP / HPFAC 1976 ! UVECPY = DYDP / HPFAC 1977 ! UVECQX = DXDQ / HQFAC 1978 ! UVECQY = DYDQ / HQFAC 1979 ! 1980 ! Formats 1981 ! 1982 1001 FORMAT (/' *** ERROR W3GNTX : GRIDS NOT INITIALIZED *** '/ & 1983 ' RUN W3NMOD FIRST '/) 1984 1002 FORMAT (/' *** ERROR W3GNTX : ILLEGAL MODEL NUMBER *** '/ & 1985 ' IMOD = ',I10/ & 1986 ' NAUXGR = ',I10/ & 1987 ' NGRIDS = ',I10/) 1988 ! 1989 !/ 1990 !/ End of W3GNTX ----------------------------------------------------- / 1991 !/ 1992 END SUBROUTINE W3GNTX ENTRY POINTS Name w3gdatmd_mp_w3gntx_ Page 48 Source Listing W3GNTX 2014-09-16 16:59 Symbol Table w3gdatmd.f90 SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References 1001 Label 1982 1772 1002 Label 1984 1777 ABS Func 1826 scalar 1826,1843,1861,1884,1901,1918 D180 Param 1757 R(8) 8 scalar 1758 D2R Param 1758 R(8) 8 scalar 1759 D360 Param 1756 R(8) 8 scalar 1823,1825,1840,1842,1858,1860,1881 ,1883,1898,1900,1915,1917 DXCIRC Local 1761 R(8) 8 1 3 1823,1824,1825,1826,1840,1841,1842 ,1843,1858,1859,1860,1861,1881,188 2,1883,1884,1898,1899,1900,1901,19 15,1916,1917,1918 EXTCDE Subr 1743 1743,1773,1778 FLAGLL Local 1784 L(4) 4 scalar 1784,1821,1833,1838,1850,1856,1869 ,1879,1891,1896,1908,1913,1925 HALF Param 1760 R(8) 8 scalar 1861,1864,1867,1870,1918,1921,1923 ,1926 IMOD Dummy 1683 I(4) 4 scalar ARG,IN 1776,1777,1784,1785,1786,1792,1938 IX Local 1762 I(4) 4 scalar 1820,1823,1824,1825,1826,1829,1831 ,1833,1834,1837,1840,1841,1842,184 3,1846,1848,1850,1851,1854,1858,18 59,1860,1861,1864,1867,1869,1870,1 880,1881,1882,1883,1884,1890,1891, 1892,1897,1898,1899,1900,1901,1907 ,1908,1909,1914,1915,1916,1917,191 8,1924,1925,1926 IY Local 1762 I(4) 4 scalar 1822,1823,1824,1825,1826,1832,1833 ,1834,1839,1840,1841,1842,1843,184 9,1850,1851,1857,1858,1859,1860,18 61,1868,1869,1870,1878,1881,1882,1 883,1884,1887,1889,1891,1892,1895, 1898,1899,1900,1901,1904,1906,1908 ,1909,1912,1915,1916,1917,1918,192 1,1923,1925,1926 MINLOC Func 1826 scalar 1826,1843,1861,1884,1901,1918 NDSE Dummy 1683 I(4) 4 scalar ARG,IN 1772,1777,1792 NDST Dummy 1683 I(4) 4 scalar ARG,IN 1792 PI Param 1755 R(8) 8 scalar 1758 R2D Param 1759 R(8) 8 scalar RLGTYPE Param 1938 I(4) 4 scalar 1938 W3DIST Local 1833 scalar 1833,1850,1869,1891,1908,1925 W3DIST_R4 Func 1833 R(4) 4 scalar PRIV 1833,1850,1869,1891,1908,1925 W3GNTX Subr 1683 W3GSUC Local 1784 scalar 1784 W3GSUC_R4 Func 1784 RECORD 8 scalar PRIV 1784 W3SERVMD Module 1743 1743 Page 49 Source Listing W3GNTX 2014-09-16 16:59 w3gdatmd.f90 1993 !/ ------------------------------------------------------------------- / 1994 1995 SUBROUTINE W3DIMUG ( IMOD, MTRI, MX, COUNTOTA, NNZ, NDSE, NDST ) 1996 !/ 1997 !/ +-----------------------------------+ 1998 !/ | WAVEWATCH-III NOAA/NCEP | 1999 !/ | F.ardhuin | 2000 !/ | FORTRAN 90 | 2001 !/ | Last update : 15-Mar-2007 ! 2002 !/ +-----------------------------------+ 2003 !/ 2004 !/ 15-Mar-2007 : Origination. ( version 3.14 ) 2005 !/ 2006 ! 1. Purpose : 2007 ! 2008 ! Initialize an individual spatial grid at the proper dimensions. 2009 ! 2010 ! 2. Method : 2011 ! 2012 ! Allocate directly into the structure array GRIDS. Note that 2013 ! this cannot be done through the pointer alias! 2014 ! 2015 ! 3. Parameters : 2016 ! 2017 ! Parameter list 2018 ! ---------------------------------------------------------------- 2019 ! IMOD Int. I Model number to point to. 2020 ! NDSE Int. I Error output unit number. 2021 ! NDST Int. I Test output unit number. 2022 ! MX, MTRI, MSEA Like NX, NTRI, NSEA in data structure. 2023 ! ---------------------------------------------------------------- 2024 ! 2025 ! 4. Subroutines used : 2026 ! 2027 ! See module documentation. 2028 ! 2029 ! 5. Called by : 2030 ! 2031 ! Name Type Module Description 2032 ! ---------------------------------------------------------------- 2033 ! W3IOGR Subr. W3IOGRMD Model definition file IO program. 2034 ! WW3_GRID Prog. N/A Model set up program. 2035 ! ---------------------------------------------------------------- 2036 ! 2037 ! 6. Error messages : 2038 ! 2039 ! - Check on input parameters. 2040 ! - Check on previous allocation. 2041 ! 2042 ! 7. Remarks : 2043 ! 2044 ! - Grid dimensions apre passed through parameter list and then 2045 ! locally stored to assure consistency between allocation and 2046 ! data in structure. 2047 ! - W3SETG needs to be called after allocation to point to 2048 ! proper allocated arrays. 2049 ! Page 50 Source Listing W3DIMUG 2014-09-16 16:59 w3gdatmd.f90 2050 ! 8. Structure : 2051 ! 2052 ! See source code. 2053 ! 2054 ! 9. Switches : 2055 ! 2056 ! !/S Enable subroutine tracing. 2057 ! !/T Enable test output 2058 ! 2059 ! 10. Source code : 2060 ! 2061 !/ ------------------------------------------------------------------- / 2062 USE W3SERVMD, ONLY: EXTCDE 2063 ! 2064 IMPLICIT NONE 2065 ! 2066 !/ 2067 !/ ------------------------------------------------------------------- / 2068 !/ Parameter list 2069 !/ 2070 INTEGER, INTENT(IN) :: IMOD, MTRI, MX, COUNTOTA, NNZ, NDSE, NDST 2071 !/ 2072 !/ ------------------------------------------------------------------- / 2073 !/ Local parameters 2074 !/ 2075 !/ 2076 ! 2077 ! -------------------------------------------------------------------- / 2078 ! 1. Test input and module status 2079 ! 2080 IF ( NGRIDS .EQ. -1 ) THEN 2081 WRITE (NDSE,1001) 2082 CALL EXTCDE (1) 2083 END IF 2084 ! 2085 IF ( IMOD.LT.1 .OR. IMOD.GT.NGRIDS ) THEN 2086 WRITE (NDSE,1002) IMOD, NGRIDS 2087 CALL EXTCDE (2) 2088 END IF 2089 IF ( GRIDS(IMOD)%GUGINIT ) THEN 2090 WRITE (NDSE,1004) 2091 CALL EXTCDE (4) 2092 END IF 2093 ! 2094 ! -------------------------------------------------------------------- / 2095 ! 2. Allocate arrays 2096 ! 2097 ALLOCATE ( GRIDS(IMOD)%TRIGP(MTRI,3), & 2098 GRIDS(IMOD)%XYB(MX,3), & 2099 GRIDS(IMOD)%SI(MX), & 2100 GRIDS(IMOD)%TRIA(MTRI), & 2101 GRIDS(IMOD)%CROSSDIFF(6,MTRI), & 2102 GRIDS(IMOD)%IEN(MTRI,6), & 2103 GRIDS(IMOD)%LEN(MTRI,3), & 2104 GRIDS(IMOD)%ANGLE(MTRI,3), & 2105 GRIDS(IMOD)%ANGLE0(MTRI,3), & 2106 GRIDS(IMOD)%CCON(MX), & Page 51 Source Listing W3DIMUG 2014-09-16 16:59 w3gdatmd.f90 2107 GRIDS(IMOD)%COUNTCON(MX), & 2108 GRIDS(IMOD)%VNEIGH(MX,2*COUNTRI), & 2109 GRIDS(IMOD)%INDEX_CELL(MX+1), & 2110 GRIDS(IMOD)%IE_CELL(COUNTOTA), & 2111 GRIDS(IMOD)%POS_CELL(COUNTOTA), & 2112 GRIDS(IMOD)%IAA(NX+1), & 2113 GRIDS(IMOD)%JAA(NNZ), & 2114 GRIDS(IMOD)%POSI(3,COUNTOTA), & 2115 GRIDS(IMOD)%IOBP(MX), & 2116 GRIDS(IMOD)%IOBPD(NTH,MX) ) 2117 ! 2118 !some segmentation troubles can appear, they are related with the allocation of 2119 !normal(1st dimension) and the nesting of the triangulated grid. 2120 ! -------------------------------------------------------------------- / 2121 ! 3. Point to allocated arrays 2122 ! 2123 CALL W3SETG ( IMOD, NDSE, NDST ) 2124 ! 2125 ! -------------------------------------------------------------------- / 2126 ! 4. Update counters in grid 2127 ! 2128 NTRI = MTRI 2129 COUNTOT=COUNTOTA 2130 GUGINIT = .FALSE. 2131 RETURN 2132 ! 2133 ! Formats 2134 ! 2135 1001 FORMAT (/' *** ERROR W3DIMUG : GRIDS NOT INITIALIZED *** '/ & 2136 ' RUN W3NMOD FIRST '/) 2137 1002 FORMAT (/' *** ERROR W3DIMUG : ILLEGAL MODEL NUMBER *** '/ & 2138 ' IMOD = ',I10/ & 2139 ' NGRIDS = ',I10/) 2140 1003 FORMAT (/' *** ERROR W3DIMUG : ILLEGAL GRID DIMENSION(S) *** '/ & 2141 ' INPUT = ',I10/) 2142 1004 FORMAT (/' *** ERROR W3DIMUG : ARRAY(S) ALREADY ALLOCATED *** ') 2143 ! 2144 !/ 2145 !/ End of W3DIMUG ----------------------------------------------------- / 2146 !/ 2147 END SUBROUTINE W3DIMUG Page 52 Source Listing W3DIMUG 2014-09-16 16:59 Entry Points w3gdatmd.f90 ENTRY POINTS Name w3gdatmd_mp_w3dimug_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References 1001 Label 2135 2081 1002 Label 2137 2086 1003 Label 2140 1004 Label 2142 2090 COUNTOTA Dummy 1995 I(4) 4 scalar ARG,IN 2110,2111,2114,2129 EXTCDE Subr 2062 2062,2082,2087,2091 IMOD Dummy 1995 I(4) 4 scalar ARG,IN 2085,2086,2089,2097,2098,2099,2100 ,2101,2102,2103,2104,2105,2106,210 7,2108,2109,2110,2111,2112,2113,21 14,2115,2116,2123 MTRI Dummy 1995 I(4) 4 scalar ARG,IN 2097,2100,2101,2102,2103,2104,2105 ,2128 MX Dummy 1995 I(4) 4 scalar ARG,IN 2098,2099,2106,2107,2108,2109,2115 ,2116 NDSE Dummy 1995 I(4) 4 scalar ARG,IN 2081,2086,2090,2123 NDST Dummy 1995 I(4) 4 scalar ARG,IN 2123 NNZ Dummy 1995 I(4) 4 scalar ARG,IN 2113 W3DIMUG Subr 1995 W3SERVMD Module 2062 2062 Page 53 Source Listing W3DIMUG 2014-09-16 16:59 w3gdatmd.f90 2148 2149 !/ ------------------------------------------------------------------- / 2150 SUBROUTINE W3SETREF 2151 !/ 2152 !/ +-----------------------------------+ 2153 !/ | WAVEWATCH III NOAA/NCEP | 2154 !/ | F. Ardhuin | 2155 !/ | FORTRAN 90 | 2156 !/ | Last update : 13-Nov-2013 | 2157 !/ +-----------------------------------+ 2158 !/ 2159 !/ 13-Nov-2013 : Origination. ( version 4.13 ) 2160 !/ 2161 ! 1. Purpose : 2162 ! 2163 ! Update reflection directions at shoreline. 2164 ! 2165 ! 2. Method : 2166 ! 2167 ! 3. Parameters : 2168 ! 2169 ! Parameter list 2170 ! ---------------------------------------------------------------- 2171 ! None 2172 ! ---------------------------------------------------------------- 2173 ! 2174 ! 4. Subroutines used : 2175 ! 2176 ! See module documentation. 2177 ! 2178 ! 5. Called by : 2179 ! 2180 ! Name Type Module Description 2181 ! ---------------------------------------------------------------- 2182 ! WW3_GRID Prog. WW3_GRID Grid preprocessor 2183 ! W3ULEV Subr. W3UPDTMD Water level update 2184 ! ---------------------------------------------------------------- 2185 ! 2186 ! 6. Error messages : 2187 ! 2188 ! None. 2189 ! 2190 ! 7. Remarks : 2191 ! 2192 ! 8. Structure : 2193 ! 2194 ! See source code. 2195 ! 2196 ! 9. Switches : 2197 ! 2198 ! !/S Enable subroutine tracing. 2199 ! !/T Basic test output. 2200 ! 2201 ! 10. Source code : 2202 ! 2203 !/ ------------------------------------------------------------------- / 2204 USE CONSTANTS Page 54 Source Listing W3SETREF 2014-09-16 16:59 w3gdatmd.f90 2205 ! 2206 IMPLICIT NONE 2207 !/ 2208 !/ ------------------------------------------------------------------- / 2209 !/ 2210 INTEGER :: ISEA, IX, IY, IXY, IXN, IXP, IYN, IYP 2211 INTEGER :: J, K, NEIGH1(0:7) 2212 2213 REAL :: TRIX(NY*NX), TRIY(NY*NX), DX, DY, & 2214 COSAVG, SINAVG, THAVG, ANGLES(0:7), CLAT 2215 !/ 2216 !/ ------------------------------------------------------------------- / 2217 !/ 2218 ! 2219 ! 1. Preparations --------------------------------------------------- * 2220 ! 2221 RETURN 2222 ! 2223 ! Formats 2224 ! 2225 !/ 2226 !/ End of W3SETREF ----------------------------------------------------- / 2227 !/ 2228 END SUBROUTINE W3SETREF ENTRY POINTS Name w3gdatmd_mp_w3setref_ Page 55 Source Listing W3SETREF 2014-09-16 16:59 Symbol Table w3gdatmd.f90 SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References ANGLES Local 2214 R(4) 4 1 8 CLAT Local 2214 R(4) 4 scalar CONSTANTS Module 2204 2204 COSAVG Local 2214 R(4) 4 scalar DX Local 2213 R(4) 4 scalar DY Local 2213 R(4) 4 scalar ISEA Local 2210 I(4) 4 scalar IX Local 2210 I(4) 4 scalar IXN Local 2210 I(4) 4 scalar IXP Local 2210 I(4) 4 scalar IXY Local 2210 I(4) 4 scalar IY Local 2210 I(4) 4 scalar IYN Local 2210 I(4) 4 scalar IYP Local 2210 I(4) 4 scalar J Local 2211 I(4) 4 scalar K Local 2211 I(4) 4 scalar NEIGH1 Local 2211 I(4) 4 1 8 SINAVG Local 2214 R(4) 4 scalar THAVG Local 2214 R(4) 4 scalar TRIX Local 2213 R(4) 4 1 0 TRIY Local 2213 R(4) 4 1 0 W3SETREF Subr 2150 Page 56 Source Listing W3SETREF 2014-09-16 16:59 w3gdatmd.f90 2229 2230 !/ 2231 !/ End of module W3GDATMD -------------------------------------------- / 2232 !/ 2233 END MODULE W3GDATMD SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References CLGTYPE Param 516 I(4) 4 scalar DUMMY Local 613 R(4) 4 scalar DUMMY Local 654 R(4) 4 scalar DUMMY Local 658 R(4) 4 scalar DUMMY Local 662 R(4) 4 scalar GRID Type 533 4376 scalar 590,688 ICLOSE_NONE Param 519 I(4) 4 scalar ICLOSE_SMPL Param 520 I(4) 4 scalar ICLOSE_TRPL Param 521 I(4) 4 scalar ICLO_NONE Param 519 I(4) 4 scalar 519 ICLO_SMPL Param 520 I(4) 4 scalar 520 ICLO_TRPL Param 521 I(4) 4 scalar 521 MPAR Type 670 912 scalar 684,690 NPAR Type 603 36 scalar 606,672 PROP Type 608 8 scalar 610,673 REFPARS Local 721 R(4) 4 1 1 PTR SBSP Type 657 4 scalar 659,681 SBSPS Local 681 SBSP 4 scalar SBTP Type 644 4 scalar 646,678 SCHM Type 666 16 scalar 668,683 SDBP Type 648 12 scalar 651,679 SFLP Type 612 4 scalar 614,674 SFLPS Local 674 SFLP 4 scalar SGRD Type 592 1080 scalar 601,689 SLNP Type 616 12 scalar 618,675 SNLP Type 638 28 scalar 642,677 SRCP Type 620 776 scalar 636,676 STRP Type 653 4 scalar 655,680 STRPS Local 680 STRP 4 scalar SXXP Type 661 4 scalar 663,682 SXXPS Local 682 SXXP 4 scalar T_GSU Type 570 scalar 570,749 W3GDATMD Module 2 W3GSRUMD Module 504 504 Page 57 Source Listing W3SETREF 2014-09-16 16:59 Subprograms/Common Blocks w3gdatmd.f90 SUBPROGRAMS/COMMON BLOCKS Name Object Declared Type Bytes Dimen Elements Attributes References W3DIMS Subr 1127 W3DIMUG Subr 1995 W3DIMX Subr 946 W3GDATMD Module 2 W3GNTX Subr 1683 W3NMOD Subr 815 W3SETG Subr 1299 1106,1270,1792,2123 W3SETREF Subr 2150 COMPILER OPTIONS BEING USED -align nocommons -align nodcommons -align noqcommons -align records -align nosequence -align norec1byte -align norec2byte -align norec4byte -align norec8byte -align norec16byte -altparam -assume accuracy_sensitive -assume nobscc -assume nobuffered_io -assume byterecl -assume nocc_omp -assume nocstring -assume nodummy_aliases -assume nofpe_summary -assume noieee_fpe_flags -assume nominus0 -assume noold_boz -assume old_unit_star -assume old_ldout_format -assume noold_logical_ldio -assume old_maxminloc -assume old_xor -assume protect_constants -assume noprotect_parens -assume split_common -assume source_include -assume nostd_intent_in -assume nostd_mod_proc_name -assume norealloc_lhs -assume underscore -assume no2underscores -auto no -auto_scalar no -bintext -ccdefault default -check noargs -check noarg_temp_created -check nobounds -check noformat -check nooutput_conversion -check nooverflow -check nopointers -check power -check noshape -check nounderflow -check nouninitialized -coarray-num-procs 0 no -coarray-config-file -convert big_endian -cross_reference -D __INTEL_COMPILER=1210 -D __unix__ -D __unix -D __linux__ -D __linux -D __gnu_linux__ -D unix -D linux -D __ELF__ -D __x86_64 -D __x86_64__ -D _MT -D __INTEL_COMPILER_BUILD_DATE=20120612 -D __pentium4 -D __pentium4__ -D __tune_pentium4__ -D __SSE2__ -D __SSE3__ -D __SSSE3__ -D __SSE4_1__ -D __SSE4_2__ -D __SSE__ -D __MMX__ -D __AVX__ -double_size 64 Page 58 Source Listing W3SETREF 2014-09-16 16:59 w3gdatmd.f90 no -d_lines no -Qdyncom -error_limit 30 no -f66 no -f77rtl no -fast -fpscomp nofilesfromcmd -fpscomp nogeneral -fpscomp noioformat -fpscomp noldio_spacing -fpscomp nologicals no -fpconstant -fpe3 -fprm nearest no -ftz -fp_model noprecise -fp_model fast -fp_model nostrict -fp_model nosource -fp_model nodouble -fp_model noextended -fp_model novery_fast -fp_model noexcept -fp_model nono_except -heap_arrays 0 no -threadprivate_compat -free -g0 -iface nomixed_str_len_arg -iface nono_mixed_str_len_arg no -intconstant -integer_size 32 no -mixed_str_len_arg no -module -names lowercase no -noinclude -O2 no -pad_source -real_size 32 no -recursive -reentrancy none no -sharable_localsaves -vec=simd -show noinclude -show map -show options no -syntax_only no -threadcom no -U no -vms -w noall -w nonone -w alignments -w noargument_checking -w nodeclarations -w general -w noignore_bounds -w noignore_loc -w nointerfaces -w notruncated_source -w uncalled -w uninitialized -w nounused -w usage -includepath : /gpfs/gp1/usrx/local/intel/composer_xe_2011_sp1.11.339/compiler/include/,.f,./.f,/usrx/local/intel/composerxe/mkl/include/.f, /usrx/local/intel/composerxe/tbb/include/.f,/gpfs/gp1/usrx/local/intel/composer_xe_2011_sp1.11.339/compiler/include/intel64/.f, /gpfs/gp1/usrx/local/intel/composer_xe_2011_sp1.11.339/compiler/include/.f,/usr/local/include/.f,/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/.f, /usr/include/.f,/usr/include/.f -list filename : w3gdatmd.lst -o filename : none COMPILER: Intel(R) Fortran 12.1-2100