WAVEWATCH III  beta 0.0.1
w3pro2md Module Reference

Bundles routines for third order porpagation scheme in single module. More...

Functions/Subroutines

subroutine w3map2
 Generate 'map' arrays for the ULTIMATE QUICKEST scheme. More...
 
subroutine w3xyp2 (ISP, DTG, MAPSTA, MAPFS, VQ, VGX, VGY)
 Propagation in physical space for a given spectral component. More...
 
subroutine w3ktp2 (ISEA, FACTH, FACK, CTHG0, CG, WN, DEPTH, DDDX, DDDY, CX, CY, DCXDX, DCXDY, DCYDX, DCYDY, DCDX, DCDY, VA)
 Propagation in spectral space. More...
 

Detailed Description

Bundles routines for third order porpagation scheme in single module.

Author
H. L. Tolman
Date
29-May-2014

Function/Subroutine Documentation

◆ w3ktp2()

subroutine w3pro2md::w3ktp2 ( integer, intent(in)  ISEA,
real, intent(in)  FACTH,
real, intent(in)  FACK,
real, intent(in)  CTHG0,
real, dimension(0:nk+1), intent(in)  CG,
real, dimension(0:nk+1), intent(in)  WN,
real, intent(in)  DEPTH,
real, intent(in)  DDDX,
real, intent(in)  DDDY,
real, intent(in)  CX,
real, intent(in)  CY,
real, intent(in)  DCXDX,
real, intent(in)  DCXDY,
real, intent(in)  DCYDX,
real, intent(in)  DCYDY,
real, dimension(0:nk+1), intent(in)  DCDX,
real, dimension(0:nk+1), intent(in)  DCDY,
real, dimension(nspec), intent(inout)  VA 
)

Propagation in spectral space.

Third order QUICKEST scheme with ULTIMATE limiter.

As with the spatial propagation, the two spaces are considered independently, but the propagation is performed in a 2-D space. Compared to the propagation in physical space, the directions represent a closed space and are therefore comparable to the longitudinal or 'X' propagation. The wavenumber space has to be extended to allow for boundary treatment. Using a simple first order boundary treatment at both sided, two points need to be added. This implies that the spectrum needs to be extended, shifted and rotated, as is performed using MAPTH2 as set in W3MAP3.

Parameters
[in]ISEANumber of sea point.
[in]FACTHFactor in propagation velocity.
[in]FACKFactor in propagation velocity.
[in]CTHG0Factor in great circle refracftion term.
[in]CGLocal group velocities.
[in]WNLocal wavenumbers.
[in]DEPTHDepth.
[in]DDDXDepth gradient.
[in]DDDYDepth gradient.
[in]CXCurrent component.
[in]CYCurrent component.
[in]DCXDXCurrent gradients.
[in]DCXDYCurrent gradients.
[in]DCYDXCurrent gradients.
[in]DCYDYCurrent gradients.
[in]DCDXPhase speed gradient.
[in]DCDYPhase speed gradient.
[in,out]VASpectrum.
Author
H. L. Tolman
Date
01-Jul-2013

Definition at line 1305 of file w3pro2md.F90.

