Bundles all input updating routines for WAVEWATCH III.
More...
|
| subroutine | w3ucur (FLFRST) |
| | Interpolate the current field to the present time. More...
|
| |
| subroutine | w3uwnd (FLFRST, VGX, VGY) |
| | Interpolate wind fields to the given time. More...
|
| |
| subroutine | w3utau (FLFRST) |
| | Interpolate atmosphere momentum fields to the given time. More...
|
| |
| subroutine | w3uini (A) |
| | Initialize the wave field with fetch-limited spectra before the actual calculation start. More...
|
| |
| subroutine | w3ubpt |
| | Update spectra at the active boundary points. More...
|
| |
| subroutine | w3uic1 (FLFRST) |
| | Update ice thickness in the wave model. More...
|
| |
| subroutine | w3uic5 (FLFRST) |
| | Update ice floe mean and max diameters in the wave model. More...
|
| |
| subroutine | w3uice (VA) |
| | Update ice map in the wave model. More...
|
| |
| subroutine | w3ulev (A, VA) |
| | Update the water level. More...
|
| |
| subroutine | w3urho (FLFRST) |
| | Interpolate air density field to the given time. More...
|
| |
| subroutine | w3utrn (TRNX, TRNY) |
| | Update cell boundary transparencies for general use in propagation routines. More...
|
| |
| subroutine | w3dzxy (ZZ, ZUNIT, DZZDX, DZZDY) |
| | Calculate derivatives of a field. More...
|
| |
Bundles all input updating routines for WAVEWATCH III.
- Author
- H. L. Tolman
- Date
- 22-Mar-2021
- Copyright
- Copyright 2009-2022 National Weather Service (NWS), National Oceanic and Atmospheric Administration. All rights reserved. WAVEWATCH III is a trademark of the NWS. No unauthorized use without permission.
◆ w3dzxy()
| subroutine w3updtmd::w3dzxy |
( |
real, dimension(nsea), intent(in) |
ZZ, |
|
|
character, dimension(*), intent(in) |
ZUNIT, |
|
|
real, dimension(ny,nx), intent(out) |
DZZDX, |
|
|
real, dimension(ny,nx), intent(out) |
DZZDY |
|
) |
| |
Calculate derivatives of a field.
Derivatives are calculated in m/m from the longitude/latitude grid, central in space for iternal points, one-sided for coastal points.
- Parameters
-
| [in] | ZZ | Field to calculate derivatives of. |
| [in] | ZUNIT | Units of ZZ (used for test output). |
| [out] | DZZDX | Derivative in X-direction (W-E). |
| [out] | DZZDY | Derivative in Y-direction (S-N). |
- Author
- W. E. Rogers, NRL
- Date
- 06-Dec-2010
Definition at line 3139 of file w3updtmd.F90.
3237 REAL,
INTENT(IN) :: ZZ(NSEA)
3238 CHARACTER,
INTENT(IN) :: ZUNIT*(*)
3239 REAL,
INTENT(OUT) :: DZZDX(NY,NX), DZZDY(NY,NX)
3240 INTEGER :: ISEA, IX, IY, IXP, IXM, IYP, IYM
3242 INTEGER :: ISX, ISY, MAPOUT(NX,NY)
3245 INTEGER,
SAVE :: IENT = 0
3248 INTEGER,
SAVE :: NXS = 49
3250 REAL :: DFAC , STX, STY
3251 INTEGER :: IXPS,IYPS,IXMS,IYMS,IXTRPL,IXTRPLS
3252 INTEGER :: IXSTART,IXEND
3260 CALL strace (ient,
'W3DZXY')
3294 IF (
mapsta(iy,ix) .NE. 0 )
THEN
3302 IF (
mapsta(iy,ixps).EQ.0)
THEN
3315 IF (
mapsta(iy,ixms).EQ.0)
THEN
3323 IF (
mapsta(iyps,ix).EQ.0)
THEN
3330 IF (
mapsta(iyms,ix).EQ.0)
THEN
3336 dzzdx(iy,ix) = (zz(
mapfs(iy ,ixp))-zz(
mapfs(iy ,ixm))) * stx *
dpdx(iy,ix) &
3338 dzzdy(iy,ix) = (zz(
mapfs(iy ,ixp))-zz(
mapfs(iy ,ixm))) * stx *
dpdy(iy,ix) &
3340 dzzdx(iy,ix) = dzzdx(iy,ix) *
dfac
3341 dzzdy(iy,ix) = dzzdy(iy,ix) *
dfac
3354 IF (
mapsta(iy,ix) .NE. 0 )
THEN
3363 IF (
mapsta(iy,ixps).EQ.0)
THEN
3375 IF (
mapsta(iy,ixms).EQ.0)
THEN
3387 IF (
mapsta(iy,ixtrpls).EQ.0)
THEN
3395 IF (
mapsta(iyms,ix).EQ.0)
THEN
3403 dzzdx(iy,ix) = (zz(
mapfs(iy ,ixp))-zz(
mapfs(iy ,ixm))) * stx *
dpdx(iy,ix) &
3405 dzzdy(iy,ix) = (zz(
mapfs(iy ,ixp))-zz(
mapfs(iy ,ixm))) * stx *
dpdy(iy,ix) &
3407 dzzdx(iy,ix) = dzzdx(iy,ix) *
dfac
3408 dzzdy(iy,ix) = dzzdy(iy,ix) *
dfac
3423 mapout(ix,iy) =
mapsta(iy,ix)
3424 IF (
mapfs(iy,ix) .NE. 0 ) &
3425 xout(ix,iy) = zz(
mapfs(iy,ix))
3429 1,
nx, isx, 1,
ny, isy,
'ZZ', zunit)
3432 xout(ix,iy) = dzzdx(iy,ix)
3436 1,
nx, isx, 1,
ny, isy,
'DZZDX',trim(zunit)//
'/m')
3439 xout(ix,iy) = dzzdy(iy,ix)
3443 1,
nx, isx, 1,
ny, isy,
'DZZDY',trim(zunit)//
'/m')
3451 9000
FORMAT (
' TEST W3DZXY : DX0I, DY0I : ',2e12.5)
3452 9010
FORMAT (
' TEST W3DZXY : FIELDS ')
References constants::dera, w3gdatmd::dpdx, w3gdatmd::dpdy, w3gdatmd::dqdx, w3gdatmd::dqdy, w3servmd::extcde(), w3gdatmd::flagll, w3odatmd::iaproc, w3gdatmd::iclose, w3gdatmd::iclose_none, w3gdatmd::iclose_smpl, w3gdatmd::iclose_trpl, w3gdatmd::mapfs, w3gdatmd::mapsta, w3odatmd::naperr, w3odatmd::naproc, w3odatmd::ndse, w3gdatmd::nsea, w3gdatmd::nx, w3gdatmd::ny, w3arrymd::prtblk(), and constants::radius.
Referenced by w3wavemd::w3wave().
◆ w3ubpt()
| subroutine w3updtmd::w3ubpt |
Update spectra at the active boundary points.
Spectra are read and interpolated in space and time from the data read by W3IOBC.
- Author
- H. L. Tolman
- Date
- 06-Jun-2018
Definition at line 1314 of file w3updtmd.F90.
1398 INTEGER :: IBI, ISP, ISEA
1400 INTEGER,
SAVE :: IENT = 0
1407 REAL :: Spectr(NSPEC), AnglBP
1413 CALL strace (ient,
'W3UBPT')
1421 IF (
bbpi0(1,0) .EQ. -1. )
THEN
1431 bbpi0(isp,ibi) =
cg(mapwn(isp),isea) / sig2(isp) * &
1450 bbpin(isp,ibi) =
cg(mapwn(isp),isea) / sig2(isp) * &
1460 IF (
polat < 90. )
THEN
1461 spectr =
bbpin(:,ibi)
1462 anglbp =
angld(isea)
1464 bbpin(:,ibi) = spectr
1479 hs1 = hs1 +
bbpi0(isp,ibi) * dden(mapwn(isp)) / &
1481 hs2 = hs2 +
bbpin(isp,ibi) * dden(mapwn(isp)) / &
1484 hs1 = 4. * sqrt( hs1 )
1485 hs2 = 4. * sqrt( hs2 )
1486 WRITE (ndst,9001) ibi,
isbpi(ibi), hs1, hs2
1495 9000
FORMAT (
' TEST W3UBPT : WAVE HEIGHTS BBPI0/N (NO TAIL)')
1496 9001
FORMAT (
' ',2i8,2x,2f8.2)
References w3odatmd::abpi0, w3odatmd::abpin, w3gdatmd::angld, w3odatmd::bbpi0, w3odatmd::bbpin, w3adatmd::cg, w3gdatmd::dden, w3odatmd::ipbpi, w3odatmd::isbpi, w3gdatmd::mapwn, w3odatmd::nbi, w3gdatmd::nk, w3gdatmd::nspec, w3gdatmd::nth, w3gdatmd::polat, w3odatmd::rdbpi, w3gdatmd::sig2, and w3servmd::w3acturn().
Referenced by w3wavemd::w3wave(), and wminiomd::wmiobg().
◆ w3ucur()
| subroutine w3updtmd::w3ucur |
( |
logical, intent(in) |
FLFRST | ) |
|
Interpolate the current field to the present time.
Linear interpolation of speed and direction, with optionally a correction to get approximate quadratic interpolation of speed only.
- Parameters
-
| [in] | FLFRST | Flag for first pass through routine. |
- Author
- H. L. Tolman
- Date
- 15-Dec-2004
Definition at line 172 of file w3updtmd.F90.
267 LOGICAL,
INTENT(IN) :: FLFRST
271 INTEGER :: ISEA, IX, IY
273 INTEGER,
SAVE :: IENT = 0
275 REAL :: D0, DN, DD, DT0N, DT0T, RD, CABS, CDIR
281 INTEGER(KIND=4) :: TIDE_KD0, INT24, INTDYS
282 REAL :: WCURTIDEX, WCURTIDEY, TIDE_ARGX, TIDE_ARGY
283 REAL(KIND=8) :: d1,h,tide_hour,hh,pp,s,p,enp,dh,dpp,
ds,dp,dnp,tau
284 REAL :: FX(44),UX(44),VX(44)
290 CALL strace (ient,
'W3UCUR')
311 ca0(isea) = sqrt( cx0(ix,iy)**2 + cy0(ix,iy)**2 )
312 cai(isea) = sqrt( cxn(ix,iy)**2 + cyn(ix,iy)**2 )
313 IF (
ca0(isea) .GT. 1.e-7)
THEN
314 d0 = mod(
tpi+atan2(cy0(ix,iy),cx0(ix,iy)) ,
tpi )
318 IF (
cai(isea) .GT. 1.e-7)
THEN
319 dn = mod(
tpi+atan2(cyn(ix,iy),cxn(ix,iy)) ,
tpi )
323 IF (
ca0(isea) .GT. 1.e-7)
THEN
329 IF (abs(dd).GT.
pi) dd = dd -
tpi*sign(1.,dd)
344 rd = dt0t / max( 1.e-7 , dt0n )
347 rd = dt0t / max( 1.e-7 , dt0n )
355 WRITE (ndst,9000) dt0n, dt0t, rd
367 d1=d1-dfloat(tide_kd0)-0.5d0
368 call astr(d1,h,pp,s,p,enp,dh,dpp,
ds,dp,dnp)
370 intdys=int((tide_hour+0.00001)/int24)
371 hh=tide_hour-dfloat(intdys*int24)
389 CALL setvuf_fast(h,pp,s,p,enp,dh,dpp,
ds,dp,dnp,tau,real(
ygrd(iy,ix)),fx,ux,vx)
390 wcurtidex =
cxtide(ix,iy,1,1)
391 wcurtidey =
cytide(ix,iy,1,1)
396 wcurtidex = wcurtidex+fx(j)*
cxtide(ix,iy,j,1)*cos(tide_argx)
397 wcurtidey = wcurtidey+fx(j)*
cytide(ix,iy,j,1)*cos(tide_argy)
411 WRITE(993,
'(A,F20.2,13F8.3)')
'TEST ISEA 0:', &
412 d1,h,s,tau,pp,s,p,enp,dh,dpp,
ds,dp,dnp,real(
ygrd(iy,ix))
415 WRITE(993,
'(A,4I9,F12.0,3F8.3,I4,X,A)')
'TEST ISEA 1:',ix,j,
time,tide_hour, &
420 WRITE(993,
'(A,5I9,F12.0,5F8.3)')
'TEST ISEA 2:',ix,k,j,
time,tide_hour, &
425 WRITE(993,
'(A,2F8.4,A,2F8.4)')
'#:',cx0(ix,iy),cy0(ix,iy),
'##',wcurtidex,wcurtidey
436 cabs =
ca0(isea) + rd *
cai(isea)
438 ci2 = sqrt( rd2 *
ca0(isea)**2 + &
439 rd *(
ca0(isea)+
cai(isea))**2 )
440 cabs = cabs * min( 1.25 , ci2/max(1.e-7,cabs) )
442 cdir =
cd0(isea) + rd *
cdi(isea)
446 IF( arctc .AND. (isea .GT. nglo) )
THEN
447 dn = cdir + angarc( isea - nglo )*
dera
448 cdir = mod(
tpi + dn,
tpi )
452 cx(isea) = cabs * cos(cdir)
453 cy(isea) = cabs * sin(cdir)
467 9000
FORMAT (
' TEST W3UCUR : DT0N, DT0T, RD :',2f8.1,f6.3)
References w3gdatmd::angarc, w3gdatmd::arctc, w3tidemd::astr(), w3adatmd::ca0, w3adatmd::cai, w3adatmd::cd0, w3adatmd::cdi, w3adatmd::cx, w3idatmd::cxtide, w3adatmd::cy, w3idatmd::cytide, constants::dera, w3timemd::dsec21(), w3idatmd::flcurtide, w3gdatmd::fswnd, w3gdatmd::mapsf, w3gdatmd::narc, w3odatmd::ndst, w3gdatmd::nglo, w3gdatmd::nsea, w3idatmd::ntide, w3gdatmd::nx, w3gdatmd::ny, constants::pi, w3tidemd::setvuf_fast(), w3servmd::strace(), w3idatmd::tc0, w3idatmd::tcn, w3tidemd::tide_ampc, w3tidemd::tide_index2, w3tidemd::tide_mf, w3tidemd::tide_phg, w3tidemd::tidecon_allnames, w3wdatmd::time, w3timemd::time2hours(), constants::tpi, w3tidemd::twpi, and w3gdatmd::ygrd.
Referenced by w3wavemd::w3wave().
◆ w3uic1()
| subroutine w3updtmd::w3uic1 |
( |
logical, intent(in) |
FLFRST | ) |
|
Update ice thickness in the wave model.
- Attention
- FLFRST not used.
- Parameters
-
- Author
- C. Sevigny
- Date
- 27-Aug-2015
Definition at line 1513 of file w3updtmd.F90.
1577 LOGICAL,
INTENT(IN) :: FLFRST
1582 INTEGER :: IX, IY, ISEA
1605 9010
FORMAT (
' TEST W3UIC1 : TIME :',i9.8,i7.6/ &
1606 ' OLD TICE :',i9.8,i7.6/ &
1607 ' NEW TICE :',i9.8,i7.6)
References w3idatmd::flic1, w3wdatmd::iceh, w3gdatmd::iicehfac, w3gdatmd::iicehmin, w3gdatmd::mapsf, w3odatmd::ndst, w3gdatmd::nsea, w3idatmd::ti1, w3wdatmd::tic1, and w3wdatmd::time.
Referenced by w3wavemd::w3wave().
◆ w3uic5()
| subroutine w3updtmd::w3uic5 |
( |
logical, intent(in) |
FLFRST | ) |
|
Update ice floe mean and max diameters in the wave model.
- Attention
- FLFRST not currently used.
- Parameters
-
- Author
- C. Sevigny
-
F. Ardhuin
- Date
- 13-Jan-2016
Definition at line 1624 of file w3updtmd.F90.
1689 LOGICAL,
INTENT(IN) :: FLFRST
1695 INTEGER :: IX, IY, ISEA
1714 flfloe =
ice(isea) .EQ. 0 .OR.
iceh(isea) .EQ. 0
1719 icef(isea) = icep5(ix,iy)
1726 9010
FORMAT (
' TEST W3UIC5 : TIME :',i9.8,i7.6/ &
1727 ' OLD TICE :',i9.8,i7.6/ &
1728 ' NEW TICE :',i9.8,i7.6)
References w3wdatmd::ice, w3wdatmd::icedmax, w3wdatmd::icef, w3wdatmd::iceh, w3gdatmd::mapsf, w3odatmd::ndst, w3gdatmd::nsea, w3idatmd::ti5, w3wdatmd::tic5, and w3wdatmd::time.
Referenced by w3wavemd::w3wave().
◆ w3uice()
| subroutine w3updtmd::w3uice |
( |
real, dimension(nspec,0:nsealm), intent(inout) |
VA | ) |
|
Update ice map in the wave model.
Points with an ice concentration larger than FICEN are removed from the sea map in the wave model. Such points are identified by negative numbers is the grid status map MAPSTA. For ice points spectra are set to zero. Points from which ice disappears are initialized with a "small" JONSWAP spectrum, based on the frequency SIG(NK-1) and the local wind direction.
In the case of icebergs, the iceberg attenuation coefficient is added to the subgrid obstruction map.
- Parameters
-
| [in,out] | VA | Spectra in 1-D or 2-D representation. |
- Author
- H. L. Tolman
- Date
- 28-Mar-2014
Definition at line 1756 of file w3updtmd.F90.
1837 #if defined W3_ST3 || defined(W3_ST4)
1848 REAL,
INTENT(INOUT) :: VA(NSPEC,0:NSEALM)
1852 INTEGER :: ISEA, JSEA, IX, IY
1854 INTEGER,
SAVE :: IENT = 0
1856 INTEGER :: MAPICE(NY,NX), ISPROC
1862 CALL strace (ient,
'W3UICE')
1865 local = iaproc .LE. naproc
1868 WRITE (ndst,9000) ficen
1869 IF ( .NOT. local )
WRITE (ndst,9001)
1884 mapice = mod(mapst2,2)
1885 mapst2 = mapst2 - mapice
1896 ice(isea) = icei(ix,iy)
1897 berg(isea)= bergi(ix,iy)
1902 IF ( icei(ix,iy).GE.ficen .AND. mapice(iy,ix).EQ.0 )
THEN
1903 mapsta(iy,ix) = - abs(mapsta(iy,ix))
1906 IF (local .AND. (iaproc .eq. isproc))
THEN
1908 WRITE (ndst,9021) isea, ix, iy, mapsta(iy,ix), &
1909 icei(ix,iy),
'ICE (NEW)'
1912 #if defined W3_ST3 || defined(W3_ST4)
1919 WRITE (ndst,9021) isea, ix, iy, mapsta(iy,ix), &
1920 icei(ix,iy),
'ICE (NEW X)'
1925 ELSE IF ( icei(ix,iy).GE.ficen )
THEN
1926 WRITE (ndst,9021) isea, ix, iy, mapsta(iy,ix), &
1933 IF ( icei(ix,iy).LT.ficen .AND. mapice(iy,ix).EQ.1 )
THEN
1938 IF ( mapst2(iy,ix) .EQ. 0 )
THEN
1939 mapsta(iy,ix) = abs(mapsta(iy,ix))
1942 IF ( local .AND. (iaproc .eq. isproc) )
THEN
1944 WRITE (ndst,9021) isea, ix, iy, mapsta(iy,ix), &
1945 icei(ix,iy),
'SEA (NEW)'
1948 #if defined W3_ST3 || defined(W3_ST4)
1955 WRITE (ndst,9021) isea, ix, iy, mapsta(iy,ix), &
1956 icei(ix,iy),
'SEA (NEW X)'
1962 WRITE (ndst,9021) isea, ix, iy, mapsta(iy,ix), &
1968 ELSE IF ( icei(ix,iy).LT.ficen )
THEN
1969 WRITE (ndst,9021) isea, ix, iy, mapsta(iy,ix), &
1981 mapst2 = mapst2 + mapice
1987 9000
FORMAT (
' TEST W3UICE : FICEN :',f9.3)
1988 9001
FORMAT (
' TEST W3UICE : NO LOCAL SPECTRA')
1989 9010
FORMAT (
' TEST W3UICE : TIME :',i9.8,i7.6/ &
1990 ' OLD TICE :',i9.8,i7.6/ &
1991 ' NEW TICE :',i9.8,i7.6)
1992 9020
FORMAT (
' TEST W3UICE : ISEA, IX, IY, MAP, ICE, STATUS :')
1993 9021
FORMAT (
' ',i8,3i4,f6.2,2x,a)
References w3gdatmd::aalpha, w3wdatmd::berg, w3adatmd::charn, w3gdatmd::ficen, w3odatmd::iaproc, w3wdatmd::ice, w3parall::init_get_isea(), w3parall::init_get_jsea_isproc(), w3gdatmd::mapsf, w3gdatmd::mapst2, w3gdatmd::mapsta, w3odatmd::naproc, w3odatmd::ndst, w3gdatmd::nsea, w3adatmd::nsealm, w3gdatmd::nspec, w3gdatmd::nx, w3gdatmd::ny, w3servmd::strace(), w3wdatmd::tice, w3wdatmd::time, w3idatmd::tin, and w3wdatmd::ust.
Referenced by w3wavemd::w3wave().
◆ w3uini()
| subroutine w3updtmd::w3uini |
( |
real, dimension(nth,nk,0:nseal), intent(out) |
A | ) |
|
Initialize the wave field with fetch-limited spectra before the actual calculation start.
Named as an update routine due to placement in code.
Fetch-limited JONSWAP spectra with a cosine^2 directional distribution and a mean direction taken from the wind.
- Parameters
-
| [out] | A | Action density spectra. |
- Author
- H. L. Tolman
- Date
- 06-Jun-2018
Definition at line 1050 of file w3updtmd.F90.
1139 REAL,
INTENT(OUT) :: A(NTH,NK,0:NSEAL)
1144 INTEGER :: IX, IY, ISEA, JSEA, IK, ITH, ISPROC
1146 INTEGER,
SAVE :: IENT = 0
1149 INTEGER :: IX0, IXN, MAPOUT(NX,NY)
1152 REAL :: ALFA(NSEAL), FP(NSEAL), YLN(NSEAL), &
1154 REAL :: XGR, U10C, U10DIR, XSTAR, FSTAR, &
1155 GAMMA, FR, D1(NTH), D1INT, F1, F2
1158 REAL :: U10MAX = 20.
1166 CALL strace (ient,
'W3UINI')
1179 CALL init_get_isea(isea, jsea)
1185 xgr = 0.5 * sqrt(
hpfac(iy,ix)**2+
hqfac(iy,ix)**2)
1191 u10c = max( min(
u10(isea),u10max) , u10min )
1193 xstar =
grav * xgr / u10c**2
1194 fstar = 3.5 / xstar**(0.33)
1195 gamma = max( 1. , 7.0 / xstar**(0.143) )
1197 alfa(jsea) = 0.076 / xstar**(0.22)
1198 fp(jsea) = fstar *
grav / u10c
1199 yln(jsea) = log( gamma )
1202 WRITE (ndst,9011) isea, u10c, xstar, &
1203 alfa(jsea), fp(jsea), gamma
1216 aa = alfa(jsea) * 0.06175/fr**5
1217 bb = max( -50. , -1.25*(fp(jsea)/fr)**4 )
1218 cc = max( -50. , -0.5*((fr-fp(jsea))/(0.07*fp(jsea)))**2 )
1220 = aa * exp(bb + exp(cc) * yln(jsea))
1230 CALL init_get_isea(isea, jsea)
1235 d1(ith) = ( max( 0. , cos(
th(ith)-u10dir) ) )**2
1236 d1int = d1int + d1(ith)
1243 f2 = f1 * a(
nth,ik,jsea) *
cg(ik,isea) /
sig(ik)
1245 a(ith,ik,jsea) = f2 * d1(ith)
1259 DO isea=iaproc,
nsea, naproc
1260 jsea = 1 + (isea-1)/naproc
1265 e1i = e1i + a(ith,ik,jsea)
1267 etot = etot + e1i *
dsip(ik) *
sig(ik) /
cg(ik,isea)
1271 hsig(ix,iy) = 4. * sqrt( etot *
dth )
1279 ixn = min(
nx , ix0+nxp-1 )
1281 ix0, ixn, 1, 1,
ny, 1,
'Hs',
'm')
1282 IF ( ixn .EQ.
nx )
EXIT
1292 9000
FORMAT (
' TEST W3UINI : XGR = ',e10.3)
1296 9010
FORMAT (
' TEST W3UINI : ISEA, U10C, XSTAR, ALPHA, FP, GAMMA')
1297 9011
FORMAT (
' ',i6,f8.2,f10.1,2f6.3,f6.2)
References w3adatmd::cg, w3gdatmd::clgtype, constants::dera, w3gdatmd::dsip, w3gdatmd::dth, w3gdatmd::flagll, w3parall::get_jsea_ibelong(), constants::grav, w3gdatmd::gtype, w3gdatmd::hpfac, w3gdatmd::hqfac, w3odatmd::iaproc, w3parall::init_get_isea(), w3parall::init_get_jsea_isproc(), w3gdatmd::mapsf, w3odatmd::naproc, w3odatmd::ndst, w3gdatmd::nk, w3gdatmd::nsea, w3gdatmd::nseal, w3gdatmd::nth, w3gdatmd::nx, w3gdatmd::ny, w3arrymd::prtblk(), constants::radius, w3gdatmd::rlgtype, w3gdatmd::sig, w3servmd::strace(), w3gdatmd::th, constants::tpiinv, w3adatmd::u10, w3adatmd::u10d, and w3gdatmd::ungtype.
Referenced by w3wavemd::w3wave().
◆ w3ulev()
| subroutine w3updtmd::w3ulev |
( |
real, dimension(nth,nk,0:nseal), intent(inout) |
A, |
|
|
real, dimension(nspec,0:nseal), intent(inout) |
VA |
|
) |
| |
Update the water level.
The wavenumber grid is modified without modyfying the spectrum (conservative linear interpolation to new grid).
- Parameters
-
| [in,out] | A | 2-D represetation of the spectra. |
| [in,out] | VA | 1-D represetation of the spectra. |
- Author
- H. L. Tolman
- Date
- 26-Sep-2012
Definition at line 2013 of file w3updtmd.F90.
2133 REAL,
INTENT(INOUT) :: A(NTH,NK,0:NSEAL), VA(NSPEC,0:NSEAL)
2137 INTEGER :: ISEA, JSEA, IX, IY, IK, I1, I2, &
2140 INTEGER,
SAVE :: IENT = 0
2142 INTEGER :: MAPDRY(NY,NX), ISPROC
2143 REAL :: DWO(NSEA), KDCHCK, WNO(0:NK+1), &
2144 CGO(0:NK+1), DEPTH, &
2145 RDK, RD1, RD2, TA(NTH,NK), &
2147 REAL :: KDMAX = 4., rdkmin = 0.05
2157 INTEGER(KIND=4) :: TIDE_KD0, INT24, INTDYS
2158 REAL :: WLEVTIDE, TIDE_ARG, WLEVTIDE2(1)
2159 REAL(KIND=8) :: d1,h,tide_hour,hh,pp,s,p,enp,dh,dpp,
ds,dp,dnp,tau
2160 REAL :: FX(44),UX(44),VX(44)
2166 CALL strace (ient,
'W3ULEV')
2169 local = iaproc .LE. naproc
2172 WRITE (ndst,9000) kdmax, rdkmin
2178 IF ( nk .LT. 2 )
THEN
2179 IF ( iaproc .EQ. naperr )
WRITE (ndse,1000)
2186 WRITE (ndst,9010) time, tlev
2190 WRITE (ndst,9011) tlev
2195 mapdry = mod(mapst2/2,2)
2196 mapst2 = mapst2 - 2*mapdry
2209 d1=d1-dfloat(tide_kd0)-0.5d0
2210 call astr(d1,h,pp,s,p,enp,dh,dpp,
ds,dp,dnp)
2212 intdys=int((tide_hour+0.00001)/int24)
2213 hh=tide_hour-dfloat(intdys*int24)
2224 dwo(isea) =
dw(isea)
2229 CALL setvuf_fast(h,pp,s,p,enp,dh,dpp,
ds,dp,dnp,tau,real(ygrd(iy,ix)),fx,ux,vx)
2230 wlevtide =
wltide(ix,iy,1,1)
2244 wlevtide =wlevtide+fx(j)*
wltide(ix,iy,j,1)*cos(tide_arg)
2259 wlv(isea) = wlevtide
2263 wlv(isea) = wlev(ix,iy)
2275 dw(isea) = max( 0. , wlveff-zb(isea) )
2293 kdchck =
wn(1,isea) * min( dwo(isea) ,
dw(isea) )
2294 IF ( kdchck .LT. kdmax )
THEN
2298 depth = max( dmin,
dw(isea) )
2301 wno(ik) =
wn(ik,isea)
2302 cgo(ik) =
cg(ik,isea)
2306 CALL wavnu3(sig(ik),depth,
wn(ik,isea),
cg(ik,isea))
2308 CALL wavnu1(sig(ik),depth,
wn(ik,isea),
cg(ik,isea))
2313 own(ik) = dsip(ik) / cgo(ik)
2314 dwn(ik) = dsip(ik) /
cg(ik,isea)
2319 IF ( wlv(isea)-zb(isea) .LE.0. )
THEN
2320 IF ( mapdry(iy,ix) .EQ. 0 )
THEN
2322 IF ( local .AND. (ibelong .eq. 1) )
THEN
2326 mapsta(iy,ix) = -abs(mapsta(iy,ix))
2328 WRITE (ndst,9021) isea, wlv(isea)-zb(isea), &
2329 0., 0.,
' (NEW DRY)'
2331 WRITE (ndst,9021) isea, wlv(isea)-zb(isea), &
2340 IF (wlv(isea)-zb(isea).GT.0. .AND. mapdry(iy,ix).EQ.1)
THEN
2346 IF ( local .AND. (ibelong .eq. 1) )
THEN
2351 IF ( mapst2(iy,ix) .EQ. 0 )
THEN
2352 mapsta(iy,ix) = abs(mapsta(iy,ix))
2354 WRITE (ndst,9021) isea, wlv(isea)-zb(isea), &
2355 0., 0.,
' (NEW WET)'
2357 WRITE (ndst,9021) isea, wlv(isea)-zb(isea), &
2358 0., 0.,
' (NEW WET INACTIVE)'
2366 rdk = abs(wno(1)-
wn(1,isea)) / dwn(1)
2369 IF ( mapsta(iy,ix) .LT. 0 )
THEN
2371 isea,
dw(isea), kdchck, rdk,
' (INACTIVE)'
2372 ELSE IF ( rdk .LT. rdkmin )
THEN
2374 isea,
dw(isea), kdchck, rdk,
' (NEGL)'
2377 isea,
dw(isea), kdchck, rdk,
' '
2381 IF ( rdk.LT.rdkmin .OR. mapsta(iy,ix).LT.0 ) cycle
2383 IF ( ibelong .eq. 0) cycle
2385 IF ( .NOT. local ) cycle
2392 out(ik,ith) = a(ith,ik,jsea) * sig(ik) / cgo(ik)
2394 ta(ith,ik) = a(ith,ik,jsea) * own(ik)
2401 CALL prt2ds ( ndst, nk, nk, nth, out, sig,
' ', &
2402 tpi, 0., 1.e-5,
'F(f,th)',
'm2s',
'Before' )
2407 IF ( wno(1) .LT.
wn(1,isea) )
THEN
2413 IF ( ik0 .GT. nk+1 )
GOTO 251
2414 IF ( wno(ik0) .GE.
wn(1,isea) )
THEN
2428 IF ( wno(ik) .GT.
wn(i2,isea) )
THEN
2430 IF ( i1 .GT. nk )
GOTO 250
2435 IF ( i1 .EQ. 0 )
THEN
2436 rd1 = (
wn(1,isea) - wno(ik) ) / dwn(1)
2439 rd1 = (
wn(i2,isea) - wno(ik) ) / &
2440 (
wn(i2,isea) -
wn(i1,isea) )
2444 IF ( i1 .GE. 1 )
THEN
2446 a(ith,i1,jsea) = a(ith,i1,jsea) + rd1*ta(ith,ik)
2450 IF ( i2 .LE. nk )
THEN
2452 a(ith,i2,jsea) = a(ith,i2,jsea) + rd2*ta(ith,ik)
2463 va(ispec,jsea) = va(ispec,jsea) / dwn(mapwn(ispec))
2468 IF ( i2.LE.nk .AND. rd2.LE.0.95 )
THEN
2471 a(ith,ik,jsea) = fachfa * a(ith,ik-1,jsea)
2480 out(ik,ith) = a(ith,ik,jsea) * sig(ik) /
cg(ik,isea)
2485 CALL prt2ds ( ndst, nk, nk, nth, out, sig,
' ', &
2486 tpi, 0., 1.e-5,
'F(f,th)',
'm2s',
'After' )
2491 WRITE (ndst,9021) isea, kdchck,
' (DEEP)'
2499 mapst2 = mapst2 + 2*mapdry
2503 IF (gtype.EQ.ungtype)
THEN
2517 1000
FORMAT (/
' *** ERROR W3ULEV *** '/ &
2518 ' THIS ROUTINE REQUIRES NK > 1 '/)
2521 9000
FORMAT (
' TEST W3ULEV : KDMAX :',f6.1/ &
2526 9010
FORMAT (
' TEST W3ULEV : TIME :',i9.8,i7.6/ &
2527 ' OLD TLEV :',i9.8,i7.6)
2528 9011
FORMAT (
' NEW TLEV :',i9.8,i7.6)
2532 9020
FORMAT (
' TEST W3ULEV : LOOP OVER ALL POINTS:', &
2533 ' ISEA, DW, KDMIN, RDK : ')
2534 9021
FORMAT (
' ',i6,f8.2,f6.2,f7.3,a)
References w3tidemd::astr(), w3adatmd::cg, constants::dera, w3gdatmd::dmin, w3gdatmd::do_change_wlv, w3gdatmd::dsip, w3adatmd::dw, w3servmd::extcde(), w3gdatmd::fachfa, w3idatmd::fllevtide, w3parall::get_jsea_ibelong(), w3gdatmd::gtype, w3adatmd::hs, w3odatmd::iaproc, w3parall::init_get_isea(), w3parall::init_get_jsea_isproc(), w3gdatmd::mapsf, w3gdatmd::mapst2, w3gdatmd::mapsta, w3gdatmd::mapth, w3gdatmd::mapwn, w3odatmd::naperr, w3odatmd::naproc, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3gdatmd::nsea, w3gdatmd::nseal, w3gdatmd::nspec, w3gdatmd::nth, w3idatmd::ntide, w3gdatmd::nx, w3gdatmd::ny, w3arrymd::prt2ds(), pdlib_w3profsmd::set_iobdp_pdlib(), w3tidemd::setvuf_fast(), w3gdatmd::sig, w3tidemd::tide_ampc, w3tidemd::tide_mf, w3tidemd::tide_phg, w3wdatmd::time, w3timemd::time2hours(), w3wdatmd::tlev, w3idatmd::tln, constants::tpi, w3tidemd::twpi, w3gdatmd::ungtype, w3wdatmd::ust, w3gdatmd::w3setref(), w3dispmd::wavnu1(), w3dispmd::wavnu3(), w3idatmd::wltide, w3wdatmd::wlv, w3adatmd::wn, w3gdatmd::ygrd, w3gdatmd::zb, and w3wdatmd::zeta_setup.
Referenced by w3wavemd::w3wave().
◆ w3urho()
| subroutine w3updtmd::w3urho |
( |
logical, intent(in) |
FLFRST | ) |
|
Interpolate air density field to the given time.
Linear interpolation.
- Parameters
-
| [in] | FLFRST | Flag for first pass through routine. |
- Author
- J. M. Castillo
- Date
- 13-Aug-2021
Definition at line 2552 of file w3updtmd.F90.
2634 LOGICAL,
INTENT(IN) :: FLFRST
2638 INTEGER :: ISEA, IX, IY
2640 INTEGER,
SAVE :: IENT = 0
2642 REAL :: DT0N, DT0T, RD
2647 CALL strace (ient,
'W3URHO')
2668 ra0(isea) = rh0(ix,iy)
2669 rai(isea) = rhn(ix,iy) - rh0(ix,iy)
2682 rd = dt0t / max( 1.e-7 , dt0n )
2685 rd = dt0t / max( 1.e-7 , dt0n )
2692 WRITE (ndst,9000) dt0n, dt0t, rd
2712 9000
FORMAT (
' TEST W3URHO : DT0N, DT0T, RD :',2f8.1,f6.3)
References w3timemd::dsec21(), w3gdatmd::fswnd, w3odatmd::iaproc, w3gdatmd::mapsf, w3odatmd::naproc, w3gdatmd::nsea, w3adatmd::ra0, w3adatmd::rai, w3wdatmd::rhoair, w3servmd::strace(), w3wdatmd::time, w3idatmd::tr0, w3wdatmd::trho, and w3idatmd::trn.
Referenced by w3wavemd::w3wave().
◆ w3utau()
| subroutine w3updtmd::w3utau |
( |
logical, intent(in) |
FLFRST | ) |
|
Interpolate atmosphere momentum fields to the given time.
Linear interpolation of momentum module and direction, with a simple correction to obtain quasi-conservation of energy.
- Parameters
-
| [in] | FLFRST | Flag for first pass through routine. |
- Author
- J. M. Castillo
- Date
- 22-Mar-2021
Definition at line 829 of file w3updtmd.F90.
911 LOGICAL,
INTENT(IN) :: FLFRST
915 INTEGER :: ISEA, IX, IY
917 INTEGER,
SAVE :: IENT = 0
919 REAL :: D0, DN, DD, DT0N, DT0T, RD, MI2, &
929 CALL strace (ient,
'W3UTAU')
950 ma0(isea) = sqrt( ux0(ix,iy)**2 + uy0(ix,iy)**2 )
951 mai(isea) = sqrt( uxn(ix,iy)**2 + uyn(ix,iy)**2 )
952 IF (
ma0(isea) .GT. 1.e-7)
THEN
953 d0 = mod(
tpi+atan2(uy0(ix,iy),ux0(ix,iy)) ,
tpi )
957 IF (
mai(isea) .GT. 1.e-7)
THEN
958 dn = mod(
tpi+atan2(uyn(ix,iy),uxn(ix,iy)) ,
tpi )
962 IF (
ma0(isea) .GT. 1.e-7)
THEN
968 IF (abs(dd).GT.
pi) dd = dd -
tpi*sign(1.,dd)
983 rd = dt0t / max( 1.e-7 , dt0n )
986 rd = dt0t / max( 1.e-7 , dt0n )
994 WRITE (ndst,9000) dt0n, dt0t, rd
1007 mi2 = sqrt( rd2 *
ma0(isea)**2 + &
1008 rd *(
ma0(isea)+
mai(isea))**2 )
1009 taua(isea) =
taua(isea) * min(1.25,mi2/max(1.e-7,
taua(isea)))
1014 IF(
arctc .AND. (isea .GT. nglo) )
THEN
1015 mdarc =
tauadir(isea) + angarc( isea - nglo )*
dera
1027 9000
FORMAT (
' TEST W3UTAU : DT0N, DT0T, RD :',2f8.1,f6.3)
References w3gdatmd::angarc, w3gdatmd::arctc, constants::dera, w3timemd::dsec21(), w3gdatmd::fswnd, w3adatmd::ma0, w3adatmd::mai, w3gdatmd::mapsf, w3adatmd::md0, w3adatmd::mdi, w3gdatmd::narc, w3odatmd::ndst, w3gdatmd::nglo, w3gdatmd::nsea, constants::pi, w3servmd::strace(), w3adatmd::taua, w3adatmd::tauadir, w3wdatmd::time, constants::tpi, w3idatmd::tu0, and w3idatmd::tun.
Referenced by w3wavemd::w3wave().
◆ w3utrn()
| subroutine w3updtmd::w3utrn |
( |
real, dimension(ny*nx), intent(in) |
TRNX, |
|
|
real, dimension(ny*nx), intent(in) |
TRNY |
|
) |
| |
Update cell boundary transparencies for general use in propagation routines.
Two arrays are generated with the size (NY*NX,-1:1). The value at (IXY,-1) indicates the transparency to be used if the lower or left boundary is an inflow boundary. (IXY,1) is used if the upper or right boundary is an inflow boundary. (IXY,0) is used for all other cases (by definition full transparency).
- Parameters
-
| [in,out] | TRNX | Transparencies from model definition file. |
| [in,out] | TRNY | Transparencies from model definition file. |
- Author
- H. L. Tolman
- Date
- 30-Oct-2009
Definition at line 2736 of file w3updtmd.F90.
2815 REAL,
INTENT(IN) :: TRNX(NY*NX), TRNY(NY*NX)
2819 INTEGER :: ISEA, IX, IY, IXY, IXN, IXP, IYN, IYP
2821 INTEGER,
SAVE :: IENT = 0
2824 INTEGER :: ILEV, NLEV
2827 REAL :: TRIX(NY*NX), TRIY(NY*NX), DX, DY, &
2836 CALL strace (ient,
'W3UTRN')
2847 WRITE (ndst,9001)
'INITIALIZING ATRNX/Y'
2852 IF (
trflag .EQ. 0 )
THEN
2854 WRITE (ndst,9001)
'NO FURTHER ACTION REQUIRED'
2862 WRITE (ndst,9001)
'DATA APPLIED AT CELL BOUNDARIES'
2871 IF ( ix .EQ. 1 )
THEN
2873 atrnx(ixy, 1) = trnx(ixy)
2874 ELSE IF ( ix .EQ.
nx )
THEN
2876 atrnx(ixy, 1) = trnx(iy)
2879 atrnx(ixy, 1) = trnx(ixy)
2881 atrny(ixy,-1) = trny(ixy-1)
2882 atrny(ixy, 1) = trny(ixy)
2885 ilev = nint(10.*min(trnx(ixy),trny(ixy)))
2886 levs(ilev) = levs(ilev) + 1.
2895 WRITE (ndst,9001)
'DATA APPLIED AT CELL CENTERS'
2905 IF ( ix .EQ. 1 )
THEN
2906 ixn = iy + (
nx-1)*
ny
2908 ELSE IF ( ix .EQ.
nx )
THEN
2909 ixn = iy + (ix-2)*
ny
2912 ixn = iy + (ix-2)*
ny
2916 IF ( iy .EQ. 1 )
THEN
2919 ELSE IF ( iy .EQ.
ny )
THEN
2929 atrnx(ixy,-1) = (1.+trnx(ixy)) * trnx(ixn)/(1.+trnx(ixn))
2930 atrnx(ixy, 1) = (1.+trnx(ixy)) * trnx(ixp)/(1.+trnx(ixp))
2931 atrny(ixy,-1) = (1.+trny(ixy)) * trny(iyn)/(1.+trny(iyn))
2932 atrny(ixy, 1) = (1.+trny(ixy)) * trny(iyp)/(1.+trny(iyp))
2934 IF (
mapsta(iy,ix) .EQ. 2 )
THEN
2935 IF ( ix .EQ. 1 )
THEN
2937 ELSE IF (
mapsta( iy ,ix-1) .LE. 0 )
THEN
2940 IF ( ix .EQ.
nx )
THEN
2942 ELSE IF (
mapsta( iy ,ix+1) .LE. 0 )
THEN
2945 IF ( iy .EQ. 1 )
THEN
2947 ELSE IF (
mapsta(iy-1, ix ) .LE. 0 )
THEN
2950 IF ( iy .EQ.
ny )
THEN
2952 ELSE IF (
mapsta(iy+1, ix ) .LE. 0 )
THEN
2958 ilev = nint(10.*min(trnx(ixy),trny(ixy)))
2959 levs(ilev) = levs(ilev) + 1.
2966 WRITE(ndst,9010)
'ISLANDS'
2969 WRITE (ndst,9011) ilev, levs(ilev)/real(
nsea)
2970 nlev = nlev + nint(levs(ilev))
2979 WRITE (ndst,9001)
'NO ICE ACTION REQUIRED'
2987 WRITE (ndst,9001)
'CALCULATE ICE TRANSPARENCIES'
3008 IF (
ice(isea).GT.0)
THEN
3009 IF (
ficel.GT.0.)
THEN
3010 trix(ixy) = exp(-
ice(isea)*dx/
ficel)
3011 triy(ixy) = exp(-
ice(isea)*dy/
ficel)
3018 trix(ixy) = ( licen -
ice(isea)*dx ) / ( licen - lice0 )
3032 triy(ixy) = ( licen -
ice(isea)*dy ) / ( licen - lice0 )
3037 trix(ixy) = max( 0. , min( 1. , trix(ixy) ) )
3038 triy(ixy) = max( 0. , min( 1. , triy(ixy) ) )
3044 IF (
berg(isea).GT.0)
THEN
3045 trix(ixy) = trix(ixy)*exp(-
berg(isea)*
ffacberg *dx*0.0001)
3046 triy(ixy) = triy(ixy)*exp(-
berg(isea)*
ffacberg *dy*0.0001)
3050 ilev = nint(10.*min(trix(ixy),triy(ixy)))
3051 levs(ilev) = levs(ilev) + 1.
3057 WRITE(ndst,9010)
'ICE'
3060 WRITE (ndst,9011) ilev, levs(ilev)/real(
nsea)
3061 nlev = nlev + nint(levs(ilev))
3073 IF ( ix .EQ. 1 )
THEN
3074 ixn = iy + (
nx-1)*
ny
3076 ELSE IF ( ix .EQ.
nx )
THEN
3077 ixn = iy + (ix-2)*
ny
3080 ixn = iy + (ix-2)*
ny
3084 IF ( iy .EQ. 1 )
THEN
3087 ELSE IF ( iy .EQ.
ny )
THEN
3096 * (1.+trix(ixy)) * trix(ixn)/(1.+trix(ixn))
3098 * (1.+trix(ixy)) * trix(ixp)/(1.+trix(ixp))
3100 * (1.+triy(ixy)) * triy(iyn)/(1.+triy(iyn))
3102 * (1.+triy(ixy)) * triy(iyp)/(1.+triy(iyp))
3113 9000
FORMAT (
' TEST W3UTRN : TRFLAG = ',i3)
3114 9001
FORMAT (
' TEST W3UTRN : ',a)
3115 9010
FORMAT (
' TEST W3UTRN : OBSTRICTION LEVELS FOR ',a,
' :')
3116 9011
FORMAT (
' ',i4,f8.5)
References w3adatmd::atrnx, w3adatmd::atrny, w3wdatmd::berg, w3gdatmd::clgtype, constants::dera, w3gdatmd::ffacberg, w3gdatmd::fice0, w3gdatmd::ficel, w3gdatmd::ficen, w3gdatmd::flagll, w3gdatmd::gtype, w3gdatmd::hpfac, w3gdatmd::hqfac, w3wdatmd::ice, w3gdatmd::mapsf, w3gdatmd::mapsta, w3odatmd::ndst, w3gdatmd::nsea, w3gdatmd::nx, w3gdatmd::ny, constants::radius, w3gdatmd::rlgtype, w3servmd::strace(), and w3gdatmd::trflag.
Referenced by w3wavemd::w3wave().
◆ w3uwnd()
| subroutine w3updtmd::w3uwnd |
( |
logical, intent(in) |
FLFRST, |
|
|
real, intent(in) |
VGX, |
|
|
real, intent(in) |
VGY |
|
) |
| |
Interpolate wind fields to the given time.
Linear interpolation of wind speed and direction, with a simple correction to obtain quasi-conservation of energy.
- Parameters
-
| [in] | FLFRST | Flag for first pass through routine. |
| [in] | VGX | Grid velocity |
| [in] | VGY | Grid velocity |
- Author
- H. L. Tolman
- Date
- 27-May-2014
Definition at line 489 of file w3updtmd.F90.
599 REAL,
INTENT(IN) :: VGX, VGY
600 LOGICAL,
INTENT(IN) :: FLFRST
604 INTEGER :: ISEA, IX, IY
606 INTEGER,
SAVE :: IENT = 0
608 REAL :: D0, DN, DD, DT0N, DT0T, RD, UI2, &
614 REAL :: STAB0, STAB, THARG1, THARG2, COR1, COR2
621 CALL strace (ient,
'W3UWND')
642 ua0(isea) = sqrt(
wx0(ix,iy)**2 +
wy0(ix,iy)**2 )
643 uai(isea) = sqrt(
wxn(ix,iy)**2 +
wyn(ix,iy)**2 )
644 IF (
ua0(isea) .GT. 1.e-7)
THEN
649 IF (
uai(isea) .GT. 1.e-7)
THEN
654 IF (
ua0(isea) .GT. 1.e-7)
THEN
660 IF (abs(dd).GT.
pi) dd = dd -
tpi*sign(1.,dd)
677 rd = dt0t / max( 1.e-7 , dt0n )
680 rd = dt0t / max( 1.e-7 , dt0n )
688 WRITE (ndst,9000) dt0n, dt0t, rd
699 ua(isea) =
ua0(isea) + rd *
uai(isea)
701 ui2 = sqrt( rd2 *
ua0(isea)**2 + &
702 rd *(
ua0(isea)+
uai(isea))**2 )
703 ua(isea) =
ua(isea) * min(1.25,ui2/max(1.e-7,
ua(isea)))
705 ud(isea) =
ud0(isea) + rd *
udi(isea)
707 uxr =
ua(isea)*cos(
ud(isea)) + vgx
708 uyr =
ua(isea)*sin(
ud(isea)) + vgy
709 ua(isea) = max( 0.001 , sqrt(uxr**2+uyr**2) )
710 ud(isea) = mod(
tpi+atan2(uyr,uxr) ,
tpi )
720 as(isea) =
as0(isea) + rd *
asi(isea)
732 WHERE (
ua .GE. wwcor(1) )
ua =
ua+(
ua-wwcor(1))*wwcor(2)
744 uxr =
ua(isea)*cos(
ud(isea)) - rwindc*
cx(isea)
745 uyr =
ua(isea)*sin(
ud(isea)) - rwindc*
cy(isea)
746 u10(isea) = max( 0.001 , sqrt(uxr**2+uyr**2) )
760 u10(isea) = max(
ua(isea) , 0.001 )
783 stab0 = zwind *
grav / 273.
788 stab = stab0 *
as(isea) / max(5.,
u10(isea))**2
789 stab = max( -1. , min( 1. , stab ) )
793 tharg1 = max( 0. , ffng*(stab-ofstab))
794 tharg2 = max( 0. , ffps*(stab-ofstab))
795 cor1 = ccng * tanh(tharg1)
796 cor2 = ccps * tanh(tharg2)
800 asf(isea) = sqrt( (1.+cor1+cor2)/shstab )
810 9000
FORMAT (
' TEST W3UWND : DT0N, DT0T, RD :',2f8.1,f6.3)
References w3gdatmd::angarc, w3gdatmd::arctc, w3adatmd::as, w3adatmd::as0, w3wdatmd::asf, w3adatmd::asi, w3gdatmd::ccng, w3gdatmd::ccps, w3adatmd::cx, w3adatmd::cy, constants::dera, w3timemd::dsec21(), w3idatmd::dt0, w3idatmd::dtn, w3adatmd::dw, w3gdatmd::ffng, w3gdatmd::ffps, w3idatmd::flcur, w3gdatmd::fswnd, constants::grav, w3gdatmd::mapsf, w3gdatmd::narc, w3odatmd::ndst, w3gdatmd::nglo, w3gdatmd::nsea, w3gdatmd::nx, w3gdatmd::ny, w3gdatmd::ofstab, constants::pi, w3gdatmd::rwindc, w3gdatmd::shstab, w3servmd::strace(), w3wdatmd::time, constants::tpi, w3idatmd::tw0, w3idatmd::twn, w3adatmd::u10, w3adatmd::u10d, w3adatmd::ua, w3adatmd::ua0, w3adatmd::uai, w3adatmd::ud, w3adatmd::ud0, w3adatmd::udi, w3gdatmd::wwcor, w3idatmd::wx0, w3idatmd::wxn, w3idatmd::wy0, w3idatmd::wyn, and w3gdatmd::zwind.
Referenced by w3wavemd::w3wave().
real, parameter pi
PI Value of Pi.
real function dsec21(TIME1, TIME2)
logical, pointer do_change_wlv
real, dimension(:), pointer wwcor
real, dimension(:), pointer iceh
integer, dimension(:), pointer twn
real, dimension(:), pointer charn
real, dimension(:), pointer as
double precision, dimension(:,:), pointer ygrd
real, dimension(:,:), pointer dt0
Define data structures to set up wave model auxiliary data for several models simultaneously.
real, dimension(:), pointer zb
real, parameter dera
DERA Conversion factor from degrees to radians.
integer, parameter ungtype
Define data structures to set up wave model dynamic data for several models simultaneously.
real, dimension(:,:), pointer atrnx
pure subroutine wavnu3(SI, H, K, CG)
real, dimension(:,:), pointer cg
subroutine get_jsea_ibelong(ISEA, JSEA, IBELONG)
Set belongings of JSEA in context of PDLIB.
integer, parameter rlgtype
real, dimension(:,:), pointer wy0
integer, dimension(:), pointer mapth
real, dimension(:), pointer dw
real, dimension(:), pointer u10d
real, dimension(:,:), pointer atrny
real, dimension(:), allocatable ds
real, dimension(:), pointer sig
real, dimension(:), pointer icef
real, dimension(:), pointer wlv
integer, dimension(:), pointer ti5
integer, dimension(:), pointer time
real, dimension(:), pointer hs
real, dimension(:,:), pointer bbpi0
real, dimension(:,:), pointer abpin
logical, pointer flcurtide
real, dimension(:), pointer asi
real, dimension(:), pointer cdi
real, dimension(:), pointer dsip
real, dimension(:,:,:,:), pointer wltide
integer, dimension(:), pointer tu0
integer, dimension(:), pointer trho
real, dimension(:), pointer th
integer, parameter iclose_none
real, dimension(:,:), pointer hqfac
integer, dimension(:), pointer tlev
subroutine w3acturn(NDirc, NFreq, Alpha, Spectr)
real, dimension(:), pointer ca0
integer, dimension(mc) tide_index2
real, dimension(:), pointer berg
real, dimension(:), pointer ra0
real, dimension(:,:), pointer dqdy
integer, dimension(:,:), pointer mapfs
real, dimension(:,:), pointer wxn
real, dimension(:), pointer md0
integer, parameter clgtype
logical, pointer fllevtide
real, dimension(:), pointer ud
integer, dimension(:), pointer tic1
integer, dimension(:,:), pointer ipbpi
character *5, dimension(:), allocatable tidecon_allnames
real, dimension(:,:,:,:), pointer cxtide
real, parameter tpiinv
TPIINV Inverse of 2*Pi.
real, dimension(:), pointer cai
real, dimension(:), pointer ud0
subroutine astr(d1, h, pp, s, p, np, dh, dpp, ds, dp, dnp)
real, dimension(:), pointer mdi
real, dimension(:), pointer cy
real, dimension(:), pointer taua
real, dimension(:), pointer angarc
real, dimension(:,:), pointer dtn
integer, dimension(:,:), pointer mapsf
integer, dimension(:), pointer ti1
real, dimension(:,:), pointer dpdx
real, dimension(:), pointer ma0
real, dimension(:), pointer uai
real, dimension(:), pointer ua0
real, parameter radius
RADIUS Radius of the earth (m).
real, dimension(:), pointer sig2
real, dimension(:,:), pointer wn
real, dimension(:), pointer mai
real, dimension(:), pointer u10
real, parameter tpi
TPI 2*Pi.
real, dimension(:,:), pointer dpdy
real, dimension(:,:), pointer rdbpi
real, dimension(:), pointer icedmax
real, dimension(:), pointer zeta_setup
subroutine setvuf_fast(h, pp, s, p, enp, dh, dpp, ds, dp, dnp, tau, XLAT, F, U, V)
Define data structures to set up wave model input data for several models simultaneously.
integer, dimension(:), pointer mapwn
real, dimension(:,:), pointer abpi0
real, dimension(:), pointer ice
real, dimension(:), pointer as0
real, dimension(:,:), pointer wx0
integer, dimension(:), pointer tc0
integer, dimension(:), pointer tw0
integer, dimension(:), pointer tin
real, dimension(:,:), pointer hpfac
subroutine init_get_jsea_isproc(ISEA, JSEA, ISPROC)
Set JSEA for all schemes.
real, dimension(:), pointer ust
real, dimension(:), pointer udi
real, dimension(:,:,:,:), pointer cytide
real, dimension(:), pointer ua
real, dimension(:), pointer dden
integer, parameter iclose_trpl
subroutine wavnu1(SI, H, K, CG)
real, dimension(:), pointer tauadir
subroutine extcde(IEXIT, UNIT, MSG, FILE, LINE, COMM)
subroutine prt2ds(NDS, NFR0, NFR, NTH, E, FR, UFR, FACSP, FSC, RRCUT, PRVAR, PRUNIT, PNTNME)
real, dimension(:), pointer rhoair
double precision, parameter twpi
real, dimension(:), pointer angld
integer, dimension(:), pointer tln
real, dimension(:), pointer rai
integer, dimension(:), pointer isbpi
real, dimension(:), pointer cx
real, dimension(:), pointer cd0
integer, dimension(:), pointer tic5
integer, dimension(:), pointer trn
real, dimension(mc, 2) tide_ampc
Parallel routines for implicit solver.
real(kind=8) function time2hours(TIME)
integer, parameter iclose_smpl
real, dimension(mc, 2) tide_phg
integer, dimension(:), pointer tun
integer, dimension(:), pointer tr0
subroutine prtblk(NDS, NX, NY, MX, F, MAP, MAP0, FSC, IX1, IX2, IX3, IY1, IY2, IY3, PRVAR, PRUNIT)
real, dimension(:,:), pointer wyn
real, dimension(:,:), pointer dqdx
integer, dimension(:,:), pointer mapsta
integer, dimension(:), pointer tice
real, parameter grav
GRAV Acc.
integer, dimension(:,:), pointer mapst2
subroutine init_get_isea(ISEA, JSEA)
Set ISEA for all schemes.
integer, dimension(:), pointer tcn
subroutine set_iobdp_pdlib
real, dimension(:,:), pointer bbpin
real, dimension(:), pointer asf