209
17AD-AILS 168 NAVAL OCEAN RESEARCH AND DEVELOPMENT ACTIVITY NSTL S-ETC F/6 20/4 APPLICATION OF A DISCRETE NONLINEAR SPECTRAL MODEL TO IDEAL CAS--ETC U) APR 82 j H ALLENDER, M LYBANON UNCLASSIFIED NORDATN-148 NL mhEhEEhh mohhohmhhhEEEE momhhhhhmmhhlf Ihhhhhhhhh I

A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

17AD-AILS 168 NAVAL OCEAN RESEARCH AND DEVELOPMENT ACTIVITY NSTL S-ETC F/6 20/4APPLICATION OF A DISCRETE NONLINEAR SPECTRAL MODEL TO IDEAL CAS--ETC U)

APR 82 j H ALLENDER, M LYBANONUNCLASSIFIED NORDATN-148 NL

mhEhEEhhmohhohmhhhEEEE

momhhhhhmmhhlfIhhhhhhhhh I

Page 2: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

- ~SCAME 1-fl SPETR f(f)

T*, 1966(00).I - Y-6.0(10)2.0

r-

zo

a ;,L

3 Appaoed im POWI I%"4Diatz)bo"a Ualimited

Page 3: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

I

ABSTRACT

The discrete nonlinear spectral model developed by Allender,

Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press,

1982) is applied to seven ideal cases of wind wave generation.

These cases form the basis of an international study to compare

wave prediction models,(-Hasseimmn et al., Proc. Symp. on Wave

Dyn., Plenum Press, 1982). Model results are summarized

graphically for each case, as applicable, and a brief explana-

tion of model behavior is given.

The model is free of numerical dispersion and damping, and

reproduces the JONSWAP relations for fetch- and duration-limited

wave growth quite well. Model results from cases with increasing

complexity provide a benchmark for understanding model behavior

in actual situations and for future improvements.

Accession For

NTIS GRA&IDTIC TABUnannonced

,ana

D

AI

C

TA

B

tDist

pITI

Ii

[Dis

Page 4: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

ACKNOWLEDGEMENTS

T.P. Barnett is thanked heartily for being an enthusiastic

and optimistic collaborator throughout this project. Isaac

Traxler did all of the computer graphics. Michael Stirgus and

Richard Myrick put the plots into final form. Joyce Ford is

thanked for typing the manuscript.

* Ii* b

Page 5: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

CONTENTS

Page

LIST OF ILLUSTRATIONS v

LIST OF TABLES vi

I. INTRODUCTION 1

II. PRESENTATION OF MODEL RESULTS 3

A. CASE I, Propagation 3

B. CASE II, Fetch-limited Growth 4

C. CASE 111, Oblique, Fetch-limited Growth 7

D. CASE IV, Windy Half-Plane B

E. CASE V, Frontal Passage 9

F. CASE VI.A, Stationary Hurricane 10

G. CASE VI.B, Moving Hurricane 13

H. CASE VII, Directional Relaxation 14

III. SUMMARY 15

IV. REFERENCES 16

V. TABLE OF MATHEMATICAL NOTATION 17

APPENDIX Al

Page 6: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

A SUMMARY OF CALCOMP-COMPATIBLE PLOT PROGRAMS FOR THE WAVE MODEL

Isaac Traxler

Computer Sciences Corporation

NSTL Station, MS 39529

Page

A. Introduction and History of Plot Programs A2

B. Program PLOTWM A4

1. Significant Wave Height, Peak Frequency, and Mean

Direction vs. Fetch

2. Spectrum (1-D) vs. Frequency with Time or Fetch as Family

Parameter

3. Spectrum (2-D) vs. Frequency with Direction as Family

Parameter

C. Mean Direction Contour A39

D. E/EPM Contour A50

E. Mean Frequency Contour A64

F. Average Frequency Contour A76

G. Spectrum (2-D) Contour A88

H. General Custer (Arrow) Diagram Al05

-Magnitude is Variance, Direction is Mean Wave Direction

iv

Page 7: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

, • :,-

T

LIST OF ILLUSTRATIONS

Figure 1. Model Output Points, CASE II 19

Figures 2-15. Model Results, CASE II 20

Figure 16. Model Output Points, CASE III 27

Figures 17-33. Model Results, CASE III 28

Figure 34. Model Output Points, CASE IV 37

Figures 35-49. Model Results, CASE IV 38

Figure 50. Model Output Points, CASE V 46

Figures 51-63. Model Results, CASE V 47

Figure 64. Model Output Points, CASES VI.A-B 54

Figures 65-84. Model Results, CASE VI.A 55

Figures 85-104. Model Results, CASE VI.B 67

Figures 105-109. Model Results, CASE VII 78

ii

I

I1I V

__ __ __ __ __ __ __ _-- ...... .... -..

Page 8: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

LIST OF TABLES

Page

TABLE 1. MODEL PARAMETERS FOR CASES II-V. 5

TABLE 2. MODEL PARAMETERS FOR CASES VI.A-B. 12

vi

. ifi!

Page 9: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

APPLICATION OF A DISCRETE NONLINEAR SPECTRAL MODEL TO

IIDEAL CASES OF WIND WAVE GENERATION

1I. INTRODUCTION

A variety of wave prediction models have been developed in recent years. These

models differ considerably in the way they represent various physical processes and

also in their manner of dealing with all the messy details inherent in realistic

wave prediction.

In order to assess model performance and identify critical areas for future

research efforts, a joint investigation among wave modelers was undertaken. Nine

groups of modelers applied their models to seven ideal cases of wind wave generation

and then conducted a detailed intercomparison of model results. A preliminary

report of the model intercomparison was given at the Symposium on Wave Dynamics and

Radio Probing of the Ocean Surface, Miami, FL, May, 1981. The final report appears

in the proceedings of that symposium (Hasselmann, et al., 1982).

NORDA Code 331 was one of the participants in the intercomparison. We applied

the discrete nonlinear spectral (DNS) model, developed by Code 331 in collaboration

with T.P. Barnett of Scripps Institute of Oceanography, to the ideal cases. The

model physics and underlying philosophy is described in Allender et al. (1982). A

Idetailed description of the model computer program isOgiven in NORDA Technical Note

147. For the present model we assume that input from the atmosphere Sin and weak,

nonlinear interactions among waves Snl are the dominant source terms that govern

the growth of the wave spectrum. Dissipation, i.e., any process that removes energy

from the surface wave field, enters only through a prescribed, maximum spectral

III

Page 10: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

density that depends on the local wind speed. The form of Sin yields an

exponential growth mechanism, consistent with linear feedback theories. The

magnitude of Sin is consistent with the minimum suggested by Snyder et al. (1981).

The nonlinear interactions are represented by a set of empirical orthogonal

functions that decompose a body of exact cdlculations that were made for a family of

single-peaked spectra with different peakedness and angular spread. Thus, the

representation for Snl depends crudely on spectral shape. The Pierson-Moskowitz

spectrum with its peak at the local wind frequency, but with a variable energy level

and a cos2 angular spread with respect to the wind direction, is used as the

spectral limiter. Some additional constraints (on the rate of change of the

spectrum and on where in frequency and direction to apply the limiter) are also

required to obtain stable spectra. These constraints are borne out of the mismatch

between the relatively large amount of information that ought to be present in the

2-D wave spectrum and the relatively low level of sophistication used to represent

physical processes affecting wave growth.

The algorithm used for propagation is generally the most complicated aspect of

numerical methods in wave models. We use an adaptation of the method of

characteristics to avoid the numerical damping and dispersion problems that are

typical of finite difference methods. The wave field is quantized as sets of

frequency-direction particles that move along parallel rays in given directions and

at the group velocities of the given frequency components. The rays are thought of

as directed line segments that connect equally spaced ray points. A net of grid

points is also defined over the physical domain to introduce the wind field, to

accumulate values of the 2-D spectrum and to compute the source terms. Reciprocal

relationships between nearest neighbor ray and grid points then form the backbone of

the overall algorithm.

2

Page 11: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

IThe primary purpose of the present note is to describe briefly and to present

* all pertinent DNS model results obtained for the ideal cases. The note stands as a

record of model performance, and can be used to better understand the effect of

modifications to the DNS model and the results of future model applications. The

format for the remainder of the note is a case by case presentation of results.

II. PRESENTATION OF MODEL RESULTS

A. CASE I, PROPAGATION

The DNS model uses an adaptation of the method of characteristics to

propagate spectral density (which is proportional to surface displacement squared

per elemental frequency and direction increments). The purpose of CASE I was to

reveal numerical damping and dispersion inherent in the numerical algorithm, which

by definition should be no larger than roundoff error in the present model.

We tested the model, however, by comparing results with an analytical

solution. If we assume that spectral density F propagates in direction x with

(group) velocity Cg and can grow in an exponential fashion controlled by a

constant, say B, then

" F + C "F = BF (1)

subject to initial and boundary conditions on 0 < x < L. For simplicity we take

F(O,t) = K and F(x,O) = g(x).

Then the solution to (1) is

F(x,t) = exp(Bt) g(x-C t) x > Cgt (2)K exp(Bx/Cgi x Z Cgt (3)

Specifically, in the interval 0 < x < L:

r

r i3

Page 12: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1. If t < L/Cg there are two regimes

F(x,t) propagates the initial condition and grows it exponentially in

time for x > Cgt, F(x,t) = eBt g(x - Cgt); -

F(x,t) is constant in time but increases exponentially with distance

for x < Cgt, and

2. If t > L/Cg then "information" from x = 0 has had time to reach all

points in [0, L], and F(x,t) = KeBX/Cg everywhere.

We specified a constant boundary condition for several frequencies and

directions and ran the model, suppressing all source functions for spectral density

except for atmospheric input (which is proportional to BF). At first the model

solution did not agree with Eqs. (2)-(3). An error in the linkage arrangement

between ray and grid points was discovered and corrected (see Allender and Lybanon,

1982, Secs. II.A, IV.A, and V.A for details on ray-grid concept). The corrected

model satisfied Eqs. (2)-(3) to within round-off error in our tests and we concluded

that the model propagates energy at the specified group velocities without

significant numerical damping or dispersion.

B. FETCH-LIMITED GROWTH

The results of comprehensive studies of wave growth under fetch-limited

conditions (Hasselmann et al., 1976) provide benchmarks for evaluating the

performance of wave prediction models. In this case we have appriori knowledge

about the relationships among variance, peak, fetch, and time, and, to a lesser

extent, some quasi-equilibrium form for the growing wind sea spectrum (Hasselmann et

al., 1976).

The physical setting for CASE II was a 1000 x 1000 km square ocean, initially

at rest, subjected to a constant offshore wind of 20 m/s. The upwind boundary was

treated as a shoreline (solid), whereas the other three boundaries were perfect

4

iI

Page 13: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

absorbers. Table 1 gives the frequencies, directions, and other model parameters

that were used. Fig. 1 gives a schematic of the domain and the locations selected

for model output.

Model results for CASE II are summarized in Figs. 2-15. The figures are

largely self-explanatory and a table of mathematical notation is included as Sec.

V.

TABLE 1

MODEL PARAMETERS FOR CASES II-V

Domain 1000 by 1000 kin; no flux condition on S boundary with

perfect absorption for outgoing rays on W, N, E

boundaries, initially at rest.

Grid 50 kin, regular

Rays 30 parallel rays, ea. dir.

35-40 km ray-point spacing

Time Step 1200 sec

Run Time 40 hr

Frequencies (20) .045, .05, ..., .08, .09,., .16,

.18, .225, .25 hz

Directions (24)1 0, 15, 30, ... , 330, 3450

IA resolution of 450 was used in the half plane opposite the wind direction in

CASES II-IV and in the SE quadrant in CASE V.

5

Page 14: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

Key results for this simulation are given in Figs. 2-3, which show variance E*

and peak frequency fp* vs. fetch x* (all variables nondimensional) for successive

times during the growth of the spectrum. Good agreement with the JONSWAP relations

(plotted in the figures) is found over most of the fetch. Such agreement is a

significant improvement over previous spectral models. Notably, the model

reproduces the JONSWAP relations by combining processes that depend on five indepen-

dent variables (f,g,x,y,t) and without tuning of the model parameters. Model

spectra are still fetch-limited at x*=1.34(10 7). A fetch of about x*=1.6(10 7)

would be required for full development. Figs. 4 and 6 show the behavior of E* and

fp vs. t*. As seen in Figs. 2, 3, 4 and 6, the model E* and fp* values scatter

somewhat for fetches less than about two grid lengths because the gradients in the

wave field are not resolved. The situation is similar to that occurring in discrete

hydrodynamical modeling, but not as severe because some wave components actually can

grow to their limit in just a few temporal or spatial steps. To reduce the spatial

truncation errors we ran a short test on a 200 x 200 km domain with a 10 km grid and

a 10 min time step, and all other model parameters as before. With this five-fold

increase in resolution there is no scatter in E* or fp* at short fetches as shown

in Figs. 5 and 7, respectively. In practical cases the difficulty could be

corrected altogether by simply setting the high frequencies to their limiting

values, as described in Allender et al., 1982, Sec. 3.

The times at which the wave field b'ecomes fetch-limited agree well with a

simple relation that can be derived from the JONSWAP duration law reported by

Hasselmann et al. (1976). To use this relation we assume that the fetch-limited

domain expands at the group velocity of the peak frequency. Then the extent of the

fetch-limited domain XFL as a function of time, starting with no wind sea, is

found to be:

6

Page 15: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

XFL = 0.0021 U2 t*(lO/7 ) (4)

l using a constant drag coefficient of 1.8(10 -3 ) to convert to U*. The times at

which E* and fp* become time-dependent in Figs. 2-3 are predicted well by Eqn. (4)

for x*>1.34(10 6 ). This prediction accurately implies that -Lhe present model also

Ifollows the JONSWAP duration laws.Figs. 8-9 provide a convenient summary of the development of variance and peak,

I normalized by the 'final' values defined according to the Pierson-Moskowitz

spectrum, vs. both fetch and time. A smooth progression of E* and fp* values is

seen except for short fetches as explained in the preceeding paragraphs.

The development of 1-D model spectra (energy density vs. frequency) is shown in

Figs. 10-11. The peak enhancement factor (cf. Hasselmann et al., 1976) of

I one-dimensional model spectra decreases more or less monotonically from about 2.7 to

1.5 between x*=1.34(10 6 ) and x*=1.34(10 7 ). Wave components greater than about

1.3-1.4 fp* tend to reach their limiting values as the model spectra develop. So,

the high frequency side of the spectrum follows an f-5 slope except in a narrow

band to the right of the peak. In this band densities are somewhat higher than for

corresponding JONSWAP spectra, perhaps because Snet is not allowed to be negative

here.

Examples of 2-D model spectra are given in Figs. 12-15. Some of the raggedness

typical of short fetches shows up as well as the perfect symmetry imposed by the

limiting form of the spectrum at long fetches.

C. CASE III, OBLIQUE FETCH-LIMITED GROWTH

The physical domain and model configuration were the same as for CASE II

(1000 x 1000 km square ocean, model parameters as in Table 1), except that the wind

blew at an angle of 450 seaward off the straight coastline. A sketch of the domain

V7

T

Page 16: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

and output points is given in Fig. 16. The primary item of interest was whether the

model predicted skew spectra at short fetches (perpendicular to the shoreline). A

secondary interest was growth with distance as measured in the wind direction

(toward NE) starting from the SE corner of the domain. Presumably this growth

follows the same fetch law as in CASE 11.

All of the model results prepared for the model intercomparison are presented

in Figs. 17-33.

Growth with distance downwind (Fig. 27) compares well with growth for the

corresponding fetches from CASE II (Fig. 10). The raggedness in 2-D spectra caused

by irregularities in fp* at short fetches is evident in Fig. 28, for example. The

model does indeed predict skew spectra for areas close to the shoreline with long

alongshore fetches. Fig. 30 demonstrates this skewness with higher frequencies

aligned with the wind direction (450) and lower frequencies running nearly parallel

to the shoreline (900).

D. CASE IV, WINDY HALF-PLANE

The model domain was a 1000 x 1000 km square ocean, initially at rest,

subject to a constant wind of 20 m/s in the left (western) half plane, and no wind

in the right (eastern) half plane (See Table 1 for model parameters). Fig. 34 gives

a sketch to locate output points. The overriding purpose of this case was to

examine, qualitatively, at least the propagation of swell into the half plane with

no wind.

All of the model results extracted for the intercomparison are shown in Figs.

35-49. A visual impression of growth of variance and the average angle of the

spectrum appears in the so-called 'General Custer' plot, Fig. 37. (Participants in

the international, wave model study seemed quite willing to carry along this dubious

8

Page 17: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

name, although some of them were not familiar with the historical background.) The

model response is symmetric about the N-S centerline of the windy half plane.

Swells propagate into the calm half plane, their energetic constituents being more

aligned with the wind direction as fetch increases. The ragged 2-D spectrum at

short fetches is again exemplified in Fig. 38. Some locations show two almost

distinct swell spectra, e.g., Fig. 45, a somewhat unrealistic situation that is

modified by geometric dispersion in actuality.

Detailed behavior in the eastern half plane seems to depend primarily on two

things: 1) the basic growth curve followed by spectral components under constant

wind, and 2) the assumed angular distribution for the limiting spectrum, especially

as it affects larger fetches. The behavior also depends on the strength of coupling

among different wave directions through our representation for nonlinear transfer.

E. CASE V, FRONTAL PASSAGE

The model domain was a 1000 x 1000 km square ocean, initially at rest,

subject to a constant S wind of 20 m/s below the SW-NE bisector of the domain and an

E wind of 20 m/s above the bisector. (See Table 1 for model parameters.) Fig. 50

sketches the situation and locates the selected output points. This case was

designed primarily to test the manner in which the model wave field responded to a

change in wind direction, now known as 'directional relaxation'.

Figs. 51-63 were prepared for the intercomparison. The overall response can be

seen quickly in Fig. 52, the General Custer diagram. The variance grows with

increasing fetch toward the north until the front is crossed. The variance drops,

then the average wave direction relaxes to the new direction, as the variance grows

again. The relaxation is faster for less developed spectra, y* about 0.25(107),

than for more fully-developed spectra, y* about 0.75(107).

I9

Page 18: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

In retrospect we think that the drop in variance upon crossing the front is

unrealistic, although the average angle response hit the middle ground among all the

different wave model results (Hasselmann et al., 1982). Directional relaxation in

the model is affected by the nonlinear transfer term in the model equations, which

is applied with respect to the average wave direction (not wind direction). Also, a

variety of logic statements, used in applying the limiting spectrum affect the

relaxation process through imposed (and sometimes) abrupt changes in spectral

density at various f and 0. Some rethinking of the model is necessary here, as

well as comparison of model behavior with limited theory and observations, such as

they are.

In this very complex case bimodal seas arise in the SW part of the domain above

the front, e.g., Fig. 56. This behavior was seen in most of the models tested in

the intercomparison. Some isolated spurious peaks were noted, especially in the NW

part of the domain, e.g., Fig. 60. These peaks were apparently caused by temporary

changes to the model (Allender and Lybanon, 1982), made in lieu of using some

mechanism for subgrid scale wave growth. Looking back, it seems likely that subgrid

growth would have contributed to a more reasonable overall response to this case.

F. CASE VI A, STATIONARY HURRICANE

Two model hurricanes were studied. The (synthetic) wind field (prepared by

V. Cardone, Oceanweather, Inc., White Plains, N.Y.) was the same for both cases

except that the storm was stationary in CASE VI A and translated at 15 m/s to the

north in CASE VI B. The spatial distribution of wind speed and direction was

patterned after a northward-moving hurricane, with a maximum speed of 40 m/s located

50 km northeast of center, a pronounced east-west wind-speed asymmetry (stronger

east of center) and a pronounced north-south wind-direction asymmetry (more inflow

in rear quadrants).

10

Page 19: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

The model domain was defined as 270< x< 1030 km east-west by 700< y< 1700 km

north-south with a grid spacing of 40 km (selected to resolve the wind field).

Table 2 gives other pertinent model parameters. The stationary storm was located at

(650, 1400) for a duration of 24 hr. The parametric hurricane model by Ross (1976)

was used for initial and boundary conditions throughout the run. The Ross model

defines the total energy and peak frequency at any point in a hurricane in terms of

the wind speed and radial distance from the eye. The directional spectrum in that

model is taken to be of JONSWAP type with a cos2 spread relative to the local wind

direction. In addition we set the spectrum fully-developed initially at the eye in

this case. Clearly, the Ross method colored our results, because of the relatively

small model domain that was chosen out of necessity (maximum number of grid points

without recoding). We are encouraged, however, by the reasonable results that we

obtained in both cases.

Figure 64 shows the relative locations of selected output points. Figs. 65-84

were prepared for the model intercomparison. Significant wave heights between 9 and

10 m (Fig. 65) and average frequencies of about 0.1 hz (Fig. 66) occur roughly

northeast of the eye of the storm. The high average frequencies along the southern

boundary are artifacts produced by our treatment of the source terms. If the wind

speed is less than 5 knots, no atmospheric input is added. If no low or mid

* frequency bands contain significant energy the nonlinear transfer will pump energy

from the spectral tails (assumed to be present for frequencies greater than the

* maximum model frequency) into high model frequencies. The average spectrum

* frequency then turns out to be relatively high as evidenced in the average frequency

plots.

IA

Page 20: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

TABLE 2

MODEL PARAMETERS FOR CASES VI A-B

Domain E-W extent: 270-1030 km; N-S extent: 700-1700 km; parametric

hurricane model (Ross, 1976) used for boundary and initial

conditions; perfect absorption for outgoing rays

Grid 40 km, regular

Rays 30 parallel rays, ea. dir., 25-35 km ray-point spacing

Time Step 1200 sec

Run Time 24 hr

Eye of Storm Initial position: (650, 1400) km for VI A, (650, 104) km for

VI B; final position: (650, 1400) km

Frequencies (20) .045, .05, ...,.08, .,..., .16, .18, .225, .25 hz

Directions (24) 0, 15, 30, .... 330, 3450

12

Page 21: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

The General Custer plot, Fig. 67, gives some impression of the overall model

response to the vortical wind field.

G. CASE VI B, MOVING HURRICANJE

The second model hurricane translated northward at 15 m/s. Otherwise, the

wind field and model parameters were the same as for CASE VI A (see Sec. III.G and

Table 2). The model domain was really much too small for this case and '.he boundary

conditions imposed via the model by Ross (1976) affect the solution markedly.

The locations of model output points are given in Fig. 64 and all of the plots

for the model intercoinparison are given in Figs. 85-104. Significant wave heights

for this case reach 9-9.5 m, Fig. 85, almost as large as for the previous case, but

in the right rear quadrant of the storm. Most of the models give this response,

thought to be reasonable by hurricane aficionados, but field data from a fast-moving

hurricane are required for confirmation. Mean frequencies, Fig. 86, drops as low as

0.1 hz, roughly, and, as explained in Sec. III.F, the relatively high mean

frequencies near the boundaries are artifacts of the way in which the source terms

are treated. (Actually these high means may be quite reasonable.) Spectra with

wild directional properties contribute to the messy appearance of the General Custer

diagram, Fig. 87. The clear vortical pattern seen in CASE VI A, Fig. 85, is no

longer apparent.

Cardone found the present case very inconclusive when he compared different

model outputs because of the many confounding variables (Hasselmann et al., 1982).

Growth rates for the spectrum and directional relaxation are the key contributors to

the model response. Simulating hurricanes is a very practical business and future

testing of the model(s) should include applications using real wind and wave data

f rom severe storms.

13

Page 22: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

H. CASE VII, DIRECTIONAL RELAXATION

The large differences among model results for the previous cases pointed

toward a simpler test of directional relaxation. In an unbounded ocean area subject

to a constant wind of 20 rn/s and with a partially- or fully-developed wave spectrum

the wind shifts instantly by 900; the ensuing model response is termed directional

relaxation in a so-called 'duration-limited' (rather than 'fetch-limited')

situation. T. Barnett of SID conducted part of this test using the same spectral

balance as in the full wave prediction model but without the propagation algorithm

and all its trappings.

Figures 105-108 describe the response of the simplified model following a 900

wind shift from N to W when the sea is fully-developed (fm = fu = .13 g/U).

Below the spectral peak the spectrum changes very slowly (Figs. 107-8). It retains

high energy and with nowhere to propagate dominates the growth after t=O. Indeed,

mean frequency fo remains small and variance E (Fig. 105) drops so the nonlinear

terms (proportional to EOfol) cannot grow the mid range frequency very rapidly.

In real life the 'swell' would propagate away and much more rapid growth Would be

evident at mid-range frequencies. Between fp and fcut the spectrum is

immediately limited by the local fully developed sea. Thus the energy between N and

E is lost and that between N and W is limited by a cos2 distribution centered on

W. The growth in this frequency range is slow, however, for the reasons noted

above. Above fcut the local sea is set to that expected for the local wind, i.e.,

a subgrld growth mechanism is used. The implied turning times, are crudely in

balance with theory: "Swell" is unaltered; waves traveling slower than the wind

respond rapidly. We could add some finesse in dealing with the mid range

frequencies but choose not to until we see the results of some more realistic tests

LA14

Page 23: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

(on actual data). As indicated with regard to CASE V (Sec. 111. E), the drop in

variance associated with the effects of the limiting spectrum on mid frequencies is

probably unrealistic, and some rethinking is necessary. On the bright side, real

winds take several hours to 'switch by 900 at least over the spatial scales resolved

by most wave prediction models, so this problem may be less severe than it first

appears.

Ill. SUMMARY

We have applied the discrete nonlinear spectral model to seven ideal cases of

wind wave generation as part of an international study to compare wave prediction

models. Our primary purpose is to save the results, which were costly in personnel

and computer time, for future reference. The primary areas we see for model

improvement and rethinking are subgrid scale growth mechanisms and appropriate

behavior under rapidly changing winds. A study using actual wind and wave data

seems essential in order to really assess model capabilities. The effects of

uncertainties in the wind field should be quantified, also.

15

Page 24: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

IV. REFERENCES

Allender, J.H., T.P. Barnett, and M. Lybanon (1982). An Improved Spectral Model for

Ocean Wave Prediction. Proc. Symp. on Wave Dyn. and Radio Probing of the

Ocean Surface, Eds. K. Hasselmann and 0. Phillips. Plenum Press.

Allender, J.H. and M. Lybanon (1982). A Discrete Nonlinear Spectral Model for Ocean

Wave Prediction; Description of Computer Program. NORDA Tech. Note NTN 147,

NSTL Station, MS.

Hasselmann, K. and X Others (1982). The Wave Model Intercomparison Study. Proc.

Symp. on Wave Dyn. and Radio Probing of the Ocean Surface, Eds. K. Hasselmann

and 0. Phillips. Plenum Press.

D. D Ross, P. Muller, and W. Sell (1976). A Parametric Wave Prediction

Model. J. Phys. Oceanog., 6, 2, 200-227.

Ross, D. (1976). A Simplified Model for Forecasting Hurricane Generated Waves

(Abstract). Bull. A.M.S., January, 113.

Snyder, R.L., F.W. Dobson, J.A. Elliot, R.B. Long (1981). Array Measurements of

Atmospheric Pressure Fluctuations Above Surface Gravity Waves. J. Fluid

Mech., 102, 1-59.

i

161

Page 25: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

p

V. TABLE OF MATHEMATICAL NOTATION

Common notation was established for the intercomparison. Symbols used

in the text and the figures are summarized below.

(f,G) Wave component frequency and direction

(x,y) Spatial coordinates

g Acceleration of gravity

t Time

U Wind speed (m/s)

9 U Wind direction

F(f,G) 2-D wave spectrum

F(f) 1-D wave spectrum, fFdQ

Fmax Maximum value of 1-D or 2-D spectrum,

according to context

E Variance of sea surface displacement,

ffFdfdg

fu (or fPM ) Wind frequency, .13 g/U, peak of

Pierson-Moskowitz (PM) spectrum

fp Peak frequency of 1-D spectrum (determined

by quadratic fit in model)

fo Mean frequency of spectrum, fffF dfdg

9 Mean direction of spectrum,

t 1 [gsingF df dO]