1305  !/
1306  !/ +-----------------------------------+
1307  !/ | WAVEWATCH III NOAA/NCEP |
1308  !/ | H. L. Tolman |
1309  !/ | FORTRAN 90 |
1310  !/ | Last update : 01-Jul-2013 |
1311  !/ +-----------------------------------+
1312  !/
1313  !/ 14-Feb-2000 : Origination. ( version 2.08 )
1314  !/ 17-Dec-2004 : Multiple grid version. ( version 3.06 )
1315  !/ 01-Jul-2013 : Adding UQ and UNO switches to chose between third
1316  !/ and second order schemes. ( version 4.12 )
1317  !/
1318  ! 1. Purpose :
1319  !
1320  ! Propagation in spectral space.
1321  !
1322  ! 2. Method :
1323  !
1324  ! Third order QUICKEST scheme with ULTIMATE limiter.
1325  !
1326  ! As with the spatial propagation, the two spaces are considered
1327  ! independently, but the propagation is performed in a 2-D space.
1328  ! Compared to the propagation in physical space, the directions
1329  ! rerpesent a closed space and are therefore comparable to the
1330  ! longitudinal or 'X' propagation. The wavenumber space has to be
1331  ! extended to allow for boundary treatment. Using a simple first
1332  ! order boundary treatment at both sided, two points need to
1333  ! be added. This implies that the spectrum needs to be extended,
1334  ! shifted and rotated, as is performed using MAPTH2 as set
1335  ! in W3MAP3.
1336  !
1337  ! 3. Parameters :
1338  !
1339  ! Parameter list
1340  ! ----------------------------------------------------------------
1341  ! ISEA Int. I Number of sea point.
1342  ! FACTH/K Real I Factor in propagation velocity.
1343  ! CTHG0 Real I Factor in great circle refracftion term.
1344  ! MAPxx2 I.A. I Propagation and storage maps.
1345  ! CG R.A. I Local group velocities.
1346  ! WN R.A. I Local wavenumbers.
1347  ! DEPTH R.A. I Depth.
1348  ! DDDx Real I Depth gradients.
1349  ! CX/Y Real I Current components.
1350  ! DCxDx Real I Current gradients.
1351  ! DCDX-Y Real I Phase speed gradients.
1352  ! VA R.A. I/O Spectrum.
1353  ! ----------------------------------------------------------------
1354  !
1355  ! Local variables.
1356  ! ----------------------------------------------------------------
1357  ! DSDD R.A. Partial derivative of sigma for depth.
1358  ! FDD, FDU, FDG, FCD, FCU
1359  ! R.A. Directionally varying part of depth, current and
1360  ! great-circle refraction terms and of consit.
1361  ! of Ck term.
1362  ! CFLT-K R.A. Propagation velocities of local fluxes.
1363  ! DB R.A. Wavenumber band widths at cell centers.
1364  ! DM R.A. Wavenumber band widths between cell centers and
1365  ! next cell center.
1366  ! Q R.A. Extracted spectrum
1367  ! ----------------------------------------------------------------
1368  !
1369  ! 4. Subroutines used :
1370  !
1371  ! W3QCK1 Actual propagation routine.
1372  ! W3QCK2 Actual propagation routine.
1373  ! STRACE Service routine.
1374  !
1375  ! 5. Called by :
1376  !
1377  ! W3WAVE Wave model routine.
1378  !
1379  ! 6. Error messages :
1380  !
1381  ! None.
1382  !
1383  ! 8. Structure :
1384  !
1385  ! -----------------------------------------------------------------
1386  ! 1. Preparations
1387  ! a Initialize arrays
1388  ! b Set constants and counters
1389  ! 2. Point preparations
1390  ! a Calculate DSDD
1391  ! b Extract spectrum
1392  ! 3. Refraction velocities
1393  ! a Filter level depth reffraction.
1394  ! b Depth refratcion velocity.
1395  ! c Current refraction velocity.
1396  ! 4. Wavenumber shift velocities
1397  ! a Prepare directional arrays
1398  ! b Calcuate velocity.
1399  ! 5. Propagate.
1400  ! 6. Store results.
1401  ! -----------------------------------------------------------------
1402  !
1403  ! 9. Switches :
1404  !
1405  ! !/S Enable subroutine tracing.
1406  ! !/T Enable general test output.
1407  !
1408  ! 10. Source code :
1409  !
1410  !/ ------------------------------------------------------------------- /
1411  USE constants
1412  USE w3gdatmd, ONLY: nk, nk2, nth, nspec, sig, dsip, ecos, esin, &
1413  ec2, esc, es2, fachfa, mapwn, flcth, flck, &
1414  ctmax
1415  USE w3adatmd, ONLY: mapth2, mapwn2, itime
1416  USE w3idatmd, ONLY: flcur
1417  USE w3odatmd, ONLY: ndse, ndst
1418 #ifdef W3_S
1419  USE w3servmd, ONLY: strace
1420 #endif
1421 #ifdef W3_UQ
1422  USE w3uqckmd
1423 #endif
1424 #ifdef W3_UNO
1425  USE w3uno2md
1426 #endif
1427  !/
1428  IMPLICIT NONE
1429  !/
1430  !/ ------------------------------------------------------------------- /
1431  !/ Parameter list
1432  !/
1433  INTEGER, INTENT(IN) :: ISEA
1434  REAL, INTENT(IN) :: FACTH, FACK, CTHG0, CG(0:NK+1), &
1435  WN(0:NK+1), DEPTH, DDDX, DDDY, &
1436  CX, CY, DCXDX, DCXDY, DCYDX, DCYDY
1437  REAL, INTENT(IN) :: DCDX(0:NK+1), DCDY(0:NK+1)
1438  REAL, INTENT(INOUT) :: VA(NSPEC)
1439  !/
1440  !/ ------------------------------------------------------------------- /
1441  !/ Local parameters
1442  !/
1443  INTEGER :: ITH, IK, ISP
1444 #ifdef W3_S
1445  INTEGER, SAVE :: IENT = 0
1446 #endif
1447  REAL :: FDDMAX, FDG, FKD, FKD0, DCYX, &
1448  DCXXYY, DCXY, DCXX, DCXYYX, DCYY
1449  REAL :: DSDD(0:NK+1), FRK(NK), FRG(NK), &
1450  FKC(NTH), VQ(-NK-1:NK2*(NTH+2)), &
1451  DB(NK2,NTH+1), DM(NK2,0:NTH+1), &
1452  VCFLT(NK2*(NTH+1)), CFLK(NK2,NTH)
1453  !/
1454  !/ ------------------------------------------------------------------- /
1455  !/
1456 #ifdef W3_S
1457  CALL strace (ient, 'W3KTP2')
1458 #endif
1459  !
1460  ! 1. Preparations --------------------------------------------------- *
1461  ! 1.a Initialize arrays
1462  !
1463  IF ( flck ) vq = 0.
1464  !
1465 #ifdef W3_T
1466  WRITE (ndst,9000) flcth, flck, facth, fack, ctmax
1467  WRITE (ndst,9010) isea, depth, cx, cy, dddx, dddy, &
1468  dcxdx, dcxdy, dcydx, dcydy
1469 #endif
1470  !
1471  ! 2. Preparation for point ------------------------------------------ *
1472  ! 2.a Array with partial derivative of sigma versus depth
1473  !
1474  DO ik=0, nk+1
1475  IF ( depth*wn(ik) .LT. 5. ) THEN
1476  dsdd(ik) = max( 0. , &
1477  cg(ik)*wn(ik)-0.5*sig(ik) ) / depth
1478  ELSE
1479  dsdd(ik) = 0.
1480  END IF
1481  END DO
1482  !
1483 #ifdef W3_T
1484  WRITE (ndst,9020)
1485  DO ik=1, nk+1
1486  WRITE (ndst,9021) ik, tpi/sig(ik), tpi/wn(ik), &
1487  cg(ik), dsdd(ik)
1488  END DO
1489 #endif
1490  !
1491  ! 2.b Extract spectrum
1492  !
1493  DO isp=1, nspec
1494  vq(mapth2(isp)) = va(isp)
1495  END DO
1496  !
1497  ! 3. Refraction velocities ------------------------------------------ *
1498  !
1499  IF ( flcth ) THEN
1500  !
1501  ! 3.a Set slope filter for depth refraction
1502  !
1503  fddmax = 0.
1504  fdg = facth * cthg0
1505  !
1506  DO ith=1, nth/2
1507  fddmax = max(fddmax,abs(esin(ith)*dddx-ecos(ith)*dddy))
1508  END DO
1509  !
1510  DO ik=1, nk
1511  frk(ik) = facth * dsdd(ik) / wn(ik)
1512  frk(ik) = frk(ik) / max( 1. , frk(ik)*fddmax/ctmax )
1513  frg(ik) = fdg * cg(ik)
1514  END DO
1515  !
1516  ! 3.b Depth refraction and great-circle propagation
1517  !
1518  DO isp=1, nspec
1519  vcflt(mapth2(isp)) = frg(mapwn(isp)) * ecos(isp) &
1520  + frk(mapwn(isp)) * ( esin(isp)*dddx - ecos(isp)*dddy )
1521  END DO
1522  !
1523 #ifdef W3_REFRX
1524  ! 3.c @C/@x refraction and great-circle propagation
1525  vcflt = 0.
1526  frk = 0.
1527  fddmax = 0.
1528  !
1529  DO isp=1, nspec
1530  fddmax = max( fddmax , abs( &
1531  esin(isp)*dcdx(mapwn(isp)) - ecos(isp)*dcdy(mapwn(isp)) ) )
1532  END DO
1533  !
1534  DO ik=1, nk
1535  frk(ik) = facth * cg(ik) * wn(ik) / sig(ik)
1536  END DO
1537  DO isp=1, nspec
1538  vcflt(mapth2(isp)) = frg(mapwn(isp)) * ecos(isp) &
1539  + frk(mapwn(isp)) * ( esin(isp)*dcdx(mapwn(isp)) &
1540  - ecos(isp)*dcdy(mapwn(isp)) )
1541  END DO
1542 #endif
1543  !
1544  ! 3.d Current refraction
1545  !
1546  IF ( flcur ) THEN
1547  !
1548  dcyx = facth * dcydx
1549  dcxxyy = facth * ( dcxdx - dcydy )
1550  dcxy = facth * dcxdy
1551  !
1552  DO isp=1, nspec
1553  vcflt(mapth2(isp)) = vcflt(mapth2(isp)) + &
1554  es2(isp)*dcyx + esc(isp)*dcxxyy - ec2(isp)*dcxy
1555  END DO
1556  !
1557  END IF
1558  !
1559  END IF
1560  !
1561  ! 4. Wavenumber shift velocities ------------------------------------ *
1562  ! FACK is just the time step, which is accounted for in W3QCK2
1563  !
1564  IF ( flck ) THEN
1565  !
1566  ! 4.a Directionally dependent part
1567  !
1568  dcxx = - dcxdx
1569  dcxyyx = - ( dcxdy + dcydx )
1570  dcyy = - dcydy
1571  fkd = ( cx*dddx + cy*dddy )
1572  !
1573  DO ith=1, nth
1574  fkc(ith) = ec2(ith)*dcxx + &
1575  esc(ith)*dcxyyx + es2(ith)*dcyy
1576  END DO
1577  !
1578  ! 4.b Velocities
1579  !
1580  DO ik=0, nk+1
1581  fkd0 = fkd / cg(ik) * dsdd(ik)
1582  DO ith=1, nth
1583  cflk(ik+1,ith) = fkd0 + wn(ik)*fkc(ith)
1584  END DO
1585  END DO
1586  !
1587  ! 4.c Band widths
1588  !
1589  DO ik=0, nk
1590  db(ik+1,1) = dsip(ik) / cg(ik)
1591  dm(ik+1,1) = wn(ik+1) - wn(ik)
1592  END DO
1593  db(nk+2,1) = dsip(nk+1) / cg(nk+1)
1594  dm(nk+2,1) = 0.
1595  !
1596  DO ith=2, nth
1597  DO ik=1, nk+2
1598  db(ik,ith) = db(ik,1)
1599  dm(ik,ith) = dm(ik,1)
1600  END DO
1601  END DO
1602  !
1603  END IF
1604  !
1605  ! 5. Propagate ------------------------------------------------------ *
1606  !
1607  IF ( mod(itime,2) .EQ. 0 ) THEN
1608  IF ( flck ) THEN
1609  DO ith=1, nth
1610  vq(nk+2+(ith-1)*nk2) = fachfa * vq(nk+1+(ith-1)*nk2)
1611  END DO
1612  !
1613 #ifdef W3_UQ
1614  CALL w3qck2 ( nth, nk2, nth, nk2, cflk, fack, db, dm, &
1615  vq, .false., 1, mapth2, nspec, &
1616  mapwn2, nspec-nth, nspec, nspec+nth, &
1617  ndse, ndst )
1618 #endif
1619  !
1620 #ifdef W3_UNO
1621  CALL w3uno2 ( nth, nk2, nth, nk2, cflk, fack, db, dm, &
1622  vq, .false., 1, mapth2, nspec, &
1623  mapwn2, nspec-nth, nspec, nspec+nth, &
1624  ndse, ndst )
1625 #endif
1626  END IF
1627  IF ( flcth ) THEN
1628  !
1629 #ifdef W3_UQ
1630  CALL w3qck1 ( nth, nk2, nth, nk2, vcflt, vq, .true., &
1631  nk2, mapth2, nspec, mapth2, nspec, nspec, &
1632  nspec, ndse, ndst )
1633 #endif
1634  !
1635 #ifdef W3_UNO
1636  CALL w3uno2r( nth, nk2, nth, nk2, vcflt, vq, .true., &
1637  nk2, mapth2, nspec, mapth2, nspec, nspec,&
1638  nspec, ndse, ndst )
1639 #endif
1640  !
1641  END IF
1642  ELSE
1643  IF ( flcth ) THEN
1644  !
1645 #ifdef W3_UQ
1646  CALL w3qck1 ( nth, nk2, nth, nk2, vcflt, vq, .true., &
1647  nk2, mapth2, nspec, mapth2, nspec, nspec, &
1648  nspec, ndse, ndst )
1649 #endif
1650  !
1651 #ifdef W3_UNO
1652  CALL w3uno2r( nth, nk2, nth, nk2, vcflt, vq, .true., &
1653  nk2, mapth2, nspec, mapth2, nspec, nspec,&
1654  nspec, ndse, ndst )
1655 #endif
1656  !
1657  END IF
1658  IF ( flck ) THEN
1659  DO ith=1, nth
1660  vq(nk+2+(ith-1)*nk2) = fachfa * vq(nk+1+(ith-1)*nk2)
1661  END DO
1662  !
1663 #ifdef W3_UQ
1664  CALL w3qck2 ( nth, nk2, nth, nk2, cflk, fack, db, dm, &
1665  vq, .false., 1, mapth2, nspec, &
1666  mapwn2, nspec-nth, nspec, nspec+nth, &
1667  ndse, ndst )
1668 #endif
1669  !
1670 #ifdef W3_UNO
1671  CALL w3uno2 ( nth, nk2, nth, nk2, cflk, fack, db, dm, &
1672  vq, .false., 1, mapth2, nspec, &
1673  mapwn2, nspec-nth, nspec, nspec+nth, &
1674  ndse, ndst )
1675 #endif
1676  !
1677  END IF
1678  END IF
1679  !
1680  ! 6. Store reults --------------------------------------------------- *
1681  !
1682  DO isp=1, nspec
1683  va(isp) = vq(mapth2(isp))
1684  END DO
1685  !
1686  RETURN
1687  !
1688  ! Formats
1689  !
1690 #ifdef W3_T
1691 9000 FORMAT ( ' TEST W3KTP2 : FLCTH-K, FACTH-K, CTMAX :', &
1692  2l2,2e10.3,f7.3)
1693 9010 FORMAT ( ' TEST W3KTP2 : LOCAL DATA :',i7,f7.1,2f6.2,1x,6e10.2)
1694 9020 FORMAT ( ' TEST W3KTP2 : IK, T, L, CG, DSDD : ')
1695 9021 FORMAT ( ' ',i3,f7.2,f7.1,f7.2,e11.3)
1696 #endif
1697  !
1698 #ifdef W3_T0
1699 9040 FORMAT (/' TEST W3KTP2 : NORMALIZED ',a/)
1700 9041 FORMAT (1x,60(1x,i2))
1701 9042 FORMAT (1x,60i3)
1702 #endif
1703  !/
1704  !/ End of W3KTP2 ----------------------------------------------------- /
1705  !/

References w3gdatmd::ctmax, w3gdatmd::dsip, w3gdatmd::ec2, w3gdatmd::ecos, w3gdatmd::es2, w3gdatmd::esc, w3gdatmd::esin, w3gdatmd::fachfa, w3gdatmd::flck, w3gdatmd::flcth, w3idatmd::flcur, w3adatmd::itime, w3adatmd::mapth2, w3gdatmd::mapwn, w3adatmd::mapwn2, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3gdatmd::nk2, w3gdatmd::nspec, w3gdatmd::nth, w3gdatmd::sig, w3servmd::strace(), constants::tpi, w3uqckmd::w3qck1(), w3uqckmd::w3qck2(), w3uno2md::w3uno2(), and w3uno2md::w3uno2r().

Referenced by w3wavemd::w3wave().

◆ w3map2()

subroutine w3pro2md::w3map2

Generate 'map' arrays for the ULTIMATE QUICKEST scheme.

Author
H. L. Tolman
Date
09-Nov-2005

Definition at line 136 of file w3pro2md.F90.

136  !/
137  !/
138  !/ +-----------------------------------+
139  !/ | WAVEWATCH III NOAA/NCEP |
140  !/ | H. L. Tolman |
141  !/ | FORTRAN 90 |
142  !/ | Last update : 09-Nov-2005 |
143  !/ +-----------------------------------+
144  !/
145  !/ 19-Dec-1996 : Final FORTRAN 77 ( version 1.18 )
146  !/ 15-Dec-1999 : Upgrade to FORTRAN 90 ( version 2.00 )
147  !/ 09-Feb-2001 : Clean up of parameter lists ( version 2.08 )
148  !/ 20-Dec-2004 : Multiple grid version. ( version 3.06 )
149  !/ 09-Nov-2005 : Removing soft boundary option. ( version 3.08 )
150  !/
151  ! 1. Purpose :
152  !
153  ! Generate 'map' arrays for the ULTIMATE QUICKEST scheme.
154  !
155  ! 2. Method :
156  !
157  ! MAPX2, MAPY2, MAPTH2 and MAPWN2 contain consecutive 1-D spatial
158  ! grid counters (e.g., IXY = (IX-1)*MY + IY). The arrays are
159  ! devided in three parts. For MAPX2, these ranges are :
160  !
161  ! 1 - NMX0 Counters IXY for which grid point (IX,IY) and
162  ! (IX+1,IY) both are active grid points.
163  ! NMX0+1 - NMX1 Id. only (IX,IY) active.
164  ! NMX1+1 - NMX2 Id. only (IX+1,IY) active.
165  !
166  ! The array MAPY2 has a similar layout varying IY instead of IX.
167  ! MAPXY contains similar information for the cross term in the
168  ! diffusion correction (counter NMXY only).
169  !
170  ! 3. Parameters :
171  !
172  ! Parameter list
173  ! ----------------------------------------------------------------
174  ! ----------------------------------------------------------------
175  !
176  ! 4. Subroutines used :
177  !
178  ! See module documentation.
179  !
180  ! 5. Called by :
181  !
182  ! Name Type Module Description
183  ! ----------------------------------------------------------------
184  ! W3WAVE Subr. W3WAVEMD Wave model routine.
185  ! ---------------------------------------------------------------
186  !
187  ! 6. Error messages :
188  !
189  ! 7. Remarks :
190  !
191  ! 8. Structure :
192  !
193  ! ------------------------------------------------------
194  ! 1. Map MAPX2
195  ! a Range 1 to NMX0
196  ! b Range NMX0+1 to NMX1
197  ! c Range NMX1+1 to NMX2
198  ! 2. Map MAPY2
199  ! a Range 1 to NMY0
200  ! b Range NMY0+1 to NMY1
201  ! c Range NMY1+1 to NMY2
202  ! 3. Map MAPAXY and MAPXY
203  ! 4. Maps for intra-spectral propagation
204  ! a MAPTH2, MAPATK
205  ! b MAPWN2
206  ! ------------------------------------------------------
207  !
208  ! 9. Switches :
209  !
210  ! !/S Enable subroutine tracing.
211  ! !/T Enable test output.
212  !
213  ! 10. Source code :
214  !/ ------------------------------------------------------------------- /
215  USE w3gdatmd, ONLY: nk, nth, nspec, nx, ny, nsea, mapsta
216  USE w3adatmd, ONLY: nmx0, nmx1, nmx2, nmy0, nmy1, nmy2, nact, &
217  nmxy, mapx2, mapy2, mapaxy, mapxy, &
218  mapth2, mapwn2
219  USE w3odatmd, ONLY: ndst
220 #ifdef W3_S
221  USE w3servmd, ONLY: strace
222 #endif
223  !/
224  IMPLICIT NONE
225  !/
226  !/ ------------------------------------------------------------------- /
227  !/ Parameter list
228  !/
229  !/ ------------------------------------------------------------------- /
230  !/ Local parameters
231  !/
232  INTEGER :: IX, IY, IXY0, IX2, IY2, IX0, IY0, &
233  IK, ITH, ISP, ISP0, ISP2
234 #ifdef W3_S
235  INTEGER, SAVE :: IENT = 0
236 #endif
237 #ifdef W3_T
238  INTEGER :: MAPTXY(NY,NX), I, IXY
239  INTEGER :: MAPTST(NK+2,NTH)
240 #endif
241  !/
242  !/ ------------------------------------------------------------------- /
243  !/
244 #ifdef W3_S
245  CALL strace (ient, 'W3MAP2')
246 #endif
247  !
248  ! 1. Map MAPX2 ------------------------------------------------------ *
249  ! 1.a Range 1 to NMX0
250  !
251 #ifdef W3_T
252  maptxy = 0.
253 #endif
254  !
255  nmx0 = 0
256  DO ix=1, nx
257  ixy0 = (ix-1)*ny
258  ix2 = 1 + mod(ix,nx)
259  DO iy=2, ny-1
260  IF ( mapsta(iy,ix).EQ.1 .AND. mapsta(iy,ix2).EQ.1 ) THEN
261  nmx0 = nmx0 + 1
262  mapx2(nmx0) = ixy0 + iy
263 #ifdef W3_T
264  maptxy(iy,ix) = maptxy(iy,ix) + 1
265 #endif
266  END IF
267  END DO
268  END DO
269  !
270  ! 1.b Range NMX0+1 to NMX1
271  !
272  nmx1 = nmx0
273  DO ix=1, nx
274  ixy0 = (ix-1)*ny
275  ix2 = 1 + mod(ix,nx)
276  DO iy=2, ny-1
277  IF ( mapsta(iy,ix).EQ.1 .AND. mapsta(iy,ix2).NE.1 ) THEN
278  nmx1 = nmx1 + 1
279  mapx2(nmx1) = ixy0 + iy
280 #ifdef W3_T
281  maptxy(iy,ix) = maptxy(iy,ix) + 2
282 #endif
283  END IF
284  END DO
285  END DO
286  !
287  ! 1.c Range NMX1+1 to NMX2
288  !
289  nmx2 = nmx1
290  DO ix=1, nx
291  ixy0 = (ix-1)*ny
292  ix2 = 1 + mod(ix,nx)
293  DO iy=2, ny-1
294  IF ( mapsta(iy,ix).NE.1 .AND. mapsta(iy,ix2).EQ.1 ) THEN
295  nmx2 = nmx2 + 1
296  mapx2(nmx2) = ixy0 + iy
297 #ifdef W3_T
298  maptxy(iy,ix) = maptxy(iy,ix) + 4
299 #endif
300  END IF
301  END DO
302  END DO
303  !
304 
305 #ifdef W3_T
306  WRITE (ndst,9000) 'MAPX2', nmx0, nmx1-nmx0, &
307  nmx2-nmx1, nmx2
308  DO iy=ny, 1, -1
309  WRITE (ndst,9001) (maptxy(iy,ix),ix=1, nx)
310  END DO
311 #endif
312  !
313  ! 2. Map MAPY2 ------------------------------------------------------ *
314  ! 2.a Range 1 to NMY0
315  !
316 #ifdef W3_T
317  maptxy = 0.
318 #endif
319  !
320  nmy0 = 0
321  DO ix=1, nx
322  ixy0 = (ix-1)*ny
323  DO iy=1, ny-1
324  iy2 = iy + 1
325  IF ( mapsta(iy,ix).EQ.1 .AND. mapsta(iy2,ix).EQ.1 ) THEN
326  nmy0 = nmy0 + 1
327  mapy2(nmy0) = ixy0 + iy
328 #ifdef W3_T
329  maptxy(iy,ix) = maptxy(iy,ix) + 1
330 #endif
331  END IF
332  END DO
333  END DO
334  !
335  ! 2.b Range NMY0+1 to NMY1
336  !
337  nmy1 = nmy0
338  DO ix=1, nx
339  ixy0 = (ix-1)*ny
340  DO iy=1, ny-1
341  iy2 = iy + 1
342  IF ( mapsta(iy,ix).EQ.1 .AND. mapsta(iy2,ix).NE.1 ) THEN
343  nmy1 = nmy1 + 1
344  mapy2(nmy1) = ixy0 + iy
345 #ifdef W3_T
346  maptxy(iy,ix) = maptxy(iy,ix) + 2
347 #endif
348  END IF
349  END DO
350  END DO
351  !
352  ! 2.c Range NMY1+1 to NMY2
353  !
354  nmy2 = nmy1
355  DO ix=1, nx
356  ixy0 = (ix-1)*ny
357  DO iy=1, ny-1
358  iy2 = iy + 1
359  IF ( mapsta(iy,ix).NE.1 .AND. mapsta(iy2,ix).EQ.1 ) THEN
360  nmy2 = nmy2 + 1
361  mapy2(nmy2) = ixy0 + iy
362 #ifdef W3_T
363  maptxy(iy,ix) = maptxy(iy,ix) + 4
364 #endif
365  END IF
366  END DO
367  END DO
368  !
369 #ifdef W3_T
370  WRITE (ndst,9000) 'MAPY2', nmy0, nmy1-nmy0, &
371  nmy2-nmy1, nmy2
372  DO iy=ny, 1, -1
373  WRITE (ndst,9001) (maptxy(iy,ix),ix=1, nx)
374  END DO
375 #endif
376  !
377  ! 3. Map MAPAXY and MAPXY ------------------------------------------- *
378  !
379  nact = 0
380  DO ix=1, nx
381  iy0 = (ix-1)*ny
382  DO iy=2, ny-1
383  IF ( mapsta(iy,ix).EQ.1 ) THEN
384  nact = nact + 1
385  mapaxy(nact) = iy0 + iy
386  END IF
387  END DO
388  END DO
389  !
390  nmxy = 0
391  DO ix=1, nx
392  ixy0 = (ix-1)*ny
393  ix2 = ix+1
394  IF ( ix .EQ. nx ) ix2 = 1
395  DO iy=2, ny-1
396  IF ( mapsta( iy ,ix ).GE.1 .AND. &
397  mapsta( iy ,ix2).GE.1 .AND. &
398  mapsta(iy+1,ix ).GE.1 .AND. &
399  mapsta(iy+1,ix2).GE.1 ) THEN
400  nmxy = nmxy + 1
401  mapxy(nmxy) = ixy0 + iy
402  END IF
403  END DO
404  END DO
405  !
406  ! 4. Maps for intra-spectral propagation ---------------------------- *
407  !
408  IF ( mapth2(1) .NE. 0 ) RETURN
409  !
410 #ifdef W3_T
411  maptst = 0
412 #endif
413  !
414  ! 4.a MAPTH2 and MAPBTK
415  !
416  DO ik=1, nk
417  DO ith=1, nth
418  isp = ith + (ik-1)*nth
419  isp2 = (ik+1) + (ith-1)*(nk+2)
420  mapth2(isp) = isp2
421 #ifdef W3_T
422  maptst(ik+1,ith) = maptst(ik+1,ith) + 1
423 #endif
424  END DO
425  END DO
426  !
427 #ifdef W3_T
428  WRITE (ndst,9000) 'MAPTH2', isp, 0, 0, isp
429  DO ik=nk+2, 1, -1
430  WRITE (ndst,9001) (maptst(ik,ith),ith=1, nth)
431  END DO
432  maptst = 0
433 #endif
434  !
435  ! 4.b MAPWN2
436  !
437  isp0 = 0
438  DO ik=1, nk-1
439  DO ith=1, nth
440  isp0 = isp0 + 1
441  isp2 = (ik+1) + (ith-1)*(nk+2)
442  mapwn2(isp0) = isp2
443 #ifdef W3_T
444  maptst(ik+1,ith) = maptst(ik+1,ith) + 1
445 #endif
446  END DO
447  END DO
448  !
449  DO ith=1, nth
450  isp0 = isp0 + 1
451  isp2 = nk+1 + (ith-1)*(nk+2)
452  mapwn2(isp0) = isp2
453 #ifdef W3_T
454  maptst(nk+1,ith) = maptst(nk+1,ith) + 2
455 #endif
456  END DO
457  !
458  DO ith=1, nth
459  isp0 = isp0 + 1
460  isp2 = 1 + (ith-1)*(nk+2)
461  mapwn2(isp0) = isp2
462 #ifdef W3_T
463  maptst(1,ith) = maptst(1,ith) + 4
464 #endif
465  END DO
466  !
467 #ifdef W3_T
468  WRITE (ndst,9000) 'MAPWN2', nspec-nth, nth, nth, nspec+nth
469  DO ik=nk+2, 1, -1
470  WRITE (ndst,9001) (maptst(ik,ith),ith=1, nth)
471  END DO
472 #endif
473  !
474  RETURN
475  !
476  ! Formats
477  !
478 #ifdef W3_T
479 9000 FORMAT (/' TEST W3MAP2 : TEST MAP FOR PROPAGATION'/ &
480  ' MAP : ',a/ &
481  ' CENTRAL : ',i6/ &
482  ' ABOVE : ',i6/ &
483  ' BELOW : ',i6/ &
484  ' TOTAL : ',i6/)
485 9001 FORMAT (1x,130i1)
486 9010 FORMAT (' TEST W3MAP2 : COMPOSITE MAPS TH2, WN2 AND BTK')
487 9011 FORMAT (2x,60i2)
488 #endif
489  !/
490  !/ End of W3MAP2 ----------------------------------------------------- /
491  !/