[ff cosQ F df dO JI

' 1 17

Page 26: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

FPM(fpM) ag 2 (2,)-4(fpM)-5 e-5 14, with a = .0081,

i.e., peak of PM spectrum

EpM ag 2 (2,r fpM- 4( 1/5), i.e., variance of

PM spectrum

f ~f/f P

2U*f/g, U* 0.855 m/s with U10 =20 rn/s

g2 E/U*

18

Page 27: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.34 0.71.4

CASE 11"0.7 134

o (0.67, 1.01)

y*(x 10-7) - (0.67, 0.67)

o (0.61, 0.54)

O (0.67, 0.40)

o (0.67, 0.27)

o (0.67, 0.20)

o (0.67, 0.13)o (0.67, 0.07)

0 -0 X* (x 10-7) 1.34

Figure 1. Model Output points, Case II

19

Page 28: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

STANDARD RESOLIT 10:1E" vs. FETCH AND TI! E aX* -aY" = 6.7 (1J5)CASE IIDNS MODEL

/ T = 1.49 C10,6)

-T* = 9.90 (105)

* _- __ T_ P = 4.95 (105)

,- _T_ = 4.!3 (15)

102 , Figure 2.02 = 2.48 (105) Model results, Case II

l2, <s: i A I I , ! , , , I . . . .. .

iD 5 06 1718

X"

2.5'10 2 ) -

PEA.K FREQUENCY vs. FETCH AND TIE2.0(10 "2) - CASE II STANDARD RESOLUTIOA

DNS %CDEL cX* = Y* = 6.7 (1l5)

_______~_ -T" 2.48 (105

"' X T" 4.13 (1O5)

- 4- -5 (105)

'\

Figure 3. T* - 9.90 (195)Model results, Case II T"= 1.49 (106)

4.5(1 -3) -.... .

5 16 1 o105 10 07 108

20

Page 29: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

4 F STANDARD RESOLUTIONS E" vs. TIME AND FETCH - - 6.7 (1O5)CASE 11DNS MODEL

10 1- X - 1,34 (1o7)

x 6.70 (10

S- 2.68 (106)

X" - 1.34 i06>

2 '--, X* = 6.70 (135) Figure 4.Model results, Case II

10" 105 106 107

T'

1 -FI:1E RESOLUTIONE vs. TIME AND FETCH 6X° -Y* - 1.34 (105)CASE 11ID',S M ODEL

31030

E X - 2.68 (106)V - 2.01 (106)

X 1.34 (196)

102 X - 1.01 (1^6)

Figure 5. X" - 6.7 (105)

Model results, Case II

/

104 05 106 7

T*

21

Page 30: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PEAK FREOUENCY vs. TIME AND FETCHCASE II STANDARD RESOLUTI0ND:iS MODEL =

3"2K \ V X = 6.70 (105)

X* - 1.34 (196)

-.--- X" - 2.68 101)

X" -6.70 (136) Figure 6.

X= 1.34 (107) Model results, Case II

134 10 6 107

T"

2.5(I0"-2) - PEAK FEOUE0LECY vs. TIME ANZ FETCHCASE 1ID:4S MODEL

2.0(10 -2) ,- 6.70 (105)

1X = i % (106)

-- = 1.3, (106)

:0-2 ,X - 2.01 (136)

x" - 2.68 (106)

Fu 7FINE RES3LJUTI0lFigure 7.

Model results, Case II AX* AY " 1.34 (13')

4.5(10" 3) I . , ..... I134 105 106 107

T2

22

Page 31: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

/Ep: vs. T]'E AiD FETCH. CASE : DS "2:,EL

1.5

0.7.

T/ (0I) 6.4

Figure 8..- Model results, Case II

-' 0.2

0.5 1.0 1.5

X(1O7

fI.: s.FETC; AX,D T:,".-: Z AS I EN:S ' :D-LL

I iL

K. 1.32-

1..L . __14---

Figure 9. i

Model results, Case II G.S- "- 1.3

-- .2.

0.0 0.5 1.0 1.5

X-(107)

23

Page 32: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SCALED 1-D SPECTRA F(f)

CASE !

T = 1.66(105)YO 6.70(105) c

__ i1.34(i06) C'

2.01 -2.66 +4.02 x5.36 C

r 6.701.01(107)

"" ; .,1.34 Z

Figure 10.Model results, Case II

C?-'

z , /f

/

SCALED 1-D SPECTRA F(f)FPM('Fy)

CA)E II

T L25;.3,- a1.65(105) 0

( -2,,

3.7z

-7 ,.1 3'I, ;7.4.3 -

9.90 2 Figure 11.i ,1.24(105 ) 2,'" 2Model results, Case II

i! //1.49

fI I "'N

. .. i .0 4. -I 2-

24

Page 33: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180- SCALED 2-D SPECTRUMFmAX

CASE I J

DNS MODEL: FMAx - 5.09 M2 /HZ-RAD

To - 2.48(105)90 - (X.,Y°) . 6.70(106), 2.01(106)

27CrFigure 12.

Model results, Case II

I I I I

0.00 0.05 0.10 0.15 0.20f (1 0")

1 -O r SCALLD 2-B SPLCIRJ. F(,,@)Fmx

CASE IIDN'S rO=L: F'x - 17.75 M2 I-z-gAD

T" - 1.49(106)90 -(X,Y*) - 6.70(106), 2.01(106)

I..;e o0

270k Figure 13.

Model results, Case II

1801 I I I0 .00 0.05 0.10 0.15 0.20

f*(l01)

I 25

Page 34: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

rSCA-D 2-D SPECRU F(f,G)

I CASE II 9 M2

DNS FINEL: F;IAX - 5.0 /HZ-RADT* - 2.43(105)

90 (X.)Y* 6.70(106), 1.34(107)

L

270- Figure 14.

I- Model results, Case II

. O0 .- I I k-

0.00 0.05 0.10 0.15 0.20

i" - SC-_L 2-bJ S?CU':" F ,-.f,,10

CASE I!

DNS E,3 EL: Fmtx 79.98 I2

/HZRAD

T- 1.4,0(106)

90- (X*,Y*) - 6.70(106), I.3d 1 7 )

00 L

Figure 15.270-- Model results, Case II

0.00 0.05 0.10 015 0.20

26

Page 35: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

III

I.

1.34

CASE III

(1.01, 1.01)0

y* (x 10"/)

(0.40, 0.40) "1.01, 0.40)0 b

(0.10, 0.10) (0.40, 0.10) (1.01, C.10)Q ~ 0 0

0I0x* (x 10-7) 1.34

Figure 16. Model output points, Case III

27

Page 36: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.5m

0. 7 ___ CASE I 11

DNS MODEL

1.0 - * STATIONARY

Figure 17.

0.5 Model results, Case III

0.3

0.01 .0.0 0.5 1.0 1.5

x*(1 07)

1.5-

CASE III

1.0 - T* -STATIONARY

Figure 18.

0.5 1 _________4___ Model results, Case III

0.0.0

0 000.5 1.0 1.5

28

Page 37: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.5

E AND

///////l CASE IIII I I I ////////7 /DNSMODEL

ST STATIONARY

EP10- , , / 1 7 / 7 7"

0

" w , p / 1 ' '00 . Figure 19.A l low , p .-W ., , f .,,' A'ON. Model results, Case III

lo lo 10 ON 10 .,9.r.r m .0m . , 1

I IV

I P P . .. . . . . . .

0.0 ,0.0 0.5 1.0 1.5

x*(107)

SCALED 1-D SPECTR.A F(f)FPM(fPM)

CASE I I I

U'6 S *.DEL=1.01(106), 1.01(106)

SJ T- 2.48 (105 ,

4.95 CU

S1.49 (106)"- 1.66

Figure 20.

* Model results, Case III

---------- ------ --~ .. ..- .. " . ma' c. ac a, o Is o..20

Fm w10*'

29

Page 38: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

In

SCALED 1-D SPECTRA F(f)

FPM(f pM)~~CASE I II

DNS MODEL

(X*,Y*) - .02(lo6), 4.02((06)

T* - 2.48 (105) c,., 4.95o_ 9.90 /,,.- 1.49 (1061 ,

C3 1.65

C Figure 21.

Model results, Case III

Q.Do 0.05 0. 10 0.15 0.2Fm .10 4

SCALED 1-D SPECTRA F{,)

CA:SE III

D:%S i'ODEL1 (X*,y*) = 1.01(107), 1.O1(O7)

T" - 2.43 (105)U, 4.9c-

1.66 Z

z Figure 22.

Model results, Case III

C. c 0.05 0.1 6 0.15 C. 20

Fm x10'

30

Page 39: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

.NO

- SCALED 1-D SPECTRA F(f)Fpm ( fpm)

CASE IIIDNS rl, DELT- 2.48(105)

cc (X*,Y) =1.01(106. r.110

CL) 1.01(107), 4.21~

Figure 23.z Model results, Case III

Fmw 104

SCALED 1-D SPECTRA F(f)Feii fp,,)

LA CASE 11;

cc T* 4.95(105)a (X*..) =1.01(10 ), 1.01(10)

C-L. -4.02(106), 402(105) c

;20

~ I Figure 24.LI Model results, Case III

FmcI 0.0 F. 10 i02

31

Page 40: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

'- SCALED I-D SPECTRA F(')

CASE ill

. DS CDL

TI 9.90(lf5)

(X, Y) = 1.01(10), i.01(104.02136), 4.U(i 6),;

7 7

Li

Figure 25.Model results, Case III

.. 1° i

0.C 0.1 0.15s 0.20

In

F, ii0

SCALED 1-D SPECTRA F(')

5 F;m( fpy.)3

T" 1.49(105),, y-) - 1.01(1 5)o .O1.01(Io) 7

c;1

Figure 26.U. Model results, Case III

.aO 0 .15 0.20

32

Page 41: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SCALED 1-D SPECTRA F(f)Fpm(fpm)

CASE IIIDNS3 MODELT* 1.65(106)

cr-(X*,Y*) -1.01(10),. 1.01(106) o

Uw0.215, .216

Figure 27.Model results, Case III

ca0.05 Fm0.1 0, 0.15s 0.:20

-S MODEL: FmAx - 9.39 P?/HZ-RAD

T- - 1.65(106)

'0 (\-y-) =1.01(10),. 1.01(106)

e o

270k Figure 28.Model results, Case III

j0.00 0.05 0.10 0.15 0.20

f10,

33

Page 42: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

I

180-

90L

70I Figure 29.[ Model results, Case III

SCALED 2-D SPECTRUM1 Hfg)270- FMAX

CASE IIIDNS MOLEL: Fmx - 18.53 .1/Z-A

T= 1.55(106)

(X-,Y- 4.02(106), 1.01(1[06)0.00005010.502

90-

8 0 Figure 30.Model results, Case III

270 SCALED 2-D SPECTRUM F(,G)

CASE I

DNS MlODEL: Fm~x -18.92 !?H-A

T'= 1.66(10G)

0.00 0.05 0.10 0.15 0.20

f 'i 0.1)

34

Page 43: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180-

90

Figure 31.Model results, Case III

SCALED 2-D SPECTRUM F(f,9)270 FMAX

CASE III

DNS MODEL: FrAAX - 48.79 M2 /HZ-RAD

T" - 1.66(106)

(X',Y*) - 4.02(106), 4.02(105)180 1 1 1 1

0.00 0.05 0.10 0.15 0.20

180-

90

0 L Figure 32.Model results, Case III

SCALED 2-D SPECTRUM F(, 9)270 F:,x

CASE III

NS MODEL: FMAx - 52.74 PM2/MZ-RAD

T° - 1.66(106)(X-,y-) - 1.01(107), 4.02(C)

180 1 I - I0.00 0.05 0.10 0.15 0.20

35I L ... ... .~~ -- . ......... ..... ......... .. . ... .

Page 44: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

18 0 r

,I901-

e o

SC(LCD 2-D SPCTR, F(f,a)270 L FMAX

CASE II IDIS "'.OEL: FMAX - 77.55 M2 /HZ-RA !

T • - 1.6(10 6)

1801 (X, Y-) = 1.1(107), 1.01(107) 10.00 0.05 0.10 0.15 0.20

f -( -)

Figure 33. Model results, Case III

3

36

Page 45: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.34 CASE IV I

(0.62, 1.01)1(0.81, 1.01) (1:01, 1.01)00 0

y* (x 10-7)

(0.6 0.40)1(0.81, 0.40) o, 0.40)

(0.62, 0.10)1(0.81. 0.10) (1.01, 0.10)0 0 0

0 x* (x i0 - 7 ) 1.34

Figure 34. Model output points, Case IV

[I- . . . ...- ,.. *r.i Y..7~'

Page 46: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.5

EEpt4

CASE I V

1.0 DNS MIODEL1.0 P STATIONARY

0..5 0.5 Figure 35.Model results, Case IV

0.3

-~0.1

0.010.0 0.5 1.0 1.5

x*(107)

1.5-

vCASE IV

E'I1.6 DNS MO0DEL

1.0 T* STATIONARY

0.5 2.0Figure 36.1.9 3.0Model results, Case IV

x *(107)

38

Page 47: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

EPM

oAET

I I t t t t t.------

0.0 0.5 1. 1 ''''0 1.5It ~ ~ x( tO ..... ) Fgr 7

t ttttf t II..Io oe esls aeI

0. 0.5 1.0O1.

180~ ~~ -- PLITPFfP* IA

274-. _ Fiue 8

E801 0.20: MX 6.6m2 H-A

T&. 396(16

Page 48: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

16rSC ALE D 2-D SPEC T R f G

CASE 1V

DAS MOtCL: FMAX ~,2

90L- V-1.E6(106)

Figure 39.

2701-Model results, Case IV

0.00 0.05 0.10 0.15 0.20

ISI-SCALED 2-D SPECTSU:F(,6

CASE IV

DfiS NIODEL: FmAx -61.20 r,/!i:-r\D

T- 1.66(106)

a 0~

Figure 40.Model results, Case IV

18010.00 0.05 0.10 0.15 0.20

40

Page 49: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180- SCALED 2-D SPECTRUM F(A)

FMAX

CASE IV

DNS MODEL: FmAx - 2.74 M2/HZ-RAD

T- - 1.66(106)90 (X°,Y°) 8.06(106), 1.01(106)

eo

Figure 41.

270 - Model results, Case IV

1801 I I 10.00- 0.05 0.10 0.15 0.20

f*( 101)

SCLAED 2-D SPECTR' F( ,G)180r FMAX

CASE IVDNS MODEL: FmAx - 20.73 M2/HZ-r %DT" - 1.66(106)

90- (X°.Y-) - 8.06 (106), 4.02(1C5)

Figure 42.

270 Model results, Case IV

L0.00 0.05 0.10 0.15 0.20f*'( 1 o )

!7 41

Page 50: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180- SCALE 2 - TrFmAx

CASE iV

Di "MEL: F.:AX = Z. M'4:-RA:T" - 1.6u,(136)

90 (X*,y*) -3 1') .I17

F Figure 43.'7O~ Model results, Case IV270-

1801 I I0.00 0.05 0.10 0.15 0.20

f*-(1 0-)

F~f, )

FMAX o

CASE IV,.,S .. DEL: Fmx J01 M

2/HZ-RA& j

T" - :.L(Lb)90 (X,Y ° )

- 1.i(137), 1.01(1,6)

9c

Figure 44.

270 Model results, Case IV

180{ I I II-0.00 0.05 0.10 0.15 0.20

f *(101)

42 1

Page 51: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180 VCALED 2-D z,'JU; F'!,-i

CASE IVDNS ;.oDEL: Fpx = 6.66 M2/.4Z-zAr

T" = 1.66(106)

90 (X*,Y) = 1.01(107), 4.02(I1G)

eo

Figure 45.

270 _ Model results, Case IV

1801 I I 10.00 0.05 0.10 0.15 0.20

f*( 1 -1)

180- SCALED 2-3 SECk2: ,,;)F~x

CASE IV

T• = I.CG(J 6)

90 (X*,Y*) - 1.01i17), ,,.3.(O'

0o

Figure 46.

270 Model results, Case IV

180I I I I0.00 0.05 0.10 0.15 0.20

43

Page 52: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SCALED 1-D SPECTRA F(f)

CASE IVDNS MODEL

- 1.66(106)

(X,Y) =6.16(106), 1.01(10G)U6.16(106)..L.2i~

Mwe results, Case CV

(n61(0) .117

C3CE'.c u -05

0.0 0.gu0 4.70

Mode resltOas I

cIn

SCALED 1-D SPECTRA F(f)Fpm( fpm)

In CASE IV

DN~S MO0DEL- 1 .C5(106)

(X,)-= 8.06(105), 1 .01(!OE)c

80(0) 4.020136) 0

w-

~ c~]Figure 48.Model results, Case IV

0. 0 .0 3 0:05 0:. 0.10 0.12 0.15 0.17 0.20Fm m10'

44

Page 53: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

Cl

SCALED I-D SPECTRA F(f)FpM(fpm)

CASE IV

"" DNS rODELT- - 1.66(106)

C (X*,Y*) - 1.01(107), 1.01(7, 6)U 1.01(107), 4.02UC) *

(n 1.01(107), 1.01(107) "

Otoo 0.05 . 10 0.15 0.20

" Fm ;10-1

II Figure 49. Model results, Case IV

II'

KU 45

zM

Page 54: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.34CASE

V

(0.91, 1.07)

(0.94, 1.04) 0 (1.04, 0.97)'0

(1.07, 0.94)

y* (x 10-7 )

(0.30, 0.47 u'i

(0.34, 0.44) (0.44, 0.37)

00(0.47, 0.34)

/ -I

00 x* (x I0-7) 1.34

Figure 50. Model output points, Case V

46

46 [

Page 55: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.5

-" - -'- . - ' "- ", - -4. 4. 4. ~ I CASE V-" 4" " • DNS iODEL

1.0 ,- - - V.WW, , -,' T.STATIONARY

"" . .. . . t' t4-4--. -. . ., ..tttt , . .-- 1

o - -.. '-4-. tttttttttt4s.4 4-4 . . . . , tttttttt- -. t t

.... . t tt t tt t IFr~ ?tfI t ft f tt I rsls

..... t t t t t t t t Model Case V.. .-- t t t t t t t t t t t t t t Fi ur 51

I t t tIt -ttt t t t tt- - t I t t t t t t t t fft Moe eutCsPS, % t t t t t t # t f t t t t t t f t

f. f t I f t t 1, ft t t t t t t t

S , I t $ I I I 2 4 .a a4 1 1 1

0.010.0 0.5 1.0 1.5

x*(107)

1.5

E

E PmCASE V

DNS MODEL1.0 T. 0.2 T*= STATIONARY

0.4 Figure 52.

Model results, Case V

0.01 I

0.0 0.5 1.0 1.5

x*(10)

- - -47

Page 56: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.5

f( '2.0 fPM

CASE V

DNS MODEL

1.0 1.7 1.8 T STATIONARY

1.7

0.5 /.Figure 53.

1.9 Model results, Case V2.0

2.5 -

0.0 .10.0 0.5 1.0 1.5

180 -x*(107)SCALED 2-D SPECTRUM F(f,9)

FMAX

CASE V

DNS MODEL: FMAX = 33.55 m2/HZ-RAD

90 T" = 1.66(106)

(X',Y' ; 4.36(106), 3.69(106)

e o,Figure 54. ,

Model results, Case V

270-

0.00 0.05 0.10 0.15 0.20f*( 1 o")

48 I

V __ __

Page 57: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180- SCALED 2-D SPECTRUM F(f,9)

FfiAxCASE V

DNS MODEL: FMAX - 34.86 M2/i4Z-RAD

90- T* 1.66(106)

(X*,Y) =4,69(106), 3.35(106)

e o

Figure 55.

270- Model results, Case V

1801 10.00 0.05 0.10 0.15. 0.20

180- f"(1 01)

SCALED 2-D SPECTRUMl F(f,G)90 -FMAX

CASE V

DNS M~ODEL: FMAX . 22.09 m2 /HZ-RAD

T= 1.66(106)

(X,Y) =3.02(106), 4.69(106)e eo

Figure 56.* 270- Model results, Case V

18010.00 0.05 0.10 0.15 0.20[ f*( 101)

I 49

Page 58: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180 SCALED 2-D SPECTRUM ~rOFmAx

CASE v

DNS MIODEL: FmAx a20.13 M2/HZ-RAD

T'- 1.66(106)90 (X-,Y) =3.35(106), 4.36(106)

8 0

Figure 57.Model results, Case V

270

18011010.5020.00 0.05 01 .502

SCALED 2-D SPECTRUM F(f,G)Fmx

CASE V

90 DNS MODEL: FMAX = 72.17 M2 /lZ-RAD

- _1.66(106)

(X,Y) -1.07(107) 9.38(106)

e o

Figure 58.

270- Model results, Case V

0.00 -0.05 .1 0.15 02

fI*( 10O")

50

Page 59: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180-SCALED 2-D SPECTRUM F(fG)

Ftx

CASE V

DNS MODEL: FmAx = 74.06 M2/HZ-RAD

90 T- - 1.66(106)(X*,Y) = 1.04(107), 9.72(106)

0o

Figure 59.270 Model results, Case V

180 I I I0.00 0.05 0.10 0.15 0.20

180- f*(1 01)

SCALED 2-D SPECTRUM F(f,G)

90 F, x

CASE V

DNS MODEL: FmAx - 57.13 M2/HZ-RADT- - 1.66(196)(X-,Y*) = 9.05(106), 1.07(107)

Figure 60.270 Model results, Case V

180 II0.00 0.05 0.10 0.15 0.20

f*(1 0)

I 51

Page 60: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

* ~-o,~-180

180 SCALED 2-D SPECTRUM F(f,G)

FmAxCASE V

DNS MODEL: Fmq4x -58.38 M2 /HZ-RAD

90 -T' - 1.66(106)

(X*,Y) -9.38(106), 1.04(107)

e8o

270 Figure 61.

Model results, Case V

180 I0.00 0.05 0.10 0.15. 0.20

Cullf(1 01)

SKALEZ 1-0 SPECTRA F(f)

Ln CASE VDNS MODEL

cr~ T-= 1.66(106)

(X,Y) =9.05C106), 1.07(107)

aJJ-

1.07(107), 9.38(196) -+

61

Figure 62.U, Model results, Case V

C

00.0 0.0 0'.10 0.1:020

52

Page 61: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SCALED 1-Dl SPECTRA F(f)Fpm( P)

In CASE V- fDNS MIODEL

T* 1.66(106)(X*,Y) - 3.02(,o6), 4.69(106)

Uj ~3.35(106, 4.36(106

4.36(106), 3.69(106) -

4,91.) 3.35(106)d-

wNcxad

*t 0: LL, 0:15 0.20Fm 0L.

Figure 63. Model results, Case V

53

Page 62: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

N

A

314 kcm

(42, sa

(4(875, 6 2 5)P\ 1/

(550, 1500)0 0(750. 1500)

(600. 1450) (700, 1450)

(650, 1400) E

(600. 1350u)/ " \6,(700, 1350)

/ \(550, vio0) 0 0 (750, 1300)

4Z,1115) (815, 1125)

Figure 64. Model output points, Cases VI.A-B

54

Page 63: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

US CASE Vi DNS MODEL1701 24 HR STORM SPEFD 0 m/s

1500

)300

1100

900

250 450 650 850 105.0

x (km)

Figure 65. Model results, Case VI.A

55

-L -

Page 64: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

f CASL Vi INlS I1IOD[L

T 24 H SIOJN1 SPEED =0 m./s1700

1500

1300

1100 lo t

900

250 450 650 850 1050

x (km)

Figure 66. Model results, Case VI.A

56

Page 65: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

lis CASE VI DNS MODlEL

T 211 HR STORM SPLED = 0 m/s

1700 ~" *% \\\

1300 t ' ' I' ' _ . . . . . . . . . . J

E t

1100Fgur 67. t t as V.A

Itt

900 i a A A

7001 4*I ~250 450 650 850 1050

x(km)

Figure 67. Model results, Case VI.A

57

L I L I

l ~ r.*

-''i& 4,..~ 'V

Page 66: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180 SCALED 2-D SPECTRUM F(f,9 .)

FMAX

CASE VI

DNS rODEL: FMAx = 90.6 M2/HZ-RAD

90 T = 24 HR

(X,Y) = 650, 1400 KM

STC.R'I SPEED -0 M/s

eo

. <Figure 68.

Model results, Case VI.A

270F

180 I I I 40.00 0.05 0.10 0.15 0.20

f(hz)

180 !SCALED 2-D SPECTRU' )

CASE V1DNS '-*DL: FrAx = 129.1 .:

2/HZ-PAZ

90 T = 24 HR(X,Y)

= C0,n', 14SO KM

ST'2j S = 1,0 ,/s

e o

Figure 69.Model results, Case VI.A

270

180~1801[ I I I I

0.00 o.os 0.10 0.15 0.20f(hz)

58

Page 67: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180[

SCALED 2-D SPECTRUM E!)90 F FmAx 161

CASE VI

DNS MODEL: FMAx - 21.3 M2/HZ-RAD

I - 24 MR

(XY) = 600, 1350 KM

e o STOMi SPEED = 0 MIs

[ Figure 70.270 -e:' .<D- Model results, Case VI.A

0.00 0.0s 0.10 0.15 0.20f(hz)

180 -SCALED 2-D SPECTRUM F(f,g)

. FMAX

CASE VI

DNS MODEL: FmAx - 161.6 M2 /HZ-RAD

90 T - 24 MR(X,Y) - 700, 1450 KM

STORM SPEED = 0 M/S

8 Go

[ [12/flFigure 71.270 LModel results, Case VI.A

180[0.00 0.05 0.10 0.15 0.20

f(hz)

59

Page 68: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180 c-;,LES 2-D SPECTRUM 'F(f,G)FMAX

LCA.SE V!

fllS M0DEL: FmAx 80.9 M2/HZ-RAD

T = 24 HR90 (X,Y) - 700, 1350 KMSTORM: SPEED =0 ,m/s , ,

oo

Figure 72.

270 Model results, Case VI.A

180[o.co 0.05 0.10 0.15 0.20

f(hz)

1 80

SCALED 2-D SPECTRUMiF~9F[..A x

CASE V1LS ,MODEL: FmAx = 58.6 t

2 /HZ-RAD

T = 24 HR

90F (X,Y) = 550, 1510 Krm

L STSR:l SPEED = 0 /s

e o=

Figure 73.270 Model results, Case VI.A

180.0.00 0.05 0.10 0.15 0.20

f(hz)

60

Page 69: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

18ISCALED 2-D SPECTRUM F(f,G)

90 F~

CASE VI

DNS MODEL: Fmx =8.7 M2/HZ-RAD

T = 24~ MR(XY) - 550, 1300 KM

e 0 STORM1 SPEED =0 mIs

Figure 74.

270 Model results, Case VI.A

ISO[0.00 0.05 0.10 0.15 0.20

f(hz)

SCALED 2-D SPECTRUM Ef&'9iF CASE VIDNS MODEL: FMAX = 101.1 m2/Hz-RAD

90 T - 24 HR(X,Y) - 750, 1500 KMSTORM SPEED - 0 m/S

e o

Figure 75.270 Model results, Case VI.A

ISO', I50.00 0.05 0.10 0.15 0.20

f(hz)

61

Page 70: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1 8 0 r

90- Figure 76.Model results, Case VI.A

e h

SCALED 2-D SPECTPU' F(f,;)FmAX

270 - CASE VI

D,'4S MODEL: FMAX = 49.4 M2 /HZRA,T = 24 Hp

(X,Y) = 750, 1330 KMSTCOl SPEED = 0 M/S

180 1 ,0.00 0.05 0.10 0.15 0.20

f(hz)

SCALED 2-D SPECTRU" F(_ff)

"o0 r FMAX

CASE VI

DNS IODEL: FMAX = 66.6 '2/HZ-PAD

T = 24 HR90 (X,Y) = 425, 1625 KM

STOR I SPEED = 0 M/S

eo

Figure 77.

270j Model results, Case VI.A

180I I I0.00 0.05 0.10 0.15 0.20

f(hz)

62

Page 71: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1 80 -I SCALED 2-D SPECTRU F(f.9)FMAX

CASE VI

DNS riODEL: Fmx - 6.0 ./HZ'RAD

90 -T 24 HR

(X,Y) = 424, 1175 KM

STORM SPEED = 0 m/s

eo

Figure 78.

270 Model results, Case VI.A

180, I0.00 0.05 0.10 0.15 0.20

f(hz)

180- SCALED 2-D SPECTRU;I"F(f,g)Fmx

CASE VIDNS MMDEL: FMAx - 47.8 M2 /HZ-PAZT - 24 HR

90 (X,Y) - 875, 1625 KM

STORN SPEED " 0 M/S

Figure 79.270 Model results, Case VI.A

270

1800.00 0.05 0.10 0.15 0.20

f(hz)

63

Page 72: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

90 Figure 80.

90 Model results, Case VI.A

270 LCASE VIb. 11O2EL: 171AX = 13,9 m2 /HZ-RAD

T = 24 HR

(XXY = 875, 1175 KM

STORM1 SPFED = 0 m/s

0.00 0.05 0.10 0.15 0.20f (hz)

X ~SCALED 1-D SPECTRA F(f)

CASE VI

C ~D.S MO0D'EL: F'.Ax = 220.0 I"/KzCT = 24 HR

(X,y) =650, 1433 KM

2: 753, 1500U-875, 1625 -

STO&9 SPEED x Js

Figure 81.Model results, Case VI.A

0o.100 0.I 0isFREQUENCY IN HERTZ

_______64

Page 73: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

S SCALED 1-D SPECTRA F(f)

CASE VI

NS M~ODEL: Fmx - 5. M2/HZT - 24 H4R

(X,Y) - 650, 1400 KMa700, 1350 c

750, 1300 dLU-. 875, 1175 +

C, STORM' SPEED - 0 M/S

w

Figure 82.Model results, Case VI.A

C.

'0. 30 0.15c 1 0. 20FREQUENCY IN HERTZ

SCALED 1-D SPECTRA F(f)FMAX

CASE VIDNS MODEL: FMAX -94.6 mI/HZT -24 MR

* (X,Y) -650, 11;00 KmCcl 600, 1450z 550, 1500I 425, 1625

I-.STORM SPEED -0 M/sUO

d- Figure 83.3 Model results, Case VI.A

*b cc0.23 FREQUENCY IN HERTZ

65

Page 74: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1" SCALED 1-D SPECTRA F(f)

FMAX

CASE VI

DNS i.JDEL: FMAX - 84.3 M 2/HZ

T - 24 HR

(X,Y) - 650, 1403 KM -0d EO3, 1350 c

$1 550, 1300425, 1175 +

Ln STORM SPEED =0 ,r/s

I-

0.05 0.10 0.15 0.20FREQUENCY IN HLMTZ

Figure 84. Model results, Case VI.A

i

66

Page 75: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

uIs CASE VI DINS MODELT =2'4 U SOI~i SPLUD 15 m/s

1700-

1500

1300-

1100-

900 ZI

250 450 650 850 1050x (km)

Figure 85. Model results, Case VI.B

67

Page 76: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

CAL VI biS flifIh I.

T 24 )IR SIORMI SI'IED 15 M/S1700

1500

1300

1900

goo-

700 ' .. . . .250 450 650 850 1050

x (k m)

Figure 86. Model results, Case VI.B

,,, 68

Page 77: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

IIs,6 CA'JE VI UiNS MODEL

T - 24 HR SOrPM SPEED = 15 W/s

1500

* - d1

* . - , . ~. -1300

- ..et T T t itt t t t tt t t

1100- . ,

. , , . . . , S t -t t900 -. . , , /t t t

700250 450 650 850 1050

x(kin)

Figure 87. Model results, Case VI.B

69

Page 78: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

80 TALED 24 SPECTRUM F9

CASE Vi'LIS 2E:Fmx - 20.1 M2 /HZ-RAD

90 1T - 21 HR(X,Y) =600, 14150 Km

STORM' SPEED -15 MIS

Figure 88.Model results, Case VI.B

270F

1800.00 0.05 0.10 0.15 0.20

f(hz)

,80SCALED 2-D SPECTRUM~ Ff,g)

Fmx

CASE VI

DNS r'TEL: FMAX - 62.6 m/zp,

90 T = 24 HR

(X,Y) = 650, 14100 KM

STaR:I SPEED -15 MIs

e OkI \fIr 4.*\Figure 89.

Model results, Case VI.8

270h

18010.00 0.05 0.10 0.15 0.20

f(hz)

70

Page 79: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

IO

90 ...

Figure 90.

o Model results, Case VI.B

SCALED 2-D SPECTRUIi F(f,9)

270 CASE VI

DNS iODEL: FmAx - 175.6 M2 /HZ-RAD

T = 24 HR

(X,Y) = 600, 1350 KM

180 I I STnRM SPFFn = 1q M/I

0.00 0.05 0.10 0.15 0.20

f(hz)

180 SCALED 2-D SPECTRUMI F(fQ)FmAx

CASE Vi

DNS M'ODEL: FMAx - 43.0 m 2/HZ-RAC

90 T - 24 MR

(X,Y) - 700, 1450 KM

STOP.4 SPEED - 15 M/S

G 0Figure 91.Model results, Case VI.B

I. 270[

180[ I I I0.00 0.05 0.10 0.15 0.20

f(hz)

71

Page 80: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

IS0 SCALED 2-D SPECTRU1 W,9

Fm~ux tCASE VI

90~DAS MODEL: FmAx -144.14 M2/HZ-RAD

(X,Y) -700, 1350 .

STORMI SPEED =15 tm/s

0r

Figure 92.[ Model results, Case VI.B

2701-

ISO0.00 0.05 0."O 0.15 0.20

f(hz)

180 f~ALED 2-B SPECTRUM. FE .9FmA x

ICASE V1

r'S ,]EL: Fm~ix - 7.2 m~2/HZ-RAD

IT =24H

90(X,Y) = 550, 1500 KMST01'. SPEED =15 m/S

e oModel results, Case VI.B

270~

180 II0.00 0.05 0.10 0.1502

f(hz)

72

Page 81: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

t

180-

90

Figure 94.Model results, Case VI.B

e o

SCALED 2-D SPECTRUM F~f)F,x

270 -CASE VI

DNS MODEL: FMAX = 17.4 M2 /HZ-P^IT = 24 HR

(X,Y) = 550, 1300 K180I STOPM SPEED - 15 M/s

0.00 0.05 0.10 0.15 0.20

f(hz)

180 SCALED 2-D SPECTRUM F(,)

FKAx

CASE VI

DNS MODEL: FmAx = 30.6 M2

/14Z-RAD

90 T = 24 HR

(X,Y) - 750, 1500 KM

STORII SPEED - 15 M/S

Figure 95.e o - Model results, Case VI.B

270

4 .1 8 0 I I I I

0.00 0.05 0.10 0.15 0.20

f(hz)

1 [73

Page 82: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180 SCALED 2-D SPECT;U'IM~e

DNS r:ODEL: FMAX =34i1.6 M2/HZ-PAD

90 L = 4H(XY) = 750, 1300 KPMSTORM SPEED 15 m/s

Figure 96.6O~ ~ :Model results, Case VI.B

L

1800.00 0.05 0.10 0.15 0.20

f(hz)

16ScF SCALED 2-D SPECTRU:1, F(_!.e

CASE VIDIS "'ODEL: F x = 1.9 m S-A

90 T = 24 HR

90I (X,Y) = 4~25, 1625 v~i

STORMI SPEED =15 MIS

Figure 97.

e - Model results, Case VI.E3

270

180[0.00 0.05 0.10 0.15 0.20

f (hz)

74

Page 83: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180

90

Figure 98.

eo - Model results, Case VI.B

270SCALED 2-D SPECTRUM F(f 9)

270 jCASE VIDNS MODEL: FMAX -3.4 M2/HZ-RAD

T - 24 HR

(X,Y) = 425, 1175 KM1801 I I STO~rI SPEED - 15 M/s

0.00 0.05 0.10 0.15 0.20f (hz)

180 SCALED 2-D SPECPUM F(f9)

FMAX

CASE VIDNS MODEL: FMAX = 28.6 M2 /HZ-RAD

T = 24 MR90-

(X,Y) = 375, 1625 KM

STOFJI SPEED = 15 M/S

Figure 99.

e o. Model results, Case VI.B

270r

1801 I I I I0.00 0.05 0.10 0.15 0.20

f(hz)

75

Page 84: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

180 SCALED 2-D SPECTRUM E L9

V FMAX

CASE VI

I DNS MODEL: Fmx - 134.9 M2/HZ-PAD

90 - T - 214 im90T

(X,Y) = 875, 1175 KM

STORII SPEED 15 m/s

-

Figure 100.

Model results, Case VI.B

270

ISF180i I I

0.30 0.05 0.10 0.15 0.20

f(hz)

.---

"- SCAlED 1-D SPECTRA F()FMAX

LS E VLI

E % S . :.. . Fm x = '3 . 2

J T = 24 .,f(X,Y) = 653, 1.,3 Km

x .. 6.53, 1-,53

oSTOR ! SPEE-:D 1= B,

-a

2 Figure 101.Model results, Case VI.B

00 G'G 0, toJLi 02

FREQUENCY IN HER TZ .., .o

76/ Akc, , , 0. . 0 0 .. . . ... . .. -. .. . ... .... 2 . . . ..0. .. ..... . . .

Page 85: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

Ia

SCALED 1-D SPECTRA F(f)Fmx

CASE VI

o DNS MODEL - F,Ax = 120.0 M21,Z

T - 24 HR

I(X,Y) = 650, 1400 Km600, 1350

c: 550, 1300U" 425, 1175 -

.3 STOR. SPEED - 15 PJsn

-= Figure 102.Model results, Case VI.B

O 0.05 0.10 0.15 0.20FREQUENCY IN HERTZ

* " SCALED I-D SPECTRA F(_f

CASE V1

o DNS MODEL: FMAX = 220.0 M2 /HZ

T - 24 HR

(X,Y) = 650, 1400 m -

700, 1350750, 1303

1. 875, 1175

cc, STORM SPEED "15 M/s

LC;

-° aFigure 103.Model results, Case VI.B

00 ,~~~~C 05O 0O 5020

FREQUENCY IN HERTZ

77L

Page 86: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SCALED 1-D SPECTRA F(f)

CASE V1I -A

DNS MODEL: .F~x -63.0 2m

T -24 HR

(X,Y) = 650,. 4.D hm73:3, 14,%

a 7A, .1"o

I 875, 165 +aSTORMI SPEED =15 m/

U- 62

V)1

ct~0: 0.0 0. 20FREQUENCY IN HERTZ

Figure 104. Model results, Case VI.B '

CASE 7 1DNS

E* vs. T* *

DEFIN: E*=E /U

6001 T*=Tg /U* '

T106'

Figure 105. Model results, Case VII

78

Page 87: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

.12 ...

CASESATURATED

DNSF/Fmax.& (f,t).10

.09 "1'

l.o90.U

d .08 -"- Il"UIL

*Q7\

.07 '

05 -

0T*(x10) 1.0

Figure 106. Model results, Case VII

79

Page 88: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

CASE MISATURATEDIS8- t=I h,,DNS

F(&,f) /Fmax

Figure 107.90 Model results, Case VII

C)

Z 0 OLD WIND DIRECTION

uLJ

-90 -NEW WIND DIRECTION

Contour Interval 0.1

0 .5 1.0 1.5

CASE SATURATED

DNSF(&f)/Frnax.

Figure 108.90 Model results, Case VII

2: 0 OLD WIND DIRECTION0

L-

-90- NEW WIND DIRECTION

Contour Interval =0.1

0 0.5 1.015

80

Page 89: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

APPENDIX

A Summary of Calcomp-Compatible

Plot Programs for the Wave Model

Isaac Traxler

Computer Sciences Corporation

NSTL Station, MS 39529

Al

Page 90: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

A. INTRODUCTION

The following documentation is divided up into sections. Each major

section is a separate program. Each program includes a short text description,

an input data description, a variable definition section, a program listing,

and an example plot. The variable list is included with each one instead of

overall because the meaning of variables change. Unfortunately the programs

were not designed with a global variable usage plan in mind.

Whenever possible subroutines were borrowed from one program to make

another program easier. Most of the tape I/O is done in READS and READJS.

All the contour plots are created by passing parameters to CONTUN. CONTUN

is a contourplot creating subroutine that has obviously been implemented on

several different machines using several different plot packages. The included

version works on Calcomp compatible systems.

The plot programs, like the wave model, run on a CDC 6600 using a 60-bit

word. The programs are dependent on the word size because of the data tape.

The data is packed on the tape two values per sixty bits. This fact causes

the programs to be machine dependent since they must separate out the data.

All text is used assuming 10 characters per word may be stored. Only changes

to dimensions and subscripts would be necessary to alter this.

A2

Page 91: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

The following programs allow some of the data produced by the DNS WAVE

Model to be graphically displayed. These programs evolved over a long period

of time. At first, a program was written that produced a few simple curve

plots. Their original purpose was to allow the results of the model to be

interpreted easier and more fully. One by one separate sections were added

to this and eventually contour plotting programs were written. As time passed

these programs were altered continuously to extract more information about the

model. At some point the Wave MODEL Intercomparison Workshop became a reality.

Shortly thereafter, a preliminary version Wave Modeler's Newsletter was

released. It contained a list of "standard" plots that each participant

should attempt to produce. These programs began to drift in that direction.

Whenever time permitted they were altered so that they would correspond to

the plot requirements.

As time went by several newsletters were written. Some of them contained

new plot requirements. "Corrections" were constantly being issued to the existing

requirements. New programs were written to produce these plots. Old programs

were modified. The final result is the following collection of programs. They

were never created with the idea of a plot package in mind. They simply evolved

to meet the changing requirements.

With a certain amount of study, these programs can be altered to produce

an extremely large variety of plots. Before attempting to change them or even

use them, I recommend that the user become very familiar with the format of

the history and summary tapes.

[ A3

Page 92: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

B. PROGRAM PLOTWM

This program produces six different plots. The plots are chosen via a

plot type number followed by appropriate data cards. Some of the plots have

the ability to display multiple curves that are user selectable. All plots

can be run separately or in conjunction with others. A plot may be run

several times in one execution run. The following is a list of plots that

the program can produce: Significant Wave Height, Peak Frequency, Mean

Direction, l-D Spectrum, and 2-D Spectrum.

The significant Wave Height plot displays a theorectical curve and an

observed curve (program calculated) on an axis system of Significant Wave

Height vs. fetch. The axes are labeled and provide for a title as well as

providing for an overall title at the top of the graph.

The Peak Frequency section produces a graph with two curves, one theo-

retical and one observed. The X-axis corresponds to fetch and the Y-axis

corresponds to frequency. Axis labeling, axis titling and overall titling

is also provided.

The Meaz, Direction section plots a single curve, mean direction, with the

axes being direction and fetch. The same labeling capabilities exist for this

routine as above.

A4

Page 93: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

l-D Spectrum plots can display multiple curves on one graph. Three

different routines exist to do l-D Spectrum plots. The first one does 1-D

Spectrum plots at final time step with grid point as family parameter. A

second section allows time as a family parameter and uses only one grid

point. A third section of code allows any single time to be chosen and

uses grid point as a parameter. This one was written so that plots could

be made that were not at the final time step. It is slower than the first

since it uses the history tape rather than the summary tape.

The 2-D Spectrum section produces a graph similar to the others in

format using direction as the family parameter. Any time step is allowable.

This program has two primary sections. The first section requests pri-

mary data arid takes care of most overhead. The second part of the program

requests a plot type number and then turns control over to each separate

section of the program. Each plot type requires further input. At the

end of the section the Drogram returns to requesting a plot type number.

A5

Page 94: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

INPUT DATA LIST FOR PLOTWM

FORMAT VARIABLE DESCRIPTION

7110 FACMAIN,FACI,FAC2, FACMAIN is the overall scale factor for all plots,FAC3,FAC4,FAC5, the other values are multiplied times FACMAIN forFAC6 each particular plot, FACI corresponds with plot

type 1, FAC2 corresponds with plot type 2, etc.,FAC5 is also used for plot type 7.

110 NGRID Number of grid points wave model used in gen-erating data tape.

8110 NF,(FREQ(j), NF is number of frequencies, FREQ is an arrayj=l,NF,l) containing a list of frequencies.

llO,7F10.O ND,(DIR(k), ND is number of directions, OIR is direction/,(BfiO.O))k=l,ND,l) list.

2F10.O U,D U is wind speed and D is wind direction

llO,lOx, NS,(NOSTA(i), NS is number of stations, NOSTA is station list,3(ilO,FlO.O), Y(i), i=l,NS,l) Y is a list of fetches, each Y(i) is Associated(4(IlO,FlO.O) with NOSTA(i).

2F10.O SF(l),SF(2) Scale factors

2110 ILPIPL If ILP&IPL both equal 0 then default valuesused, otherwise 0 implies false and 1 impliestrue.

110 IPTYPE If IPTYPE=O then program stops, values 1 thru

7 select plot types.

PLOT TYPE 1 SIGNIFICANT WAVE HEIGHT

8A1O TITLE(i),i3,10 Title of plot, appear across top of plot

I10,lOx,6Al0 NXCHAR,XLABEL NXCHAR is number of characters in X-axis label,XLABEL is the label of X-axis.

llO,lOx,6AlO NYCHAR,YLABEL NYCHAR is number of characters in Y-axis label,YLABEL is the Y-axis label.

PLOT TYPE 2 PEAK FREQUENCY PLOT

8AlO TITLE(i),i=3,10 TITLE is label displayed at top of plot.

IlO,lOx,6AlO NXCHAR,XLABEL NXCHAR is number of characters in XLABEL,XLABEL. is the X-axis label.

I10,10x,6AO NYCHAR,YLABEL NYCHAR is the number of characters in Y-axislabel, YLABEL is the Y-axis label.

A6

Page 95: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

INPUT DATA LIST FOR PLOTWM (Cont'd)

PLOT TYPE 3 MEAN DIRECTION PLOT

FORMAT VARIABLE DESCRIPTION

8AIO TITLE(i),i=3,10 TITLE is the title of the plot.

IlO,lOx,6AlO NXCHAR,XLABEL NXCHAR is the number of characters in XLABEL,XLABEL contains actual X-axis label.

IlO,lOx,6AlO NYCHAR,YLABEL NYCHAR is the number of characters in theY-axis label, YLABEL is the Y-axis label.

PLOT TYPE 4 1-D SPECTRUM

8A10 TITLE(i),i=3,1O TITLE is title of plot.

IlO,lOx,6Al0 NXCHAR,XLABEL NXCHAR is the number of characters in XLABEL,XLABEL is the X-axis label

IlO,lOx,6AlO NYCHAR,YLABEL NYCHAR is the number of characters in YLABEL,YLABEL is the Y-axis label

l1O NDU If NDU=l then non-dimensional units are used,else dimensional units are used.

110 NSID Number of stations to be plotted.

8110 NOID(i),i=l,NSID,l Station list, up to ten station numbers to beplotted.

PLOT TYPE 5 1-D SPECTRUM

8AO TITLE(i),i=3,10 TITLE is the title of the plot

IlO,lOx,6AlO NXCHAR,XLABEL NXCHAR is the number of characters in XLABEL,XLABEL is the X-axis label

IlO,lOx,6AlO NYCHAR,YLABEL NYCHAR is the number of characters in YLABEL,YLABEL is the Y-axis label

110 NDU If NDU=l then non-dimensional units are used,else dimensional units are used

8110 NSTEP,(ITIME(i), NSTEP is number of time steps to be plotted,i=I,NSTEP,I) ITIME is a list of time steps to be plotted.

IlO IN(RDPT The grid point number to be plotted.

I| A7

Page 96: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

INPUT DATA LIST FOR PLOTWM (Cont'd)

PLOT TYPE 6 2-D SPECTRUM

FORMAT VARIABLE DESCRIPTION

8AlO TITLE(i),i=3,10 TITLE is the title of the plot.

IlO,lOx,6Al0 NXCHAR,XLABEL NXCHAR is the number of characters in XLABEL,XLABEL is the X-axis label.

IlO,lOx,6AlO NYCHAR,YLABEL NYCHAR is the number of characters in YLABLE,

YLABEL is the label of the Y-axis.

110 INGRDPT The grid point number that is to be plotted.

10 ITSTEP The time step number to be plotted.

8110 NSD,(IDIR(i),i-l, NSD is the number of directions to be plotted,NSD,I) IDIR is the array of directions

PLOT TYPE 7 1-D SPECTRUM

110 NSTEP Time step to be plotted.

110 NGRDPTS Number of grid points to be plotted.

8110 GRDPTS(i),i=l, Array containing list of grid points to beNGRDPTS plotted.

IlO,7AlO NCHAR,TITLE(i) NC' 1 is number of characters in TITLE,TITLEi=3,9 is Lhe title of the plot.

I1O,7AI0 NXCHAR,XLABEL NXCHAR is the number of characters in XLABEL,XLABEL is the X-axis label.

IlO,7A10 NYCHAR,YLABEL NYCHAR is the number of characters in YLABEL,YLABEL is the label of the Y-axis.

110 NDU If NDU=l then non-demensional units are usedelse dimensional units are used.

110 NSTEP Time step selected.

A8

Page 97: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

I

VARIABLE LIST FOR PLOTWM

SS(2) - Real, scale factors, hold default values of 1.0

FREQ(20) - Real, array containing list of frequencies in hz

DIR(36) - Real, array holding directions in degrees

Y(lO0) - Real, array containing a list of fetch values to cor-

respond to station list

SF(2) - Real, actual scale factors, used to scale Y(fetch)

BUFFER(1511) - Real, used as input buffer to hold SREC off of summary tape

CURVE(IO0,10) - Real, stores dependent variable values to be plotted, allowsup to 10 curves with a maximum of 100 points each to be plotted

TITLE(lO) - Real (used as character), contains title of plot

XLABEL(6) - Real (used as character, contains label of X-axis

YLABLE(6) - Real (used as character), contains Y-axis label

SID(500,20) - Real, input buffer to hold 1-0 spectrum off JSREC onsummary tape

FM(500) - Real, contains Peak Frequency for each station

TAR(0O) - Real, temporary array used to hold independent variablevalues for plotting

NSTAR - Real, corresponds to N* in Wave Modeler's newsletter, nor-malization value

USTAR - Real, 100*NSTAR

BFPM - Real, corresponds to FPM(fPMj in newsletter

G - Real, gravity

NOSTA(I00) - Integer, list of station numbers to correspond to Y(listof fetches)

LUN(2) - Integer array to hold logical unit numbers

NOID(IO) - Integer, used to hold list of station numbers to be plotted

NB - Integer, size of BUFFER, number of values to read in

NX - Integer size of line printer plot in X direction

NY - Integer, size of line printer plot in Y direction

A9

Page 98: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1 6 ' AA4 CA0E S A C N E E O M E T A T V T S LAP P L I C A T I O N O F A D I S C R E T E N O N L I N E A R S P E C T R A L M O D E L T O I D E A L C A S --E T C ( U )

NCASFED RA-TN-148A

2E1- EE00000h

Page 99: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

VARIABLE LIST FOR PLOTWM (Cont'd)

NF - Integer, number of frequencies

ND - Integer, number of directions r

NGRID - Integer, number of grid points

NEWPAGE - Logical, flag indicating whether or not to do a new page of plots

SREC - Logical, true if SREC has been loaded into BUFFER

JSREC - True if JSREC has been loaded into SID

LP - Logical, true means do a printer plot, false means donot do a printer plot

PL - Logical, flag for plotter plot

FACMAIN - Real overall scaling factor for plots, used as a multiplierin every call to FACTOR

FACI - Real, scale factor for plot type 1, multiplied by FACMAINfor overall factor

FAC2 - Real, scale factor for plot type 2, multiplied by FACMAINfor overall factor

FAC3 - Real, scale factor for plot type 3, multiplied by FACMAINfor overall factor

FAC4 - Real, scale factor for plot type 4, multiplied by FACMAINfor overall factor

FAC5 - Real, scale factor for plot type 5, multiplied by FACMAINfor overall factor

FAC6 - Real, scale factor for plot type 6, multiplied by FACMAINfor overall factor

U - Real, wind speed

D - Real, di recti on

Cl, C2, C3 - Real, used to hold temp results of expressions

ILP - Integer, used to indicate how LP should be set

IPL - Integer, used to indicate how PL should be set; if ILP and IPLare 0 then default values are used for LP and PL, otherwise aI means true and 0 means false

IPTYPE - Integer, plot type

A1 0

Page 100: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

VARIABLE LIST FOR PLOTWM (Cont'd)

IOFSET Integer, used to indicate how many words to skip on inputof record

NDU Integer, flag for non-dimensional units

Al 1

Page 101: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

ri1ucG&'i PLOR( NJ~ Os:T TAPE5wlIMPUI, TAPE6-OUTPUTs

C PROGRAA rO GENERATE PLOTS OF BAR4ETT WAVE MODEL RESULTS*C EAL SS(?)v ' REo(2i), 011U36)9 Y(100)9 SFC2)t BUFFER(151.)

ZEAL CulVE(.)0,%0)q TITEL=O1), XLABEL(6)9 YLAbEL(6)

ZEAIL SI)(500,20), FM(500)ALC p - rIPR~kY ARRAY JSE0 TJ IOLO X-AXIS VALUES IF THEY HAVE BEEN

C N ST All CO~tRESPfflS TO NO US;ED IN CALCUJLATIONS -

INTECER 40ST4(100), LUNI?), N01D(10)..OGICAL 'EHPAGE, S EC, LP, PL.OGICAL JSZE:

)ATA NCiR, TITLECI), TIrLEM2 /LO0D9 2*10H)ATA NX, NY /1209 60/)ATA L;J4 /192/)ATA NEO)'AGE, SREC, LP, PL I.TRUE., *FALSE., eFALSE., *TRUE*/)ATA JSI=C /oFALSEo/3ATA NSIAR/0.855/)ATA UST'.R/8595,,B:P,1/13510O0.O,

cC FACIAIN - 4%1'4 SCALIMS FACT)R. FOR PLOIsC FACL - SCALING FACTOR FOR P-01 TYPE IC FAD? - SCA-ANG ' ACTOR FOR P-..T TYPE 2C FAC3 - SCAL.ING FACTOR FOR P..OT TYPE 3C FAC4 - SCALING :ACTOR FOR P-O1 TYPE 4C FAC5 - SCA..ANG FACTOR FOR P...T TYPE 5

:ALL PL)rs(09097)1006 :fJRMAT(8=10.0)

lEAO(5,l)0b) FACMAI N,FAC LFAC2,FAC3, FAC4,FAC5,F AC6C lEAD t1D):L C3N~DITIONS,

lEAD (5910)0) NGRI)lEAD (5,1030) NF, (FREO(J),J-1,NFllEAD (5910)0) ND, (OIR(IKiK-1,NDI

1000 2ORM4T (I10,7F1Of(8F10.0))kEAD (5,3032) U, D4RIT= 16,2000) NGRID

2000 OR1IAT (11qL45X311I3ARNEI1 WAVE MODEL PLOT PROGRAMI//+ 52XLbirl)DEL C)NDITI)NS//+ 114,12H GRID POINTS)4RIIE (6*2001)

2001 ZORIIAT 1/11X11FIFREJUENCI=S)'fRITE (6,2002) (FREQ(JIJ-1,MF)

2002 :ORVIAT (1.X12F10*3)4RITE (5,2D03)

2.003 :ORfIAT (flIXi0HOIRzCTIONS),fRJTE (692032) (0l 4K),K('1,HD)4RITE (592D04)

2004 =D~k (f11X2',HWIN) SPEE) AND DIZEP TION)4RITE (6,200?) UslEA0 (5,103L) NS, (NOSTA(IJ, Y(liJ 1-10S4)

1001. :RA (110, 10X3(I L0,FlD.0)/(4( I 1otF1.0.r)))lEAD 1591002) SF

1002 :OR4AT fZF1O.C)IF (SF(t) *LE. 0a) SF(Ll - SSMlIF (SF(2) oLE. 0.) SF(1 - SS(24RITE (692005J

ZL 5 PORItAT If54XC15HPLJT PAR4METERS)4RITE (bt20b)

2006 =ORM4T (ILLX7HFETCIES)4RITE (S,20021 (Y(I),IaL9NSJ4RITE (6,2007)

200 :UJq.Mi% (fllX35HD161ANCE AND VE'..)Cl)Y SCALE FACTORS)4I1T E (5,200?) SFJ - 1 0 SF12)491TE (5,2008)

2008 : ORMAT 41/22KL9HAFrER SCkLING &4 R ITE (6,20363'(RITE (6,230?) (Y(IJ,I1-1,NS)i(RITE 16,2004t)P(RITE 15,2002) Up4RITE (b,?039)F-ACHAINqFACl 9FAC29FAC3,FAC4,FAC5,FAC6

_____ _____Al 2

Page 102: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

HPRlltAA1I PLOT44d

ZD09 ' OR!1AT(84 FACIIAIN,3Xs4HFaCI,5X,41FAC2,5X,4IFAC35X'.HFAC4,,X,

C SECTION FOR DIIIE4SIONE) VARAIBLES:3 -U**:- 195E-3 oSORT (03):- 2954 0 (G / U) 0 C300eD*3

C A.PPLY S&ALE FACTORS.)a 1.0 1-1,MSV (I)-Y (I) *SF 1 )

10 0.bT[NUEc ILP - 1 THaJOSES LII4EPRP4TER PLOTS.C IPL - I 11)OSES ZETA PLOTS*c ILP - I'. ft CHOOSES DE-AULTS.

1EAD (591OD5) ILP, IPL1005 :ORMAT(BIL()

IF (ILP oEE)* 0 eA'4Do 12L *EQ* 3) GO TO 2DIF (ILP .EQ* 0) LP - sFA-SEoIF (ILP oELI. 1) LP - sTRJE9IF (IPL wEQ. 0) PL - *FA-SE*IF (IPL E-lo 1) PL - *TRJEe

C tEAD PL3T TYPE,20 tEAD 159100D) IPTY?E

C.IF(IPTYPE 6L=9 0) ^ALL P-0T(0.0,3.399)IF (IPTiE ELE. 0)'STOP

C:;OT0(30,L30,23O,333'.309530,63D)s IPTYPE

C SIGNIFICANT IIAYE HEIGHT PLOT*30 lEAD (591003) CTIT.E(I)9[-3910)1003 :ORM&T (BAlO)

lEAD (591034) NXCHARq XL4BEL1004 rORHAT (IlD,1OXbAI3)

tEAD (5,104) -IYCI-AR, YLkBELIF (SREC) GO TO0 40

C :ALL RE%)S (LUN(1)v BUFFER, NB, NF)

SREC - *rRJE&'.0 IOFSET - 11C :ALCULAr:E OBSERVED AND THEORETICAL SIGNIFICANT WAVE HEIGHTS*

30 53 I-19NSJ - 4OST4IX) + IOFSETZURVE(IU=O.O4*SQT(3UF:ER(J))ZURVE(I,?) - Cl * SORT (1000.0 # y(I))

50 :ONTINU=C PLOT CUiVES.

[F (LP) CALL PLCURV'(NSZYCeRVEO.OO.O,0.0,060,+ NCHARTITLEq NXCIARXLABELNYCHARYLABELNEWPAGENXNY)ZALL FA:rOR(FAC1*FkCMAINlIF(PL)CA..L ZPLOT(NS ,2,YCURVEOO0D,0.0,0.0,D

+ O.0,D0vNCHARTLTLE(31,+ NXCHAI, XLABELNYCHARYL-ABELI10 6.5,90.0, 10.). ,00b.5)

I-

:;0 TO 20c 'EAK FIE)UEN:Y PLOT.

130 :ONTI?4UFC

ZEAD(591303) (TITLE (I),I'-3vl0)tEAD (591004) NXCtIAR, XL&BELlEA3 (5,1004) NYCrIAR, YL%8ELIF (JSREC) GO TO 1L40

c lEh) JskIEC.:ALL RE&5JS(LUN(1) ,SlDI4F ,GRID)

CJSREC - .TRUE*

140 :ONTINJE:ALCULArE JBSERVEO AND TIEORETICAL PEAK FREQUEN(;IESs

c ALL PKFiEO(FREQSlDqNS ,lFqFt1,4OSTA)

)O 150 l1,N9SC FMUI) IS TIz PEAK FRE3UENCY FOR STATION I

11-HOSTA(il):URVE( I, )-Fa(II)CURV=1IZ) -C2 0 (10O3.) 0 Y(I))4l*C-0s3)

150 ZONTINUJE

Al 3

Page 103: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PROGR4M PLOT44

+ * ,pr%- NXCIARXL*BELNYCI$AaYLABELNEWPAGENXNY):ALL FACT0R(CAC2FICAI4)IF CPL)CL lLOT('4S 2,YJUZVE,0.O.0,0.0,2.0

+ 0&0,20,NCHAR9TlTLE(3),* 4M(C!A19XLA3EL ,Y4?.HAR, Y-AaEL,3~o.I6.5,0.0, 10.1,006.55

lEAD (591D)4) NYCHAR,YLAiELIF (SR:C) GOTO 240

CALL kEADS (LUN( 3.) BUF:ElqNB4B F)SREC * TRUE*

240 IBFSET 11. # Z*NGRI30 250 lalgNS91

J - MISTA(1 + IOFSETCURVECI,1) - AI3((57,Z96*BUFFEk(J)),36)*0J

IF (CUR;E(Iv1) .GT* 180.0) CURVE(191) a CUkVE(I,1) -360.0

250 CONTIIUE IIF ULP) :ALL PLCURiI(NSI.YCURVE,0.0,0.0 ,-180.0,180.0,

H CHAWITLENXICIAW,BEL9NYCI1Ak LA 8ELNtEWPAGEPNXoNYJ:ALL FAC OR(FAC3*FACMAIN)IF (PLI :ALL lPLor(NS,2l,(,CURVED.0,0.0,-lBoOO,180.0

+ 4C4A~,FiTLE (3),NKCiIAR,(LABELNtCHiARYLABEL,1O.1,6.5,Dl.1.+ 0.0,6.55

OTO 20C SE~rION F0'q 1-D SPECTIUM PL:3T

330 OGNTIN4UEC

kEAO(591D03) (ITLE(Ilg1a391O)IEAD(5tl)04) NXCHA~vXLASCLtEAD(5,13D10 NYCHI19YLABELtEAD(591DOD) NDUIEAD(5*1305) NS1D1510 a 'IND(AS1O,12)

4RIT"-(69?3303)2330 =0RMAT(12.f P-OT TYPE 4)

4RITE($923311 (TITLEC I),1-3,10,1)2331 =OR,,AT(bi rIrLEg/93A10)

ifRIT=(592332) XLAB:L2332 :ORMAT(1311 X AXIS ..ABEL919bAl0)

4RITE(b,2334) YLAB=L2334 0a1IAT(13H !YAXIS hABEL9/96AID)

2335 :OR1i(3H NJMBER JF STAFIONS:,313,,13HSTAFIBN LISr:,/,416,3X)IOF SE I. .3IF (JSRE:) G3TO 34)

CALL lEASiJS(LUN(1) ,SI)94FNGRIO)JSREC - .TRUE.

340 30 360 I11NSIO,1L-HDI) (I)DO 35) J-). NF,3.

IF(N)Uw=E3.1 aDTO 345:URVEIJsI SIDI LJ)

345 :ONTINUE:URVE(JqI )mSLD(L9JI/BFPl

350 C04TINJE360 CONT14UE

1FIN0U*:3ol) GOTO 380)0 370 I-19NFI.

TAR( )-FREG( I)370 CONrI1IUE

;OTO it))380 :ONTIMU:

)0 390 Iu1,NF91TAq(1)mFREU(I)*JSTAR/;/100

390 CONrIIU=E400 OI4TINUE:

Page 104: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PROGRAM PLUT4f1

I F(LP)CA..L PLCURV( 1FNS1),TARCURVE:s,4O,).DO,15,NCHA~, TITLENXCIARXLABELNYC4Ai&,YLABELNEWPAGENXNY)"L F4: O.I( ;AC4*FeLCIAI N)

IF (PL)Ck.L ZO(~NIghsURE004OOOl5+ 0 0+NCHART[ TLE (3) ,NXCHARX..ABELNYCHARYLABE-.+8.) b.,000,8.O)*,60)010O 2D

c4,30 ODNTINJE

:ALL FAtTOk( FAC5#FDICMA4N):ALL G~pr('GZIDLJ'4(2) ,1),1FFRE0,LPPLCU.RVENEWPAGENXNY,+ CHA~,TI T.ENXCIARXL48ELNYCIARYLA8ELI

;0 TO 20530 C'ONTINUE

;ALL FAcrDat;ACMiAI*FACS)SREC-*FA'SE*:ALL SZ);LT( 4GRID,..UNCZI ,N),NFFkE~LPPL, 4EWPAGENXNYNCHAR,

+ TITLE, 4XCARXLABELNYCNARYLABELCURVEaUFFER);o To zo

c .EAVE ADIN FOR OTHER PLOTS*630 :ONTINUE

:AILL FAZTOR(FAC5F4CM'AIN)!REC- F AL SE.:ALL SL)LT( NG'RIDLJN(Z) ,4DNFFREQLPPLNEWPAGENXNYNCHAR,

* TITLE, 1XCH&RNYCIARTA1,CURVE,8UFFER);OTO 25E ND

Al 5

Page 105: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SUJBRDUT14~E P<FREU( ';REQSLDNSNF9FM*MOSTA)C THIS SUIR3JTIINE CALCLJ.ATES THE PEAK FREOUEN4CY WIHICH IS RETURNED IN FCC FRP3 AR4Ai OF FREQUENCIESC S5) 1-0 S?ECTZUMi VA..UESC NS -NUMBEI OFh STATION~SC NF - HU48EI OF FREQUE4CIESCC I - STAT134 COU'4TERC J - -FREDUE'4ZY 1'4DEXC SM HOLDS JAK ZREUUE4CY L)UZU.4G SEARCH ROUTINEC JM9 - INDEXIC F PEAK FREQUENCY'Z .1 - in9 1 ICJ.2 - JM9

C J93 - in1 IC Xl - FIRST 7RcQJENCYC Y1 - FIRST SPECTRAL VALUEC X2 - SECO4) FRE3UENCYC Y2 - SECOND SPECTRAL VALUEC X3 - THIRD FREOJENCYC Y3 - TtIIRD SPECTRAL VALUEC XNJ4 NUM=IATOI OF FZEQUFE':Y APPRJKIMATIONC DENJIM - E;43tINATOR OF FREOJENCY APPROXIMATIOA4

INTEGER 45, i4Ft It .9, JII, .1, 92, J93INTEGER 40STA(NS)ZEAL FaE)(NS) ,SlD45OD,20),FM(NF).SMXlX2,K3,YlY2,Y3ZEAL XNJ54, DENOI

C 0O EVERYT14G FOR EAC4 STATION)D iD KUItNSt1

I-MOS[A(K)C BEGIN SEARCH FOR DISCRETE PEAKC DO PRELIM14ARIES

SM - 510I11J-41 - I

C STAIT AZTIJA. SE3LPCHDJ LO J3=29 NF, L

IF (91 *GE9 SID(I*J)) GO T3 10C KEE" 4EW IAC

SH - SID(I*J)

10 CO'4TINJEC SEE IF CURV= FITTING :AN BE DONE

IF ((in1 ..4L. 1.) ANO. (J99 NME. '4F)) GO TO 20C SIN:E PEAK IS AT END, CURVE FITTING CAN NOT BIE DONE

Fl(Il - FRE3(.i?)GJ TO 1.0

C PRE:ARE TO )0 1'JRVE FITTING~ BY SOLVING PEAK AS MIAXIMUM VALUE OF QUAEC THIAT PASSES THROUGH rHE 3 P0OIN15 AROUND THE )ISCRETE PEAK

20 J1-JH-l.92-JilJ3- JM'jLi(1-FRE9( Jl)

K2-FRE2( J2)f2-SlD(I ,JZ)K3sFRE0( J3)V351lD( IJ3)

CCA,-ULATE JENJMINATOR, OF PEAK FREQUENCY)ED-0XO3X*ZX*lX*~~O2X*l

C APPIOXIMAT1JN CAN NOT BE D04E IF DEI43NINATOR IS ZEROIF (1)EN9I N91o 0) ;OTO 3)

FM(I) - fREQ(JN1)GO T3 4D

C CAL^JLATE AJIEkATOR AN) PEAK FREQUENZ Y30 INUM=-(rZ*X3eX3-Y3tX2.X2. (3OX19XI-YlOX3QX3.Y1*X2*X2 -Y2*XI*X1)

:N( I-KNJM/DENOI40 C0ITIMJE

RETURNEN4D

Al 6

Page 106: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SUBROUT.AE GRPT(NGk1DLU1,NDNF.FREOLPPLENEWPAGENXNY,C + CH&1,TI T-.ENXCIARXLtBELNYCrAt~YLABEL)

C THiIS ROUT14: RE&DS THE HISTIRY TAPE A4D PROU:JES A GRAPHC OF THE I-) SPEZ TRUM iT SELECTED TInES AT ONE GRID POINT.C IT :ALLS:C FA)IDREC - POSITIONS FILE DINTER AT BEGINN14G OF RIGHT DATA RECORDC RS>LIT - J4PAC<S A REAL VA..AE FROM A WORDC IS?LIT - J4PACI(S AN !NTEGEI VALUE FROMI A WUR)C PL:URV - k]UTI1E TO 00 LINE PRINTER PLOTSC ZP..OT - ZzETA P.OT ROJTINECC PARAIETERSC NGlUD - TOTAL N.JMBER IF GRI) POIATSC LUqI - L)GZ'%L U41T NUIBEkC NO N4BEI OF DIRECTIONSC NF - MU45ER OF FREQUE'ICIESC FREJ - ARR~f OF FREQUENCIESC LP - FLAG FIR LINE PRINTER PLOTSC PL - FLAG =3R PLOTTER PLOTSC NC4CIR - LE'NGTH JF TITLEC TIT-E - TITLE OF GRAPHC NX - WI)TH IF PiINTER PLOTC NXCIAR - LE4GTH OF X-AXIS LABELC XLA3EL - X%(IS :-ABELC NYCIAR - HEIGH1T OF LIIE PR1'4TER PLOTC YLAIEL - A:TUAL ARRAY CONTAINING Y-AXIS LABELCC VARIBLES:C NST7P - NJ43ER JF TIM:: STEPSC ITIiE - A114Y OF SELEC-TED TIMESC INSIDPT GRI) POINT TO BE PUITTEDC BUF - INPJT BUFFJERC E03 - EID OF BUFFER (..ENGTH OF INPJT RECORD)C TIMITR - TI4E IqDEXC J - FREOUEN'4Y INDEXC K - DIRECtIJN INDEXC FACTOR - Z*IDISTANCEC IN) -T!EL.S WII:H HALF 9F WJRD GRID POINT VALJE IS PACKED INC IPTI - lNOE OF BUF FIR GRI) POINT VALUEC E - ARRAY 0: IN)EPEr4DENT VAIIABLE VALUJESC

I NTEGEA G 1G3 9LUN 9 409NF5 s rE P,I TI HE ( 10 J sIN'R)P T NCHARI NTEGER 4XCHAHNYCj.ARE 3, TIMCTRJK, INDvI ;TR9NX9NYlEA. FACrOkE(I0,0)FRQ(NF)TITE(1D),X ABEL (6),YLAOEL(6)lEAL BU=I25qikEAL BFPiLJSTARGOGICAL -.PP..)ATA BFPI/13b1000. 3/,USTtR/85.5/,G/980.6/

C REA) .! USEI SUPPLIED INFOR4ATION

lEA) (5,1.003) (TITLE(I)9Im3,10)1003 =ORMATISA1D)

ZEADI 5,1304) NXCHAIXLASEL1004 :ORM4T(IL09IDXbA13J

lEAD (5,1001t) NYCNARYLA3ELIEAO(5*130k) NDUlEAD (5,1005) NSTEP9(ITIlE( I),I-1,NSTEP,1)

1005 =ORMAT(3I1~1lEAD (5,10351 INGR)PT#RITE(692C0)

2000 =ORMkT(17H GRPT-PLJ TYPE 5)

2001 zc~,jT(7j rirLE:8ALO)4RITE(Si?0021 NXCHkRXLA3EL

2002 :ORMAT(31 NXCHARm,13,/971XLABEL-,6410)4RITE(692003) NYCHAR9YLA3EL

2003 :IJRMAT(O 6 4Y'HAR-v1 3q/97iYLABEL-96AlD)4RITE( 6,?V)41 NSTEP,(ITI4E(1I),I-19NSTEP,1)

2004 :ORMAT(ZZI 14J1BER IF T14:E STEPS:*,12,9191H9 SELECTED TInF:S'I,(ItC,3Xj4RITE(bZ005) INGR)PT

2005 :O0pjAT(lZI1 GlI PO[NT:,14)C REA) DATA AID DJ SUMATIO14

Al17

Page 107: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SJBROUT14E GRPT

IEWIND -.J4I)0 24D TIMCTR - 1,45JEPtL

DO ZD3 J-1,NF,l .E(J9TInCTR) - 0.0

200 CO'4TINJELRE WIND LUS4

~LF4DRFCUJTIhirI4ICTR),LUNNDNF)Do 23 J-LiNF,1

BUFE75R 1IN (LUNL) (8UF(liBUF(E13i)IF (UNIT(-UN)) Zl,99fs9996

210 FACTOR a SPLJT(l98UF(0)1~4) * hOD(IN4 RDPT+192) + I

IPTR - (I4GRDPT + 1.3/Z 4Z-RSPLIIUlND9BJ-:(IPTR)jE(JTIr1CTk)-E(JTII1CTRJtFACTOR*Z

220 CONTINUE230 C34TINJEu240 CONT1UE

IF(NDUo=3); OTOZ6330 250 J-1,t4F,1

BUF( J3 -FREG(IJ)L250 CJ'4TINUE

260 :ONTIJiu=30 280 I'3.,NF,1

BUF (I) -FREQ( I )USTAR/ ;DO 27) J-itNSTEP91

270 C34TINJE280 CONTI'4UE290 ON4TINUE

IF(LP)CA..L PLCURV 4FNSTE-PBUFE,0.0,0.02,po.0,1.5," NCHAR, T[T-..ENXCARXLBELNYCHA,YLABELI4EWPAGENXNYJ4F -N4F-1IF(PL)Ck-.L ZPLOT('4F ,NSTE%9BUFEDO0.020.0,3..5,

" Do259,PD.0259" NCHARtrITL-1(3),I4KCNAR, LABELNvCIARtYLABEL," 8.o', be fl,00980,Os0,6.)

4F-NF.1IETURN

998 tRITE(S,99) LUN999 :ORMAT(32I43)* 'EkROR 01 EtJF READING UNIT,13,6H ***

STOPEND

Ali8

Page 108: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

)fAR2UT14E SZDP-..

SUBROUT1 4E S2DPLT( IGRID,.UNNDNFFRE0,LPPLNEWPAGENXNY,C NClAR, TITLE*NXCA,%R9 XLABEL,'4YC-4ARYLAhEL9S2DBUF)

C THIS ROUT1'4E REkDS THE HISTIRY TAPE A4D PRODLI:ES A GRAPHC JF 1*E 2:D SPECTkU; AT SELECTED DIRECTIONS.C IT :ALLS:C F4IlDREC - POSITIONS FILE OINTER AT BEGINNI4G OF RIGHT DATA RECORDC RS-"LIT - JIPAC.(S A R; AL VA..UE FROMI A WORDC PLZURV - IUTINE TO DO) LIN: PRINTER PLOTSc ZP..OT - z:.rA P..OT ROJTINE

C PARAIETERSC NGRID - TOTAL NJMBER IF GRI) POINTSC LU4 LOGIAhL UJI1T NUIi3ERC ND NU'IBE1 OF DIRECTIONSC. NF -NUMN OF FREQUENCIESC FRE3 - WARf OF FREQUENCIESC LP - FLAG FIR LINE PRINTER PLOTSC PL - FLAG F3R P..OTTER PLOTSC. NC44R - LE41rTH OF TITLEC TIT..E - TIr..E OF GRAPI1C. NX - WIDTH IF PAINTER PLOTC NXC-IAR - LE4GTH OF- X-AXIS L*BELC XLA3EL - XA(US LABELC NYCIAR - Y-AkIS LABEL LENGTJC YLA3EL - ArUAL ARRAY CONTAINING Y-AXIS LABELCC VARIABLES:C IN~lDPT GRI) POINT TO BE PU)TTEDC BUF - INPUT BUFFERC E03 - EN4D I= BUFFER (-.ENGTA OF INPJT RECORO)C J -FREQUEJ4Y Ii4DEXC K -DZR=CTJJN 14DEXC IN) -TELLS WI1H HALF OF WJR) GRID POINT IVALJE IS PACKEDC IPTI -IN)EX )F BUF FIR GRI) POINT VALUEC

INTE;ER TITLE (101(LABEL(bI ,YLABEL(6)INTEGER IDIiR(4O)lEAL FRE 3(Z3J S2D(I.O910)tEAL aU l(600).OGICAL .PvP-

C REA) IN USEI SUPPLIED INFOkIATIONlEA() (5,10031 (TIT-E(I1iii3910)

ZEADt(591)04) NXCHAI ,XLABE:L1004 :ORAAT(IIlDDXbAl))

lEAD 15,1004) NYCH4RYLA3E.1005 ' ORMAT(9[1D)

lEAD (5,10D5) INGR)PTZEAD(591)05) ITSTEP

)O 23 [1,53,19IDRIv-1N~IDO 1) J-19NF,1.

SZ)(JI )-0.t)10 C)"4TINUE20 CONT14U:E

EOB -4#.A1.N;RID)/2

!EWIAD UJNIN.) - rOD(INMRPT+i,2f + I

IPTk - (I'4GRDPT + IMd '.:ALL Fr43tEC(ITSTEPtLUNp4)v4F))0 50 J*19NF.1

(-1 -

30 :ONTINUE-BUFFER 14 (LUN*L) (BUF(L),OtIFlEJl3)1

IF (UNIr(LUNI) 319998,99331 :DNTINUI:

V S2)(JI I.RSP.IT(1OB)9UF( IPI,) )

33 :ONTISJ=IFM4.E5.KI ;OTO 5)

T" (-1+KIF(I*LE*4SD) GLJTO 30

-Al 3

Page 109: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SLJ3ROLITI IE S20PL r

39 :ONTINU:3UFFERk 14 tLJN,1) (BUF(1Jv5UF(l))IF(UNIT(-U4)) '.399)8,998

40 Af4TINJE

IF(IGLr.o4)GTJ 3950 C)NTIAUE

I F(LP) CALL PLCUkv( iNF ,NS),FRE0,SZO0,0.0.0,0,0+ 4c1&i.,TITLE ,NXC1ARXLkBELNYCHfA~,YLA8ELNEWPAGENXNY)I F(PL )Ch-L ZPLOT(N ,NSDFREQS2DO.oOO,').0,0.O

+ c.0,30 )1+ NCHAlrITLE(3)I4ICHARICLABELNYC-fARYLABEL,+11.117.1,00091I10*0071)

RE TURN99'8 ERIT=EL69999) LUN999 =ORtiAT(32H)* 4 ERROR 01 EOF READING UNJTvI3,6H1**4

ST3PENO

A20

Page 110: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

.J3ROUT14IE S101T

SUBROUTI 4tE SlD1T(NGRID9 .J,ND,-4F,FREQLPPLNEWPAGENXt,NHsA~+TITLE, qXCdARNYClAR*TA~,EJ

INTEGER 4TEPNGRD?TS,GR)PTS(10) ,NXCHARsXL&BEL( 7),NYCHARYLABEL(?INTEGER 4DJLUNE)39NGRI)9NFqNDINTESER I N)E- (1092)9,II..OGICA-. PLLPZEAL TIT-E(13)ZEAL FRE:J(4F) ,TAR(100) ,GUSTARBUF(254)ZEAL 1(1)O,92) ,VAR(100)9TFACTORREAL BF31t)ATA k3:Pl/1351'00)/)ATA USTkR/8./,pG/980*5f

C NSTE3' - SELE;TEO TIME STEPC NGRDPT5 - NJiBER OF GRID POI'4fS SELECTED)C GRPTS - ARRAY OF SELECTED GRID POINTSC NXCIAR.- NJ43ER IF CHARACTERS IN X-AXIS LABELC TITLE TIT-= OF GRAPHC XLAB=L -X ~kiS LABELC NYC-MR - I4J13EI IF CHAZACTERi IN Y-AXIS LABELC YLABEL -Y-4XIS 'ABELC NOU -FLkG FIR NO'N-DI?1 NSIO'4%L UNITSC LUN LOGlCk.. UNIT NUM;ERC EOB =ND UF 3JFFE4C NGRI) - NtUt3ER OF GRID POINTS ON TAPEC NF - NUMIBER OF FREQUENGIESC FRED ARRAY OF FREOUEi4CIESC TAR -TE4P AIRAY, USED TO STJRE INOE?EdSDENT VAIUABLE VALUESC G - ,RAVITY :ONSTANTC USTAI - J* CJNST&NTC ND - NUMBER IF DIRECTiONSC BUF - ARRAY JSED AS IH2UT BUFFER

IEAO(59130D) .NSTEP1000 FfJRMAT(BIO)

IEAD(591000) NGRDPTS4GRDPTS-4IINOC NGROPI S,0)ZEAD(5,I.0OD) (GRDPTS(I ),I-1,NGI&DPTS,lJZEAD(591302) NCHAR, hIlLEl 111-3,9,1)

1001 :OR~ikT(Bk)I0)ZEAD(591)02) NXCHAl ,KLABEL

1002 :ORMkT(Il0,(7A1O)llEAD (5910)2) NYC-ItR9 YZABELZEAD1591D00) NDU4RITE I 62000) NSTEP

2000 :URt1AT(2)H SELECTE) TIME STEP:,14)4RITE(59011 NGR)PTS,(GROPTS(I ),l-1,NGRDPI5l1)

2001 :OMT(Z NJMBER OF SELECTED GR.ID POINTS:9149/,+ 2H 1.IST OF GRI) PoIpdsi/92isiois)

4RITE(6, ?002) (TITLE(I1,91-3,10)2002 :ORMAT(7I TIrLE:9f,2X,8At0)

4R1 TE(6, 20 3) NXC4-ARXLA3'CL2003 :ORMAT(?4H LENGTH IF X-A(IS LABEL:914/1,r X-AXIS LABELZ,7A1O)

4RITE( 6,200',) NYCI-IRYL43EL2004 :ORMAT(24ti LENGTH 3F Y-AKIS LABE-.: s149/ s14-1 Y-AXIS LAOIEL;9?A1O)

4fRITE(5,2035) NDU2005 :ORIAT151 NDJI12)

IEWIND UJNEOB-4.(lo-NGRID)I250 5 I-LNGROPTSJ.

5 CJNTI 4U:IF(43U 0:0. 1) GOT3 20

DO l~ID1INF91T& (I) -FREQI I)

10. CJ'4TINJEGOTO '40

20 CONT4IUE03 30 1-lpNFv1

30 'C)4TINJE40 C]NUIl4UE

)0 6) I-LNF,1

Page 111: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

. UBR~UTIqE sliu

50 C04TZNJE60 CONIq'UE

REWINJ .U'l:ALL FH)lFCe4STEPs.UNNINF))0 190 J-1,NF,1

J:FER 1.4 (LJN91) (8UF(1),BUF(EOB))I:(UNsII(LU4) J 7O9~99999

70 C3%rINJE

3) 50 I-19H;ROPTS9111-INOEXU .1.)T-RSPL IT(IHIDEX( I, ZI BUF (11))El J, )-Eli, I)+FB.CTO.*T

ZUA41AX1( 1 E( JI))80 CONTINUE90 C)I4TINJE

100 CO4NTI'4UEIF (NDU , 4E. L.) GOJT 130

DO 12) X-LNGRO?TSI.03 11D0 J-1,NF,1

E(JgJ)-E(.JI )j3:PN110 CONTINUE120 :34TINJE130 0NtTIN~U=

)D 131 i-1,NSRDPTS,lDO 131 J-iNF91

E CJol11-El J 1) /Z131 C)'4T11JE

~iF-18IF(LP)CALL PLCURV( 4FNGR)PTSiTARE,()ODO,2,0.0,1.O,

+ NCtfA~,rITLE.,NiXCHkRgXLAIE,MYCH&~,YLABELvqEWPAGENXNY1IF(PL)CA-L ZPLOTCN ,NGR0PTSTARE,0.0,0.O2,~.D,1.O,

+ 0.16557,025,+ NCH-A~T1JL:f3),NXCHAR,'4LDBELNYC-IARYLABE.L,+ 8.0,00.00, 8.000060)

IE URN999 :ONTINUE

1111 =0RMAT(?SH ERROR W-iEN RE4DING UNIT ,I2Z)

E ND

A22

Page 112: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

FUNCTIJN RSPLIT

:uNC10 RSPLIT(IN3gWORO)INTEGER INDl.EAL WOOvTE4PSO T3 M110IA) 9 IND

100 SPLIT 0 i.I)) eANOo 7777777770DDODOODOOBE TUR'4

110 rEIIP - 43RD %AN4D* O00O)7777777777BISPLIT -S4iI-T(TttiP,30)

IE TU.RN

I~ A2 3

Page 113: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

u3ROUTI'4E L1II

SUBR?)U1I* LIMITS(XtilNXiAXIROJW, I OLNPTSX)

C TH15 SU3RUJrI4E FINDS THE MINIMUM~t A40 MAXIMUHr VALUE OF A 2-0) ARRA-ei

C XMIl4 - MII4I1UM RETURSED HER:C XMtAK - 4AXIhUn RETURNED HEREC X - ARRAY J) VA-UES T) BE SE:A CH-EDC IR3.4 - NI4dzrIR OF kOWS IN ARIAYC IC)- - NUIAER OF~ COLU414S IN4 ARRAY TO BE SEARCtIEDC NOT:: IF I:)L-1 THEN ik 1-Dl 4RIAY CA*4 BE SEAIRC1iEOC 4dPTS - NJH3I3~ JF POINTS IN AIRAY

INTEGER IRtW91COL94PTSlEAL X' 4qX1kXX(lOW,IC)LJ

C INIIALIZE 4lNI4iUt AND MAX14UMI(MN - ((11) -

KMAX - XIINCNO0f START S=EAZC1

DO 1~ J-ltNPTSo1X4N- AHINI(XtIlN9K(JqII)

XIAX - AhAXILXNAX,((JI))10 D'NTIMU=

!E TURNENO

A24

Page 114: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

FUH4CT13H ISPLir

c uNCrJD04 ISPLIT111439MOt)l

INTE'Ek 14)91WDRDITEMP

100 ITEMP - IWJR) *AN4D* 7777 1777770000009000*SI SPLIT - SHIFT( ITE*,P-3 IUETURH

110 ITEMP - IWOJR) AND% 0O000077777777B6ITEfIP - SHIFFIITE4~ 308ISPLIT -SHIFY41TEiF,-30)UETURNEND

A25

Page 115: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

.1IROUTI'4E FNDRE:

suBRJUTI '4E F'IDREC( 4STEP9-U~4,NDtNF)CC THIS SJ3RaJri4E SPACES TAPE FORWARD UN4TIL PROPER TIME STEP IS FUN

INTEGER IBLJF(5) ,NSTEP9LU4D9NFIJC NST=P - T14E STEP WANTEDC LU'4 - LOGICOLL UNIT NU4BERC NO) - 'qJ4d:lP~ OF )IRECTIONSC N4F - NUIBEk OF FkEQUENCIESC IoJ: - IN?LUr BUFFERC I - DIRECTIK INlDEXC J1 - FREaUE4:Y lI DEXCC REA) IN ID IE-C3R)

C 3UFFER 14 (LJN,1) (IBUF(l.),IBUF(5))C $A<= SURE 43 READ ERR3R5

IF (usir(LJN)) 10,998t995C PUL.. OUT PIESENT STEP t4LJIBEI

10 [BUFII) ;-ISPLIT.(ZvI8UF(L))C IS I T TIE RIGHT STEP NUMBER?

IF (JBU=(1) *EO* NSTEP) SO TO 90DC NO* WEL! SA(IP A-.L Tt4E DATA kECORDS THEN

20 30 45 J*LNFI.DO 30 K-19ND91

BJ-FER IN (LUNtl) (IBUF(1),IBUF(l))C MlA<= SUIE 4 READ ERRO DID IOT OCCJZ

IF (LJNIT(LUNJ1) 30,998,99830 CJ'ITINJE'.0 CONT14UE

C N0el READ 14 ID IECORO,3UFFER 14 (LJN,1) (IBUF(1)sIBUF(5))

C CHE'( FJR ZEAD ERRORIF (UNIT(LU4)) 509498t998

C PUL.. OUT CJZRENT STEP NLJMBEI50 J8UF(l) - ISPLIT(2,IBUF(1))

c is THIS RISIT STEP?IF (IBJF(1) oNE* NSTEP) SOTO 20

C ?tUST BE IGIT ?LACE900 ZETLRN998 4RITE(S.'993 LUN999 :ORMAT(3?HD** EIROR 01 EOF READING UNIT91396H 0 #1*

STOPE ND

Ll

A2GI

Page 116: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

li-ROUTI qE GRIOV

iUaR]UTI IE GZD(lvM J~YN0~tDiK4~ ERIC RojrINF TO 3LANK (JUT PLOT IIAGE9 THEN PUT IN AXESC X'IX,XIN- IAX AND M14 X( AXIS VALUESC Yb1XYMX- ~IAX AND M1l Y AXIS VALUESC D)XDDY- K DISTANCE OR Y )ISTANCE BETWEEN PRINTED AXIS VALUESC NKNY- 19, PRINTER SPACES FOR X AND Y AXISC I[ER- ERR)l RETURN C3JDE () INDICATES OK)C

INTEGER 3LAN<gPLUS

+ XMAX, KDINtYlAXYM IN,+ DX9)'V9rIK9NNY9+ XSCALEYSCA.Ei+ ,IXIYIG,IV)ATA BLA'4KNI NUS9P-US9ICiM~10H it.Hvl/IYF(Y)-Y-IIT(YSCALE(YY-YMIN)+.5)LXF(KX)-1&5+XSCALEO(XX-XI!4)

I G-0IV-0

C DO SOME ERR)R CHECKING[F (XMXLEXMN) GO TO 90)KM A X-X ri(MIN2XIII)ELX-X41&K-1I NIF (YM3C.LEaYMN) GO TO 901

fMAIN"YHK)ELY-YMAK-YMIN)X-DDX)Y-DOY

IF (NX.1.o5. .NX*.pT&12)) GO TO 90ZIX-MX+.IF (NY*-.T5OR*NY.%GT,60) GO TO 933

C CLEAR PlINT IMASE

C:0 DETERMINE S:ALE FACT0kS

KSCALE-'4K/DELXYSCkLE-4fi')E-Y

*C CREATE HOkIttliTAL AND VERTI:AL BORDERS

)0121 IA(INV)MINJIMAG~lX)-4PUS

21 0 2MG1. JalNXII X-IXF( KVAL)IIIA6'(IXoIJ-P.US

1 1MAG( IXIYJ-PLUS

30 211 Ju2,NY4

IMAG(IX1)I-IAR

212 IMAG(MX,J)-ICHAR4NY-(DE-Y/DY..OO1)30 21.3 JulNIYIYUIYF(VktIN+J*DY)

213 1 MAC(IX1XIY)-PLUSCNP IF K-0 WITtIIN GRID RAiGE, 0IAW X AXIS

I X-I XF C).)IF (IX...E.1. .0k., IKeGT.'IK) GO TO 2?030 221 J,2,NY

221 [MACC IKJ RICHARA7

Page 117: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

.L3ROUTI'4E GRIDV

C IF Y-0. WIT1II4 GRID RA4GEv DIAW Y AXIS I220 OUNTINU;

IY-IYF(5. IIF(IYeLE.1 e9R, IYGT*NY) GO TO 22?)0i 223 1-29NX

223 IMAG(IIv)-tlhtUS

222 1 G -1

400 4RI T:- (b660)60D =OM (45H * XJA(K<-XMIN* EIROR RETJRN4 FROM GRID.)

I ER -aIIE TUR14

601 :ORMAT ( 5HiP 00 YIIAX(-YMIN# ERROR kETJRN FROM GRID*)

902 4RITE (56D02602 ODRMAT (76Hi 0** * X E(TENT OF GRAPH Too SMALL OR TOO LARGE-.*

+lOR RETJIN Flom1 GR[Do)I E R a3IEIURI4

903 4RITE (6,6D3)603 :ORM4T (7b6H *0 *0 * Y EKTENT OF GRAPH TOO SMALL OR TOO LARGE.

*lOR IETJIN FlomI GRID*)I ER-4tIETURNEND

A28

Page 118: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

UtIROUT1 4E PLOTV

SUBR)UT14E P.JTV(XYNPTSISYMNJUTIER)RourINE TO PLOT VECTO1 Y AGA14ST VECTOR X

)IME.NSI)4 Ki 1) ,YQ)INTEGER 3LANi(,XCHAk

* 4 XMAX,'(nINvY4AX9YhINq

* X5CALEYSCA.Eq1KXMY9IGLV

)ATA BL&4KtX~hAR/l1 91HXI)ATA MIIMJSPLUS9,IC-IAR/-lH',lAIfIXF ( X) 1*.5+X SCALE ( XX-X4'INJI YF (YY) NY-1I YSCALE' V -YMIN J,.5)

IF (IG.=~3) GO TO 900IF (NPTS.LT.) GO TO 90140UTm0

*C PLOT NPTS IF DATA FRO4 X A4) Y ARRAYS)O 100 11,9NPTS

C FIN) X POSITIONKX".IXF(KtI))IF uIX*-f.1 sORo IK*GToMK) GO TO 11.0

C FI4) Y POSITIONIY-IYF(Y( 1)IF (IY,'-r.1 wOR. IY*GT.I1?) GO TO 11.0.OC-IMAG( IXIY)

C IS 'RINT P3511TJ BLA4K OR % -9 +9 OR I?[F ('-0^6EQB-.ANK) SO TO LliIF (LOC.EO.MINUS

4..OR*LOC&:O.P.US*,ORwLOC*EO.I'HAR) SO TO 11l.

C IF SOMETHINp ELSE IN THE PRINT POSITION, REPLACE WITH X

SO TO 133C PUT PLOTTIl3 SYMBOL 14 THIS PR~INT POSITIONill. IMAG(IXIY)-ISYMt

SO TO 1))C COI= HERE I= P01INT OUTSIDE SRI0110 IO3UT-!40Ji.1100 :ONTIN3EC

I V-I.IETURN

C900 4RITE (b9bDO)S00 -OiRNAT (41H1*~ ~* ERRIR IN GRIDV* NO P..OT ORAWN*)

IER-1ZE TURtN

901 4RITE (b,601)601 ;DR4AT (33H 04*** NPTS(1. 40 P-IT DRAWN.)

I ER-2IETUINEND

A23

Page 119: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

jBiuuri4E LABLV

SUBRJUT1 4E LA6lLV(NKCHAR,(LABELNYCIARYLA3ELNCHAR,1ITLENEWPAGEI

c RuiriNE nJ >fdNr CONP-ETED 4'RAPH AND LABELS A40 TI TLEINTEGE BLAN(.OGICAL 4EWPAGE)IMEI4SI)4 KLA8LLIl) ,YLA8ELfl1hTITLE(.)

0immON /1111/ IMAG( h1.,b1) ,

+- XIIAXs, K i N, YlA~(YhI N,t XSCALEYSCA-Et

)ATA MAS <IOO)CODD07? )ODOO0OB/ ,BLANK/l1H f

IXF CXX)nuL. 5+XSCALE tXX-X4IN)IYF(YY)*Y-I4T(YSCALE'(YY-YMIlN)#.5J

IF (IGo.=39O) GO TO 900IF (IV* I 2.)) GO T) 901

CC IF IEDUEST:)t SK(IP TO A NEW PAGE

IF (NEWP&GE) WRITE (6965))bBD ODRM4T (IHIIC SKI '> 3 LINS i AND WRITE PLOT TITLE (IDOCHAR S PER LINE t 10 LINES AXI4CH-,(NClkR*9) /10

dRJTE (660) (TJL..EfI),I-I.,NCH)600 =OM4T fI0l(/,6XwIOAl0))CC C0O3UTE ST41TIMS LINE OF Y 4XIS LABEL10 :D4TINJz

IPZ -MY1

..2'LI+AY'.HARIF (L2,Sr.4YJ LZ-M(

C PR1'4T PLOT IMIAGE, Y AXIS VA..UES, AND Y LABEL

YVAL=YMI '+JYLQL)YJ Y V =IY f VALJI SH=-DI CNT-3IL-I.

C WRIrE PLOT IMAGE7 LINEdiRITE (6i,601) (IMA (IXI 1) ,XwlMX)

C IF 'PPR3PRIATE, CALCULATE AID PRINT Y AXIS VA..LE[F (JYV,;T61Y) GO TU L1.1

C PR14T A Y AKIS VALUE JN THIS LINE4RIT: (69632) YVAL

602 :ORPiAT (IH+?ZXG1Jv4)JYnl-1-VVAL-Yh1I4.JYl*DYJYV=IY-I YVAL)

C IF PPROPRIATE9 WRITE A Ct1AIA'TER OF THE Y LAaEL101 IF (NYClkR.E2.0) G) TO 120

IF (IY*'-ToLl oORe IYoGT...Z) GO TO I00ICNT-IC~r.IIF (IC'IT.GT.IYCHAk) GO T) 10DfL'S-l1FTi YLA3EL (IL) ,ISH)I SHNISi1.6IF (S1..5')GO 10 1.0?I SH-0[L-.IL .1

102 4C4T-NC~r.1(RITE (59S031 YL

603 :ORflAT ILH#',lA1)C100 :DHTINuEtCC CA-:UL4TE '.10 PkINT X AXIS fALLJES

PIRITE (59b34) XIIINA30

Li

Page 120: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SU'3ROUTl'4E LAbLV

604 :O MAT (f1Os~ll4)1 PHT-Z.)O 2D~3 lvN'4X9(X-X'II 4 iI*DXIT-IXF(K)J49IF (IT.,r.IP4T) GO TO 23)IF ([T.~r.124) GO0T 0031 P NT -1IT +I I4RITE (59b05) IT9X'(

b05 :ORM.AT (LH.,F-,Gllo4)200 :ONTIM4JECC WRI TE X LA3E:L

IF (NXClU~.Ea.0) RETURNI Pl-N)(Cikk~/2AIPZI P1.IF (Llo.f1.U LI-I..ZNXCk1lIF (!a.Gr.(MX-Ll)) L2-IIX-Ll4SKP:12'*-lI

4RITE (6#670) NSKP, (XLAS3EL( I),I-1.,L2)

IE TUR~NC900 iIRITE (6,690)690 =UR~iT (%5H- * *~ ERRIR INI GRID&..O PLOT CONSTRUCTED.)

I E R -lIf TU~tN

901 4RITE (b*b91)691 (3o~mA (41-1 0* 00I' ERR)R IN P10Th'. NO PLOT DRAWN.)

I E R- 2I ET UR HN D

A31

Page 121: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

3U3ROUTI'4E PLTRI)

SUBROUTIqE PLTRN) (At B, X, Y)CC SUBROUTI1E TJ FIND "NICE" PLOT B3UNDARIES FOR INTERVAL (At B)CC k - INPJT INTERVAL LOWER MARGIN.C 3 - IN?JT INTERVAL UPPER MARGIN*c K - .OWER PLIT BOU4LARY :Ok THE INTEkYAL.

f - UPPER PLOT BUU4DARY :OR THE INTERVAL.C

3(P) - lNT (ABS () * Z)

IF (ABS (A) oNE, A-3S (B)) GO TO 5K-,,A I

CIETURN

C 4ITH A E B DECIMAL POINTS ALIGNED FIND HIGIEST-ORDERC U4-3UAL DIGIT.

5 1 - 1.3IF (ABS (A) *GE. Z OR* ABS (B) .GE, Z) GO TO 20

10 IF (Q(A) .ME. 03(8) GO T3 22Z - 1 0 10.0.D TO 10

CZD IF (0(h) .EQ. Q(B)) GO T3 2422 1 - z f 10.

;D TO 2)24 Z - 7 0 I0&

C IF OME 3z THE DIGITS IS ) MOVE O4E PLACE RIG.IT.IF (3(A) .ME. O ,.AND, Q(B) *ME. 0) GO TO 32

30 I - Z 0' 100C32 X - AINT IA Z) / Z

IF (A *.-T, 0.0 DA4D. A .ME. X) X - AINT (A 4 Z - 1.0) / ZY - AIMT (B * Z) / IIF (3 o.0g, 0.0 DA4D B ,4E. Y) Y - AINT (B 9 Z 1.0) Z lIF 11X - Y) / (A - B) &r.o 2.0) :O TO 30

I ETURN-ND

A32

Page 122: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

,UROUT41 READS

SU3R)UTI'4E READS ('UN,, IJFFER, NB9 NF)

C SUBRtOUT14E T3 R.EAD SUhMMAlY RECOR)--C SU43 OVER FREQUENCY ANt) DIRECTION*c

ZEAL 6U:;ERNB)

ZEWIND -JS~c SK(IP TO SRECo

JO 1) IaloNF3UFFER Iq (LUNt1) (DUIIDJkN)

IF [UN4IT (LUi)) 10, 50, 50

1D OilTINUEc UEAD SREZ.

3UFF.=R 14 (LJN.1) (BUFFEM.()9BUF:EM(tBJ)

2D O04TINUEIEWIND LJI4

CIE TURH

50 4RITE (591000) LUN1000 :ORMkT (3ZHOO 4 ERROR JR, EOF kEADING UNIr,913,6H1***

STOP

END

A33

Page 123: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

FUNICT!)N4 XINC

:IND '1E::T" nIC INTERVALS.C kOAPTErJ FROM TEKTRONIX P-)T 5D SOFTWARE,

)ATA XNJiNI /10.,

k.AW (X2 - Xl) / XNOINTIEXP -0..iJ) (RAN)S - 10.00IEX)IF tRAW .LT. 1. stirquo 3 sNE9 RAW~) S De 0 5r - RAW f' SIF Cr I.34 .2) GO FU 10IF (ASS CrT - le ) *;T. .0L) 5 - . SSD TO 3)

1D IF CT , GrV. 5.) GD TO 20S 5. 0 S

S0 T3 3D20 s - 10. # s

C i - "N4EAT" TIC INI: RVAL*C %DJUST DATA MiINIMU4I.30 11 XI. f S

K.41 S 0, FL3AT CMI + 2)40 [F (XMIl L:7o Xl) G) TO 5)

Ktil - XIL - S;0 TO 40

C 40JUST )hT4 ?IAXIMUi'150 12 X2 f S

'CM2 S *' FLJAT (M2 - 2)60 IF (X2 ..E. J(I1) G) TO 7)

KN2 - X4'? + S0O T3 6)

C SET VALUE-S T) RETUIN li :ALLING PR)GRAM*

(2 - X42KINCR SI ETIUk~N

END

Aj' 4

Page 124: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

jlJRL)UTI'IE REAL)JS

SUB3RDUT1'4E READJS(-UNSl),NFNGRID)

C THIS SUEIROJT14E READS 1-D SPECTRAL VAL-UES FOR SELECTED STATIONS

C SID - kETJ 4S RESULT )F SU31fBUTINEC BUF=E - rEIPDRi RY INIUI BUFFERC LU4 - LJGI~kL U41IT NUJIBEkC J - FREQUE4:Y DJ LOOP INDEXC L - BUFFL- INDEX

IFAL iUF:ER(501), 519(5))p4F)INTEGER '4FLiJNpI JNGRI9

C SET FILE POINTER AE ENPRCSE

BJFFEl IN (LUNL) (BUFFER(1), BUFFEk(50L))IF (J54IT(LUN)) 10,40,*40

10 03 Z9) 1-19NGIlDt513(1 ,J)-BUFFER( I 1)

20 CO)NTINUE30 C34TINJE

C RES=T FILE ?OINTEREWIND ..JN

IE TUZNC ERRP)R C0.14DITIO3N

'0 4R!TE(6,5J) LUN50 :OR(32HD-41 9 E ROR 01 EOF READING UNIT,13,6H ***

STOP

A3 5

Page 125: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

iUBRUUTIqE P-CURV(PTSMRPH-,XYXNXMXYK N,YMX,+ NCfHkk, TI TLE vNXCHAR9 X'-ABEL 9 Y CH4R,YL ABE-, EWPAGE ,NXN y)

C THIS suiRoiriNE DOES PRINTER PLOTS OF UP Ti ) L CURVES WITH UPC T) 10) P) INTS EACH,CC NPTS - ACTJNL NJMBER JF P014TS PER CURVEC NGRi'H -NJ43E) IF CURVES PEI GRAPHC X - X VALJES TO 8L PLITTEDC Y - EACH CJ..UIN IS A SET OiF Y VALUESC THE NEXT FJJR VNRIABLE-S ARE PASSED PARAMETERS THAT MAY BE CONSThNTS.C IN ?AREN4THESES k.RE THE VARIA[BLE NAMES THAT THIS kOUTINE WILL USE FOkCCALZ-U AT~IJ~.

C XM;4(XMN1') - MINIMUM X VALUEC XMX(XMAX) - MAXIMUM X VALUE:C NOTE: IF XI'4-XMX THENA SEAR:H IS PE4FrJRMED TO FIND X LIMITSC YriN(YM14) - MINIMUM Y VALUEC YIIX(YJIAX) - MAXIMUM V VALUE

CNOT::: IF YMKM THEN A SEAkCH IS PERFORMED TO FIND Y LIMITSC NCJ4AR - N~J13ER JF CHARACTERS IN TIT.EC TIT-.E - ACTJAL TITLE IN CHARACTERSC NXCjR - 4JIB=R OF CHARACTEIS IN X-AXIS LABELC XLA3EL - K-kXIS LABELC NYC-IAR - 4JIBER OF CHARACTEIS IN Y-AXIS LABELC YLA3EL -- YAKIS .ABELC NE4PPAGE - ;A- !-R WRITING k TOP-OF-PAGEC NX - tUM3EI Or PRINTER SPACzS FOR X-AXISC NY - NUIBEI OF PRINTER SPACE:S FOR Y-AXISC,C 00K - DIST44CE BETWEE4 X TI^ MARKSC DDY - DISTAICE BETWEE4 Y T1 MARKSC IS?1 CHA14CTEZS USED TO PLOT CURVESC IEI - ERROR CUDE (0 IS OK)C NO'JF - U43E-R OF : POINTS OUTSIDE OF GRIDC

OGICAL 4EWPkGEINTEGER 4PTSNGRPHNCHA1,NXCHARNYCHiARNK,1Y, ISYH(1O), I ERNOJTREAL X( I)O),V(100,LOIXti4XINXNXKMAXYMVtINYMXYMAXREAL TIT-EIl))sXLAIEL(l) ,YLABEL(1.) DDXDDY

C CA-CULATE LIMITSC DID USER S?cCIFf DOMAIN?

IF (X44 *E~o XMX) ;O TOKNIN - 1

GO T) 4~C NOT USER SPECIFIEQ SO CALCL-ATE

2 :ALL LIliTS( KMINsXiAXNAPrS,1,NPT5,K)C DID USER SP:CIF( RASGc?

4. [F(YIN .EO. YMX) Gi TO &.YNIN - 11YlAX -YMXGO TO 8

C NOT USER S>:CIFIED SO] CALCJ-ATE6 :ALL LIiTS( YMiNYiAXU5),NGRPHNPTSY)

C EN) OF 'ETEING LIMITS8 0IJ

C FI4) TICK MARK INCREMENTS)DX -XI4CR(XMIN9XlAX)*)DY - X14CiR(YMINVIAX)

C GENERATE AKISALL GRI )V(XMAXXMIMYDIAKYMIN.DDXDOYNX'4YIER)

C PLOT CUZVZS)0 10 1 - 1,NGRPHI

CALL 'LOTV(XVtiIhN43TSISYM(I) ,NOUTIEZR)10 ODNT1NJ=

C LABIEL GIAP-f A4D DUMP ;RIOALL LA3.V(NXCHiARKLABELNYCHARVLABE.-LNCHARTI TLENEWPAGEILR)UETUIN-ND

A36

Page 126: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SUBR)UTI IC ZPL[JT(NPTSNGIP-9tYXM'4,XHXYMtvYMXt+ Yl*4C,K14C,

C NC4AR T TL ENXC t&RXLAiEL NYCHARYLAELXA)LN YAXLNXOX1,yt y

C NPh - NU4I3:R op POINTSC NGR2H -NLJ43Cl OF CURVES TI BE GRAPHIEDC X - ARRA~Y 3: X :OORD14ATESC Y - Y COR)INI.TES, EACH CUJLJMN IS A SETC NC-IR - LE'4SiT JF TITLEC TIL.E - TIT..E OF GRAPIC NXCI~ - NJ4t3ER IF CI1AZACTERi IN X-AXIS LABELC XLA3EL - AZIAY IF CHARACTERS, ACTUAL LABEL OF X-AXISC NYCJAR - ' -EiG~TI OF V-kXIS LkBELC YLA3EL - -.A3EL )F Y-AXISCC, THE NEXT FJJR VARIABLES ARE PASSED PARAMETERS THAT MAY BE CONSTANTSoC IN 'ARE'4T4ESES ARE THE VARIBLE NASES THAT THIS ROUTINE WILL USE FO;C CAL:ULATIO45oC XJMl'(X'IlN) - MINIMUMN X VALUEC. XMX(XKAX) - MAXIMUM X VALUEC NOT::: IF XM4-XMK THEN4 SEAR:H IS PERFORMED TO FIND X LIMITSC YM'4iYMIIJ - MINIMUM Y VALUEC YMXIYMAX) - MAXIMUM Y VALUEC NOTE-: IF Y44-YMX THEN A SEiZCH IS PERFORMED TJ FIND Y LIMITScC XOj - INITIAL K VALUE: FOR X-AXISC X1IZ - TIC 'lARK INCREIENT FIR X-AXISC YOka INITIAL Y VALUJE FOR Y-AXISC Y1N4- TIC 'lARK INCREIENT F)R Y-AXISC T -ARRAY JSED FOR SCALE CA_.LSC TX -ARRAY :O .INE CALLS; X VALUESiXOjRGXINCC. TY -ARRAY JSED FUR LINE CALS; Y VALUESYORGYINCC XO -LEFT X C304OINArE- OF GRAPH IN INCESC, Xl -RIGHT ( COJRDINAiE OIF GRAPH IN I4CHESC YO -BOTT31 Y CDORDINATE OF GRAPH 1~4 INCHESC . - TOP Y COOR)INATE OF GRAPH IN 1'4CHESC Tl X 3 FFSzT FIR TITEC TZ - Y OFFSET F2R TIJEC ILEF - INrE;El >ASSED TO LIIE TO SPECIFY PLOTTI14G CHARACTERC

INTEGER 4PhT ,NGRPHiNCHAlvNXCHAR,'4YCHARlEAL XI'dXII 4XMX,(MAXYiNYtINtIKtAXXAXLNYAXLNX~JX1,Y),V1ZEAL XKl;XIA4CqYOR~vYI N TlT2ZEAL X(l),Y(10Qq0,l), TIlKECI)ZEAL XLA3EL(lI, YLAt3&L(lJIFAL T(',), TK(lU2)v TY(1J2)4CHAZ = 4CIAZ - 2

C F14) EXTREI=E VA-UES 1'4 DATA* C

C DID USER SPECIFf DOMAIN?* IF (XM4 ;ED. XMX) SO) TO

X M 1N - )(m IXM~AX-XMK 1GO TI 't

C NOT USER& SPECIFIE0 SO CALCLATE2 :.ALL LIIITS( KMINKMAXti4PTSviNPTSX)

C DIDJ USEI SPbECIFf RANG:?* '4 IF(YMN 6--Q. VilK) GO TO 6

YMIl YM4YMAX -YMX

GO UJ 8C NOT USER SPE-CIFIED SO CALCJ.ATE

C 6 ;ALL Li1iTS(YMINY1AX91l)bNGRPHN4PrSY)CEN) OF GETTING LIMITS

B :ONJINLIEC PREVARE PLOT ROJTINES

:ALL PLOT (1*259O.5,-3)[I C SCA-E VALUES FOR PLOT ROUT14ESKORG-XMi 4

r IF(XINZ.If*0*O) GOfO 10

[(2) XiK A37

LA_

Page 127: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

;u~3UUT4E PLOr

:ALL SCA..EIT ,XAXLN,2,1)XORG =T t3)(INC v 114)

10 -.QT I NU:IF(YINC4C,1.3.0) GCJF(J 12

F(2 ) =YiAX

ALL SCh-.f (I YAXLN9Z,1)

CDRA4 X-AXISG~I:ALL AXI3(X3,YIIl LE,(NXCAR)*XAXLo,999~,lO)~XIC

CDRA4 TOP OF G I)

:ALL AXI StXl.Y0O,~vYAXL1,t9O.oD999.0,1.O)fi-XDo(Xl-XD3/2*D - tHCii4R/14*D)FZ-0.35*rl:ALL SYtIOL(rT2,).O,0TIrLEo.Dg4CNAR)[LET -))O 20 I 1, NPTS, 1

IXCI) XC!)20 CONT1ILJE

rX(NPTS.1) -XORGFX(HPTS+?) -XIIICFY(NPTS+l) - YORGTYtNPTS4Z ) -Y

DI0 3) J -19 NPrS, 1

TY~j) Y(JtI)30 C)'4TINJE

:ALL PLOI(XOYO,3)IC&.L ..ANE(TXTY ,NPTSLI.,[LET)

fl-YI-0.1L5:ALL SYIIOL( xltO.25,YI1,1,ILET,0.),-1)

40 CONT14UE:ALL PLZIF (X)+14*O) ,(YO-),5)9-3)4CHAI =4CIAl + 20kET'JR4

A38

Page 128: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

C. MEAN DIRECTION CONTOUR

This plot is a contour graph of mean direction over the grid that the

wave model operated on. The X and Y axes correspond to X and Y distance on

the grid. The contours are changes in the mean direction of the wave motion.

This program reads from the summary tape, hence only the Final time step can

be plotted. Provision for a title is made. This contour, like the others,

makes use of the subroutine CONTUN.

A

- [A3g9

Page 129: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

INPUT DATA LIST FOR MEAN DIRECTION PLOT

FORMAT VARIABLE DESCRIPTION

IO,7A10 NCHAR,TITLE NCHAR is the number of characters in the title,TITLE is the title of the plot

l10,110 NB,NF NB is number of words of data to read in fromtape, NF is the number of frequencies used inmodel run

110 IOFSET Number of points of data to skip, used to bypassheader info or special points

2110 IGRDX,IGRDY Number of points in grid in X and Y directions,respectively

IlO,3FlO.O MODE,AR(l), Correspond to mode and AR of CONTUN, refer to CONTUNAR(2) ,AR(3)

IlO,FlO.O NDGTS,SIZE Number of decimal places to be printed, size infractions of an inch

IlO.FlO.O NONO,THETA If NONO is negative then plots are not labeled,else plots are labeled, labeling occurs at anangle equal to THETA

2FlO.O SI,SJ Points per inch in Z direction and Y direction,respectively

A40

Page 130: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

VARIABLE LIST FOR MEAN DIRECTION

AR(3) - Real, interval values for CO4TUN

F(20,20) - Real, array of values to be contoured

FSMSK(530) - Real, mask array for CONTUN

BUFFER(2000) - Input buffer for READS

TITLE(7) - Integer, title of plot

FS(18) - Integer mask array for CONTUN

NCHAR - Number of characters for title

NB - Integer, size of buffer

NF - Integer, number of frequencies

IOFSET - Integer number of words to skip

NGRID - Integer, number of grid points

IGRDX - Integer, number of points in X direction

IGRDY - Integer, number of points in Y direction

MODE - Integer, indicates mode for CONTUN

NDGT - Integer number of decimal places to be used on contour labels

SIZE - Real, size of contour labels in parts of an inch

NONO - Integer, if negative contours are not labeled, if positiveor 0 contours are labeled

THETA - Real, angle of rotation for contour labels

SI - Real, number of points per inch in X direction

SJ - Real, number of points per inch in Y direction

IND - Integer, index into BUFFER

XMAX - Real, length of plot in X direction in inches

YMAX - Real, length of box in Y direction in inches

XINDT - Real, how far from box edge to first point in X direction

YINDT - Real, how far from box bottom to first point in Y direction

A41

Page 131: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

Pk OG AM hN

PRUGRAM MN( INPUTtUUTPUTTAPE5-1 NPUTTAPE6-OUTPUTiTAPE,TAPE1I1C '

C AR - INTERVAL VALUES FOR /CONTUN/C F - INPUT ARRAY FOR /CW4TUNI/C FS - MASK ARRAYC FSMSK - MASK ARRAY FOR CONTU4C IGRDX - NUMIBER OF GRID POINTS IN X DIRECTIONC IGROY - NUMBER OF GRID POINTS IN Y DIRECTIONC MOOL - SPECIFIES HIDE FOR /CONTUN/C NONO - FLAG TO TELL /CUNTUN/ WHETHER OR NOT TO LABEL CONTOURSC NDGT - NUMBER OF DIGITS IN CONTOUR LABELC HPTSK - NUMBER OF GRID POINTS TO SKIPC SIZE - HEIGHT OF CONTOUR LABELS AS PART OF AN INCHC SI - NUMBER OF POINTS PER INCH IN X DIRECTIONC SJ - NUMBER OF POINTS PER INCH IN Y DIRECTIONC THETA - ANGLE THAT CONTOUR LABELS ARE ROTATEDC

REAL F(ZO,2O , FSMSK(530),AR(3),BUFFER(2000)INTEGER TITLE(7)gFS(1B)

C READ IN LENGTH OF TITLE AND TITLE OF GRAPHREAD(51OOO) NCHAR,(TITLE(I) ,Ji-lv7)

C GET BUFFER SIZE AND NUMBER OF FREQUENCIESREAD(5,1O10) NBNF

C GET OFFSET -'

READ(5lO10) IOFSETC GET NUMBER OF GRID POINTS

READ(5,1010) NGRIDC GET X AND Y DIMENSIONS OF GRID

READ(591010) IGRDXIGRDYC START GETTING /CONTUN/ INFORMATIONC GET MODE AND AR VALUES

READ(59.020) MODEAR(l) ,AR(2)9AR(3)C GET NUMBER OF DIGITS AND SIZE OF LABELS

READ(5, 1020) 'NDGTSIZEC GET LABELING FLAG AND ANGLE OF ROTATION FOR LABELS

READ(51O20) NONOTHETAREAD(5,1030) SISJ

1000 FORMAT(I10,7A10)1010 FORMAT(811011020 FORMAT(IO,7FIO.O)1030 FORMAT(8FIO.O)

C LOAD BUFFERCALL READSiBUFFERNBNF)

C ZERO OUT MASK ARRAYSDO 98 1-1,15,1

FS(I1-0FSMSK( I )-O,

98 CONTINUEDO 99 I-19,530,1

FSMSK( -0.099 CONTINUE

I NOI OF SET+2*NGRID+1DO 20 J-1,IGRDY,1

DO 10 I-1,1GRDX91F(I,J1AMOD((57296bBUFFER(lND))360-0)IF(F(I, J).GT.180.0)F(IJ)-F(IJ)-360,OIND-IND+

10 CONTINUE20 CONTINUE

C SET UP FOR PLUT ROUTINESC GET DIMENSIONS OF PLOT

XMAX-IGRDX/S IYMAX-IGRDY/SJ

C INITIALIZE THE PLOTTERCALL PLOTS(090,7)

C MOVE PEN AWAY FROM EDGE OFCALL PLOT IO.5tS5-3)

C DRAW BOX AROUND PLOTCALL PLOT (O.OtYMAX92)C ALL PLOT ( XMAX , YMAX92)CALL PLOT(XMAX,.0,21CALL PLOI (OO,0,"2)XINOT-IOI(2*O0*S1

YINDT-I.Q/(Z.O*SJJC SET UP NEW ORIGIN

A42

Page 132: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PRO~kAM HN

CALL PLOTIXINDTtYINDT,-3)C PUT TITLE ON GRAPH

CALL SYIIUUL( O.OYtAX,25 ,TITLEoO.O,1NCHIAR)c DO CONTOUR PLOT FINALLY)IIIIJ

CALL CONTUNi(F ,GRDX,1GROYFSARMOESSJTHETAH0140,S!IF,+ FSMSKNOGT)

CALL PLOT(QO,9999iC DUM1P DATA

WRITE (b,02) IGRDX, IGRtOY302 FOR'IAT(9ii GRID IS ,I's,3H X ,114)

WRITE(b,221,iI THETANDGT,S IZE220~ E-RMAT(7Ht THETA -9F 10*695X 95HNDGT-9 1495Xt 5HS IZE=,9FIO.L)

WRITE(b,230) XMAXYt4AX2 30 FURMAT(131 SIZE OF BGX;,sF1O.693H X ,FI.36))

STOPEND

-A4 3

Page 133: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

irdROLIT INE RE ADS

SURPOUTI'41 REA.DS (LUN, BUFF[Ps N~v NF)CC SUBROUTINF TO READ) SUMMfAR~Y RECORD-C SUMS OVEP FREaUENCY AND DIRECTION*

IUAL BUF'E..R(N3)C

RFWIrU)lD lC SKIP TO SREC.

)n ID 1=101F

CIF (UNIT (LUN)) 109 50, 50

C10 ONTINUE

C ZEAD SRFC,BUFFER IN (LUNv1) (BUFFE (1),BUFFFR(NB))

CIF (UNIT (LU4) ) 20, 50, 50

C20 :ONTINUE

kEWIND LUNC

itE TURNC50 WRITE (b,3.000) LUN1000 P0ORMAlT (32HO4 4 4ERROR OR EOF READING UNIT,136H

CSTOP

CEND

A44

Page 134: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SU3R:)Ur I E C)INTUA = 1 MAXt J'AXjF StA R9MODE* SCALEJ I SCALE J9THE TANONO,1IIZEFSMS(,NJ&T)

C TRACES ZJNMTOURS TIOUGHi %RRAY F(IlIAX#'JMAX) AND PLOTS TllFhC Wl4ITH SCA..EISCtLEJ POI14TS PR. CM. TH-L CONTOURS AREC LABELED At AN A'4GLE THETA WITH TH; X-AXES PROVIDEDL MNO -AN INTEGEI *GE*D. IF NONO.LT.O THE CONTOURS ARE

C NJT LABELED, SIZE IS THE SIZE OF THE LABEL.

c MOD)E - I FASiILY 0: CONTIURS IS TRACED WIT-I INTERVAL-AR(l)oC IIODE -2 FAIILY OF APPR9XIMATELVY AR(l) CJtTOURS IS TRACED WITH

* C A IEASU'448LY C)MPUTED CONTOUR INTERVAL*c MODE w 3 A SINGLE CONTOJR WITH VALUE AR(l) IS TRACED.C MO)E - i AR(l)=II[ERVA-.,AR(2)-uMINAR(3)-NAXC MODE - 5 AR(J.)-4k OF CO'4T)URS, AR(2)#FMAX-MIN9AR(34E:,AX-11AXCC IMAK COINCI)ES WITH TH= PAPER X-AXLS* DIM:ENS ION OF ARRAY IN X DIRC JMAX CDINCI)ES WITH THE- PAPER Y-AXES. DIMENSION OF ARRAY 1IN Y DIR

C FS A4I INTEGER ARIAYS I4JST BE GIVEN DIMENSIONS 1AIMAXOJMAXI31 INC CALLING PIOGRAI.CC N)GT-SI NIFICANCE91F NE.w IS COIPJTED*C 2 S :OPLEME=lT AlUTMETICC EXTEINAL FJMrIJN LAND'IPJS 15 THE BOOLEAN IoEoLOGICALS AND OF TWOc FULLWORO INTEGERS*C EXTEINAL FJN;TION LOR 19J$ IS THE BOOLEAN OR OF TWO FULLWORD INTEGERS.CC SPECIFIC&TIO4 STNTEMENISoCC CHANGE K)S 5.1.73

INTEGER FS(I)11EAL JAY, JAYZROF(IMAX9JlAX))I HENS!) 4 NtASK (31) ,NPT (4,3), AR( 3),AC (5), ALS (5)OIMENSI3N IBE-G('03) ,J6EG(lDO),COD4SV(1OO),NINsv(1OO)INTEGER =SIS((1').DGICAL IALTgLPLOTKLOG..DGICAL KLINGgTHINSDATA NPT#3,4,IZ,2,I,4,3432I1f, FLAG/D/JATA AC/1.25,2.,2. 595.,I.2.I)ATA AL;/@D97,. 3,.398,.7, 1.0/

C FUNZ[ION DE=INITION*;lI9Aq3)-FLOAT([)-A/(B-A)

C S ET PLOTTINX PARAMET~eRI DFS=J1A(*'IMAX

<BEG-1(BE G4X-CSALLI -1./SCALE ICSALEJ-1./SCALFJ

C IF IIUJf.,4E.1) GO TO 604,C JO 6DZ 1-191MAXC ORITE (69603) (F(IJ)gJ'LgJMAX)C b02 ON0TINJE

b 03 =OkMAT(1.i ,2lFbo0)C 604 :04TINJE

IF (IFL&',.E~o5) GO TO 4)0 3 1-1,31

3 lASK(I)a2#*(31-1)CC SET JP LOOP :ONTROLLING SEL.F:TION OF C)NTOURS

'CI F L A5

4 IPAX1-IlkX-1JMAX1-J4%X-1IF (MOD=)E9E3) GO TO 1:KM-AR 0:ONINT=A GZ4C ON 53-1;0 TO 15

10 FIAX-F(l,1)- HIN-FNAKJO 12 I=I,1miMXJO 12 J-1,JMAX

A45S

Page 135: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

"00iT INE CUNTU,4

MIN.AMI41I(F 11NF( IJ) )12 :MAJ-AM K1( f AXtF I IvJ)

IF ( 4 IDz ,i. t5) J L) FL) 12)kRI ?J-A ( 2)0:MAX4RG2*(A3()OFAX)/~1

120 OUNINT;A1G?

C IF ht)D- -2 3SLLC[ A CU04T)UR INTERVA.&LGCNT A0 )( (FjA-FM1) Akr2)4-AL SC4rALGCST-Ai(U)(ALGCNTvl*)IF (ALZ.ZIT.GEo.) ;U TO 184-4-1fkLGC*4T-. *ALa CNT

18 B-ALGCNTA-16 A)0J 19 1I-L,5:wABS(h-;CNT-ALG(I))IF ('*GE&B) SO TO 19

'%-AC( I)19 OUNTINJE

CDETEIM14E NJ~IBER OF CONTOURS AND MINIMIUM VALUE13 IF (rNl.GT.3.1 FMILN-Flq*CON14T

:MIN -CO14NT'A INT (F IS/C 4 INT )IF (FiIAXLT,3.) FIAX-FAX--ONINTFMtAX -C (IiNT4'AINT ( EAX/C ONINT)IF (hOD::.LT.'.) GO TO 11

11 4CONS-lF IAX-FMIrN)/CO'NINT.1.4CONS-41 40(NZONSpit))IF(NCOio3.LE*D) GO TO 70))

C DE~k 4~ JiBER 0FODISITS 14 LABELr

IDGT-D21 IF (ABSI uDO(CONINr*10.*ONDGT,1.)).Lr.OELI GO TO 20

tF (N4DGT.LTeI1) GOJ TIO 21C It4SUkE TLiAr 40 P)INT IS ExArrLY ON A CONTOUR

20 )0 3Z I-iIMAX)0 3a J-1,Jfr4X

32 IF (iaBS(&"C2D(F(IJ),CONINT) J.LT.,:EL) F(l9J)-l.D00DlF(,j)Z.Qf)iC START CON~TOJR PLOTTING

(OtATJR- 316 (ONTJI-(JNTiJR.1

:ON -F MII4+C(NINT *FL )AT (KOIT JR-1)C 4RITE (69620)) CON9;lMlN9CJNlNTvK3,4TJR:620 :f3R~jkr(j. 95X9 C04 ,Fl).'i, FMIN *F10.4t COa4INT ,F1D.4,p KOM

C [JR 918)

14 FSUIP)-)CC BEG14 EDGE SEARCuiC

.PLOT'.* %LSE*JE-0

17 JE-JE.1I RE.T-1

42 3-F IIMAKgJE)-CONZuF (IM4X*J:.IE..-CONIF (:*Do;T.0.) GO TO 22I E - I IAK 1,41N-3EYE-PLOAI (I MAX)JAY-,( JE ,DsC)10 TO 5D

22 IF (JE*'zE.JMAXll G3 TO Ll

23 1EI E 1.I RE 1-2

43 %-F CIE,lI-C('4

A46

Page 136: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

)-F (I E +t1)-CONIF (A#D.3T*Do. GO TO 24

JE -1EYE-Gl'p ,_:AD)JAY-1.GO T3 5)

24i I RE T -341 3'-F(IEvJlAX)-CON

-uFL E*lvJMAX )-CONIF~hocC.GJ.,IGO TO026

J E JiAX IEYE -GA XE 1,1CJ

JAY -FLA3%T(J11AX):;0 TO 5)

26 IF(I-e.'4=91MAX1)GO 10 23C BEVplI1 I4TEUJR SEARCH

I E D27 IE-I + Iii .PLOT=. HUE.

lFFUE.E.lLPLOT-.A_SEvJE-C)

39 JE-JE+.IRET-4

40 &-F(IEvJ:)-C9NI-F(IEqJE 41)-CONIF(A*B.3r.).)GO TO 30

EYE-FLOAI( EJJAY=G( JEAB);0 TO 55

30 IF(JE.'4:&J.IA~()GO TO 39IF(IEo.4= 6IMAX1)GO TO 27IF (K(0'4JI.'E.NCONSeAN0.i(3EG.L1.83)3O TO 16

C PURG= II411A. POINTS BJFFERC SEARKH STOl:E) INITIALP31'4TS 3UFFER FDR ONR CLOSEST TO PRESENT PE.4 P051

[RE T-5(BMX02-(3EGMK/2+1

52(-0~

IF(K.LT,(BMtX02)GO TO 82

(BEG-130 TO 15

82 IRS04-94?99999)0 5b Xd:G-19KBEGMXI[F(I3ES-((8EGl.EQ.D)GO T3 56IRSU=(I-IBEG(KBEG))##2,(J-JBEG(K3EG)V**2IF(IqSO,64E&0)GO TJ 53IF(CON..4EsCO'4SV(KBEzG))GJ TO 53[BEG(KaE3) -0;0 TO 55

53 [F(IRSQo;EsIatSQMN)30 TO 56I RSQIN-I qS3(BEGINs( 3EG

56 DOr4T]NJEC TRAZZ A'4D P..JT CLOSEST STARTING CONTOUR

iF(Kt3EG'44.LE.O.Ok.tOEGIV4.GT. .0))30 TO 4530IE-IBEG( (BEGA1N)JE-J3EG( (BEGIN)

0ON-COMS '( KB:GMN)'4IN-'4I45S (KB=GMNj[8EG(KBE3N4) -0)O 57 41-1,IDFS

IF (NIA*.r.1.JRoNINI.Gr.4) .0 TO 453);0 TO (4)41,4294319NIN

58 IF(J*EQ*3)J-1IFC I.E~o3))I[FL I*EQ*[M&X) I-IIA'(1IF(JE~jJMAXlJ-JMAK130 TO 5?

A47

Page 137: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

ZURVE : 0.LDWI : 3G IN ROUTI 4EC IF hJERE 15 !ODt1 , SAVE THE INITIAL POINT

50 IF(KLIEG. ST61D0)LPL)T-.TitJE.IF(LPLOT)GO TO 59OCNSV( K3:G)=C0NI8EG(K3E;JwI;JBEG(Kdt ) -JE:4INSVM73E)-NIrM(PEGsKBE:4'1

Z [F(KBEG:.uT.l~DWGD TO 450)

IF( kM)( iASK( I BIT),FS( 14JRU) oSE*O) GO TO (?2s24,26v3D)9IRET<LING - *FL3E.

J-JE

C KEY-EYE-lo=KAY-J AY-1.E~KEYCS&.EI0EKEYEKAY-C5A-EJ*EKAYTo10

IF(KL14;) ;D TO MO)IF (LPLJt )CA-.L NUM3ER(EI(EYEKAYSIZECONT'IETAsNDGI

c IF(LPLJF)CAL- S4UMaER( (EY--I.)OCSALE[, (JAY-Le )#CSALEJ,.I05,CONTHiETC 14,N40GTJ1000 :04TINUJE

C IF(LPLOi)CALL PLDT( (EYE-1.)*CSALE:I,(JAY-l.)*CSALEJ,3)IF(LPLOTI CALL PLOT( EiEY9,EKAY,3)

1100 :ONTINUE(LING - *TRUE*-YEZRO-2 ?E5AYZRO-JAY(LOG=.FA..SE,I PE N -2iA LT -.F A- SE.

:URVE :ALL3V%4 ROJTINE60 A-F(1,J)-CON

3-F(I*J'1)-C)N:-F (Iii, J +1-CON)-F (I 1.,J I-C)N

I W'R)-I BL 131.1I BIT=IBI r-3101HOD'-32

JPP'1IF(A0C.oE.a3.)JPP-J>P*1(F(BOo:. E.JPPJPP+ZIF(JPPo=).4)GO TOJ '4

73 4OJT-NPi (NIr4,JPP)JOl 10(72, 749,lb,7ahNDJT

44 IF(A*31)',64b4746 JPP-2

;0 TO 73C 4? (I-1-1r JNI-1-C I pZ 1- +ZC JP2-J4+2C WITE(b,451 IJNINCONC(F( 1Z,JZ),IZ-INll2),JZ-JM1,JP2)Z45 -0RMAT'(23-11E ROR IN CONTJR FOR 1-,12(3H)J-,iZ5HNlN-I1,I2HAN)

C 1ZONTJR=, E18.S// (4E20.8) I47 ;0 IL) 12?vZ4,Zb,39)58)9IIET72 E-YE-FLDAr(I)

JAY=G( J, ftB)

;0o TO B374 :EYEG(1%39C)

JAY-FL341 (JiLlIF( J.EU J MAXl)HALTw,.TRUE,J-J+I;0 TO 8)

A43

Page 138: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

* i.)1 ANt LUN10.J4

76 EYE-FLcJAr(l*1)JAYaS( J, JC)[F (I *EQ. 1 MAX ) HALT.. TRUE.I .I +;0 TO d)

78 EYL-G(I,4901JAY-FL34TtJ)IF(J*ECI. 1HALT.,T;JE*

UD i- IFLL[CL LT( -1.)OCSALEI,(JAY-l.)*CSALEJiIPEN)C

130 :ONTlNuE<LING - &rIUE.u- (AID(4ASK(18IT),:SMSK(IWORD) ).4E.O) KLIN -sFALSE&TH1'4G - *FA-.SE*lF(lP=4.E3,3) TH1'4G - .RuE*IPE~4 - 3IFI(L14;) IPEN - 2IF(THL4;) IPEN - 3

E:KEY-EY" -1E KAY-JAY-i.SK E V 'CSk~- El* EKEY:KAY-C;SkEJ*EKAYIF (LPLJT)CALL PLOT(EKEYq=EKAY9IPt-4)1Ua(LOG.U%DEYEEO.EYEZRJ.AND.JAV.EQ.JAYZR))HALTe TRUE.IF(,1ALT);O 13 901 PE N-i1

(LOG-. R JE.A0 TOJ 63

CURVE ;OLLOW E'I090 lF(NOM3*-r.OJGO TO IDOL.

lF(IPEfl.EO.3) GO T) 1001IF (LPL)[ )CAL. NU,1:ER(EKEYEKAYSlZECONTH-ETANDGT)

C IFHLPLoT)CALL NHiMBER( (EYE-L.)#CS&L~lofJAY-I.)4CSALEJ,.105,CONTHETC 149NDGT)1001 D.4TINUE

:;D 101ZZ2?.,2b, 30,58), I1:.4.500 4RITE(5,q.5)1)N1NK3EGKBEGNXK, ZEJEKONTUiCONKBEGIN4.501 :DRMAT( i IN-,115/5tIKBEG-, 115/7HRBGMX,15/He(.,I53HItIl5f

*3HJE-,1 15/7H<ONTURuI15/41CNvE2)./ 7HKBEGiV4, 115//)

U TO 1570U0 ARITE(5,7OD1)7001 :ORI1T(H1l/5K,**RR)R-NEGP.T1VE N4O, OF CONTOJRS"/lH.)

E TURNEND

AD~

Page 139: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

D. E/EPM CONTOUR PLOTTING PROGRAM

This program produces a contour plot of E/EPM. The boundaries aredistance in the X and Y direction. The region corresponds to the gridthe wave model uses.The box that is draun around the contour should reflectthe boundaries of the seztion of the ocean that the model is running in.

The program starts out by reading in preliminary information aboutgrid size, CONTUN values, etc. READS is then called to load the bufferwith grid point data. Next, a pair of arrays that CONTUN needs are zeroedout. F is then loaded with the correct values. Just prior to callingCONTUN the reg-.n is boxed in and the title is placed on it. After CONTUNthe last plot buffer is dumped and then the data that was read in is writtenout for verification purposes.

By changing primarily one line of code this program can be altered soit displays SIGNIFICANT WAVE HEIGHT. After the E/EPM code and plot is aaltered listing and example plot.

AS0

Page 140: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

INPUT DATA LIST FOR E/EPM CONTOUR PLOTTING PROGRAM

FORMAT VARIABLE DESCRIPTIONI1O,7A10 NCHAR.TITLE number of characters in titletitle of plot110 NB number of words to be read in at a time110 NF n umber of frequencies2110 IGRDXIGRDY number of grid points in x direction, in y direction2110 NPTSK.IOFSET number of grid point values to skip, number of

values prior to first grid point valueI103F10.5 MODE.AR mode flag, limit values2F10.5 SI,SJ number,"of points per inch; in x direction, y directionI10,FI0.5 NONO,THETA label flag, if NONO-0 then no labels else labe*. s

are Oresent on each contour; angle of rotationin degrees of label

110,F10.5 NDGT,SIZE number of decimal places to appear in labels,size in inches of label(vertical height: of char)

A51

Page 141: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

I7

VARIABLE LIST FOR E/EPM CONTOUR PLOTTING PROGRAM

EPM/60522.0/ - value used to normalize energyNCHAR - number of characters in titleTITLE - title of plotNB - number of words to be read in, size of buffer (NF - number of frequenciesIGRDX - number of grid points in x directionIGRDY - number of grid points in Y directionNPTSK - number of grid point values to skipIOFSET - number of words of information prior to the first grid point valueMODE - mode flag for CONTUN (see CONTUN for more info)AR - limits for CONTUNSI - number of points to plotted per inch in X directionSJ - number of points to be plotted per inch in the Y directionNONO - label flag; if NONO=0 then contours are not labeled else contours

are labeled, ITHETA - angle of rotation in degrees of label

NDGT - number of digits to left of decimal point to be put on each labelSIZE - size in inches of label (vertical height of numbers)BUFFER - input buffer, used to hold SREC values before they are put in FFS - mask array for CONTUN, must be zeroed outFSMSK - mask array for CONTUM, must be zeroed outIND - used as index into BUFFER

J- do loop indexI - do loop indexF - array used by CONTUN for plotting information, loaded with altered

valuts from BUFFERXMAX - length of X axis In inches

YMX - length of Y axis in inchesXINDT - x coordinate of new originY1NDT - Y coordinate of new origin

i

1

A52

Page 142: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

I

READS- this subroutine reads an SREC

PARAMETERS-

LUN - logical unit number, device number of tape with SRECBUFFER - input buffer that is to receive the SREC data

NB - number of words to be read inNF - number of frequencies

LOCAL VARIABLES-

I - do loop indexDUN - temp location used to read int6 while skipping over records

TEXT-

This subroutine spaces :the tape forward to the SREC and then loadsit into BUFFER. The number of words read in depends on NB,

A53

Page 143: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

Pp cpt HEPM

c -POGt AM FPM N l'PUTjTPLTTAPE5 I NPUTTAPE 6-OUTPUTITAP:I= 19TAPE71

C AR- INTERVAL VALUE S FOR /CO4TUN'/C F INPUT AQCZAY FOR< /COtiTUN/C FREU - ARRAY OiF FkCOUENCIESC FS - MIASK ARRAYC FSMSK - MASK( ARR'%Y FUR CONTU'4C IGRDX - NUIP.EP OF GRID POINTS IN X OIRFCTIONC 1GROD' - NUNM37P OF GRIO POINTS IN Y DIRECTIONC MOW- - SPEC IFl ILS H'ODE FOR /CONTU.i/C NDGT - NUHBE OFr DIGITS IN CWITOUP. LAEF.LC NF - NUJMBER OF FREUUENCIESC NONE) FLAG TV TELL ICJNTUNI/ WHETHER. Ok NOT TO LAfAEL CONTOURSC NPTSK -NUMBIFR OF GRID POINTS TO SKIPC SI - NUMIBER OIF POINTS PER INCH IN X DIRECTIONC SJ - NUN4iEP. OF POINTS PER INCH IN Y DIRECTIONC SIZE -HEIGHT OlF CONTOJR LABELS AS PART OF AN JNCHC THETA -ANGLE THAT CONTOUR LABELS ARE ROTATED

7.EAL F(2 1920) ,BUFFER(1511)REAL AR(3),5I ,SJqTHETA9SIZEREAL FSMSK(53D) ,XrAXYMAXXINDTYINDTINTEGER XBNFIGRDKIGRDYIOFSETN4PTSKMODEFS( 18),TITLE(7)DATA EPM/6052.OI

C READ IN LENGTH OF TITLE AND TITLE OF GRAPH

C GET SIZE OF BUFFERREAD(5,IMlO) Nb

C GET NUMIBER OF FRUENCIESREAO(5,1310) NF

C GET X AND Y DIMENSIONS OF GRIDREAD(59101lf) IGkOXIGRDY

C GET NUIBER OF GRID POINTS TO SKIP AND IOPSETRFAD(5,1l010) MPTSK9, UFSET

C GET MODE ArID AR VALUESkEAD(5v102O) MODEARIl) ,ARI2) ,AR(3)

C POINTS PE~R INCHREAD(5,lD3V) SlvSJ

C GET LABELING FLAG AND ANGLE 3F ROTATION FOR LABELSUEAD(5sl.020l SONOTHETA

C 5ET NUIBER OF DIGITS AND SIZE OF LABELSREAD(5].t)2D) tID)GTS IZE

1000 FORIIAT(1O,7AI.0)1010 FOPrIAT(8110)1020 FDRM1AT(1I lr"7F 1O.()1030 ORNlPAT(3F~''))

C -CAD fBUF:ERCALL RLADSI1,BUFFEkNBNF)

FSMSK( I)=Dr;98 CONT14IUE

)O 99 1=19v53091FSHSK( I )-0.).

99 OM0TINLJEC ADJUST BUFFE1k INUEX

IND -IOFSET + NPTSK +I1C L.ArAOF

DO V', JuI,[G, OY,lDO ID' 1=1,IGPDX91

r(I,J)-BUFFER(IND)/EPMI N) - I ND + 1

10 CONTINUEC GET DIMENSIONS OF PLOT

XMAX-IGRDX/SIYMAXwIGR)Y/SJ

C INITIALIZE THE PLOTTERCALL PLOTSU1,0,7)

C 'iOVr PENI AWAY FJRO. EDGE OF PAPER:ALL PLOr(0*5,0o59-3)

C DRAW BOK AROJND PLOT'ALL PLOTCO0,0YMAX,2)CALL PLO.T(XMA)~,YMAXt2?CALL PLOT(XHAX,0)CALL PLOT(0.*),0*0,?)

C SET UP NEW ORIGIN

A54

Page 144: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

VINDT=1. )/(2.0OSJ)CALL PLOT (XlNDTvYI4DT9-3)

C PUT TITLF ON GRAP14'ALL SYMflOL(9.CYMAX.0.25,TITLE ,3,tNCHA'R)

c )f) CONTOUJR PLOT rINALLY1)JI)CALL COATUM(F IlGRDXIG.D~'FSARiOOESliSJ, TIIETANONO,4DSIZE,+ FSMSKNDGT)

CALL PLOT(090,999)C )UMP DATA

WRITE (62?*) THETAtNDGTSIZE220 FORtMAT(74 THETA-,F10.6,5SC,5HNDGT-, 1't,5X,511$J IZE-,f1'I.6)

pRITE(6,230) XMAXymt~x230 FORMAT(13H SIZE OF 8OX:,Fl0#b,3H X ,F1Oob)

WRITE(6,300) MB300 'ORtMAT(4H NB-,I't)

IRITE16,301) N4F301 FORMAT(44 NF',I'.)

WRITE(6,302) IGRDXIGRDY302 :ORtIAT(9-I GRID IS #1403H X *14)

STOPEND

Page 145: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

i',RO0TI~r[ READS

SUEIRUUTIlF READJS (LUN, BUFFER., N5, NF)CC SUBP.OUTINF TO P.[AD SUMMARY RECORD-C

IE AL BUFrFR(N3)

R EWIND) LUN .C SKIP TO Sk[Cw

BUFFER 14 (LUNvl) (DUMDJH)C

IF (UNIT (LUN)) 10, 50, 50

13 'ONTINUrC READ SRfC.

BUFFER IS (LJN-,1) CBUFFE (1),BUFFFR(NB))

C

20 :ONTINUEIEWIND LUN

CRETURN

C -

5(0 WRITE (6,1000) LUN1000 ;ORMAT (32H0*Q ERROR OR FOF READING UNIr,13,6H **Q

C .

STOPC

END

A56 (

Page 146: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SUiR3UIlE C)NTUM(: ,IMAX, JMAXFSAkMODES:ALEI ,SCALEJTiIETANONHs1SIZEqFSM3<9N)GT)

CC [RACES CJHTOURS THZU~UGH %RRAY F(IIIAX*JMAX) ANDO PLOTS THEMC WAITH SCA..ElSCkLEJ rO14TS PR, CM. TliE CONTOURS AREc LABELED Ar AN &'IG-E THIETA WITH] TH;I X--AXES PROVIDEDC NDNJ -AN INTEGEI o*GE.D. IF NON.LI.r THE CONTOURS ARE

C ~NJT LABELED. SIZE IS THE SIZE OF TKE LABEL.C

MOD -~) I FAIILY [P CONTIURS IS TRACED WITA JINTERYAL-AR(1).c MODE - ? FA4ILY OF : APPRXIMATE Y AR(l) C014-IOURS IS TRACfED WlitI

t:A lEASO4&6tLY CIMPUTEO CONTOUR INTERVAL.C MOE 3 A SINGLE CONTDJR WITH VALUE ARII) IS TRACED.C MO)E - k, AR(l)-INI4ERVA..,AR(2)=MINAR(3)-MAY'C MOKU - 5 AR(l)-.4k OF C04T3URS-9 AR(2)OFMAX-=i)NA()FMAtX- AX

C IMAX CDINZI)ES Wfihi THE PAPER X-AXES. DIMENSION OF ARRAY IN X DIP,L JMAX CDINCIJES WITHi THlE PAPER Y-AXES* DIMENSION4 OF ARRAY IN Y DIRCC FS A,4 INTEGER ARIAYS MUjST BE GIVEN DIMENSION4S JAIIAXOJMAXI31 INC CA~LLING PIOGRA1.Lc N)GI-SI;NIFLCANCEvIF NEJ. IS COMPJTED*C 2 S :OMPLEi'T Al.IT1ETIC,C EXTEtNAL FJNIEN LAND 1,JS 13 THE BOOLEAN I.Esi-OGICALS AND 01: TWEOC FULLWORD INTEGCERS*C EXTEtNAL FJN:TION LOR IJS I i3 THE BOOLEAN OR OF TWO FULLWORD INTEGERts.CC SPECLFIC&TIO4 STkTE1ENT'S9CC :HANSE K)S 5.1.73

INTEGER FSUl)lEAL JAY, JAYZRO ,FI1rAX, JIAX))1IME413~4 hIASK (31) ,NPT(4,3),AR(3),AC(5)sALG(i)DlIIENSI)N 18:G( 10) ,JBEG(IO)gL'O.ISV(100)-PNINSV(100)

.. OGICAL iAL TLPLDI,KLOG..OGILAL KLINGtTHIN:;DATA NPrI3,',,1,2,2,1,s,93,4,3,2,1f, FLAG/D/)ATA AC/I..2592. ,2*595*,i0.IJATA AL;f*D97 ,.3,.398,.?, 1.0/

C FUN~rION DE!INITION.;(Ikq3-F LOAT( 1)-Al0 -A I

C SET PLOTTIN3 PARAMET~e~[DFS=J~ikK*IMAXIDFS-10 '51S31+1ARG2-Al( l)(BEG-i(BE G4X-)CSALE 1-lo*/SCALE ICSALEJ-1./SCALEJ

C IF (IOJTs-*Eel) GO TO 60',C 30 602 I11I1AXC OfRITE 16,603) (F(I*J)gJ-1,JMAX)C 602 :ONTINJE

b'O63 OVqMAT(l-4 ,2IFCt.OC 601# O'4TINJr

IF (IFLAG-.EO.5) GO TO 4.)O 3 1-l-,31

3 IASK(1)-Z*0(31-1)

C SET JP LOOP :ONTROLLIN4 SELE:TION OF CJNTOURS'C

I FLAG=54 IMAX1I14%-1

J MAX 1 J '19X-1IF EMaOEE) GD TO 10:MIN=ARV?D0I41NT ,AIG?

4CONS-1;o TO 15

:MIN-FMAK)o 12 I.1qIuIAX)O 12 JuLgJIAX

A57

Page 147: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

-,UUTIS4E CONTU4 ~ I~NF

1 MAX-AKAl(1AqFIq)IF I MOD:, EsE5 ) GO TO lei%R( 3)-k=A )*MAAR( 2) Al(2)*FMAX

kRAZ-(Ak3)-ARC 2))(A:'(l1

IF0 4ODi'-T;AL C A GU 10 13 INTERVAL.

4-ALSCIALGCCT-hiO')(ALGCNT,1IF (AL :4T.Gz.o.) SO TO. 18

&LGC4T-1. *ALGCNT18 B-ALGCHT

)a 19 I2195:-ABSIA-;CNT-ALG(I))IF ('.GEs.) O TL) 19

A-AC( I)19 ODNTINU=

C DETEIINE NJ418ER OF C0~4TOURS AND MINIMUM VALUE13 IF (:MI~sGTo3o) FMIN-FM['d+CONIN'T

ZM1N,,CO4I.4T*AINT(F4I.4/CO4INT)IF (FMAXoLTe2.J FtAX-FMA(-'ONINTFMAX-CO'4INT*AINT(F4iA"fCO4INT) iIF (flO)E.LT.4) GO TO 11

FMAX-AMI4l(FIIAXqAR(3fl11 4CDNS-(F 1AX-FMIN)/CO.t1T~1.

4CONS-4I 40( MCON&9~43IF(NCO4SLE.D) GO TO 703)

C DETEIMINE' NJIBER OF'DISIfS 14 LABEL15 )EL-i.E-t,*CO4INT

IFCN)GSToGEvO) GO T) 20

21 IF (ABS(kMOD(CONIN1#1O**NDGT,1.)),LT.DEL) GO TO 20

IF (NDGI.LTo11) GO TO 21C INSU E FIAT 40 P3INT IS EXACTLY ON A CONTOUR

20 )0 32 I1,IM&X)0 32 J-1,JMIAX

32 IF (&%BS(A.4hiO(F(IJ),C0N1Tfl.L1.)EL) F] IJ)-l0OO0ODl*F(Iqj)4?*oDE'C START CONTOJR PLOTTING

(ONTJR=316 (ONTJI-=ONTUR+l

:ON-FMI4tCONlNT*FL)AT((O4TjR-l)C iPRITE (6t620') CON,;MIr4C9HINT9K34TUR:620 :ORM4T(li 95X9 C0~4 ,Fl)&4, FMIN 9F1O.49 CONINT sF1O.49 KOMC IJR 1I8)

14 FS(rIP)in)C BEG14 EDGE SEARCHC

-.PLOT-.F %LSE.JE-0

17 JE-JE+1IRE 1-1

42 )-F(111A(,JE)-CDN

[F (z~.T0)GO TO ?2[ E- IIAKI4IN-3EYE-F LOAF[ ( IMAX)JAY-G(JEDC)SD TO 53

22 IF (JE*.IE.JIAXI) G) TO 17I E 0

23 t E 1IIRET-Z

43 %-F(IE9i)-CO4

A58

Page 148: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

JLJTII~E CONTUJ4

IF (A4D,;T6DON GO rO Zit

EYE-SC IE AD)JAY-01.GO1 T) 5)

24 IR E T= 341 3-F(IUJIAXI-C0N

IF(boC.G[.,1.)GO TO Zb

JE- JIAKIEYE-SC IE BC)JAY 'F.3kT(JiIAX)SO TO 5)

26 IF(IE.o4E.oIMAXi)GO TO 23C BEV,14 I4TE [)k S[AKRC8

I E aD

-PLOT=. HUE.IF CIE. E2.1) LPLDV-- A-SE*JE-O

39 JE-JE+.I RET-4

40 ftk-F(IE9JE)-CDN3-F( IE,JftI)-CO'IF(A*8i.sr.3.)Go TO 30

EYE-FLOATC E)JAY-G( JE AB)1O TO 55

30 IF(JE*4=.JM1AX1)C) 1039[FUIE.4 E.IM1)G0 O 27IF (K0 4TJI..ME.NCOrS.AND.(3EG.LT. B))SO TO 16

C PURGE INITIK.. POINTS BJFFERC SEARKH STORE) It4ITIALP)I14TS 3UFFER F3R ONR CLOSEST TO PRESENT PEN 110S

(BE G4X-6 EG-1.[RE T-5(B NX 02- <3 EGM K/24-1

52 <-KiiIF(KoLTo(BMX02)G) rO 82

SRETUIN IF C...- CONTOURS ARE PA.TTEDIFCKONI Jl.GE. NC OSS) RE TUR4(BEG-.SO TO 15

82 IRsotiu9~99999)0 56 KB::G-1,KBEGMK!F(I3E'uiBEGJ.EQ.)G0 T3 5bIRSU-(1-[BEG(KBEG))#'*2+(J-JBEG(K3EG3)**2IF(I'ISQ*.4E.0IGO TO 53IFfCON.IE9CO45V(KBE:G))G) TO 53IBEG(KaE;)-OSO TO 55

53 IF(IRSo.;E*IiZSUHN)SU TO 5bI RS04,41 RSJ(BEG!IN-( 3EG

56 :ONTINJEC TRACE AND P-IT CLOSEST STARTING CONTOUR

I(K8EG4.LE.0OG.(B&GMI.GI. l0)SO TO 45DOIE-IBEG (BEGIN)JE-J3EG( (BEGINI

IBEGMK-E ;iNI-Cl)U 57 4-lI9DFS

57 :S()p)IF(N4.rl.)~i~NGr.3;OTO 4503

SO TO ('.),',l424'3J9NIN58 IF(J.Erj.D)J-1

L SO To 5?Z A59 --

Page 149: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

kt*UTI.\4[- COtiTJ4I.

ZURVE IOLLOW 3:GIN ROLI14EC IF 1-IERE IS iOfIM , SAVE THE INITIAL POINT

50 IF(KEG,;.1DQ)n'PL5T-.T JE.IF(LP'LUT)GO TO 59:aNsv( K3:G)=CONIDEG(K3E )-I-JBEG(KdziE) -JzEI INS ~ ((3:G ) = INi(flEG-Kf1E :I.

- F(KtBEG.T 01O'[U TO 450O)

I Ua3ZA-IBI T/31+1

MF AN4)(iASK(IBJT),FS(I$)f&D)).NE.0)GO TO (?2sZ'.,26,30)qIRLT<LING - .FALSE.

I -I EJ-JE

2 KEY-EYE -1.2 KAY-JAi-.2 KEY-CS A- El 2 KE"2 KAY-C S AE J * K AIF(NDNO*-r.0)Gl TO 1000[F(KLI'4;I O TO 11)0IF (LPLir)A-.L tU3ER(EKYEKAY,5lZECa,TH1ETA, NDGT)[F(LPL~r)CL-.. N;tE3ERC(EY2-I.)*CSALEI,( f9AY-L.)*CSALEJ,.I05CNTB[I

c 14NOGT)1000 O:dIIl4J2

c IFLPLOi)CAL. PLfT((EYE-1.)*CSALEI,'1(JAY-L.J*CSALEJ,3)IF (LPLaJijCALL PLUT(EKEYtEKAY,3)

1100 :ONTIMU=

(LIN' - n TRUE*EYEZRO-EYEJAYlRLI=JkY(L 0G-.F S E*I P EN -IA LT -. F A -SE.

:URVE -ALLJVI'45 ROJTINE60 4-F(IJ)-CON

3-Ft(I j4L)-C)N:-F( l+19J+l)-CON)-F (1.1 j )-CIN

I WOk)-1BIT/3141I8IT18BIr-310IHOR032FS(IdO.1))- OR(FS(1vEORD) ,iASK(lII))JPP-1LF(A*CaGE.D.)JPP-J>P '1I F ( 8 D Do)) jpp-j P?+2MiFPPeE)'i)&O TO 44

73 40JT-NPr(NIN,JPP);o TD(72, 14,7b,7BhNOUT

44 IF(A*3)q46q4b4746 JPP-2

;0 TO 73C 47 IMI-1-1

C IP2='1+Zc JP2=J+Zc WIITE(b,'.5) lJNINCON,((F(IZJZ),IZJlNlI?2),JZJM1,JP2)

45' :OKAT(23.I1EIROR IN CONTJR FOR InsI2(3H)J-9 [295HOIN-v 1,121,AN

47 :!0 TU (2i,249Z6,33,58),IlET7? EYEr-FLOArUl

JAY-CC J, AB)IF( JeE3&l. I J T' .. RJE*

74 :EG13C

JAY-FL)Ar (J+I) 1IF( i. ELIJ NAXI) H,,LT .T RuE%

AO TO 8)

AGO {

Page 150: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

:(J14IE CONTJ*4

76 EYE-FLkTI#1UJAY=S( Jv 3C)I F (I *EQ. I MAXI )tlALrw. TRUE,

IF(J.E0.LJATsTZE

C 80 IFLLTC LT;;(EEI. 1SAL2IAYI.4CS-1.*ALEJIPENi)

(LING - OflU~e[F(ANO(DIASK(IBIiT),:SMSK(WOR)) ). E.O) KLIN #F/,LSE,TH14G - .FA SE,MIFP:fl&EQJ.3) TiH4G -' *TRUE*

IPEN : 3IF(KLIIS) IPEN aIF(1TH11) IPEN n 3

EKEY-EY"E -1E:KAY-JAi-I.EKEY-CS4-.EI*@EKEYE KAY- CS A-EJOEKAYiF (LPL~r) CALL PL0I(EKEY,9'(AYs1PK:4)IF( KLOGa %N0.EYE EQo EEZR5. AND JAY. E: GoJAYR) KkLT-.T 11UE*IF(t$ALT)ZO 1) 90I PEN-14IH-'4Pr( 4OUTI)CLOG-. TJE*;0 TO 6D

CURVE ;OLLOH E'4D90 IF(NODN)..T*0)GO TO ID)OL

IF(PE4,=Q.3) GO T) 1.001IF (LPL3r)CAL. NUi3ER(EKEtE)AYSIZECONTHET&itNDGT)

C, IF(LPLOr)CALL NU~bLPEg( (EYE-I* ) CS ALEI1,( JAY-La 14CSAlEj,.105iCO-49Tifc 142NOGTJ1001 O.'T4=J

GO TO(Zi24v~b%3Gt58),Il:T4500 4RITE (6, '5)l)NI Nt3EGKBZ GMiK, IEJEKOt4TLIkCONKBEGMN4501 ZORMTt4INa.,I15/5tiKBEGu, I15/?Hi(BEGMX-',15/2HK',I15/3HI[-,J15/

*3HJEinI 1/7KONTUiZll5/41CONvE2).S/ 7HKBEGM14, 115//)(BEG-].'U TO 15

7000 4RITE(5,70D1)7001 =O~TIl59ERRNf~V 40, OF CQNTOLJRS'/ltil)

If TURN4END

A6 1

Page 151: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PROGRAM SW

FPROGRAM SH( INPUTiflUTPUTTAPE5-INPUTTAPEu.DUTPUTTAPEI.1TAP[,7)C AR -INTERVAL VALUES FOR /CO4TUN/C F INPUT AkZAY FOR /C)NTUN/C FRED - ARRAY OF FREQUENCIESC FS - MASK AlkAYC FSMS( - MASK ARRAY FOR CONTU4C IGRDK -NU~cIER OF GRID POINTS IN X DIRECTIONC IGROY - NU14BEP OF GRID POINTS IN Y DIRECTIONC MiODE -SPECIFIES MIODE FOR /CONTUN/C NOGY NUMBEZ OF DIGITS IN C3NTOUR LABELC NF - NUMBER 3F FREQUENCIESC NONO -FLAG TO TELL /CONTUN/ WHETHER OR NOT TO LABEL CONTOURSC NPTSK -NUMBER, OF GRID POINTS TO SKIPC SI - NUMIBER 5F POINTS PER INCH IN X DIRECTIONC SJ - NUMBER OF POINTS PER INCH IN Y DIRECTIONC SIZE -HEIG4T OF CONTOOR LABELS AS PART OF AN INCHC THETA -ANGLE THAT CONTOUR LABELS ARE ROTATED

ZEAL BUF:ER(1511)REAL F(19925)AEAL AR(3)qSISJT-IETASIZEZEAL XMAK ,Y11X9XINDT9YP4DTINTEGER ;SMSK((18)INTEGER 4BNFIGRDXIGRDYIOFSETNPTSKMODEFS( 18) ,TITLE(7) -

C REA) IN LENGTH- OF TITLE AND TITLE OF GRAPH

ifRITE(b,306) TITLE306 FORM1AT(74 TITLE:q/,1H 91DA1O)

C :;ET SIZE OF BUFFERkEAD(591310) NB9RITE(b,300) NB

300 FORMAT('.I NB-9',i')C ;ET NUIB=R OF FRUE*4CIES

kEAD(5,151()) NFp4RITE(b,301) NF

301 :ORMAT(4,1 NF-,I'.)C ;ET X A40O Y )IriENSIONS OF GRID

ZEAD(5,101O3 IGRDX,1GROYrIRITE (b,302) IGROX, 1GROY

302 FORMAT(9.1 GRID IS 914934I X 914)C ;ET NUMBER OF GRID POINTS TO SKIP AND IOFSET

IEAD(5,1610) NPTSK, IOFSETC GET MODE AND AR VA,.UES

1EAD(5,J3ZO) MODE,AR( 1) AR (2),AR(3iWRITE(b,305) tiODEvAR

305 =ORJ~i4T(bj M0DE-,11O5Xt3-iAR=,3(FIO&5,5X))C IOINTS P=R 14CH

C GET LABELINS FLAG AND ANGLE 3F ROTATION FOR LABELSIEAD(5,132OI NONOtTHETA

C GET NUMBFR OF DIGITS AND SIZE OF LABELSlEADt5,1O2O3 NDGTS IZEWRITE (6, 220) TH-ETANDGTSIZE

220 :ORMAT(71 THETA'.,F1O.6,5X,5HNDGT., I4,5X,5HSIZEgFLD.6)IEAD(5,1)30) XMAXYMAXORITE(b,23) XMAXYMAX

Z30 FORMAT(13H SIZE OF BOX:vclO*693H X ,F1O*6)IEAD(5,1C)30) X INDTvYINDTWRITE (b,31T) XINDTtYINDT

304 FORMATt7i XI MDT-,Fl0*591)X,6HYINDTFl0*5)1000 FORMAT(I1097410)1010 FORtiAT(8I111020 FORMAT( I LO7F 10.0)1030 PORIIAT(BF1O.0)

C -C.AD BUF:Ek'.ALL REAOS(loBUFFERiNB94FJ)0 9d 1-1,1891

F S( I ) =0FSMSK( I )-0

98 CONT1'4UFC ADJUST BJfVEZ INDEK

IND -I19FSET + NPTSK + 1oo lflD F-1,IGRDY91 A62

nn in rirar~

Page 152: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PROGRAM SW

2> F( I ,J -Q.0lo4SQRT(3JFFER(IND))1-4) - IND0 + 1

10 CONTI 4UEC ;ET DIMESSIOqIS OF PLOTC INITIALIZE THE PLOTTER

CA LL PL3TS(O,§,7)C 4IOVE PEN AwAY FROMI EDGE )F PAPER

'ALL PLJF (C0590959-3)C 5RAW BOKi AROJND PL)T

CALL PLOT (0.,qYMAX,2): ALL PL ) 1(XMAXqYMAK ,2):ALL PLOT (XMAXO.O,2):ALL PL)F (Co.,O.O,2)

C SET UP Ac:W ORIGIN'ALL PL)T( XI NOTYI 4DT,-3)

C PUT TITLE ON GRAPH:ALL SY4I3OL( O.oYMAXD0Z5,TITLEOoONCHAR)

C )0 CONTOJR. PLOT FINALLY])]])CALL C0ITUN(F, IGRDXIGROYFSARMOESSJTH-ETANONOSIZL,+ FSMSKvNDGT)

CALL PLJT(09O,999)STOPEND

A6 3

Page 153: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

E. PEAK FREQUENCY CONTOUR PLOTTING PROGRAM

This program produces a contour plot of peak frequency over a rectaii-

gular region. The boundaries as marked by a box that this program draws

around the contour are lengths. The box is supposed to be the griddedarea produced by the wave model. As of now the program will handle a20 x 20 grid.

The program begins by reading in some preliminary information. READJSis then called to load SID with the raw data values. Next the programdraws the box and titles it. The next section of the program is aroutine to determine the peak frequency. If the peak is not an endpoint then the point nearest the peak, and the two around it are used todetermine a new peak frequency. Afteir-this the program zeroes outsome mask arrays for CONTUN and then it calls CONTIN. Just prior tocalling CONTIUN the input is written. out for verification purposes.

A64

Page 154: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

INPUr DATA LIST FOR PEAK FREQUENCY CONTOUR PLOTTING PROGRAM

FO RMAT VARIABLE DESCRIPTION

110 NDU non-dimensional unit flag; if NDU-1 thennon-dimensional units will be used, elsedimensional units will be used

110, 7A10 NCHAR,TITLE number of characters in title, title of plot110, 7FI0.5,/,(8FI0.5) NF,FREQ number of frequencies,followed by

NF frequency values110 NPTSK number of grid points to skip2110 IGRDX,IGRDY numberof grid points, in x direction, Y dire:LionI10,3F10.5 MODE,AR mode flagand limit values for CONTUNI10,F10.5 NONO,THETA label flag, if NONO0 then contours are not:

labeled else they are labeled; angle of ro-tation for label

l1O,FIO.5 NDGT,SIZE number of decimal places to be used for labels;height of digits in label in inches

2F10.5 SI,SJ number of points to be plotted per inch, xdirection, y direction

A65

Page 155: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

LIST OF VARIABLES USED IN PEAK FREQUENCY CONTOUR PLOTTING PROGRAMI

NDU - non-dimensional units flag, if NDU=1 then non-dimensional units areused else dimensional units are retained

LFPM - number used to normalize frequencyNCIAR - number of characters in titleTITLE - title of plotNF - number of frequenciesFREQ - list of actual frequency values

NPTSK - number of grid point values to skipIGRDX - number of grid points in x directionIGRDY - number of grid points in Y directionMODE - mode flag for CONTUN (see CONTUN for more info)AR - limit values for CONTUN (see CONTUN for more info)NONO - labeling flag, if NONOO then contours are not labeled, if NONO0

then contours are labeledTHETA - angle of rotation of contour labelsNDGT - number of digits to left of decimal point to be displayed on contour

labelsSIZE - vertical height of digits of contour labels

S1 - number of points plotted per inch in X directionSJ - number of points plotted per inch in Y directionNGRID - number of points to be transferred into SIDSID - array I-D spectrum valuesIND - index into SIDXMAX - length of x axis in inchesYMAX - length of Y axis in inchesXINDT - x coordinate of new origin

YINDT - y coordinate of new originL - do loop indexK - do loop indexSM - used to hold the SID value that seems to be the largestJM - the index of the largest value

Xl - frequency at point prior to peakYl - SID value at point prior to peakX2 - frequency at peakY2 - SID value at peakX3-- frequency at point just past peakY3 - SID value just after peakDENOM - denominator of expression used to calculate peak frequency

F - array used by CONTUN to do contour plot, filled with frequency valuesat each grid point

XNUM-. numerator of curve fit equationFS - mask array used by CONTUN4, must be zeroed outFSMSF - mask array used by CONIUN, must be zeroed out

A66..

Page 156: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

READJS- this subroutine reads a JSREC

PARAITERS-

LUN - logical unit number of file containg JSRECSID - array to be loaded with 1-D spectra valuesNF - number of frequenciesNGRID - number of values to be loaded into SID

LOCAL VARIABLES-

J - do loop indexBUFFER - input buffer

I - do loop index

TEXT-

This subroutine loads the 1-D spectra values into SID and leavesthe tape containing the JSREC rewound to beginning of file.

A67

Page 157: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PiZO~kk1 PKFRCJN LPkl)&RAI >KFRCOON( IN>JTsOUFP UTTAP 5a INPUT,TAPEb-OUTPUT,9TAPE7,

TAPE 1K1)CC 1-415 PROGRAM DOES CcP4TOUR PLOTS OF PEAK( FREUJEN'CY OVER THE WHOLE GRIlmCC TITLE - TIT-: OF GRAPHC NCHk! - MU13E-R OF CHARACTERS IN TITLEC NF - NUMBER 3F FREOUENCIESC IGR).X - SUMA=R OF GRID POINTS IN X DIRECTIONC IGR9( - NU13:R OF GRID POINTS IN Y DIRECTIONC NPTSK - NJ'I3tR OF GRID POINTS TO SKIPC MODE - SPECI: IES MODE FOR /C)NTUN/C AR - INTER;ZA,. VA:.UES FJR /CO'4TUN/C SI - NUMBER JF POINTS PER IN4.H IN X DIRECTIONC SJ - NUMB~ER JF POINTS PER INCH IN Y DIRECTIONC THETA~ -- N&. THAT CONTOUR L4BELS ARE ROTATED OTORC N40NO FLAG iO TELL /CDNTUN/ WHETHER-OR NOT TO LABEL CNORC SIZE HEIGIr OF CONTOJR LAB=LS AS PkRT OF AN INCHC N401 NUMBERZ OF DIGITS IN C5NTOUR LABELC SID - - SP:ECTR.JM VALJESC FREG ARRAY OF FREQUE4CIESC F - INPUT ARZAY FOR /CDNTUN/C FSMS( - MAS( ARRAY FOR CONTU4CFS - MASK ARRAY i

ZEAL 5101 500,20)sFREOL2O) ,F120,2 ),FSMSK(530),AR(3)INTEGER :5(18)9 TITLEMl

CREAD IN .EiN4~ OF TITLE AND TITLE OF GRAPH i)ATA LFPI/D06374/AEAD(5,10) 1400I(NDU 0=06 1) GOTO 5

5 :ONTINUE [READ(591)00) NCHAR, hITLEl I),1,17,1)

1000 =ORMAT(I10,741O)lEhD (5,1.010) NGRI)

C ;ET AUJiP3ER OF FREQJENCIES AND LIST OF FREQJENCIESIEAD(5,IOD) SF, (FREQII) ,I-1,NFtl)

-100 =OkMhT(Il0v7F309O,/,(8FlD00)* ET NU48:R OF GRID POINTS5 TO SKIP

IEAD(5,15DO) NPTS( <C IET X A4D Y )IMENSIONS Q= GRID

IEADI 5,1010) IGRDX, 1GROY1010 :ORM.IT(8110)

C START G::TTI14' ICONTUNI/ INFORMATIONjC ;ET M031 AND APPROPRIATE AR VALUES

IEAD(5,LD20) MOOEvAR( 1),AR(2)9AR(3)1020 2ORMAT( IlD,7F-10.0

C GET -ABEL1.15 F..AG AND ANGLE 3F ROTATION FOR LA3ELSIEAD(5vt3ZD) NONO, THETAET 4UI3ER OF DIGIFS AND SIZE OF LABELSIEAD(5, 1520) NDGT,S IZEZACULATE_ 4UIBFR 0: P014rS NEEDED FROM TAPE1EAD(5,I230) SI1,5J

1030 :ORMAT(8:10O)c GET 1-D SPECTRUM

:ALL REk)JS(lv,510,4FvNGlID)C ECIDE g'i-ERE TO START AT IN 1-D SPECTRUM L

IND0 - 1. NPTSKC SET UP F3R P.O1 ROUTINESC INITIALIZE TAE PLOTTER

:ALL PLOrS(0,0,7)C OVE PSI AWAY FRO1 EDGE 3F PAPER

^ALL PLOT (Do5sO.5,-3)C PET DIM2.4SIONS OF PLOT

KMAiX=I GR)X/S IYMAX-I GR )Y/S

C )RAW BOX AROJND PLJT:ALL PLOT(0.0,YMAX92):ALL PL3r(XMAXtYMAX92):ALL PLOT(IXM(AX9,39,2):ALL PL3T(OoD0092,)

C SET UP 4EW ORIGINKINDT=1. 0/1 2. 0*51fINDT=1.0/1 2. 04S J)A6

Page 158: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

*PROGghMPKFRC)N ),NHM

:ALL~~~~ REiL(aqy~q 25LJE NC U SHAR

)O 50 L-LgIGRDYslDO 53 K=1,IGkOX,1

C SET JP FOR FINDING PEAKSI-SIOC IND,1)J 4 -11)? )F SEARC-i LOOP0) 13 J-2,NF,1

IS THERE ti NEW IAX?IF(SM.GE.SlD(IN),Jj) Goro l0

JI-J

10 C314TINUEC S EE IF PEAK IS AT JHE OF TAE ENDS

IFi (JMNE.1).AND.(JM.NE.NF)) GOTO 20c IT WA~S AN ENDPO14T

F(KtLI -FRE.( JMJ ILFPMGOTD 40

20 C34TINUEC GET PEAK AND FREO )N EACH SIDE

XL-FRE3( aM-1)YI.=S lotINDv,-1)Xl uFREQ CJH)Yl-SLD( INDjJX3 mFRE3 Cjh4l)Y3=SlD( INDJl.1)

c DETERNINE DENOMINATORDE 1OM-.K*Y3-X3#YZ+K3*Yl-Xl*Y3,Xl*YZ-K29YI.

C I.' DENHINAJOR ZE43?IF (DENOM *N::. 0,D) GOTO 3)

C )ENOI WAS 5, SO :URVE FIT CAN NOT 3E DONEF(KtL)'.FR:EOCjti)/LFPM

;DTO 40'C J AJEAL) WIll CALCJLATIONS

30 CP4TINUEX.1J~MY2*X3'OX3-Y3*X2X+Y3QK1*Xl-Yl*X3*X3.y14'XZ*X2-Y?*X1Qx1F((9Li=(-XNUl/C 40E-NOMJ)LFPM

40 J34TINUEI MD- IN)*1.

50 :04l17NU=C IERO LEJi MAS< ARRAYWS

)O 9d [-1,1811

FSMSK( [)-).098 C3NTI'IUE

)0 99 1-19053091FSMSK( 1)-3.0

99 :ONTINJE)U4P DATh4RITEI6,Z0D)MF,(FRO( I) ,I-1,NF,1)

ZOO :ORMAT(41~ THE9139151t FREQUENCIES tRE;9/vCr1Ob,2X))4RlTE(69205) NPISK

205 :URMAT(l 11*915H PODINTS SKIPPED)4RITE (6,110) IGRDX, 1GROY

210 :ORMATM~ R[D IS ,1493-4 X 914)1. R[TE(bvZ15) f(JDEqt&RCIJAhR(2) ,AR(3l215 ZORMAT(Si MODEasI2,5X,1)IAR VALUE-S:9/q(F1.0.b,2X))

4RITE (6,Z2 TIIETAqNDGT,5 hr220 ':OMAT1 71 1HE TA-,F10.6,59C,5ItNDGT-,14,5X,5iHSIZE-,I1Dob)

ZZ5 =ORMATI 7.4 NJMBER OF PO14TS PER INk'H:9F7o493H X 917*,)4RITE (b923D) XMAXvYMAX

23U !ORMAT(I3A4 SIZE OF B0X:9,13,b,3H X ,FIoob)C )0J C9]NTaJR P-OT FINALLYMM1J

:ALL CJITJ!4( * I9GRDVIGRD)vFSARMODESiSJIIIETAsNO1NOSI7ZI,:SMSK9NDGT)

:ALL PLIr(O,)99993STOPE ND

[ A6 9

Page 159: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

~-~&Jr~EREAL)Ji

iuaR)UI I 'E READJS(-USlJ ,tF ,NGRID)

C TIS SUBRjrIl4E READS 1-D SOECTRAL VA..UES FUR~ SELECTED STATIONS

C 510 - RETJR4S RESULT )F SU31OUTINESBUF:Ek - TE1PORARY INPUT BUrFER

C LUA~ - LJII&L U'41T NUJIBERJI - FREZ)U:4CY 0) LOUP INDEXL - (BUFFE i N)EK

4EAL BJF:ER(5O1J, S10(503,94F)INTEGEk 4F ,LJN IJ ,NGRI)

CSET FILE ?OINTEIkEWlIND UJN

C DO JNTIL A- FREQUENCIES HAVE BEEN ?R3CESSEU)0 35 J-Lq NF, 1

BUFFEI IN (LUN91) (tdUcFER(l)v BUFFER(5lJ)IF IJ411L.UN)) 10940'00

10 DO 20 1=19NGAD91SIO( IJ)-aUFFER(I*1)

20 CONTINUE30 C0'4TINUE

C RESET FILE -v0INTERREWIMD UNMIE TURN

C ERIR CONDoITION40O dRIrE:(b,50) -UN50 rDR1AT(32HD * EZROR 01 EOF READING UNIT913,6H **4

STOPEND

A70

Page 160: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SU3k)UT14E C)NTU4( ,IMAX, JAXFSAk.,NOi),SZALE[ ,SCALEJTETAPlONrgD1S IZE FSrIS<,N3GT)

CC TRACES CJNTOURS THIOUGH %RRAY F(IMAX**JMAX) AND PLOTS THEMC WlITH SCA..EIqSCLEJ 'OI'4TS PR, CM&. THE CONTOURS AREC LhBELED AT AN &4IGLE TIETA WITH TH:E X-AXES PROVIDEDC NONJ -AN INTEGEI *GEoDa IF NONo.LT.D THE CONTOURS ARE

c N3T LABELE-D. SIZE IS THE SIZE OF THE LABEL.,CC MO.)E - I FA'1LY 0: CONTJURS IS TRACED WITI INTERVAL-ARC 1).C MOD;_ - FA4IILY 0:: APPR)XII1ATE'.( ARML CONTOJURS IS TRACED WITHC A IEASU~44BLY CJMPUTED CONTOUR INTERVAL*C IIODE = 3 A SINGLE CONTOJR WITH VALUE AR~i.) IS TRACED*C MO0)E - '.AR(l)-I,4TERVA-,AR(2)-rtINAR(3)-MAX

C MODE - 5 ARID)-Sk OF C041)URS9 AR(2)*FMAX-MINAP(33*FIAXI AX

C IMAK COINC13ES WITH THE PAPER X-AXES. DIMENSION OF ARRAY IN X DIRC JMAX COINCI)ES WITH THE PAPER Y-AXES& DIMENSION OF ARRAY IN Y [ilkCC FS A4 INTEGER ARIAYS MUJST BE GIVEN DIMENSIONS 1AIMAXOJIIAX/31 INC CALLING PUJGRA41.CC N)GT.SI;NIFICANCEvIF NE* IS COMPJTED&C 2 S :Ot1PLE'lEIT Al.ITMETICC EXTEINAL FJmrI)N LAND IJS IS THE BOOLEAN I.EsLUGICALS AND OF TWIOC FUhLLWORD INTEGERS.,C EXTE4L FJN:TION LOR [9J$ Ii THE BOOLEAN OR OF TWO FULLWORO INTEGFRSaCC SPECIFICATIO4 STkTEflENTS,CC :H0ANE (35 5&1.73

INTEGER FS1I)UEAL JAY, JAYlRO9F( IMAtJAX))!MENSI14 PiASK(31) ,NPT(4, 3)AR(3)vAC(5JALG(5)DIIIENSIJN [BE GI ILE) JBEG(I.00),CO4SV(100),NINsv(100)INTEGER :S4S<(11).OGICAL -iATiLPLOTKLOGJIGICAL (LIN~,.THIN;5ATA NPT/3,'t,1,2,2,L,4,3,4,3,2,l(, FLAG/O/

C FUN:UION OE=INITION*

C SET PLOTTIN.- PARArIETE .S.I DFS-JM&K [MA K

ARGZ-A .( )(BLG-1(BE G1X-3CSALE[-1,/SCALEILSALEJ-1. /SCALEJ

* C IF (IUJT,8E.1.) GO TO 60'.C 30 b6iZ Im1,IAX%* C RITE (69603) (F(I9JhqJ.LJMAX)C 604- :04TINJEZ 6 03 :ORMAT(li p2IFbsO)C 604 O0ITINJE

IF (IFLAG.E~o5) GO TO 4,)O 3 1-1931

C 3 IASKII)'2*@(31-I)

C SET JP L30OP DN4TROLLING SELE:TIUN OF CJNTOURSC

- ~ 4 IMAX1-14X-1

IF (elIJoENE,,3) G0 TO I0:MIN.Ak;2ZOr4[NT-AIG24C ON S-1I ;a TO 15

10i :MAX-Fi1,1)

)a 12 1-191MAX3 30 12 J-19JMAX

A71

Page 161: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

K(IUTINE CUNTU'4

12 :MAX(.Ak(l(FIAXiF(19 J))IF flOE.NE.5) GO TO 12)

4R(Z)-AlJ Z)*FMAX

120 ;ONb4T-klG?IF (ntO)EH~E*2) GO TU 13

zIF 4)0DE -Z SELECr A COI~TJUR INTERVA4LkLGCNT-A--OG1)(CFMAX-FM14)/ARGZ)1- ALSA4LGCNT= Ai A(LGCNT,1I.IF (AL:;qT.G=E.O.) SO TO 18

hLGC'JT -I. +AL CNT18 B-ALGCNT

k-I.3U 19 1-195:-ABS(A-;CNT-ALG(l ))IF (r',GEBI O TO 193-CA-AC( I)

19 :OXTINUz

C DETEIMINE NJI$8ER OF CONTUIRS AND MtINIMUM VALUE13 IF (zM4oGTo3,) FMIN.F144CONIN4T

IF (FMAXLI.*I.) FMX-FIA-CONI4TF?1AXuCO'4INT4*AlNT(F1AX/CO'41NT)IF (IO):ELT*'*) GO TO 11

ZMIN-AttAiC hF INAR C ) )FHkX-AMI41AFIIAXsAR(3) )

11 4CONS-IFiAX-FMIH)/'ONINT.1.4CONS-4I 40(MCONS,43)IF(NCO045,LE.*) GO TO 70))

C DETEIMI4z NJiBER OF'DISITS 14 LABEL15 )EL-i.E-4*HCOINT

IF(IGToGEe0) GO T) 204DGT-D

21 IF (ABstAHoo(CONiNr*10.*9NDGT,1i,).Lr.OEL) GO TO 204lOST -1)Sf5 I 1IF (NOGr.LI*11) GO TO 21.

:INSUIE TIAT 40 P)INT IS EXACTLY ON A CONTOUR20 )0 32 I-1IIMAX

)O 32 J-1*JMAX32 IF (ABsgA4cD(tF(I9J) ,CONIIT)).LT.)EL) F(1,J)-1.OOOOO1*F(19i.1?.00D1-L

C STAZT CONTOJR oPLOTTING(ONTJR-3

16 (ONTJl=()NTUR+l0-FlI4tCNINT*FL)AT(K(O4TJR-1)

C rRITE (69620)) CON,9!iIH9C9NINTqK)NTJRZ620 ODRMtT( i- 95X9 C0OI ,F 1 a 4 FMIN %F10949 CONINT 9F 10*.'e , P4 T

CIJR .181

14 FS(rP)-)

C BE614 EUGE SEARCrf

-PLDT-.FLSE*JE-0

17 JE-JE.1I RET-1

42 )-F(IMtAICJE)-CON:-F CIPIAK, J:*1)-CONIF (-*O.;T;.. GO TO 22

~4I N-3EYE-FLOAT (IMAX)JAY'&C JE909C)SO TO 53

22 IF (JE.'4E.oJMAX1, C,3 TO 171 E- 0

23 IE - IE +IRE T-2

A72

Page 162: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

KltJT14E CUNTLJ4

)-F (IE 19 1)-ONIF (AOD,;ToIol 6 O 24.

JEl1EYE-'( IEAtD)JAY-10GO T3 5)

2 4 1 R ET -3'41 3-F(IEJiAX)-CON

:-F( IE.I.,JMAX)-COr4[FUB*CG[.D.)GO TO 26

JE- J4A(I:YE-G( IE,BvC)JAY -Fl.54T(JMAX)SO) TO 5)

26 [F(IE~dE.1I1AXl)GO TO 23C IBEG1 I-4TEM1R SEARCH

IE-D27 LE-JE:+l

. PLOT-. TIUE.IF(IE9E31.)LPLOT-*A_SE*JE-0

39 JEwJE4I.IRET-.

4.0 4uF(IE*J::)-CON3-Ff1E,Jf'1)-CONIF(A*B,.Sr,3,IGO TO 304IN-1EYE-FLOAT( E)JAY-G( JE ,AB)SO TO 55~

30 LF(JEo4:sJiiAX1)GO TO 39IFIIE.'4bIMAX1)GO TO 27IF (KODfJI.NE.NCONS.ANO.IEG.LT. BD)SO TO 1.6

C PURGE INITI1... POINTS BjFFER.C SEARiH STDI:E) INITIALP314TS 3UFFER FOR ONR CLOSEST TO PRESENT PEN POST

IRET-5(BMX02=(3EGMX/21(-D

52 (-iKilIF(KsLT,(B4tXO2)GO TO082

C RETUIN IF A.....- CONTOURS ARE P..OTTEOI F( KJNTJleGE. NCONS) RETJR'4(BEG-130 TO 16

82 IRSO-999939)0 55 KB:Gu1,KBEGMKIF(I3EG(iBEGl.EQ.0)GO T3 56IRSQ=(I-IBEG(KBEG))##24(J-JBEG(I(3EG))**2IF(IqSU9.4EoOlGO TO 53IF(C0Ne4E*COMSV(KBEG))G3 TO 53I BEG(KaE 3) -;0 TO 55

53 IF(lRSQ,;EIRSQMN)3O TO 56I RSU44i-I S;(8EGIN-( 3EG

56 :ONTINJEC TRACE AM4D P-..T CLOSEST STARTING CONTOUR

I FlKBEGII.LE.O OR. (8EGMi4.GT. IO)SO'P TO q5)0IE-IBEG( 4BEGAiN)JE-J3EG( (B:GiN)CON-LOr4SVMU(BGMNJq1N-qf4S1(KB:GMNjI BEG(KBE ,tl) -0

57 :5(flP)-)JFflN,...T~i.JReNJN*GT.4) 30 TO 45DD;0 TO C'),",1,2,43),NIN

IF( I.EU6 ))1-1IF(I .EU. I MAX) I- IPAQ~IF (J&EQJ AX) J-JMA(1;o TO 52

Q'j. ___A73

Page 163: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

:;JUTI.4dE CONTJ4.

:UPVE =OtLJW 3EGIN ROUTI[4EC IF TjEREE IS i00tM , SAVE THE [NIT-IAL POINT

50 IF tKBEGw;TolD0)LPLJT-.T JE.IF(LPLOr)GO TO 59,3N5V( K3zG)-CONI BEG( K3E & I-IE'4NSV((3E:G)-.41N(BEG-K3E &+lIF(KBEG.GT.lD(iIGD TO1 450)4

59 lb I -1 E .1 AX, ( ,E-1 i-l

1I3T-lirI-3101WORDt32MF &N)LIASKtIBIT),FS(Id)RD)).NE.0)GO TO l2Z,24,2630),IR:T /(LING - oFALSE*IF(ANDI 1&SK(IBlT)t-SMSK(IWGRD)).'4E.0) KLIA4 -*TRUE#I - I EJ-JE

c:EKEY=EYE-l.EKAY",JAY-1.rKEY-CSh_.EI#EKEYE KAY -CS A -E JeEKAYiF(MNO..T.0)GO TO 1000IF(KLI'4S) 'O TO 11)0IF (LPLJI )CA-k NuM3ER(EKE:YEKAYSIlECONPiETANDGT)

C IF (LPLJU)C&L. SMaER( (EYE-I. i*CSALEI,(JAY-I. )*CSALEJ,.105,L:ONtfE.Tc 1&,t4OGT)1000 :O4TIl4Li

c IF(LPLO)CL'. PLOT((EYE-L)CCSALE:I,(JAY-1)O'SALEJ,3)IF (LPLJT)CALL PLOr(EKEY9:KAY93)

1100 :OSTIMUE<LING = *TkLE*:YELRO-EVE5AY1RO-JAY(LOG-. F &.SE*I PENwZIA LI -. F ASE.

:URVE ZALLIVIgS ROJTINE60 4'F(IJ)-CON

3-Fl! ,J*1)-CJN)-FI 1+1,J+)-CNI BIT -I1 1 AX*( J-1)-.I NOR) -131 T/31+1

:S(~d~J =(J(FSCIrIRO),0ASK(IBIM)JPP-1IFfIA0C .'E ). IJPP->IFU8*)a.vz0 ))JPPJPP+2IF(JPPE).'.)GO TJ ',q

71 AUJT-NPfr(NiIR,JPP)I;0 T07Z, 74,7bt78),NOUT

4-4 [F(A0B)k,6,46,,746 JPP-Z

;0 TO 73C 47 [ll-I

C JMI.'J-.C IPZ-I+Zc JPZ-J+Zc WIITE(694,) IJNINCON,( (F(IZJZI ,IZmIN1,IZ) ,JZ'.JMIJPZ)

45 ;O1.AT(23jlEkROR IN CONTJR FOR I,23)-IHIl-Id~btIc L:ONTJR-, E18o3// (4E2O.8))

4? ;0 IL) (2 ZZ4926933,58)9I1ET72! :EYEFL0JArm

JAY-G( J, ABIF I .F~. )IA..T-9TRJEeI - -1;0 To 33

74 :-YEC(It3tCljAY-FL)AT (J~j)I FIJ. EU. JMAXI IHALTS *TRUE.J-JI50 TO 8)

t A74

Page 164: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

IjUT14E CONTUJ4

76 EYE-FLOATr(1*1)JAY. S (J, ),C)IF( I.E 0. ItAXI.)HALT-. TRUE.

08; TO 0 l)78 YE-GI194D)3AY-FL34r(J)[F (J.E 0. .) HALT-.lJE.

L 80 IF(LPLOr)CALL PLOTI(EYE-1. )*CSALEI ,(JAY-1. )*CSALEJJIPEN)C

80 :ONTINJE<LING = *1ZUE.IF (A4D(4SK(IBIT):SMSKCIWORD, 1.IE.O) KLINC -.FALSE.THIN4G - .FALSE.[F(IPcEO9E03) TH1I4G - *TRUE.IPEN ; 3IF(i(L14;) IPEN -2IF(THI'4;) IPEN - 3EKEY-EYIE-l.:KAY-JA V-i.EI(EY-CS4..EI*EKEYEKAYwCS4-.EJ*EKAYiF (LPLIr)CALL PLOT(ED(EY, EKAYIPE.()IF(KLOGoNDEYE*EQ 0EYEZR).ANDJAY.EG.JAYZR))HALT-.TRUE&IF(HALT)Z;O T3 90[PEN-141N-4PT( IOUT,1)(LOG-. TJE.;0 TO 63

CURVE ;OLLOW E4D90 IF(NON)...I.O)GO TO ID0L

IF(IPE'4.o:Q3) GO T) 1001IF (LPL~riCAL- NUM3ER(EKEVEKAYSIZECONTHETANDGT)

C IFLPLor)CALL NUME~ER( (EYE-I.)OCSALEI,(JAY-I..A4CSALEJ,.105,CO4,THETC 1.,I4DGY)1001 :ONT4lU=

;;O TOI 2i,24s2b,30958) , H:r4500 'RITE (5, 5)lJNlNK3EGKBE7GIXK, IEJEKONTU~,CON ,KBEGMN4501 :ORMAT(41.4IN..,I15/5HKBEG., 115/7HiBEGMX-,115/2HK-,II5/31IlE-,115/

03HJE-,I11,/7HKONTUR=115/4ICDN-,E2).B/ 7HKBEGM4-, 115/I)(BEG-iGO TO 15

7000 4RITE(S,7001)7001 =O4TIl5tERI-ER V N.40 OF CONTOJ)RS1 1/lHl)

IE TURNEND

A75

Page 165: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

- aJ

F. AVERAGE FREQUENCY CONTOUR PLOTTING PROGRAM

This program produces a contour plot of average frequency with the

X and Y directions representing distance. The plot is enclosed in a boxand titled. The box is supposed to correspond to boundaries of the oceanthat we are modeling. This program is presently set up to handle up to

a 20 x 20 grid point region. It presently gets its information for onlythe final time step out of the SREC.

The program starts out reading in preliminary information. BUFFER

is then loaded with the data to be put in the contour array. Some arrays

that CONTUN needs are zeroed out. F is then loaded with ncr-!3lized

average frequency values. The box and title are then drawn as the paper

is prepared for the contour plot. Next CONTUN is called to do the actual

contour plot. Afterwords the values that were read in are written out

in an attempt to let me know what data was input to the program.

A7

I

l A76

Page 166: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

INPUT LIST FOR AVERAGE FREQUENCY CONTOUR PLOTTING PROGRAM

FORMAT VARIABLES DESCRIPTION

110 NDU non-dimensional units flag; if NDU=I thenaverage frequency is normalized else av.freq. values are left unchanged

I10,7AI0 NCIIAR,TITLE number of characters in title, title of plot110 NB size of buffer110 NF number of frequencies2110 IGRDX, IGRDY number of grid points in X direction, in Y direction2110 NPTSK,IOFSET Number-'of grid points to ship,number of words

of information prior to first grid point valueI10,3F10.5 MODE,AR mode flag for CONTUN, limits for CONTUN2F10.5 SI,SJ points per inch, x direction, y directionI10,F1O.5 NONO,THETA if NONOs0 then contours are not labeled else

contours are labeled; angle of. rotation of labelI1O,F1O.7 NDGT,SIZE number of decimal places to be printed in labels,

size in inches of label

[ A7 7

Page 167: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

VARIABLE LIST FOR AVERAGE FREQUENCY CONTOUR PLOTTING PROGRAM

NDU - non-dimensional units flag, if NDU=l then the average frequencyvalues are divided by LFPM to make frequency non-dimensionalif NDUjl then the average frequency values are left as they areread in

LFPM -/0.06374/ value that is divided into frequency to make it non-dimensional

NCHAR - number of characters in titleTITLE - title of plotNB - number of words to be read in at a time, size of bufferNF number of frequenciesIGRDX - number of grid points in x directionIGRDY - number of grid points in y directionNPTSK - number of grid point values to skip in buffer

IOFSET - number of values at beginning of buffer that precede first gridpoint value

MODE - tells CONTUN what plotting mode to use (see CONTUN for more info)

AR - up to 3 values to be used as limits for CONTUNSI - number of points per inch to be plotted in X directionSJ - number of points per inch to be plotted in Y directionNONO - labeling flag; if NONO=0 then contours are not labeled, if NONO#0 ..

then contours are labeledTHETA - angle of rotation of contour labelsNDGT - number of decimal places used in labelsSIZE - size in inches of labelsBUFFER - input buffer, temporarily holds data from tape before it is put

into F to be plottedFS - array required by CONTUN, must be set to 0FS1N3K - an array required by CONTUN, must be set to 0IND - index into BUFFER, starts out as 1+IOFSET+NPTSKXMAX - length of X axis in InchesYN.AX - length of Y axis in inchesXINDT - new x coordinate for originYINDT - new Y coordinate for origin

A78 "

Page 168: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

READS- this subroutine reads aii SREC

PARAMETERS-

LUIN - logical tunit number, device number of tape with SRECBUFFER - input buffer that is to receive the SREC dataNB - number of words to be read inNF - number of frequencies

LOCAL VARIABLES-

I - do loop indexDUM - temp location used to read into while skipping over records

TEXT-

This subroutine spaces the tape forwiard to the SREC and then loadsit into BUFFER. The number of words read in depends on NB.

[[A7 9

Page 169: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PROGRAM AVFQ

PROGRAM AVFQ(INPUTOUTPUTTAPE5-INPUTgTAPEb-OUTPUTTAPE1,TAPE7C 1,C THIS ROUTINE PLOTS AVERAGE FREQUENCY FROM CYCLE TAPE DATA.CC AR - INTERVAL VALUES FOR /CO4TUN/C F - INPUT ARRAY FOR /CONTUN/C FS - MASK ARRAYC FSMSK - MASK AkRAY FOR CONTU4C IGRDX - NUMBER OF GRID POINTS IN X DIRECTIONC IGRDY - NUMBER OF GRID POINTS IN Y OIRFCTION IC MODE - SPECIFIES MODE FOR ICONTUN/C NDGT - NUMBFR OF DIGITS IN CONTOUR LABELC NF - NUMBER OF FREQUENCIESC NONO FLAG TO TELL /CONTUNf WHETHER OR NOT TO LABEL CONTOURSC NPTS( - NUM.BER OF GRID POINTS TO SKIPC SI - NUMBER OF POINTS PER INCH IN X DIRECTIONC SJ - NUMBER OF POINTS PER INCH IN Y DIRECTIONC SIZF -. HEIGHT OF CONTOUR LABELS AS PART OF AN INCH]C THETA - ANGLE THAT CONTOUR LABELS ARE ROTATED I

REAL F(ZJZ01IBUFFER(4511ZEAL AR (3 ,SI iS JTHETAvSI ZEREAL FSMSK(530) ,XNAXYMAXXINDTYINDTINTEGER NBd4F,IGROXZIGRDYIOFSETNPTSKMODEFS( 18) ,TITILt:(I)REAL LFPMDATA LFPM/0.06374/IEAD(5 1OfO) NDUIF(NDU EQ.* 1) GOTO 5

LFPM-1.O5 CONTINUE

C READ IN LENGTH OF TITLE AND TITLE OF GRAPH,EAD(5 O) NCHAR9 ITITLE I) el T~s l)

C GET SIZE OF BUFFERREAO(5-)O1O1. 14B

C ,PET NUMBER OF FRUENCIESREAD(591010 NF

C GET X AND Y DIMENSIONS OF GRIDkFAD(5101D0) IGRDXIGRDY

C GET NUMBER OF GRID POINTS TO SKIP AND IOFSETkEAD(5,19) NPTSK IOFSET

C GET MODE AND AR VALUESREAD(5vDt2) MDDEqAR(1) kR(2),AR(3)

C POINTS PEP INCHREAD(50,J030) STSJ

C GET LABELING FLAG AND ANGLF OF ROTATION FOR LABELSREAD(5,ID2l) NO0,THETA

C GET NU'ILER OF DIGITS AND SIZE OF LABELS.EAD( 5,1OZO) NDGTSIZE

10C0 FORMAT(J117A10)1010 FORMAT(BI ln)1020 FORMATtI1O,7F1O.O)1030 -ORMAT(BFI0,)

C L. OAD BUFFERCALL READS(lv.BUFFERqNB4F))D 98 1=1,18vIFS( I) =O

FSMSK( l)0.CO98 CONTI NUE

DO 99 I-19,530,1FSMSK( I "-0*0

99 :ONTINUEC ADJUST BUFFER INDEX

IND - IrFSET + NPTSK + IC .DAD F

DO 10 J-I,IGRDY,-00 10 I-,vIGROX,1

F I,J)=BUFFER(INOI/LFPMIND T IND + I10 CONTI NUE-w

C GET DIMENSIONS OF PLOTXMAX-I GRDX/S IYMAX-IGRDY/SJ

C INITIALlZU TfHE PLOTTER:ALL PLUTS(09(07J

C 4OVF PF4 AWAY FRO' EDGE IF PAPERC.ALL PL(Ir (A*.590 59-3I

A80

Page 170: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

P4(JGRAM AVFU

C )R~AW BOX AROUJND PLOTCA LL PLOT(DoZ YMAX,2)CALL PLOT (XMAXYiIAX,2):ALL PLOT(XMAX9O0,()2)CALL PLOT(O0e.O,*2)

C SET UP NEW ORIGIN

Y INDT=1. 31(2. G*SJ)CALL PLJT (XI NOT ,YINOT -3)

C PUT TITLE ON GR~APH]CALL SYMPIIL(O.OYrAXO.25,TITLE ,O.()NCHiAR)

C, DO CONTOUR. PLOT FINALLYMMIJCALL C0'4TLJN(F ,IGROXICRDYFSARMODESliSJTHETANON0,SIZE,

+ FSMSKNDGT)CALL PL9T(tW3,999)

C DUMP DATAWRITE (6922D)) THETAiNDGTSIZE

220 FORMAT(7- THETA=,F IO.6,5X, 5HNDGT-,I4,5X* 51S iZE-s J10.61,4RITE(b,230) XmAX,YMAX

230 FORMAT(13H SIZE OF BOX:,C1O.6,3H X *F1O.6)WRITE(693CO) NB

300 FORMAT'4H- NB-,14)ORITE(b,301) NF

301 FOR,4AT(4H NF=,I'.)WRITE(b,3n2) IGRDX, IGROY

302 FORMAT(9H- GRID IS ,I's,3H X 914)STOPE ND

Aoui

Page 171: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

$UBROUTIMF READS

SUBROUTINE READS (LUN, BUFFER, NB9 NF)

C SUBROUTINE TO READ SUMMARY RECORD ...C SUMS OVEP FREGUENCY AND DIRECTION&

ZEAL dUFFER(NB)

REWIND LUNC SKIP TO SREC,

DO 10 =INF3UFFFR I1 (LUN)) (DUMDJM)

C

C 0 CONTINUE

C EAD 5REC.

BUFFER IN (LUN,1) (BUFFEl(ljBUFFER(NB))

IF (UNIT (LUN)) 209 50, 50

20 CONTINUEREWIND LUN

CRE TURN

50 WRITE (b,1000) LUN1000 FORMAT (32H0' * ERROR OR EOF READING UNIT,13,6H * ,

C S STOP -

END

A82

Page 172: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

SUl3UrI4E C),NTUM(:,INMAXJMAXFSA~,MUOES:ALEI ,SCALEJTHETANNDO1 51 £, F SF1 <qN)CT) )gOD

Cc rkACES J NTOUPS T't OUGH %RRAY (It1AX**JiAX) AND PLOTS THlEMC WAITH SCA-.El9SCLEJ '0tjI4TS PR. CM. THE CO7NT3URS AREC LAB~ELED At AN 6O4GLE T-IETA WITH TH; X-AXES PROVIOLD

C W~') mAN INTEGEI *GE*De IF NONO.LT.0 THE CONTOURS ARLN JT LA3ELE-D* SUfE IS THE SIZE OiF THE LAOEL.

C Fi)E - L FA'iILY 0: CONTIURS 1S TkACED WIT-I INTEkVAL-AR(I)eC mODE - 2 FA'IILY 0: APPR)XIMATE.Y ARMl CJNTOURS IS TRACED wilTiC A ILAS'ABLY CJmPUTED CONTUUR INTERVAL,C MODE xU 3 A SINGLE CONTOJR WITH VALUE Aktil 15 TRACED&C MO)E - ;t AR(l)-l.4TERVA-,AR(2)-MINAR(3)-MAXC m 0(J -: - 5 AR ( II-.4k OF C 0 1 T)URS 9 AR ( 2 ) FMAX - MIN , Ak (3 FtA X-lAXCC IMAK COINP-I)ES 'sI[i TH:E PAPER X-AXES. OllIENSION OF ARRAY IN X DIRC JMAX COINCI)ES WITH THE7 PAPER Y-AXES. DIMENSIUN OF ARRAY IN Y VIR

C FS A4 INTEGER ARkAYS MJST BE GIVEN DIMENSIONS 1AIMAXOJMAX/31 INC CALLING PIOGRAtioCC N)GT-SIZ;NIFICANCE9[F NES* IS COMPJTED&C 2$ S D(PLE.4:4T AlITMETICC EXTEZNAL FJNrI3N LAND IJS 13 THE BOOLEAN I.EoLDGICAL$ AND 01' TdC FULLWORD INTEGCRS.C EXTEtNAL FJN:TION LOR, I,JS 1)7 THE BOOLEAN OR OF TWO FULLWORD INTEGERS.CC SPECIFICATIO4 STkTErENTS.CC :HANSE K)S 5.1.73

INTEGER FS(1)ZEAL JAY, J4YIROF(IMAX9JiAX)

D1I9ENS1)l 1BEG(100D) JBEG(1DD),CDNSV(100),NINSV(100)INTEGER :515k(l)..OGlCAL -iA.TLPLOTKLOG-.OGICAL <LINGTHISC)ATA NPrtd3,4 l91,2214,39493,2,1/, 1FLAG/D/)ATA AC' I. * 5,Z225,5.,))ATA AL;I.DL97, .3,.398,.7, 1.0/

C FUNrION OEzINITIUNo

C SET PLOTTIN; PtARAMETERSoIDFS=JlkK*cIMAXIOFS=ID: 5/31+1

- <BEG=1(BE GIX-CSALEI-1../SCALE I'6SALEJ=1. /SCALE J

C IF (IUJUo.4E.1I GO TO 6U4C )0 6D2 1-191MAXC 4RITE (b,603) (HIsJ),J-tJMAX)C 602 ZWITINJEC603 :ORMATC11 ,2).FboDJ

C b04 fl4TINJIF (IFLAG..E~o5) GO TO 4)0 3 1-1,31

3 iASK(I)*2*0(31-IICC SET JP LOOP :ONTROLLING SELE:TlnN OF C3NTOURS

'CIF L A-5

4 IMAXI'1'PtX-1

IF (HUDOE.NEe3) GO TO 10

* :Oi41NT-AIG?4ICO N S1;U TO 15

10i EMAX-F1l.11Ii,* M&

)0 1? uFM& m~)O 12 J-LJMAX

II -*--. A33

Page 173: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

'FRUTINE CUNTU4

:M N = AMN 4 1 (Fl1I N ,F (I 9J))12 :MAX-Ahk~1(F"tAXvF( I J))

IF ( OO ENE5 ) GO TO 123 .

120 UNINT-41GIIF ('IO)ENE.2) GO TO 13

IF 'I)DE -2 SE:LECT A CO'4TOUR INTERVAL-4LGCNT-ADG)(FAX-FMilN)/ARG2)'4-ALspcr4LGCNT=AiUD(ALGCNT91*)IF (AL:;'4TvGE.:0s) &L) TO 18'4-4-14LGC'4TI*ALGCNT

18 B-ALGCNT)U 19 1-195:wABS(4-;CNT-ALG(1 )IF ('oGEoa) &O TO 193-CA-AC( I)

19 OUNTINJ:

C DETElIIINE NJ4BER OF CON4TOURS AND MINIMUIM VALUE13 IF (FHI'4sGT*3*) FMIN-FNI'4.CONI.4r

: MIN-CO4IST9.AINT(F1N/CO4IMTJIF (FMAK.LF.).) FMAX-FIIAKCONINTFNAX=CO4I NT*AINT(F4AX/CO4INT)IF (tOD=,LT.4) GO TO 11:MIN=AMAV1(FIINvAkt 2))'FHAX-AMIql4rhIAX ,AR( 3))

11 4CONS-(F IAX-FMIN)/CONIMT*l*9!CuJNS..bI40(M'ONSv43)IFfNCO45vLE.)) GO TO 70))

C DETE MINE: AJIHER OF*DISITS I4 LABEL15 )EL-1.E-40CONINT

IF(N JGT*SEwO) GO T) 20'40GT=D

21 IF (ABS(kHOD(CONINF*10.*9NDGT,1.))&LT.DEL) GO TO 204ZT=N)F;+lI F (NOGT.Lf.Il) GO TO 21

CINSUZE IA1' 40 PuINT IS EXACTLY ON A CONTOUR20 )0 32 I1,l9MAX

)O 32 J-1,JrIAX32 IF (ABS(&40D(F(1,J)sCONI'4T)).Lr.)EL) H ItJ)mlo.OO01*F(IvI3+2,*DE 'j

C START co,,iroJR PLOTTING -

(ONTJiR=316 (ON'TJ .=(JNTUk41

:ON -F MIl4 CONINT *FL )AT (K(0 T JR-i)C fRITZ (b,620)) CONs 11NC9NJNTK3NTUR

b 20 :ORIIAT(1-j v5X, C04 , F I)o..9 F K IN 9 FlOo'. CONINT 9F10949 KONT1c I JR 1I8)

14 FS(tIP)=)

C BLGI'4 EDGE SEAkCrIC

17 JE-JE*1

42 )-F(IMA~,JE)-C0N

IF (CO*3.,T.O.) GO TO 2I E - I IA X4IN-3EYE-P U)A F ( IMA X)JAY-G(JFDsC);0 TO 5)

22 IF (JE,'4E.:JMAX1) 6) TO 17I E 0

23 IE-I F +

A84

Page 174: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

il,;TI4- CUNTU4

IF (A4D&T&OJ GO r0 24t

J E - 1EYL-G( lE ,AO)JAY-1.GO) T) 5)

2'It IR E -34.1 3 -F (I FJ AK) -CUd.

IF(b*C.'r.3.)GO T0 2fb

JE -JIAXIZYE-C( IE ,vcCJAY -F) 5T( JMAX)

O To ;526 IF(IE.'4:E.IMAX1)G) TO23

C BEG14 I 4TEAIlk SEARCHI E-O0

27 [E-IE-+l..PLOi-. HUE.fFCIE.E:).l)LPLOT-=A-SEs.JE-O

39 JE-JEelIRET='.

I-F ( E ,JE +)-CONIF(A*BoSfw3.)GO TO 30I 1 N= 1EYE-FLOAT( JE)JAY=G( JE ,A,8);0 TO 55

30 IF(JE*4:,JMAX1)GO 10 39IFCIE.4E.bIMAX1)GO 10 27[F(UO14Tjk.ME.NC0NS.AND.(3EG.*LT.B3)3 TO 16

C PURGE INITIA-. POINTS BJFFERC SEARICH STORE) INITIALP31~4TS 3UFFER FJR ONR CLOSEST TO PRESENT PEN I'OSI

(BE G4IXu(EG-1.

(BM)(OZ=(3EGMK/2+l

52 < -K #lIF(KoLT,(BIXD2)GO 10 82

C RETUIN IF A..- CP.4T0URS ARE PATOTEDIF I K aN JZ. 5E ,NC ON 5)R L TJR

;0O TO 15t12 IfRS0tN4c9999)9

)D 55 K(B:G=1,KBEGMKIF(13E3(ZBEGa.EQ.DnG:J T3 56IRSU(-IBEG(KBEG)O2+(J-JBEG(KIEG))*.2IF(1Q.S3J.4E.0)GO TJ 53IF(CUN.~4E9CONSVLKb:EG))G) TO 53I B E G( K aE UC;0 TO 55

53 IF(IRSU.;[.I SCOiN)SU TO 5bI RSQIt=I kS3(BEGHN-( 3EG

56 SbONTINJEC TRAEz AID P-I[ CLOSEST STARTING CDNJOU;Z

IlK83E&V.LE.0.Q)R.(b2G(m-4.ri.lD));O TO 4.5)0I E-I BEG( (BEGIN)JE-J3zEG( (BE-GiN)^CON-CONSJ(KB:GMM)~4IN-4I43vi(KBtG1N)IBEG(KBE&Iil)-O)O 57 41*1,IDFS

57 :(SIMP)-.3IF (NIA-..J.]R*NINoGT*4) ?0 TO 45))?;0 TO C4),41,42,43),9IN

58 IC.~.)-

iF(I*EQO.3)Il-L MKIF (JPELIJ AX) J-JIIA~l;0 TO 52

E A85

Page 175: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

JdUTI sE~ CON TJ 4.

:URVL =[);LOW 3EGIN4 ROUT1'4EC IF r-4ER IS iOaM , SAVE THE INIUiAL POINT

50 IF(KBEG. 1.1O0)LPL)T-eTqJEoIF(LPLO)G] TO 59.ONSV( K3:G)-CO4IBEG(K.IE )u-IJQEG(Kdzj,)wJ:74INSV((3EG)-mIN(BE G=KiiE j+I

Z IF(KBEGoGr.l~r0 TO 450)

IWORD-131 1(31,1IBIT-I11-310IWORD02IF( t4)(iASK(1BIT),FS(ldJRDfl.o4E.0)GO T0 (~22426930ftIR3T(LING - *FALSE.IF(AND( 1kSK(IBIT),:SiSK(WDRD)) .ME.0) KLIA -*.TRUE&I - IEJ-JE

E KEY-EYE -1.:KAY-JAY-1,K(EY-CS...E14EKE Y:KAY=CSA..EJO:KAYfF(NO~.14..T.0iGO TO 1000IF(KL14;I LJ TO 11)DIF (LPL)T )ZA.L NUMl3ER(EKYEKAYSIZECONPIETAPNOGT)I F(LPL~rlCAL.. MUBER((EE-l.)*CSALEli(JAY-L. )#CSALEJ9,105CONtfl

C bktr4OGT)1000 :O4TIP4U:

C IF(LPLOi)CALL PLOT( (EYE-1..)*CSALEI,9(JAY-1.)QCSALEJ,3)IF (LPLar)CNLL PLOI(EKEYE-KAY,3)

C1100 0DNTINU=

<LING - #TRUE,:EYEZRO-EYEJAYZRO=J8.Y(LOG=. FA-SE*I P EN -2-IALT-*FASEo

:UkVE :ALV4 ROJTINE60 k-F(I9J)-CDM

3-F (I,J*I)-CJN)-F (1.1, J)-C)N

~ Id~O)- 0(FStI4fOkD) ,jA5K(iBir))

IF.;E.X=o)JPP-JP42IF(JPP.=E5.4)G TO 14

73 40JT=NPr(NPA4,JPP);0 TO CU72t 7b, 678), NOUT

44t IF(A*3i4594b,4746 JPP-2

;0 TO 73C 47 1111-1-1

C JPZ=J+2C WIITE(b,',5) IJNINCON,((F( [ZJZ),IZ-iNLI1?2) ,JZ-JM1,JP2)C45 0'ORAT(23.11EkR0R 1IN COMTJRk FOR, 1.,I(3H)Jr,[Z,5HHIlNI1,12A1

C lZOMTJR=,E18.//(4E20m8))47 :0 TO (??,9'w,26933958JIRET72 :YE-FLOAr()

jAY-CC J, ,B)IF-Ii)I)i--.R;0 TO a3

JAY-FL)kJ CJ+j)IFlJ.E(J.JMAX1)HALTsoTRUE*J-J+;0 Tu 8)

A86

Page 176: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

OuTlt~d COt4TJ'4

76 EYE-FLJAr(1+1)JAY-S4J,)gC)

;0 TO dO78 :YE-G(19490)

5AY-FL34T(J)

j a IC 80 IF(LPLJ)TiCA'l_ PLUI((EYE-L. )4CSA..E 1,9JAY-lo )'CSALEJ 91PEN)C

80 ZONT INUE

IF(AN4D(4t.SKIBIT),:SM5K( [W0RD)).q4E.0J KLING-*FALSE*THING - .FA-.SE,IF (IPE*4,C . 3 ) Tril 4G o TIRUE*IPE.N - 3IF(KL'4;) IPEN -2IF(TH14;) IPEt4 a 3

2 KEY-EY -1.E KAY- JAY -1.EKEY-C5&..EI*EKEY:KAY-CSA.EJ'E KAYiF (LPLI))CALL PLOT(EKEY, EKAYvIP:EN)IF(KLDG.%ND.EYEEQ.EYEZR].&N0.eJAY.E0.GJAYZR))HALr-.TRUEa[FV1ALT) O TO 901 PE N-i1

(LOG-. rZJE.;0 T3 6)

CURVE ;OLLOW E4~D90 IFLNOJ3.TvO)GO TO 1U)01

IF(JPE'4,zQ*3) GO T) 1001IF (LPL3F )C&L. NUrI3ER( EKEf, EKAYSIZEChii-lHI'iNDGT)

c IF(LPLOr)CALL NU~hdER ( (EY:-L.o) *CS ALE IJAY-lo J CSALE Jv o1059CO-49THEC 149NOGI)

1001 :04TINU:;;0 T9(i az2'.?bt3095b)t,1~iT

4*500 4PRI TE ( 5v 5)1 )NI N,,3EGKBE GMXqKIHEJEKONTUkg CONvKBEGMiN'.501 :DRMAT(4-jNIN,I15/5HK EG;, 115/7HBEGMX-,115/ZHK-115/3HIF-,115/

Q3HJEIi5/7HUNTUR-115/q,1CONtE2). 5/ ?HKBEG14, 115/I)(BEG-IGO T9 15

7000 4R ITE (6,7031)7001 z~4TIl/K"EkkNSTv NO, OF CONTOJRS'/11H1)

kE TURNEND

A87

Page 177: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

G. 2-D SPECTRUN CONTOUR

This program produces a contour plot of the 2-D Spectrum withfrequency in the X direction and Theta in the Y direction. The fre-quencies are interpolated to make equal distances in the X directionreflect equal changes in frequency. The range is from 0 to 0.229 H,The T1etas are plotted side by side although the sampling is not cjual.The list of directions, from top to bottom, is: 180, 135, 90, 75, 60,45, 30, 15, 0, -15, -30, -45, -60, -75, -90, -135, and -180.

The program works into several different sections. First theprogram goes about reading in information about the plot and the data.Next the program sets up all the preliminary data for CONTUN. Theprogram then c:1lls FNDrC to get the tape positioned at the appropriatetivic step. The program then loads the 2-D array F with the availablseinfocamation. Next comes a section of code to interpolate for missing |freqiiencies. Just prior to calling CONTIN which actually does thecontour plot the program draws a box around the region where the p.loI:wI.I.. he made and then titles it.

A39

Page 178: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

INPUT LIST FOR 2-Dl SPECTRUM PROGRAM

FORMAT VARNAME DESCRIPTION

110 NC-AR number of characters in title7AI0 TITLE title of graph110 GRDPT grid point number110 TIMSTP time step number110 INF input number of frequencies8110 IFRI-Q(i),i=1,INF list of frequency indicies110 IND input number of directions8110 FIND(i),i=1,IND list of direction indices110 NORID number of grid pointsF10.5 LFRAX length 6f frequency axis in inchecsF1O.5 LDIRAX length of direction axis in inchics.110,3Fl0.5MODEAR mode flag followed by appropriate AR NvaluesI10,F1O.5 NONO,Theta NONO=l then contours arc uIabelcd, NONO--O thien

contours are not labeled; THETA is angJc ofrotation of label

I1O0FJ.0.5 NDGT,SIZE numiber of digits in labcJ~size in inchecs of label

j A89

Page 179: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

I

2-D SPECTRUM CONTOUR PLOT PROGRAM

VARIABLES -

BUF(300) - input buffer

LFRAX - length of frequency axis in inches

LDIRAX - length of direction axis in inches

AR(3) - array passed to CONTUN

if MODE=I then contour interval is AR(1)

if MODE=2 then approximately AR(l) contours will be traced

if MODE=3 then a single contour with value AR(l) will be drawn

if MODE=4 then AR(l)=interval, AR(2)=min, AR(3)=max

if HODE=5 then AR(1)=num of contours, AR(2)=-min/fmax, AR(3)-nax/faixMODE - tells CONTUN what type of plotting mode to use

THETA - angle of rotation that is used when writing the labels on the contoursSIZE - size of label in fraction of an inch.F(42,30) - the array that CONTUN uses for the values to create the contours

FIND(30) - list of indices, FIND(n) yields the direction index for the ntb _direction, the index is used as a subscript into F

IFIJQ(30) - list of indices, IFREQ(j) yields the frequency index for thejth frequency, F(IFREQ(J),FIND(n)) would tell where to put a

given frequency-index value from the tape

NCHAR - number of characters in title of graph

TITLE - title of graphGRDPT - grid point number that is to be plottedTII4STP - time step number that is to be plotted

INF - input number of frequencies, later becomes total number of frequenciesafter interpolation

IND - input number of directions, becomes final number of directionsafter 180 Is copied to--180

NGRID - number of grid points (from wavcct, must know so tape can. be positioned)

NONO - if NONO'l then contours are labeled, if NONO=O then contours are not labeledNDGT - number of decimal places to be displayed in contour labelsFS(15) - mask array us'L by CONTUN must be set to 0FSMSK(15) - mask array used by CONTUN, must be set to 0II - tells which half of the word the data i want is in12 - tells which word in BUF contains the data i wantEOB - tells me how many words to read in at a time31 - IFREQ(J)KI - FIND(k)

XPPI number of points per inch in x dierctionYPPI - number of points per inch in y direction

A90

A9 0 12

Page 180: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

ISPLIT- this subroutine(function) unpacks an integer word

PARAMETERS-

IND - flag indicating which half the word to use1WORD - the integer word containing the two values

TEXT-

This function returns the value stored in half of the integer word.

This unpacking is necessary because tu'o values have becn comip:cnscd i:to

one integer word and writtn on the, tape. This function wEil cloose

either half of a sixty-bit integer 'word(IWOR)) depnd ing on the value inIND.

A

------------ l-

Page 181: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

RSPLTT- this function returns a value stored in either the first orsecond half of a real variable

PARAMECTERS-IND - indicates whether you want value in first or second half of wordWORD - the real word that contains the two packed values

T EXT-

This function unpacks a value from the first or socond half of a

sixty bit real word. It is needed because data is packed on the t:apeas two values per word.

-a

:1

T

A92U

Page 182: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

FNDREC- this subroutine finds the proper time step on a tape

PARAMTERS-

NSTEP - time step number to be searched forLUN - logical unit number of tape to be searchedND - number of directions on tapeNF - number of frequencies on tape

LOC:AL VARIABLES-

IBUF - temporary input buffer -

J - do loop index

K- do loop index

TEXT-

This vubroutine spaces the tape forward until the appropriate time

step is found according to a header record. It leaves the tape ready

to read the data records for that time step.

A93

I

Page 183: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

NJ:u. '0 JCI!I( 11NF'J1IJUr JTv TAP 5-1 IWPUTvTA~c5=UPUT TAPE? TPE7,

I Wl ' o I~a3.I iT 2 4 -iP. tT IIT i/ >, T T'I mT; T N, TS, G k oIN F

SI~ L J I j~ 1 ,1vi L cI; q iJ -1 LIIAK4CTikS 1 4 TI TL:E

L 6L I rI' 1dI P 1' 11 1J:131.., Ti 1 PLOTTEJ:I I.., I 1 TI .I N 1-1 L L.' IJ i~ P L JI I E

C OLIF 1 P IJ T 3iJfI kI d -4 Ni6:ti jI- ur .UE'CI -,s r :jBE PZJ)TIE

C I F KEJ - t&kNV di- llNUI>K- UF UF FRE'JJENCIES TO iE PLOTTEDC Ii4U - r4JiEZ JF JIRLUCTTJMS 1) 3E PLOTrTED. I uI~-A4 JF 01 PECTIJ~ Ir 4JICES TO 3E- PLOJTTEDC LF -.. E'4IK OF FREUJLtNCY NXIS 1.4 1I4THES

.LL)HAX -LtE4I1 JF i)IRzCTlJ1 AXIS 14 14CHES

C 'ILJUE -M)FOR C5NTU.C APR - AR.h4Y 3- "tINMAXINTER %L INFORZ1AF ION FOR CONTUN -

C THETA - F ROTATION UF LABELS ON CONTOUR5NUN] - F'.All IP14T TELLS CU,4rj4 WHETH~ER O NOT TN T.L IE COTUSC S I Z:- - HE I'#'IF rJF LA BEL& 3 1 I 4CIESC ~u - NJ1WI JF SIGNIFILAAr EIGITS IN CONTOUR LAB3ELS

F- IRRAY J= VALJES TO) BE PL3TTEIJFS - MAS%. ct4.k4

CFSAASK - MAS< 4rkAAY3FP' =d554i .)

~E4(5 9 ' 1CH-ATITLEji.. :J,,k' -A ( I Vt bi ,A"I.

z u ( :URIT (3 I NJhIMER JIF C14.4CTERS 1.., TITLE:,Z/-I ,rIT TLE I S :I , 1j) I

LAiedL GRL)P T

Z [t, I : ( 1 LfLE) GRI) PJ114T IS :915)

Z - u'"i~ T 1 -1 fIm '~PU I 4rilJFF<j F F :j.', A ) J 5I FK 7, s'I I IF N F.

4kIxiT (, v 2 (1 F t1,I!1iiFl.2U~~T IirA( I SPOT JF FY IJE)EX LIST 14,(? ,I.Jf

'C -\('j 1) lIFKO lI 1N

I I (, 5 2 m3 I( I FR : ( I I I. I i )q I.)

2J i -*ri.T('.-I Fr4JN JF I) POINTS :,tilH 61D)

k4A(5tl (, -.1) INDA

5 1 F I tLiGT( I II= L 1IN

Z L), - *l .T5 4J1 (A UIi I IL H-~b1r 1I'CL TA1 Jr* I f I= s 3K Z 3.-5) N

Z J,: U S(i AT1 M1 K ONS: 4

1. A34 ( i3 1 1 A

Page 184: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

I'' ',.', "S,.CJ4

•~~ L) J , ,

u TI I: -' J z _ ,: ,

(1,J)=..

S- j: i t L L

I A I,. J, F~ ,;J16

t -LJ r ;:lti (, .J (iJF(1).,I (JF'(-i)JI tJ 0 S, I T ( 19 r:Z j'41i ijFJl=I.ku( JJ

1.=-1r4k '7 K)" (J L <LI =RSlaIT{ 1(L, t~jF (I Z )

I AA A A lA L k IA A F ( JI , i,)5.j :I 4 ,T I ,-IJ E6C C I T 1 4u :-

L3 .)I = = ,I'u, lI =F 1 4 i) ,)9) )2 J=992392F J, I ,IF J -4 , I + J + L, I Z 5

9 4 / 1,1 ) F t, , i #I 4 "- F i =,Il- F 4 1

F- 2 1 F o 1I ,T.'11) =F C ;9, I T-I JL,[I)=-( 3 ,IJ.T

gJ :L '-- ( 1 .IA I . , -i ,1 A/

II -

) j I J * .4 -

I 4 r' X )L ( , JI f C I ,1 J Ui I

71 "3'11'.J)'

L J S I v7

Aj L V -J f ( , !. , 1 J

L ICA, ti J X A, J F i P L 0 T7 ~Fl.*

S-1 ( 5

3 X 3?l

.)'" I .C I '4 , ---.IiL A

I u I ,L

- .LL 9). [ 1(. - . t:) YL b -: l"" .DR ..lLJ, .. ir i P.L~r'LT

_ I I

)X=LA95

Page 185: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

9v :.ji I 1

A96

Page 186: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

FuNCTI)NTI~ RSLkSP.AT( IN)gWORD)

INTEGER NlEAL Wik),IElP0O TJ (1)09110) 9 1N0

100 ISPLIT - RJR) *AND. 777777777700D000000C'BkE TUR~4

110 [EIIP -)R 430AND. .30000030,107777777777BISPLI - 54I-T( (-ti?930)IE TURN4

END7

Page 187: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

FtJ.4CT1)M ISPLir

INTE'ER IN), IWORD, ITEMP

100 ITEMP -IW)R) .AND. 7777777777000000000OB

I ET U AN110 IEMP -IW9R) .AMD, U0OOO)Ot000777?777778

ITEMP - HIFr(ITEW'930)ISPLIT aSriI:TIITE'IP9-30)I ETURNz N 0

A93

Page 188: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

C SUR)UT('4E F'4DREC(4STEP,..U'lvNONF)

C THIS3 sj3P.ji 4E SPACES TAPE FORWARD U14TIL PROPER TIME STEP IS FUJU14It4TEGFk !HLJF( 5) NSTEPLU4,NDsNF91,J

C N S r P I TI : ST::P 4 ANr E DC LU4 LOGIC&L U~4IT NUJIBERC ND) ,4J~tfE~ IDr )IRECTIODNSC NF -NU'1LIE OF Ff<EQtENCIESC IBJ= - it4?ur BUFFEkC I - DI1RE CTI 1 K1 40E XC J - F RE JE 4 :Y I E XCC REA) IN TO I:EC)R)C

lUFFER 14 (LJN91) (lBUF(l)tIBUF(5))C MIA<= SURE 13 READ ERR3RS

IF (iP4Ir(LUN)) 1099989995C PU _. OUT Pl.E5ENT STEP NUMBEI

10 IBUF(1.) ; ISPLIT(2,IB1UF(1))C IS IT TIE RIGHT STEP AUMBER?

IF (IBUZ11) E*EO NSTEP) FO TO 9D3C NO, WEL_. S.(IP A-L THlE DATA 'kECORDS THEN

DO3 30 K=1,Nt),1BJ *FFER IN (LUN91) (IBUF(1JIBUF(l))

C MA<-: SUIE ?4 READ ERROk DID 40T OCCJRIF (JNIT(LtJN)) 30,998,998

30 C34TINJE40 CONTI4U7

C H04 READ 14 ID ZECORD3UFFER 14 (LJfisl) (IBUF(1LhIBUF(5))

C CH:E:K F)R ZEAD ERRORIF (UtilT(LUN)) 500?989998

C PUL.. OUT CJZRLNT STEP NIJMBEI50 IBUF(l.) - ISPLIT(~,IBUFMI)

C IS THIS RIS-iT STEP?IF (IBJF11) *NEo NSTEP) 0OT0 20

C MUST BE ~I&-ir ?LACE9 00 k E TtJN998 IIE5~f)LUN999 :J1HAT(32H)* EZROR 01 :-OF READING IJNIT,13*61H **

STOPEND

A99

Page 189: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

Su3R)Ur14E C)NTU4(:,IMlAXJMAXFSAkN(JDESZALEI ,SCALEJTHETAt4iONO,lSIZEFSli3<,N3CT)

CC TRACES 6')NTOUkS TH OUGH kRRAY F(IMAXPJIAX) AND PLOYS THEMC WlITH SCA_.EI9SCLEJ !'0O'4TS PR. CM. THL CONT)UPS AREC L48ELED AT AN 44GiLE THETA WITH THE X-AXES PROVIDEDL NON) -AN INTEGEI .GE.0. IF NONO.LT.0 THE CONTOURS AREC NJT LABELED. SHE IS THE SIZE OiF THE LABEL*CC iiE)JE - I. FA4IILY 01 CONTIURS IS TRACED WIT-f INTERVAL-AR(1),C MODE - FAIILY 0O - APPR9XIMATELY AR(l) CiJNTUURS IS TRACED WITHC A IFASO'4ABLY C)HPUTED CONTOUR INTERVAL*C MODE - 3 A SINGLE CONTOJR WITH VALUE ARti.) IS TRACED.C MO)E - i AR (I)-I ,TERAq A R(2) -MIN PAR(3) -MAXC MOD0E - 5 AR~ijuNk OF CO'IT)URS, AP(2)#Fg1AXsMIN,Ak(3)4,Fr1AX-hAXCC IMAX COINCIJ3ES WITH THE PAPER X-AXES. DIME:NSION OF ARRAY IN X DIRC JMAX CDINCI)ES WITH THE PAPER Y-AXES. DIMENSION OF ARRAY IN Y DIRCC FS A~i INTEGER ARIAYS I1JST BE GIVEN DIMENSIONS 1AIIIAX*J? AX/31 INC CALLING PtOGRAM.CC N)GT-SI NIFICANCE9IF NE.o IS CODiPJTED*C 2 S :OMPLE.IEIT AlITMETICC EXTEZNAL FJI rI)N LAND IJ% 13 THE BOOLEAN I&E.LOGICALS AND OF TWO -

c FULLWORO INTEGERS*C EXTEZNAL FJN;TION LOR 19J$ Ii THE BOOLEAN OR OF TWO FULLWORD INTFGEkS. -

CC SPECIFICAT134 STTEMENTS*CC :HANSE (35 5.1.73

[ N TcGEk F S (1lEAL JAY, JAYIROF( IMAXJiAX))IME4SIJi IASK(31) ,NPT(4t3),AR(3),ACI5),ALG(5)DiMENSI)M IBEG%'(I'J) ,JBEG(lDO),CO4SV(100),N~iNsv(100)

.OGICAL 4-A.TLPLTKLOG

.OGICAL <LIN~tTHISS

)ATA AC/1.2592*v,2.5,5. ,I2.I)ATA ALI;.097,.3,.39899791.O/

C FUN: tI ON DE :I NIT IUON

C SET PLOTTIN; PARAMETE .SwI DFS-J'lke/IMAXIDFS-ID: j,31j1hRG2=Ak( L)<BEG-i(BE G4X-DCSALEI-lo/SCALEICSALEJ=1. ISCALEJ

C IF (IIJJU.NE.1) GO TO 604C )UJ 63Z 1-191MAXC uERITF (696Di3) (F(IJ~vJ~lvJMAX)C 602 :OITINJE: 603 'O I1AT(li s2lFbsD)C 604, 04TINUE

I(IFLA .EQ.5) GO TO '30 3 1-1931

3 lASK( I) 2*0( 31-I)CC SET JP L30P :ONTROLL1'4S SELE:TION OF CJNTOURS

JMA1J4X-1IF (liOD:.NEe3l GO TO 10:MI N-ARZONK NT.A C?4CONS-1.;O TO 15

10 :MAX-F(1,1)

JO12I.IrX)0 12 J-1,JMIAX

A1 00 t

Page 190: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

JOT! 1f CONTU4

:IN '4 A HI 41 (F I I i, F (I I J )

I F (MOID::NE 5 1 CU TO 1.23

AR(?-Al2)0MAX4RC?- (AM ()-AR (2)) /Ak(1)

120 DMNINT-4ZG?IF (lO)ENE*2) GO TU 13

ZIF I1)OE -2 SEL[CT A COqT)UR INrERVA_ALGCT-AA~12UFllfk-FI4)/ARG2)

ALGC8T-Al0D( ALGCNTil*1)I F ( IL:5. TG:-. O.) J50 TO 184~ -.'4-1kLGC'4T = **AL&CNT

18 B-ALGCNTA4s1.)U 19 1 L P5:-A(Sli%_CNT-ALGJ.)IF ('*GE. B) O TO 19

4-AC( 1)19 :ON T I NU

C DETEIINE NJ'IiBE OF Ctl'4TOURS AND MINIMUM VAlUEF13 IF ( -HI4&GI.),) FMIN-FMl'd4CON14T

:M1N-CO4I14TOAINT(FII.4/CO14INT)IF (FM4X*LT.).) FM.'.X-FrAK-:ONP4TFM4 X CO j NT *A INT (FlNAX /CO4I INT)IF (M0O)E.LT*4) GO TO 11.

FtAX=AHI41(FtiAXqAR(3JJ11 4CONS-(F lAX-FM! N)/CONI?4T.1.

~4C8S4I0(ONSv4r))IF(NCtbIS.LE*D) GO YO 70))

SDETEkH14= MJiBER OF 'DIGITS IN4 LABEL15 )FL-i.E-'.*CO4IINT

IF(N)GT.'^E.0) GO T) 204DGT-0

21 IF (ABs(AhMD(CONI~ir-,lo. NOG*,1))LT.LL.) GO TO 20

IF (NDGr.Lr.11) GJ TO 21CINSUZE r-fAT 40 PJINT IS EXAcrLY ON A CONTOUR

20 )O 3? 1-19IMhX)0 3? J-I.,JAX

32 IF (AEiiS(AliOO(F(IJ),LON14T)).LT.,)EL) F(I 1~)-1.000D1*lF(1,J).?.*DELC STA r CONTOJR PLOTTING

(ON TJR=31b (ONTJi.'()NTURU1

;ON-FMI,4tCOININT*FL)ATKO4TJP-lIc Ak~ITS: (b6bt?0) CLN,IIN9C9NINT9K)NTJR

620 :OfR"4T(l1 95A, COq ,Fl)o4, FMIN tF1Oolt, CONINT qF1O.4, KIINT

)D [J 4 ,IB) IJ

14 FS(rtPJ)')

C BEG;I4 EOGE SEAk~Crl

-. PLOT -.: %LSL,JE-D

17 JE-JE+l[RLT-1

4 -F (IpMAX, JE )-CIWIF (ZD*,T.O.) GF TO 22I E - I IA XI

EYE-F LUAI ([MAX)JAY-G( iF D*C)

0l TO 5322 IF (JF.4zE.JMAXl) r) fD 1i

IE r=0

Al 01

Page 191: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

JUTI'IE C(JNTU4

)-F (IE.1, 1)-:ONIF (A*D.;TD.i GO TO 24

EYE-'V( [2,4,0))JAY-1 0GO T3 5)

24 1 R ET =341 3-F(IE,J1AX)-CCf!

IF(tsQC*SI*D.)GO TO 21.

JE- JIAX1:YE-'(1[2 ,BC)JAY -FL5%T(Jl1AX).O TO 5)

2b IF(IE-.j4E.IMAX1)C0 T1023C BE-01- J'TEkUJR SEARCHI

27 1E -IE+ 1PLOr*TI UE. .FIE.E3.1,LPLOT-*:A-SE*JE-0

39 JE-JE4I.I RET-4

40 A-F(IEJE)-CON3-F( IE.JE=+l)-COlIFIA*B,.,r,3.)Go T0 30

EYE-FLOAI( ElJAY-GA J: ,AB);0 TO 5)

30 IF(JE*4E.JMAX1)GO TO 39IF(IE..4E.,IiIAX1)GO TO027IF ((ONTJINENCmIS.AND.(3EG."LT. 83))O TO 16

C PURGE INITIA.. POINT'S BJFFERC SEARili STOI:E) INITIALPI.11TS lUFFER FOR, ONR CLOSEST TO PRESENT PEN~ 110S

(B:; GIX- Z 3E6G-1

(BMXO2-K3EGMK/1'1

52 (-K~lEF(KLT,(Bi1X02)Gu TO082

C RETUIN IF A.... CONTOURS ARE PA..TTEDI F( KONIJloGE. NCONS) RETUR4(BEG-1;a TO 15

82 IfASOa.-9~9999)O 55 KBE-G-1,KBEGMKIF(IlES(iEG).EOCO T3)5 tIRSO(Il-IBEG(KBEG))'#@2+(J-JBEG(KBEG))*42IF([qS~.'4ED)GO TO 53IF(CON*IE*COI4SV(KB:EG))G) TO 53IBEG(KaE;) -0;0 TO 55

5-3 IF(IRSQ.;EoItSOMN)SO TO 56I RSIN-I RSO(BEGMMN( EG

56 :ONTINJEC TkACE A4D P.31 CLOSEST STARTING CONTOUR

IF(KaEG44.LE.0O. k(BEGM4,GT10 ) SO TO 4530[E-IBEG( (BEG.4N).E-J3E-G( (BLIEGI4)Z ON-CONSVI(iBEGHN I4IN-S4SV (KB:GHNIIBEG(KB=;MN) -0

57 :5(4P)-)IF(NIN..1.I.JR~llLNwGT*4) 0 TO 45))A TO (4)941942,43)gNIH

58 IF(JvEQa3)Jw.IF( IoEOe))I-IIF( I.EQIMAX) I -iliAaj.IF(J*EU&JJMAX)J-JMAK1;o TO 52

Al02 [

Page 192: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

1.dju1N1i CUNTJ4.

ZLIRVE :vLW 3:GIN ROuriqLCIF TIEPE IS iOEIM , SAV'7 THE INITIAL POINT

50 1 F ( K E G 3Tb13fJJLPL5T-.IqJE.IF(LPLOr)GO TO 50UONSV( K3 G)=CON.I BE G( KE Z ).1.7JBEG(KiE JJ .J=:~4INSV ((3 E G) -4 IN

IF( It'O(1ASK( IBIT),FS(1I4JRD)).NE.O)GU TO (,'2q6p3)IR:T<LING-&FLEIF (AND( IkS((IB1T3 ) :SMSK(I[WORD)) S4E*O) Kl'S -A.TkUE*I IE

:KEY-EYE:-1.:KAY-JAi'-I.

EKAY=CSA..EJ4LKAYiF(NOr40...T.oJGO TO 1000IFKLI'4J1 :0 TOl 11)0IF (LPLM )ZA-L NU"13ER(EKE:YEKAY,SIZECO1]tP1ErANOGTI

c IF(LPLJf)C4L- SUMBIER( (EY:-I.)4CSALEI,(-!"Y-4.)OCSALEJ,.15CONTiCT

1000 :04TINIU:C IF(LPLOf)CAL- PLOT( (EYE-L.)*CSAL::I,(JA* .'-*CSALEJ,3)

1F(LPL'Jr)CkL- PLOI (EKEYE-KAY,33C1100 :04TIMU:?

<LING a TRU-*E:YELRO-EYE)AYlRO-J5.Y(LOGs. F ASE*I PEN-?IALT=.FA..SE.

60NF(It,J+)-CN

)-F (1.1,J )-CJN

IW9R)-laIT/3l11811-hIB r-31IWOR06-32::St I ti. :l) = OR iF S ( I 4ORD)iASK( 1It1)JPIF(O . : D )P ->~

IF (B *O *; . ))J PP J fP +I F (JPPl E ).li iO T3 't'

73 ~4OJT-NP ( NlN, JPP);0 TOl(7?9, 76,7b)vNUUT

441 IF(AOB)4594~694746 J PP f2

;0 TO 73C 4t7 1 i I.- -l

c WlITE(b,'t) IJNINsCON,(CF(iZJZ),IA-IN'L,1K ) JZ-JM1.,JPZ)C45 -0RMAr(Z311E RUR I N CONTJR FOR 1 -9 M 310,J-9I5HNIN-s110 2IbAN)C1:ONTJR-,E18.3II(iE20.8) )47 ;0 TG (??A9426,33v58),UZET72 Y -F L3A f (I )

;0 TIJ 3374 EYE, (1,3,cl

JAY-FL3r( J.L )IlJCUsJMAXl)f...LT-*1kUEs

30 TO 8)

Al 03

Page 193: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

jJTINE CONTJ4

7b EYE-FLUM~~I*l)JAY=S(J,),C)IF (I EQ. IMAXl )HALT- *TRUE.

;D TO 83

5AY-FL)ATIJ)IF(J.ED.1)I4ALT-.T~jEw

C 130 IF(LPor)CALL PL0T((EYE-1.)4CSALEl,(JAY-l1.*CSALEJ,IPEN4)C

80 CONTINUJE<LING - &TlUE.IF (ANO44tSK( lBIT),:SMtSK( [WORD) ).'E.O) KLING-oFALSE*TH14IG a *FA'SE*IM~PE'4,C393) TH14G - orRUEeIPE'4 - 3IF(KLI14;) IPEN -2

EKEY-EY WE-lo:KAY-JAi-i.EKEY-CSk-lE10EKEY:KAY-CS4-.EJ*EKAYiF (LPLJT)CALL PLOT(EKEYv7EKAY9IPEIA)IF(KLOGAND.EYE.E~oEYEZR).ANO.JAY.E-o.JAYZR))HALT-.TRUE.lFHtALr)GO 13 90I PEN-I.

(LOG'. R JE.;0 TO 63

IRVE ;OLLOW E4090 IFLNOM)3.T0)GO TO ID01

IF(IPE4oEQ.3) GO T) 100LIF (LPL9iCkL- N4UM3R(EKEWEKAY,SIZECONTHETANDGT)[FCLPLOr)C4LL NUMbiER((EYE-I..)OCSALEI,(JAY-l..)*CSALEJ,.15C,4,TIET

l&,v4DGT).001 :O.ATINu=

GO T0CZi9Z4qZbv30958)*1 ET6500 efRIE(b,',531)NIN,i(3EG,KBi GMiXK, IEJEKONTUI,C0N ,KBEGtiNt501 :ORMAT( i,4N,11l5/5HKBEG, 1I5/7H(BEGMX-, I15/ZH-lI5/3H-IC-,115/

03J-157KNU-15tlO-E)B 7HKBEGrr4-, 115//)(BEG-.GO T) 15

)00 4RITEIS,70D1)301 :0R~&T(IllI5KIERc:,<-E4TIVE NO, OF CONTOJRS/1-11)

E TURN'END

Al 04

Page 194: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

H. CUSER DIAGRAM PROGRAM

This program consists of three major paxts: subroutines to load arrays,a section to prepare for the plotting, and a section to do the plotting.Prior to loading the data arrays a certain amount of information is read in.Part of this is read in in the main program and the rest is read in inDIRLD from which it is passed back. DIRLD loads the directioni array.MAGLD loads the magnitude array. After these two arrays are loaded, themin and max of the magnitude array are found. The program next- goes about.drawing a box around the defined region and putting a title on it. Thefinal phase of the program is to actually draw the arrows and then dump

the buffer.

A1 05

Page 195: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

AD-All$ 168 NAVAL OCEAN RESEARCH AND DEVELOPMENT ACTIVITY NSTL S--ETC F/6 05/4

APPLICATI ON OF A DISCRETE NONLINEAR SPECTRAL MODEL TO IDEAL CAS- ETC(U3

L APR 'A2 J N ALLENDER, M LYBANON

UNCLASSIFIED NO'RDA TN 14 DNA7.Ehhmhh*3l3

Page 196: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

- •

INPUT LIST FOR CUSTER DIAGRAIM PROGRAM

FORMAT VARN AME DESCRIPTION

H10 NCHAR number of characters in title

8A10 TITLE title of graph2F10.5 XL,YL x-axisy-axis length

2110 NXPTSNYPTS number of points- xy directions

NOTE: THE FOLLOWING VARIABLES ARE REAd 'in DIRLD.

I10 NGRID number of grid points

XI0 NF number of frequencies110 NB number of words in buffer110 IOFSET number of words of stuff before grid point info starts

414

[1LI

A1 06

Page 197: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

NCIA R - number of characters in title

TITLE(8) - 80 characters to be used as a title for the graph

NXPTS - number of points in the X direction

NYPTS - number of points in the Y direction

NGRID - number of grid points on tape (same as NGRID in Wave Model)

NF - number of frequencies

XL - length of x-axis in yinches

YL - length of Y-axis in inches

DX - distance between each point in x direction as it is plotteddistance pen moves in x direction each timc it plots a point

DY - distance pen must move in Y direction each time it plots a point

MAXLEN - maximum length of an arrow

MINLEN - minimum length of an arrow

NOTE: data is always scaled to use full arrow range

MAXVAL - maximum data value

MINVAL - minimum data value

TI - size passed to SYoMOL for arrow

T2 - angle of rotation passed to SYMBOL for arrow

X - x coordinate of where the arrow is to be drawn

Y - y coordinate of where the arrow is to be drawn

VALPAN - range of values (MAXVAL-MINVAL)

HAG(20,20) - magnitude array, data for magnitude of arrew is read into here

DIR(20,20) - direction array, data for direction to rotate arrow I&

read into here

BITFi,-R(151 I) - temporary input btuffer

A107

Page 198: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

NB -size of buffer, num~ber of words to be read at a time

IOFSET -length of preliminaries, numiber of words of datathat occur prior to the first grid point value

A1 08

Page 199: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

DIRLD - subroutine to load direction array

PARAMETERS -

NGRID - number of grid points,used to determine index into buffer

DIR(20,20) - direction array, array to be loaded with direction information

IX - number of points in x directionIY - number of points in y direction

NF - number of frequenciesBUFFER(1511) - temporary input bufferNB - actual minimum buffer size in wordsIOFSET - number of words of information preceding grid point :Information

VARIABLES -

IND - index into BUFFER, indicates whicL element of BUFFER is Joaded into )IRI - loop index variableJ - loop index variable

TEXT -

This subroutine loads the direction array, DIR. READS is calledto load BUFFER with the correct values. An offset of 11 words existson SRECs before the grid point information is started, The directionvalues begIn 2*NCID v;ords beyond the offset, hence IND starts with avalue equal to IOFSET+2*NGRID.

I I0

AlO

Page 200: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

MACLD - subroutine to load magnitude array

PARAMETERS -

MAC(20,20) - magnitude array, array used to hold raw magnitude values forarrows

IX - number of points in x directionIY - nunber of points in y directionBUFFER - input bufferNB - size of input buffer in wordsIOFSET - number of words of information prior to grid point information

VARIABLES -

IND - index into BUFFEREPM - normalization constantI- do loop index -.

J- do loop index

TEXT -4

This subroutine loads the magnitude array, MCG. The routine assumes *

that DIRLD has already loaded BUFFER for it. The magnitude informationstarts right after the offset, hence IND starts at IOFSET+1.

I.

7

A.

i

All0

Page 201: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

.

EXTREM- this subroutine finds the minimum and the maximum in a two-dimen-sional array.

PARAMETERS -

A(idJmjdim) - array to be searchedIDIM - dimesion of A (first)

JDIM - dimension ofA (second)MIN - minimum value found

MAX - maximum value found

VARIABLES -

I - do loop indexJ - do loop index

TEXT -

This subroutine searches a 2-d array and determines the minImum andmaximum values contained in the array.

AIII Al 11

Page 202: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

READS- this subroutine reads an SREC

PARAMETERS-

LUIN - logical unit number, device number of tape with SRECBUFFER - input buffer that is to receive the SREC dataNB - number of words to be read inNF - number of frequencies

LOCAL VARIABLES-

I - do loop indexDUM - temp location used to reaa into while skipping over records

TEXT-

This subroutine spaces the tape forward to the SREC and then loadsit into BUFFER. The number of words read in depends on NB.

Al1 2

Page 203: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

PP.LGRA14' CUSIF-R( fIPUT ,OUTPUT ,TAPF5= INPUT,91APE6-'OUTPUT,TApr l,TAPf 2,TAPE7)

C THIS PPOGRAm. fl0!-A A G1 NLPAL CUSTFR PLOT*C SLJ11POUTIMF OIFRL[ LO'ADS THE Dl P[CTIOt4 AkRAYC SUBIR-AuTINE MINGLE) LO'AD% THE M1AG'41TUOF ARRAY

INTc-Gtf 4CHAR ,TITLE (Ei)v,4XPTSvI!YPTSNGPIDqNF

R FAO 1)j i.C 3i NC HAR

~EAO~,1W1)TI TL!'

1001 O~ATR~.

ULAO(5, l:'r(') NXPTS,t4YPT39RITE(b,00l)N'XPTs,XLNyprs,YL

2001 F ORMAT ( IH , 13,91 H P VI NTS ON , F 7& 4t1211 LONG X-A X I S+ i 1 3,t1I.H POINTS5 ON ,F7.,92H LONG Y-AXL1)

DX=XL/NXPTSOY'-YL ,NYPTSWRITE(6t2IPO2) DXIJY

2002 r ORMAT ( 4- DX 9F 7 e v10 X t4-1 D Y-9,F 7o 4M1AXL FN=A M I N1 OX vDY4 1 NLE N=Oo05CALL OIR...(NGIDORNXPTSNYPTSMiFBUFFER, Nti ,OFSET)C ALL KArvLD (MAGNXPT S NYP TS vBUFFE R 9NB v I0FS T):ALL EX1%lFM1fAG ,NXPTSNYPTSMINVALiMAXVAL)VALRAN=MAXVAL-M INVAL

C I N IT IAL I E PL (T SCALL PLOISU ' . A 9 .0 97)

C MOVE AWAY FROM EDGF OF PAPERCALL PLOT(.4*5,6o5,-3)

C DRAW FIOXLAUt. PLOT 4-DXI?.9-OY/2., 3)CALL PLOT (-nX/z.0,Yt-+DYt?96v2)CALL PLnT(XL4 tX/?.l9YL+DY/2.(;,?)CALL PLOiUXt *fX/?.0 ,-DY/Z*C,,?)CALL. PLnT(-[)XI?.,-0Y/.),2)CALL PLOT( X/?. 1' 0fY/2*.),-3)CALL SY43(lLU a^.0 ,YLOY,90. ?5,tT IL9 ,o0,NCHAk)CALLSYiL(-4X)0),XLN15,.OCX =n*'

)0 1TC( $l) NXPTS,XLNPSDO 90 J=1,NYPTSV1

T 1. =t I NL " ri + C ( M AG (I 1 J ) -,hl IIV A L. ) I VALP. AN 11 IAXL fHj-j rIL lLH)Tc'ODIR( IJiCALL SYMPOL( X9YvT1,i)5,T2,)Y=DY+Y

WR I Tu (6 10) 1 9 J ,X qY 9 hG( 1 j ) ,0D1R ( I -)

9)0C C 0N T 1 N Ll

Y=0 0100 CONTPI NO

:ALL PLOT(OO,999)

STOP

Al 13

Page 204: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

C SU(-lkOUTI*lE 1)IRLO(14GkIDDIP., IXiYNFsBUFFLRNBsIFSF-T)

C THIS SUPRO1UTIME LOADS THE DIRECTION ARRAYC NGRIDJ - NUMBtER OF GPIL) POINTSC NF - NU.MFMP OF FREQUENCILSC NB - fUJFFFR SIZ['C IX - FIRST DIM ENSION 00 DiIRC lY - SECOND DIMFNSION OF PJRC DIR - DIRECTI.Wt "PAYCIOFSET - NUMflFR OF LOCATIONIS TO SKIP L

C IND - USED AS !NDEX INIO BUF EkC BUFFER - INPUT BUFFER

REAEJ(5s1V'C) NGRID100C FORMAT(51UO)

WR IT ( b, 2Wfl) NCR I2003 FORMAT(7i NGRID=9153

READ5,1rflC)NF?RITE(b,.?O01) NF

2001 FOR-l1AT("tH NF,915)

WRITE(b,20O2) N82002 :ORMAT(i NB=,I5)

lEAD (59i1C0) IOFSET4RITE(b,!C'03) IOFSET

2003 FORMAT(861 IOFSET=,15)CALL READS(lsBUFFER9NB9WN) 7IND)-IDFSET.I*NGRID+l JDO 10 J-19TY91 L

DO 10 I=1,IXqlDIR(IiJ)=360-AMOD((57.296*BUFFER(IND)),360.O)I 4)1+ I ND

10 CONTINUE iRET URPNEND

Al 14

Page 205: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

stJ'~rfUIIMF MAGLO

SUBiROUTINE: '1GLD(1AG,1X, rYsnUFFERNHIr1rSET)C

INTEGER IX, IYNb13IF SET, INEZEAL !AG(1XIY) ,iFFER(N4I)

rPM~bA 52?0')DO) ?C' j = ,1 91

CIC N D=I + INP

20 CONlTI NUFRETURN

FN D

Al

Page 206: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

t,F!0aLJN!E EXTRki 1SUI3ROUT14E EXTPEM( A, 101.9JD1MMJIN9MAX)

C THIS SUBR0UT I ME F INDS THE MI 'A AND THE MAX OF A 2-Dl ARRAYINTEGER IDIH, JOIM,! ,JRFAL Id IDI9JI).1NvM~AX

4AXMI N)0 20 I=1.,,IDIMI. 1'

MAX=AMAX1 (MAXA( I, J)10 C04TINLUr20 CfllT IN Ut

RETURNE ND

7

71.

All 6

Page 207: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

'J'I)POOTP4E RE.ADS

SUEOOUTINF READS (LUtN, aJFFEk., INI, NF)

C SUt]P[JUTI'V T9 KCAt) SUtIAZY VIECU0C SU"IS t)V1F FkRFOUENCY AND DIRECTION.

Z L AL BUF FFR (A 1)

Rl WI ND L LiiC SKIP TO: S 'rC,

-10 1.' 1=104rBUFFER IN (LUN,1) (DU,1,DJMI')

IF (UNIT (L04)I) 1"), 50, 5:)

10 ZONTINIEC ZFAD SREC.

BUF rFR IN (LUN,1) (BUFFEZ(1),BUF~f.t~(N8))

IF (UNIT (LUS)) 20, 509 50

REWIND LUN

RETURN

50 WRITE (b,10'0C) LV41000 FORMAT (32HOi n ERROR 9R EIJF READING UfNIr,13,p614

STOPc

ENDL

Al 17

Page 208: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

UNCLASSIFIEDSLCUk;TY CLASSIFICATION OF THIS PAGE (Shen Data Entered)

REPOT DCUMNTATON AGEREAD INSTRUCTIONS______ REPORT____DOCUMENTATION_______PAGE_ BEFORECOMPLETINGFORM_

IET 148E ~GOVT ACCESSION No. 3RECIPIENT'SCATALOG NUMBER

Applcaton f aDiscrete Nonlinear SpectralModel to Ideal Cases of Wind Wave Generation ______________

6 PERFORMING ORG. REPORT NUMIER

7 AUTtMORs, B. CONTRACT OR GRANT NUMBER(@)

J. Allender and M. Lybanon

9 PERFORMING ORGANIZATION NAME AND ADDRESS 10 PROGRAM ELEMENT. PROJECT, TASK(

Naval Ocean Research and Development Activity AREA 6WORK UNIT NUMBERS

Ocean Science and Technology Laboratory PE 61153N, PN RR3105NSTL Station, MS 39529 TA RR03105330, WU 13312C

1 1 CCNTROL.LIN5 OFFICE NAME AND ADDRESS 12 REPORT DATE

April 198213 NUMBER OF PAGES

__________________________________________20314 MONITORING AGENCY NAME 6 ADDRESS(if different fronm Controllind Office) 15 SECURITY CLASS. (of thie report)

UNCLASSIFIED1S. DECLASSIFICATION DOWNGRADING

SCHEDULE

16 DISTRIBUTION STATEMENT of this Report)

Unl imi ted t.ITRIBU'T1ONSTATrEM-NT AApproved for public xuno

17 DISTRIBUTION STATEMENT (of the abstract entered In Block 20. it different front Report)

IS SUPPLEMENTARY NOTES

19 KEY WORDS (Continue on reverse side of necessry~ and identify by block nunmber)

Ocean Wave PredictionSurface Wave ModelingSpectral Wave ModelWave Model Intercomparison

20 ABSTRACT (Continue on reversCe side it necessmanmd identify by block num~ber)

The discrete nonlinear spectral model developed by Allender, Barnett, andLybanon (Proc. Synip. on Wave Dyn., Plenum Press, 1982) is applied to sevenideal cases of wind wave generation. These cases form the basis of aninternational study to compare wave prediction models (Hasselmann, et al.,Proc. Symp. on Wave Dyn., Plenum Press, 1982). Model results are summarizedgraphically for each case, as applicable, and a brief explanation of model

behavior is given.

DD I A 1473 EDITION OF INOV 65 IS OSSOLETIE UCASFI 0?L F 014.601SECURITY CLASSIFICATION OIF THIS PACE (Whien Date Enterod)

Page 209: A DISCRETE NONLINEAR mhEhEEhh mohhohmhhhEEEE … · Barnett, and Lybanon +Pfoc. Symp. on Wave Dyn., Plenum Press, 1982) is applied to seven ideal cases of wind wave generation. These

UNCLASSIFIEDSECURITY CLASSIFICATION OF THIS PAGE 'When Date EntIred)

The model is free of numerical dispersion and damping, and reproduces theJONSWAP relations for fetch- and duration-limited wave growth quite well.Model results from cases with increasing complexity provide a benchmark forunderstanding model behavior in actual situati( s and for future improvements.

I:

i

UNCLASSIFIEDSECURITY CLASSIFICATION OF THIS PAGEfl~efl Date Entered)I