References w3adatmd::mapaxy, w3gdatmd::mapsta, w3adatmd::mapth2, w3adatmd::mapwn2, w3adatmd::mapx2, w3adatmd::mapxy, w3adatmd::mapy2, w3adatmd::nact, w3odatmd::ndst, w3gdatmd::nk, w3adatmd::nmx0, w3adatmd::nmx1, w3adatmd::nmx2, w3adatmd::nmxy, w3adatmd::nmy0, w3adatmd::nmy1, w3adatmd::nmy2, w3gdatmd::nsea, w3gdatmd::nspec, w3gdatmd::nth, w3gdatmd::nx, w3gdatmd::ny, and w3servmd::strace().

Referenced by w3wavemd::w3wave().

◆ w3xyp2()

subroutine w3pro2md::w3xyp2 ( integer, intent(in)  ISP,
real, intent(in)  DTG,
integer, dimension(ny*nx), intent(in)  MAPSTA,
integer, dimension(ny*nx), intent(in)  MAPFS,
real, dimension(1-ny:ny*(nx+2)), intent(inout)  VQ,
real, intent(in)  VGX,
real, intent(in)  VGY 
)

Propagation in physical space for a given spectral component.

Parameters
[in]ISPNumber of spectral bin (IK-1)*NTH+ITH.
[in]DTGTotal time step.
[in]MAPSTAGrid point status map.
[in]MAPFSStorage map.
[in,out]VQField to propagate.
[in]VGX
[in]VGY
Author
H. L. Tolman
Date
29-May-2014

Definition at line 509 of file w3pro2md.F90.

509  !/
510  !/ +-----------------------------------+
511  !/ | WAVEWATCH III NOAA/NCEP |
512  !/ | H. L. Tolman |
513  !/ | FORTRAN 90 |
514  !/ | Last update : 29-May-2014 |
515  !/ +-----------------------------------+
516  !/
517  !/ 07-Jul-1998 : Final FORTRAN 77 ( version 1.18 )
518  !/ 15-Dec-1999 : Upgrade to FORTRAN 90 ( version 2.00 )
519  !/ 24-Jan-2001 : Flat grid version ( version 2.06 )
520  !/ 09-Feb-2001 : Clean up of parameter lists ( version 2.08 )
521  !/ 14-Feb-2001 : Unit numbers in UQ routines ( version 2.08 )
522  !/ 13-Nov-2001 : Sub-grid obstructions. ( version 2.14 )
523  !/ 26-Dec-2002 : Moving grid option, ( version 3.02 )
524  !/ 20-Dec-2004 : Multiple grid version. ( version 3.06 )
525  !/ 07-Sep-2005 : Improved boundary conditions. ( version 3.08 )
526  !/ 09-Nov-2005 : Removing soft boundary option. ( version 3.08 )
527  !/ 05-Mar-2008 : Added NEC sxf90 compiler directives.
528  !/ (Chris Bunney, UK Met Office) ( version 3.13 )
529  !/ 30-Oct-2009 : Implement curvilinear grid type. ( version 3.14 )
530  !/ (W. E. Rogers & T. J. Campbell, NRL)
531  !/ 06-Dec-2010 : Change from GLOBAL (logical) to ICLOSE (integer) to
532  !/ specify index closure for a grid. ( version 3.14 )
533  !/ (T. J. Campbell, NRL)
534  !/ 23-Dec-2010 : Fix HPFAC and HQFAC by including the COS(YGRD)
535  !/ factor with DXDP and DXDQ terms. ( version 3.14 )
536  !/ (T. J. Campbell, NRL)
537  !/ 01-Jul-2013 : Adding UQ and UNO switches to chose between third
538  !/ and second order schemes. ( version 4.12 )
539  !/ 29-May-2014 : Adding OMPH switch. ( version 5.02 )
540  !/
541  ! 1. Purpose :
542  !
543  ! Propagation in physical space for a given spectral component.
544  !
545  ! 2. Method :
546  !
547  ! Third-order ULTIMATE QUICKEST scheme and diffusion correction
548  ! for linear dispersion (see manual).
549  ! Curvilinear grid implementation: Fluxes are computed in index space
550  ! and then transformed back into physical space. The diffusion term
551  ! is handled in physical space.
552  !
553  ! 3. Parameters :
554  !
555  ! Parameter list
556  ! ----------------------------------------------------------------
557  ! ISP Int. I Number of spectral bin (IK-1)*NTH+ITH
558  ! DTG Real I Total time step.
559  ! MAPSTA I.A. I Grid point status map.
560  ! MAPFS I.A. I Storage map.
561  ! VQ R.A. I/O Field to propagate.
562  ! ----------------------------------------------------------------
563  !
564  ! Local variables.
565  ! ----------------------------------------------------------------
566  ! NTLOC Int Number of local time steps.
567  ! DTLOC Real Local propagation time step.
568  ! CGD Real Deep water group velocity.
569  ! DSSD, DNND Deep water diffusion coefficients.
570  ! VLCFLX R.A. Local courant numbers in index space (norm. velocities)
571  ! VLCFLY R.A.
572  ! CXTOT R.A. Propagation velocities in physical space.
573  ! CYTOT R.A.
574  ! CELLP Real Cell Reynolds/Peclet number used to calculate
575  ! diffusion coefficient for growing spectral
576  ! components.
577  ! DFRR Real Relative frequency increment.
578  ! ----------------------------------------------------------------
579  !
580  ! 4. Subroutines used :
581  !
582  ! See module documentation.
583  !
584  ! 5. Called by :
585  !
586  ! Name Type Module Description
587  ! ----------------------------------------------------------------
588  ! W3WAVE Subr. W3WAVEMD Wave model routine.
589  ! ---------------------------------------------------------------
590  !
591  ! 6. Error messages :
592  !
593  ! None.
594  !
595  ! 7. Remarks :
596  !
597  ! - Note that the ULTIMATE limiter does not guarantee non-zero
598  ! energies.
599  ! - The present scheme shows a strong distortion when propaga-
600  ! ting a field under an angle with the grid in a truly 2-D
601  ! fashion. Propagation is therefore split along the two
602  ! axes.
603  ! - Two boundary treatments are available. The first uses real
604  ! boundaries in each space. In this case waves will not
605  ! penetrate in narrow straights under an angle with the grid.
606  ! This behavior is improved by using a 'soft' option, in
607  ! which the 'X' or 'Y' sweep allows for energy to go onto
608  ! the land. This improves the above behavior, but implies
609  ! that X-Y connenctions are required in barriers for them
610  ! to become inpenetrable.
611  ! - If TDYN is set to zero, ALL diffusion is skipped. Set TDYN
612  ! to a small positive number to have growth diffusion only.
613  ! - Curvilinear grid implementation. Variables FACX, FACY, CCOS, CSIN,
614  ! CCURX, CCURY are not needed and have been removed. FACX is accounted
615  ! for as approriate in this subroutine. FACX is also accounted for in
616  ! the case of .NOT.FLCX. Since FACX is removed, there is now a check for
617  ! .NOT.FLCX in this subroutine. In CFL calcs dx and dy are omitted,
618  ! since dx=dy=1 in index space. Curvilinear grid derivatives
619  ! (DPDY, DQDX, etc.) and metric (GSQRT) are brought in via W3GDATMD.
620  ! - Factors VFDIFX_FAC VFDIFY_FAC VFDIFC_FAC are introduced so that results
621  ! match for test case tp2.3. Use of these factors is optional and removal
622  ! can significantly reduce size/cost of code. These variants are marked as
623  ! CURV1 or CURV2. NCEP will make final decision re: which version to adopt.
624  ! CURV1 is the shorter version and results do not match the original code
625  ! for all test cases. CURV2 is the longer version and results do match the
626  ! original. DETAILED EXPLANATION: Discrepancies occur at the boundaries.
627  ! This is because, at the boundaries, the pre-curvilinear version zeros out
628  ! some terms in the diffusion calculation. Since they are zeroed out,
629  ! they aren't there to *cancel* certain other terms: these "other terms"
630  ! affect the result, so they have to be retained in the long vesion (CURV2)
631  ! to get an exact match. In the short version, the "canceling out" is
632  ! performed prior to coding the scheme, so both the canceled and canceling
633  ! terms are always omitted.
634  !
635  ! 8. Structure :
636  !
637  ! ---------------------------------------------
638  ! 1. Preparations
639  ! a Set constants
640  ! b Initialize arrays
641  ! 2. Prepare arrays
642  ! a Velocities and 'Q'
643  ! b diffusion coefficients
644  ! 3. Loop over sub-steps
645  ! ----------------------------------------
646  ! a Propagate
647  ! b Update boundary conditions
648  ! c Diffusion correction
649  ! ----------------------------------------
650  ! 4. Store Q field in spectra
651  ! ---------------------------------------------
652  !
653  ! 9. Switches :
654  !
655  ! !/MGP Correct for motion of grid.
656  !
657  ! !/TDYN Dynamic increase of DTME
658  ! !/DSS0 Disable diffusion in propagation direction
659  ! !/XW0 Propagation diffusion only.
660  ! !/XW1 Growth diffusion only.
661  !
662  ! !/OMPH Hybrid OpenMP directives.
663  !
664  ! !/S Enable subroutine tracing.
665  !
666  ! !/T Enable general test output.
667  ! !/T1 Dump of input field and fluxes.
668  ! !/T2 Dump of output field.
669  !
670  ! 10. Source code :
671  !
672  !/ ------------------------------------------------------------------- /
673  USE constants
674  !
675  USE w3timemd, ONLY: dsec21
676  !
677  USE w3gdatmd, ONLY: nk, nth, dth, xfr, esin, ecos, sig, nx, ny, &
678  nsea, sx, sy, mapsf, iclose, flcx, flcy, &
680  dtcfl, clats, dtme, clatmn, flagll, &
682  USE w3wdatmd, ONLY: time
683  USE w3adatmd, ONLY: cg, wn, u10, cx, cy, atrnx, atrny, itime, &
684  nmx0, nmx1, nmx2, nmy0, nmy1, nmy2, nact, &
686  USE w3idatmd, ONLY: flcur
687  USE w3odatmd, ONLY: ndse, ndst, flbpi, nbi, tbpi0, tbpin, &
689  USE w3servmd, ONLY: extcde
690 #ifdef W3_S
691  USE w3servmd, ONLY: strace
692 #endif
693 #ifdef W3_UQ
694  USE w3uqckmd
695 #endif
696 #ifdef W3_UNO
697  USE w3uno2md
698 #endif
699  !/
700  IMPLICIT NONE
701  !/
702  !/ ------------------------------------------------------------------- /
703  !/ Parameter list
704  !/
705  INTEGER, INTENT(IN) :: ISP, MAPSTA(NY*NX), MAPFS(NY*NX)
706  REAL, INTENT(IN) :: DTG, VGX, VGY
707  REAL, INTENT(INOUT) :: VQ(1-NY:NY*(NX+2))
708  !/
709  !/ ------------------------------------------------------------------- /
710  !/ Local parameters
711  !/
712  INTEGER :: ITH, IK, NTLOC, ITLOC, ISEA, IXY, &
713  IX,IY, IY0, IP, IBI
714  INTEGER :: TTEST(2),DTTST
715 #ifdef W3_S
716  INTEGER, SAVE :: IENT = 0
717 #endif
718  REAL :: CG0, CGA, CGN, CGX, CGY, CXC, CYC, &
719  CXMIN, CXMAX, CYMIN, CYMAX
720  REAL :: DTLOC, DTRAD, &
721  DFRR, CELLP, CGD, DSSD, &
722  DNND, DCELL, XWIND, TFAC, DSS, DNN
723  REAL :: RD1, RD2
724  REAL :: RFAC, DFAC, DVQ, QXX, QXY, QYY
725  REAL :: CP, CQ
726  LOGICAL :: YFIRST
727  LOGICAL :: GLOBAL
728  !/
729  !/ Automatic work arrays
730  !/
731  REAL :: VLCFLX((NX+1)*NY), VLCFLY((NX+1)*NY),&
732  VFDIFX(1-NY:NX*NY), VFDIFY(NX*NY), &
733  VFDIFC(1-NY:NX*NY), VDXX((NX+1)*NY), &
734  VDYY(NX*NY), VDXY((NX+1)*NY)
735 
736  REAL :: CXTOT((NX+1)*NY), CYTOT(NX*NY)
737  REAL :: VQ_OLD(1-NY:NY*(NX+2))
738  !CURV2: BEGIN -----------------------------------------------------------------
739  REAL :: VFDIFX_FAC(1-NY:NX*NY), &
740  VFDIFY_FAC(1-NY:NX*NY), &
741  VFDIFC_FAC(1-NY:NX*NY)
742  !CURV2: END -------------------------------------------------------------------
743  !/
744  !/ ------------------------------------------------------------------- /
745  !/
746 #ifdef W3_S
747  CALL strace (ient, 'W3XYP2')
748 #endif
749  !
750  ! IF ( MAXVAL(VQ) .EQ. 0. ) THEN
751  ! IF ( NBI .EQ. 0 ) THEN
752  ! RETURN
753  ! ELSE
754  ! IF ( MAXVAL(BBPI0(ISP,:)) .EQ. 0. .AND. &
755  ! MAXVAL(BBPIN(ISP,:)) .EQ. 0. ) RETURN
756  ! END IF
757  ! END IF
758  !
759  ! 1. Preparations --------------------------------------------------- *
760 
761  IF ( iclose .EQ. iclose_trpl ) THEN
762  IF (iaproc .EQ. naperr) &
763  WRITE(ndse,*)'SUBROUTINE W3XYP2 IS NOT YET ADAPTED FOR '// &
764  'TRIPOLE GRIDS. STOPPING NOW.'
765  CALL extcde ( 1 )
766  END IF
767 
768  ! 1.a Set constants
769  !
770  global = iclose.NE.iclose_none
771  ith = 1 + mod(isp-1,nth)
772  ik = 1 + (isp-1)/nth
773  !
774  cg0 = 0.575 * grav / sig(1)
775  cga = 0.575 * grav / sig(ik)
776  cgx = cga * ecos(ith)
777  cgy = cga * esin(ith)
778 #ifdef W3_MGP
779  cgx = cgx - vgx
780  cgy = cgy - vgy
781 #endif
782  !
783  IF ( flcur ) THEN
784  cxmin = minval( cx(1:nsea) )
785  cxmax = maxval( cx(1:nsea) )
786  cymin = minval( cy(1:nsea) )
787  cymax = maxval( cy(1:nsea) )
788  IF ( abs(cgx+cxmin) .GT. abs(cgx+cxmax) ) THEN
789  cgx = cgx + cxmin
790  ELSE
791  cgx = cgx + cxmax
792  END IF
793  IF ( abs(cgy+cymin) .GT. abs(cgy+cymax) ) THEN
794  cgy = cgy + cymin
795  ELSE
796  cgy = cgy + cymax
797  END IF
798  cxc = max( abs(cxmin) , abs(cxmax) )
799  cyc = max( abs(cymin) , abs(cymax) )
800 #ifdef W3_MGP
801  cxc = max( abs(cxmin-vgx) , abs(cxmax-vgx) )
802  cyc = max( abs(cymin-vgy) , abs(cymax-vgy) )
803 #endif
804  ELSE
805  cxc = 0.
806  cyc = 0.
807  END IF
808  !
809  cgn = 0.9999 * max( abs(cgx) , abs(cgy) , cxc, cyc, 0.001*cg0 )
810  !
811  ntloc = 1 + int(dtg/(dtcfl*cg0/cgn))
812  dtloc = dtg / real(ntloc)
813  dtrad = dtloc
814  IF ( flagll ) dtrad=dtrad/(dera*radius)
815  !
816  IF ( flagll ) THEN
817  rfac = dera * radius
818  dfac = 1. / rfac**2
819  ELSE
820  rfac = 1.
821  dfac = 1.
822  END IF
823  !
824  ttest(1) = time(1)
825  ttest(2) = 0
826  dttst = dsec21(ttest,time)
827  yfirst = mod(nint(dttst/dtg),2) .EQ. 0
828  !
829 #ifdef W3_T
830  WRITE (ndst,9000) yfirst
831  WRITE (ndst,9001) isp, ith, ik, ecos(ith), esin(ith)
832 #endif
833  !
834 #ifdef W3_TDYN
835  IF ( isp .EQ. 1 ) dtme = dtme + dtg
836 #endif
837  !
838  IF ( dtme .NE. 0. ) THEN
839  dfrr = xfr - 1.
840  cellp = 10.
841  cgd = 0.5 * grav / sig(ik)
842  dssd = ( dfrr * cgd )**2 * dtme / 12.
843  dnnd = ( cgd * dth )**2 * dtme / 12.
844 #ifdef W3_T
845  WRITE (ndst,9002) dfrr, cellp, dtme
846  ELSE
847  WRITE (ndst,9003)
848 #endif
849  END IF
850 
851  !
852  ! 1.b Initialize arrays
853  !
854 #ifdef W3_T
855  WRITE (ndst,9010)
856 #endif
857  !
858  vlcflx = 0.
859  vlcfly = 0.
860  vfdifx = 0.
861  vfdify = 0.
862  vfdifc = 0.
863  vdxx = 0.
864  vdyy = 0.
865  vdxy = 0.
866  cxtot = 0.
867  cytot = 0.
868  !
869  ! 2. Calculate velocities and diffusion coefficients ---------------- *
870  ! 2.a Velocities
871  !
872  ! Q = ( A / CG * CLATS )
873  ! LCFLX = ( COS*CG / CLATS ) * DT / DX
874  ! LCFLY = ( SIN*CG ) * DT / DX
875  !
876 #ifdef W3_T
877  WRITE (ndst,9020) nsea
878 #endif
879  !
880 #ifdef W3_OMPH
881  !$OMP PARALLEL DO PRIVATE (ISEA, IXY)
882 #endif
883  !
884  DO isea=1, nsea
885  ixy = mapsf(isea,3)
886  vq(ixy) = vq(ixy) / cg(ik,isea) * clats(isea)
887  cxtot(ixy) = ecos(ith) * cg(ik,isea) / clats(isea)
888  cytot(ixy) = esin(ith) * cg(ik,isea)
889 #ifdef W3_MGP
890  cxtot(ixy) = cxtot(ixy) - vgx/clats(isea)
891  cytot(ixy) = cytot(ixy) - vgy
892 #endif
893 #ifdef W3_T1
894  IF ( .NOT. flcur ) &
895  WRITE (ndst,9021) isea, mapsf(isea,1), mapsf(isea,2), &
896  vq(ixy), cxtot(ixy), cytot(ixy)
897 #endif
898  END DO
899  !
900 #ifdef W3_OMPH
901  !$OMP END PARALLEL DO
902 #endif
903  !
904  IF ( flcur ) THEN
905 #ifdef W3_T
906  WRITE (ndst,9022)
907 #endif
908  DO isea=1, nsea
909  ixy = mapsf(isea,3)
910  cxtot(ixy) = cxtot(ixy) + cx(isea)/clats(isea)
911  cytot(ixy) = cytot(ixy) + cy(isea)
912 #ifdef W3_T1
913  WRITE (ndst,9021) isea, mapsf(isea,1), mapsf(isea,2), &
914  vq(ixy), cxtot(ixy), cytot(ixy)
915 #endif
916  END DO
917  END IF
918 
919  !
920 #ifdef W3_OMPH
921  !$OMP PARALLEL DO PRIVATE (ISEA, IX, IY, IXY, CP, CQ)
922 #endif
923  !
924  DO isea=1, nsea
925  ix = mapsf(isea,1)
926  iy = mapsf(isea,2)
927  ixy = mapsf(isea,3)
928  cp=cxtot(ixy)*dpdx(iy,ix)+cytot(ixy)*dpdy(iy,ix)
929  cq=cxtot(ixy)*dqdx(iy,ix)+cytot(ixy)*dqdy(iy,ix)
930  vlcflx(ixy) = cp*dtrad
931  vlcfly(ixy) = cq*dtrad
932  END DO
933  !
934 #ifdef W3_OMPH
935  !$OMP END PARALLEL DO
936 #endif
937  !
938  ! 2.b Diffusion coefficients
939  !
940  IF ( dtme .NE. 0. ) THEN
941  !
942 #ifdef W3_OMPH
943  !$OMP PARALLEL DO PRIVATE (ISEA, IX, IY, IXY, &
944  !$OMP& DCELL, XWIND, TFAC, DSS, DNN)
945 #endif
946  !
947  DO isea=1, nsea
948  ix = mapsf(isea,1)
949  iy = mapsf(isea,2)
950  ixy = mapsf(isea,3)
951  IF ( min( atrnx(ixy,1) , atrnx(ixy,-1) , &
952  atrny(ixy,1) , atrny(ixy,-1) ) .GT. trnmin ) THEN
953  dcell = cgd * min( hpfac(iy,ix)*rfac, &
954  hqfac(iy,ix)*rfac ) / cellp
955  xwind = 3.3 * u10(isea)*wn(ik,isea)/sig(ik) - 2.3
956  xwind = max( 0. , min( 1. , xwind ) )
957 #ifdef W3_XW0
958  xwind = 0.
959 #endif
960 #ifdef W3_XW1
961  xwind = 1.
962 #endif
963  tfac = min( 1. , (clats(isea)/clatmn)**2 )
964  dss = xwind * dcell + (1.-xwind) * dssd * tfac
965 #ifdef W3_DSS0
966  dss = 0.
967 #endif
968  dnn = xwind * dcell + (1.-xwind) * dnnd * tfac
969 
970  vdxx(ixy) = dtloc * (dss*ecos(ith)**2+dnn*esin(ith)**2)
971  vdyy(ixy) = dtloc * (dss*esin(ith)**2+dnn*ecos(ith)**2) &
972  / clats(isea)**2
973  vdxy(ixy) = dtloc * (dss-dnn) * esin(ith)*ecos(ith) &
974  / clats(isea)
975 
976  END IF
977  END DO
978  !
979 #ifdef W3_OMPH
980  !$OMP END PARALLEL DO
981 #endif
982  !
983  END IF
984  !
985  ! 3. Loop over sub-steps -------------------------------------------- *
986  !
987  DO itloc=1, ntloc
988  !
989  ! 3.a Propagate fields
990  !
991 #ifdef W3_OMPH
992  !$OMP PARALLEL DO PRIVATE (ISEA, IX, IY, IXY )
993 #endif
994  !
995  DO isea=1, nsea
996  ix = mapsf(isea,1)
997  iy = mapsf(isea,2)
998  ixy = mapsf(isea,3)
999  vq(ixy)= vq(ixy) * gsqrt(iy,ix)
1000  END DO
1001  !
1002 #ifdef W3_OMPH
1003  !$OMP END PARALLEL DO
1004 #endif
1005  !
1006  IF ( yfirst ) THEN
1007  !
1008 #ifdef W3_UQ
1009  IF ( flcy ) CALL w3qck3 &
1010  (nx, ny, nx, ny, vlcfly, atrny, vq, &
1011  .false., 1, mapaxy, nact, mapy2, nmy0, &
1012  nmy1, nmy2, ndse, ndst )
1013  IF ( flcx ) CALL w3qck3 &
1014  (nx, ny, nx, ny, vlcflx, atrnx, vq, &
1015  global, ny, mapaxy, nact, mapx2, nmx0, &
1016  nmx1, nmx2, ndse, ndst )
1017 #endif
1018  !
1019 #ifdef W3_UNO
1020  IF ( flcy ) CALL w3uno2s &
1021  (nx, ny, nx, ny, vlcfly, atrny, vq, &
1022  .false., 1, mapaxy, nact, mapy2, nmy0, &
1023  nmy1, nmy2, ndse, ndst )
1024  IF ( flcx ) CALL w3uno2s &
1025  (nx, ny, nx, ny, vlcflx, atrnx, vq, &
1026  global, ny, mapaxy, nact, mapx2, nmx0, &
1027  nmx1, nmx2, ndse, ndst )
1028 #endif
1029  !
1030  ELSE
1031  !
1032 #ifdef W3_UQ
1033  IF ( flcx ) CALL w3qck3 &
1034  (nx, ny, nx, ny, vlcflx, atrnx, vq, &
1035  global, ny, mapaxy, nact, mapx2, nmx0, &
1036  nmx1, nmx2, ndse, ndst )
1037  IF ( flcy ) CALL w3qck3 &
1038  (nx, ny, nx, ny, vlcfly, atrny, vq, &
1039  .false., 1, mapaxy, nact, mapy2, nmy0, &
1040  nmy1, nmy2, ndse, ndst )
1041 #endif
1042  !
1043 #ifdef W3_UNO
1044  IF ( flcx ) CALL w3uno2s &
1045  (nx, ny, nx, ny, vlcflx, atrnx, vq, &
1046  global, ny, mapaxy, nact, mapx2, nmx0, &
1047  nmx1, nmx2, ndse, ndst )
1048  IF ( flcy ) CALL w3uno2s &
1049  (nx, ny, nx, ny, vlcfly, atrny, vq, &
1050  .false., 1, mapaxy, nact, mapy2, nmy0, &
1051  nmy1, nmy2, ndse, ndst )
1052 #endif
1053  !
1054  END IF
1055  !
1056 #ifdef W3_OMPH
1057  !$OMP PARALLEL DO PRIVATE (ISEA, IX, IY, IXY )
1058 #endif
1059  !
1060  DO isea=1, nsea
1061  ix = mapsf(isea,1)
1062  iy = mapsf(isea,2)
1063  ixy = mapsf(isea,3)
1064  vq(ixy)= vq(ixy) / gsqrt(iy,ix)
1065  END DO
1066  !
1067 #ifdef W3_OMPH
1068  !$OMP END PARALLEL DO
1069 #endif
1070  !
1071  ! 3.b Update boundaries
1072  !
1073  IF ( flbpi ) THEN
1074  rd1 = dsec21( tbpi0, time ) - dtg * &
1075  REAL(NTLOC-ITLOC)/REAL(NTLOC)
1076  rd2 = dsec21( tbpi0, tbpin )
1077  IF ( rd2 .GT. 0.001 ) THEN
1078  rd2 = min(1.,max(0.,rd1/rd2))
1079  rd1 = 1. - rd2
1080  ELSE
1081  rd1 = 0.
1082  rd2 = 1.
1083  END IF
1084  DO ibi=1, nbi
1085  isea = isbpi(ibi)
1086  ixy = mapsf(isbpi(ibi),3)
1087  vq(ixy) = ( rd1*bbpi0(isp,ibi) + rd2*bbpin(isp,ibi) ) &
1088  / cg(ik,isea) * clats(isea)
1089  END DO
1090  END IF
1091  !
1092  ! 3.c Diffusion correction
1093  !
1094  IF ( dtme .NE. 0. ) THEN
1095 
1096  IF ( global ) THEN
1097  DO iy=1, ny
1098  vq(iy+nx*ny) = vq(iy)
1099  END DO
1100  END IF
1101 
1102  !CURV2: BEGIN -----------------------------------------------------------------
1103  vfdifx_fac=0.0
1104  DO ip=1, nmx0
1105  ixy = mapx2(ip)
1106  vfdifx_fac(ixy) = 1.0
1107  END DO
1108  vfdify_fac=0.0
1109  DO ip=1, nmy0
1110  ixy = mapy2(ip)
1111  vfdify_fac(ixy) = 1.0
1112  END DO
1113  vfdifc_fac=0.0
1114  DO ip=1, nmxy
1115  ixy = mapxy(ip)
1116  vfdifc_fac(ixy) = 1.0
1117  END DO
1118  IF ( global ) THEN
1119  iy0 = (nx-1)*ny
1120  DO iy=1, ny
1121  vfdifx_fac(iy-ny) = vfdifx_fac(iy+iy0)
1122  vfdifc_fac(iy-ny) = vfdifc_fac(iy+iy0)
1123  END DO
1124  END IF
1125  !CURV2: END -------------------------------------------------------------------
1126 
1127  vq_old = vq
1128  !
1129 #ifdef W3_OMPH
1130  !$OMP PARALLEL DO PRIVATE (ISEA, IX, IY, IXY, &
1131  !$OMP& QXX, QYY, QXY, DVQ )
1132 #endif
1133  !
1134  DO ip=1, nact
1135  ixy = mapaxy(ip)
1136  isea = mapfs(ixy)
1137  ix = mapsf(isea,1)
1138  iy = mapsf(isea,2)
1139 
1140  !CURV1: DOES NOT GIVE EXACT MATCH TO EARLIER WW3 VERSION FOR TEST CASE TP2.3
1141  !CURV1: NEAR THE BOUNDARY, NOTE THAT THIS VERSION USES NON-ACTIVE GRID POINTS
1142  !CURV1: IN ITS CALCS. THIS IS NO PROBLEM, AS LONG AS THE NON-ACTIVE GRID POINTS
1143  !CURV1: EXIST IN THE ARRAY AND ARE VQ=0. ALSO NOTE THAT WITH THE SHORT VERSION
1144  !CURV1: OF THE CODE, VFDIF?_FAC VARIABLES CAN BE REMOVED AND 3-4 DO LOOPS ABOVE
1145  !CURV1: CAN BE REMOVED.
1146  !CURV1: BEGIN -----------------------------------------------------------------
1147  ! QXX = VQ_OLD(IXY+NY) - 2.0*VQ_OLD(IXY) + VQ_OLD(IXY-NY)
1148  ! QYY = VQ_OLD(IXY+1) - 2.0*VQ_OLD(IXY) + VQ_OLD(IXY-1)
1149  ! QXY = VQ_OLD(IXY+NY+1) - VQ_OLD(IXY-NY+1) &
1150  ! - VQ_OLD(IXY+NY-1) + VQ_OLD(IXY-NY-1)
1151  !CURV1: END -------------------------------------------------------------------
1152 
1153  !CURV2: DOES GIVE EXACT MATCH TO EARLIER WW3 VERSION FOR TEST CASE TP2.3. NOTE
1154  !CURV2: THAT IF VFDIFC_FAC VARIABLES ARE ALL UNITY, MANY TERMS CANCEL OUT.
1155  !CURV2: HOWEVER, VFDIFC_FAC IS ZERO WHEN A RELATED VQ POINT IS NOT AN ACTIVE
1156  !CURV2: GRID POINT
1157  !CURV2: BEGIN -----------------------------------------------------------------
1158  qxx = vfdifx_fac(ixy) *vq_old(ixy+ny) &
1159  - vfdifx_fac(ixy) *vq_old(ixy) &
1160  - vfdifx_fac(ixy-ny)*vq_old(ixy) &
1161  + vfdifx_fac(ixy-ny)*vq_old(ixy-ny)
1162  qyy = vfdify_fac(ixy) *vq_old(ixy+1) &
1163  - vfdify_fac(ixy) *vq_old(ixy) &
1164  - vfdify_fac(ixy-1) *vq_old(ixy) &
1165  + vfdify_fac(ixy-1) *vq_old(ixy-1)
1166  qxy = vfdifc_fac(ixy) *vq_old(ixy) &
1167  + vfdifc_fac(ixy-ny-1)*vq_old(ixy) &
1168  - vfdifc_fac(ixy-1) *vq_old(ixy) &
1169  - vfdifc_fac(ixy-ny) *vq_old(ixy) &
1170  + vfdifc_fac(ixy-ny) *vq_old(ixy+1) &
1171  - vfdifc_fac(ixy) *vq_old(ixy+1) &
1172  + vfdifc_fac(ixy-1) *vq_old(ixy-1) &
1173  - vfdifc_fac(ixy-ny-1)*vq_old(ixy-1) &
1174  + vfdifc_fac(ixy-1) *vq_old(ixy+ny) &
1175  - vfdifc_fac(ixy) *vq_old(ixy+ny) &
1176  + vfdifc_fac(ixy-ny) *vq_old(ixy-ny) &
1177  - vfdifc_fac(ixy-ny-1)*vq_old(ixy-ny) &
1178  + vfdifc_fac(ixy) *vq_old(ixy+ny+1) &
1179  - vfdifc_fac(ixy-1) *vq_old(ixy+ny-1) &
1180  + vfdifc_fac(ixy-ny-1)*vq_old(ixy-ny-1) &
1181  - vfdifc_fac(ixy-ny) *vq_old(ixy-ny+1)
1182  !CURV2: END -------------------------------------------------------------------
1183  !
1184  qxy = 0.25*qxy
1185  !
1186  dvq = vdxx(ixy)*( dpdx(iy,ix)*dpdx(iy,ix)*qxx &
1187  + 2.0*dpdx(iy,ix)*dqdx(iy,ix)*qxy &
1188  + dqdx(iy,ix)*dqdx(iy,ix)*qyy ) &
1189  + vdyy(ixy)*( dpdy(iy,ix)*dpdy(iy,ix)*qxx &
1190  + 2.0*dpdy(iy,ix)*dqdy(iy,ix)*qxy &
1191  + dqdy(iy,ix)*dqdy(iy,ix)*qyy) &
1192  + 2.0*vdxy(ixy)*( dpdx(iy,ix)*dpdy(iy,ix)*qxx &
1193  + dqdx(iy,ix)*dqdy(iy,ix)*qyy &
1194  + ( dpdx(iy,ix)*dqdy(iy,ix) &
1195  + dqdx(iy,ix)*dpdy(iy,ix) )*qxy )
1196  !
1197  vq(ixy) = vq_old(ixy) + dvq * dfac
1198  !
1199  END DO
1200  !
1201 #ifdef W3_OMPH
1202  !$OMP END PARALLEL DO
1203 #endif
1204  !
1205  END IF
1206  !
1207  yfirst = .NOT. yfirst
1208  END DO
1209  !
1210  ! 4. Store results in VQ in proper format --------------------------- *
1211  !
1212 #ifdef W3_T
1213  WRITE (ndst,9040) nsea
1214 #endif
1215  !
1216 #ifdef W3_OMPH
1217  !$OMP PARALLEL DO PRIVATE (ISEA, IXY )
1218 #endif
1219  !
1220  DO isea=1, nsea
1221  ixy = mapsf(isea,3)
1222  IF ( mapsta(ixy) .GT. 0 ) THEN
1223 #ifdef W3_T2
1224  WRITE (ndst,9041) isea, mapsf(isea,1), mapsf(isea,2), vq(ixy)
1225 #endif
1226  vq(ixy) = max( 0. , cg(ik,isea) / clats(isea) * vq(ixy) )
1227  ! ELSE
1228  ! VQ(IXY) = 0.
1229  END IF
1230  END DO
1231  !
1232 #ifdef W3_OMPH
1233  !$OMP END PARALLEL DO
1234 #endif
1235  !
1236  RETURN
1237  !
1238  ! Formats
1239  !
1240 #ifdef W3_T
1241 9000 FORMAT (' TEST W3XYP2 : YFIRST :',l2)
1242 9001 FORMAT (' TEST W3XYP2 : ISP, ITH, IK, COS-SIN :',i8,2i4,2f7.3)
1243 9002 FORMAT (' TEST W3XYP2 : DFRR, CELLP, DTME :',3e10.3)
1244 9003 FORMAT (' TEST W3XYP2 : NO DISPERSION CORRECTION ')
1245 9010 FORMAT (' TEST W3XYP2 : INITIALIZE ARRAYS')
1246 9020 FORMAT (' TEST W3XYP2 : CALCULATING LCFLX/Y AND DSS/NN (NSEA=', &
1247  i6,')')
1248 9022 FORMAT (' TEST W3XYP2 : CORRECTING FOR CURRENT')
1249 9040 FORMAT (' TEST W3XYP2 : FIELD AFTER PROP. (NSEA=',i6,')')
1250 #endif
1251 #ifdef W3_T1
1252 9021 FORMAT (1x,i6,2i5,e12.4,2f7.3)
1253 #endif
1254 #ifdef W3_T2
1255 9041 FORMAT (1x,i6,2i5,e12.4)
1256 #endif
1257  !/
1258  !/ End of W3XYP2 ----------------------------------------------------- /
1259  !/

References w3adatmd::atrnx, w3adatmd::atrny, w3odatmd::bbpi0, w3odatmd::bbpin, w3adatmd::cg, w3gdatmd::clatmn, w3gdatmd::clats, w3adatmd::cx, w3adatmd::cy, constants::dera, w3gdatmd::dpdx, w3gdatmd::dpdy, w3gdatmd::dqdx, w3gdatmd::dqdy, w3timemd::dsec21(), w3gdatmd::dtcfl, w3gdatmd::dth, w3gdatmd::dtme, w3gdatmd::ecos, w3gdatmd::esin, w3servmd::extcde(), w3gdatmd::flagll, w3odatmd::flbpi, w3idatmd::flcur, w3gdatmd::flcx, w3gdatmd::flcy, constants::grav, w3gdatmd::gsqrt, w3gdatmd::hpfac, w3gdatmd::hqfac, w3odatmd::iaproc, w3gdatmd::iclose, w3gdatmd::iclose_none, w3gdatmd::iclose_smpl, w3gdatmd::iclose_trpl, w3odatmd::isbpi, w3adatmd::itime, w3adatmd::mapaxy, w3gdatmd::mapsf, w3adatmd::mapx2, w3adatmd::mapxy, w3adatmd::mapy2, w3adatmd::nact, w3odatmd::naperr, w3odatmd::nbi, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3adatmd::nmx0, w3adatmd::nmx1, w3adatmd::nmx2, w3adatmd::nmxy, w3adatmd::nmy0, w3adatmd::nmy1, w3adatmd::nmy2, w3gdatmd::nsea, w3gdatmd::nth, w3gdatmd::nx, w3gdatmd::ny, constants::radius, w3gdatmd::sig, w3servmd::strace(), w3gdatmd::sx, w3gdatmd::sy, w3odatmd::tbpi0, w3odatmd::tbpin, w3wdatmd::time, w3adatmd::u10, w3uqckmd::w3qck3(), w3uno2md::w3uno2s(), w3adatmd::wn, and w3gdatmd::xfr.

Referenced by w3wavemd::w3wave().

w3gdatmd::esc
real, dimension(:), pointer esc
Definition: w3gdatmd.F90:1234
w3odatmd::tbpi0
integer, dimension(:), pointer tbpi0
Definition: w3odatmd.F90:464
w3timemd::dsec21
real function dsec21(TIME1, TIME2)
Definition: w3timemd.F90:333
w3gdatmd::dth
real, pointer dth
Definition: w3gdatmd.F90:1232
w3uno2md
Portable UNO2 scheme on irregular grid.
Definition: w3uno2md.F90:14
w3adatmd
Define data structures to set up wave model auxiliary data for several models simultaneously.
Definition: w3adatmd.F90:26
w3adatmd::mapy2
integer, dimension(:), pointer mapy2
Definition: w3adatmd.F90:642
constants::dera
real, parameter dera
DERA Conversion factor from degrees to radians.
Definition: constants.F90:77
w3wdatmd
Define data structures to set up wave model dynamic data for several models simultaneously.
Definition: w3wdatmd.F90:18
w3adatmd::atrnx
real, dimension(:,:), pointer atrnx
Definition: w3adatmd.F90:578
w3adatmd::mapxy
integer, dimension(:), pointer mapxy
Definition: w3adatmd.F90:642
w3adatmd::nmx0
integer, pointer nmx0
Definition: w3adatmd.F90:640
w3adatmd::atrny
real, dimension(:,:), pointer atrny
Definition: w3adatmd.F90:578
w3gdatmd::sig
real, dimension(:), pointer sig
Definition: w3gdatmd.F90:1234
w3gdatmd::sy
real, pointer sy
Definition: w3gdatmd.F90:1183
w3adatmd::mapwn2
integer, dimension(:), pointer mapwn2
Definition: w3adatmd.F90:642
w3gdatmd::flck
logical, pointer flck
Definition: w3gdatmd.F90:1217
w3odatmd::iaproc
integer, pointer iaproc
Definition: w3odatmd.F90:457
w3wdatmd::time
integer, dimension(:), pointer time
Definition: w3wdatmd.F90:172
w3uqckmd::w3qck2
subroutine w3qck2(MX, MY, NX, NY, VELO, DT, DX1, DX2, Q, CLOSE, INC, MAPACT, NACT, MAPBOU, NB0, NB1, NB2, NDSE, NDST)
Like W3QCK1 with variable grid spacing.
Definition: w3uqckmd.F90:517
w3gdatmd::ecos
real, dimension(:), pointer ecos
Definition: w3gdatmd.F90:1234
w3odatmd::bbpi0
real, dimension(:,:), pointer bbpi0
Definition: w3odatmd.F90:541
w3odatmd::tbpin
integer, dimension(:), pointer tbpin
Definition: w3odatmd.F90:464
w3gdatmd::dsip
real, dimension(:), pointer dsip
Definition: w3gdatmd.F90:1234
w3odatmd::nbi
integer, pointer nbi
Definition: w3odatmd.F90:530
w3odatmd::flbpi
logical, pointer flbpi
Definition: w3odatmd.F90:546
w3idatmd::flcur
logical, pointer flcur
Definition: w3idatmd.F90:261
w3gdatmd::iclose_none
integer, parameter iclose_none
Definition: w3gdatmd.F90:629
w3gdatmd::hqfac
real, dimension(:,:), pointer hqfac
Definition: w3gdatmd.F90:1212
w3odatmd::ndse
integer, pointer ndse
Definition: w3odatmd.F90:456
w3gdatmd::fachfa
real, pointer fachfa
Definition: w3gdatmd.F90:1232
w3gdatmd::clatmn
real, pointer clatmn
Definition: w3gdatmd.F90:1257
w3gdatmd::es2
real, dimension(:), pointer es2
Definition: w3gdatmd.F90:1234
w3gdatmd::dqdy
real, dimension(:,:), pointer dqdy
Definition: w3gdatmd.F90:1209
w3gdatmd::esin
real, dimension(:), pointer esin
Definition: w3gdatmd.F90:1234
w3odatmd::naperr
integer, pointer naperr
Definition: w3odatmd.F90:457
w3uno2md::w3uno2s
subroutine w3uno2s(MX, MY, NX, NY, CFLL, TRANS, Q, BCLOSE, INC, MAPACT, NACT, MAPBOU, NB0, NB1, NB2, NDSE, NDST)
Like W3UNO2r with cell transparencies added.
Definition: w3uno2md.F90:839
w3gdatmd::nsea
integer, pointer nsea
Definition: w3gdatmd.F90:1097
w3gdatmd::dtme
real, pointer dtme
Definition: w3gdatmd.F90:1257
w3servmd
Definition: w3servmd.F90:3
w3gdatmd::flcth
logical, pointer flcth
Definition: w3gdatmd.F90:1217
w3uno2md::w3uno2
subroutine w3uno2(MX, MY, NX, NY, VELO, DT, DX1, DX2, Q, BCLOSE, INC, MAPACT, NACT, MAPBOU, NB0, NB1, NB2, NDSE, NDST)
UNO2 scheme for irregular grid.
Definition: w3uno2md.F90:105
w3odatmd
Definition: w3odatmd.F90:3
w3gdatmd::clats
real, dimension(:), pointer clats
Definition: w3gdatmd.F90:1196
w3uno2md::w3uno2r
subroutine w3uno2r(MX, MY, NX, NY, CFLL, Q, BCLOSE, INC, MAPACT, NACT, MAPBOU, NB0, NB1, NB2, NDSE, NDST)
Preform one-dimensional propagation in a two-dimensional space with irregular boundaries and regular ...
Definition: w3uno2md.F90:475
w3gdatmd::mapsf
integer, dimension(:,:), pointer mapsf
Definition: w3gdatmd.F90:1163
w3gdatmd::dpdx
real, dimension(:,:), pointer dpdx
Definition: w3gdatmd.F90:1208
w3gdatmd::gsqrt
real, dimension(:,:), pointer gsqrt
Definition: w3gdatmd.F90:1210
w3adatmd::mapth2
integer, dimension(:), pointer mapth2
Definition: w3adatmd.F90:642
constants::radius
real, parameter radius
RADIUS Radius of the earth (m).
Definition: constants.F90:79
w3adatmd::u10
real, dimension(:), pointer u10
Definition: w3adatmd.F90:584
w3adatmd::nmx2
integer, pointer nmx2
Definition: w3adatmd.F90:640
w3gdatmd::iclose
integer, pointer iclose
Definition: w3gdatmd.F90:1096
constants::tpi
real, parameter tpi
TPI 2*Pi.
Definition: constants.F90:72
w3gdatmd::dpdy
real, dimension(:,:), pointer dpdy
Definition: w3gdatmd.F90:1208
w3servmd::strace
subroutine strace(IENT, SNAME)
Definition: w3servmd.F90:148
w3idatmd
Define data structures to set up wave model input data for several models simultaneously.
Definition: w3idatmd.F90:16
w3gdatmd::mapwn
integer, dimension(:), pointer mapwn
Definition: w3gdatmd.F90:1231
w3gdatmd::xfr
real, pointer xfr
Definition: w3gdatmd.F90:1232
w3gdatmd::flcy
logical, pointer flcy
Definition: w3gdatmd.F90:1217
w3adatmd::mapx2
integer, dimension(:), pointer mapx2
Definition: w3adatmd.F90:642
w3gdatmd::hpfac
real, dimension(:,:), pointer hpfac
Definition: w3gdatmd.F90:1211
w3uqckmd
Portable ULTIMATE QUICKEST schemes.
Definition: w3uqckmd.F90:14
w3gdatmd::sx
real, pointer sx
Definition: w3gdatmd.F90:1183
w3odatmd::ndst
integer, pointer ndst
Definition: w3odatmd.F90:456
w3uqckmd::w3qck3
subroutine w3qck3(MX, MY, NX, NY, CFLL, TRANS, Q, CLOSE, INC, MAPACT, NACT, MAPBOU, NB0, NB1, NB2, NDSE, NDST)
Like W3QCK1 with cell transparencies added.
Definition: w3uqckmd.F90:922
w3gdatmd::flcx
logical, pointer flcx
Definition: w3gdatmd.F90:1217
constants
Define some much-used constants for global use (all defined as PARAMETER).
Definition: constants.F90:20
w3uqckmd::w3qck1
subroutine w3qck1(MX, MY, NX, NY, CFLL, Q, CLOSE, INC, MAPACT, NACT, MAPBOU, NB0, NB1, NB2, NDSE, NDST)
Preform one-dimensional propagation in a two-dimensional space with irregular boundaries and regular ...
Definition: w3uqckmd.F90:120
w3gdatmd
Definition: w3gdatmd.F90:16
w3adatmd::nact
integer, pointer nact
Definition: w3adatmd.F90:640
w3gdatmd::iclose_trpl
integer, parameter iclose_trpl
Definition: w3gdatmd.F90:631
w3adatmd::mapaxy
integer, dimension(:), pointer mapaxy
Definition: w3adatmd.F90:642
w3adatmd::itime
integer, pointer itime
Definition: w3adatmd.F90:686
w3adatmd::nmy1
integer, pointer nmy1
Definition: w3adatmd.F90:640
w3odatmd::isbpi
integer, dimension(:), pointer isbpi
Definition: w3odatmd.F90:535
w3adatmd::nmy2
integer, pointer nmy2
Definition: w3adatmd.F90:640
w3gdatmd::ctmax
real, pointer ctmax
Definition: w3gdatmd.F90:1183
w3timemd
Definition: w3timemd.F90:3
w3adatmd::nmx1
integer, pointer nmx1
Definition: w3adatmd.F90:640
w3adatmd::nmy0
integer, pointer nmy0
Definition: w3adatmd.F90:640
w3gdatmd::ec2
real, dimension(:), pointer ec2
Definition: w3gdatmd.F90:1234
w3gdatmd::dtcfl
real, pointer dtcfl
Definition: w3gdatmd.F90:1183
w3gdatmd::iclose_smpl
integer, parameter iclose_smpl
Definition: w3gdatmd.F90:630
w3adatmd::nmxy
integer, pointer nmxy
Definition: w3adatmd.F90:640
w3gdatmd::dqdx
real, dimension(:,:), pointer dqdx
Definition: w3gdatmd.F90:1209
constants::grav
real, parameter grav
GRAV Acc.
Definition: constants.F90:61
w3odatmd::bbpin
real, dimension(:,:), pointer bbpin
Definition: w3odatmd.F90:541
w3gdatmd::flagll
logical, pointer flagll
Definition: w3gdatmd.F90:1219