Sie sind auf Seite 1von 28

WAPO AND COCO

MODELS
QUICK GUIDE

ENGINEERING INSTITUTE, NATIONAL UNIVERSITY OF MEXICO


Rubí Esmeralda Martínez Martínez
Itxaso Odériz Martínez
Edgar Gerardo Mendoza Baldwin
Rodolfo Silva Casarín
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Index
WAPO MODEL ................................................................................................................................... 2
BRIEF DESCRIPTION ........................................................................................................................... 2
STRUCTURE OF THE COMPUTER PROGRAM WAPO_V4 ....................................................................... 3
Preprocessing Module BWAPO4 ................................................................................................. 3
Solving module WAPO_V4 .......................................................................................................... 4
Input Files ..................................................................................................................................... 4
List of wave trains to be run .................................................................................................................... 4
General Data of the Wave Trains ............................................................................................................ 4
Criteria for establishing the incident wave direction ............................................................................ 7
File containing bathymetry ...................................................................................................................... 8
Output files ................................................................................................................................... 9
Intermediate file with all the initial conditions .......................................................................................... 9
Intermediate file input to WAPO_V4 ....................................................................................................... 9
File with maximum wave height results ................................................................................................. 10
Output file with instant free surface ....................................................................................................... 10
RUNNING THE PROGRAM................................................................................................................... 11
Executable Files ......................................................................................................................... 11
Output files ................................................................................................................................. 11
Presentation of results ............................................................................................................... 12
COCO MODEL .................................................................................................................................. 13
BRIEF DESCRIPTION ......................................................................................................................... 13
INPUT FILES ..................................................................................................................................... 13
General conditions file ................................................................................................................ 13
OUTPUT FILES ................................................................................................................................. 14
RUNNING THE PROGRAM................................................................................................................... 15
ANNEX 1: HOW TO GET GRD AS INPUT? .................................................................................... 16
FROM FILE DATA X, Y, Z ................................................................................................................... 16
FROM AUTOCAD FILE ...................................................................................................................... 18
HOW TO ROTATE A TOPO-BATHYMETRY? ........................................................................................... 19
When you have a AutoCAD file ................................................................................................. 19
When you have a file of points X, Y, Z ....................................................................................... 19
Input file ................................................................................................................................................ 19
Program execution ................................................................................................................................ 20
ANNEX 2: HOW TO GRAPH THE WAPO RESULTS IN SURFER? ............................................... 21
MAXIMUM AMPLITUDE FILE ................................................................................................................ 21
INSTANTANEOUS FREE SURFACE FILE ................................................................................................ 22
ANNEX 3: HOW GRAPH THE COCO RESULTS IN SURFER? ..................................................... 23
TO GENERATE THE CONTOUR MAP ..................................................................................................... 23
GENERATE THE VECTOR MAP ............................................................................................................ 24
REFERENCES .................................................................................................................................. 27

Página 1 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

WAPO Model

Brief Description
The WAPO model has been developed to compute the propagation of monochromatic wave trains
over a variable bottom. It solves the elliptic modified mild slope equation in two dimensions and is
capable of reproducing wave phenomena such as: refraction, diffraction, shoaling, reflection and
energy dissipation induced by both bottom friction and breaking.
The main assumptions behind the modified mild slope equation are: irrotational flow, incompressible
fluid and linearity; this means that the governing equation can be the Laplace equation solved for
the velocity potential and subject to kinematic and dynamic boundary conditions at the water free
surface. Additionally, waves are considered to be travelling over an impermeable bottom which
provides the last boundary condition. The result of this procedure is the mild slope equation, derived
first by Berkhoff (1972) who limited his solution to a slowly varying depth.
Further research by authors such as Massel (1993), Chamberlain and Porter (1995), Kirby and
Darlymple (1994) and Losada, et al. (1996), who considered the second order terms resulted in so
called modified mild slope equation which showed better accuracy and removed the restriction of
the slowly varying depth.
The most compact way to write the mild slope equation is in the Helmholtz form:
(1)
where:
( )
( ) √
( )

∫ ( )

( )
( )

This equation is numerically solved in a second order finite difference scheme; this means that the
velocity potential in each cell of the domain is found by solving a linear complex system of
equations.
For further reading, please see Manual del Usuario y Documentación de Referencia del
Programa MWAPO3, and Silva et al. (2005).

Página 2 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Structure of the Computer Program WAPO_V4


The name of the program comes from the acronym WAve Propagation On the coast. Version 4, it
has been coded in Fortran 77 and is divided in three modules: 1) MWAPOV4 which is only in
charge of controlling the process of multiple consecutive runs and calling the other two modules;
this is the only module the end user needs to execute, 2) a preprocessing module called BWAPO4
and 3) the solving module WAPO_V4. In addition to the modified mild slope equation the program
also can also run a modified version of the Ref-Dif (Kirby and Dalrymple, 1986) which is a parabolic
approximation to the mild slope equation called OLUCA-UNAM (the name OLUCA was given by the
IH Cantabria, the Hydraulics Institute of the University of Cantabria, Spain).

Preprocessing Module BWAPO4


This module reviews and prepares the initial conditions and bathymetry information of the study
area; it also creates a database that is read by the WAPO_V4 module.
BWAPO4 module has a main routine and seven subroutines (LEODATA, LEO_GRID, QUALBAT,
ASIGN, CHECK1, KEY and CELL).
Main Routine: Reads the file name in which the general data of the wave train has been written.
Subroutine LEODATA: Reads the general data of the wave train from a plain text file (name of the
file containing the bathymetric data, wave amplitude, wave period, tide level and properties of the
boundaries).
Subroutine LEO_GRID: Reads the bathymetry from an ASCII GRD SURFER file.
Subroutine QUALBAT: Reviews that all the cells with negative depth are interconnected and if
lagoons (cells not connected to the main water body) exist gives those cells a value equivalent to
land.
Subroutine CHECK1: Verifies that each water cell has, at least, four neighboring water cells. Where
ever this condition is not fulfilled it converts the necessary number of cells into water cells and sets
to them a high dissipation value.
Subroutine KEY: Gives an ID number to each cell according to its condition, number and position of
its neighbor cells. This ID number is the used to construct the system of equations.
Subroutine CELL: Orders the cells and numbers them consecutively, from the relative West to East
and from North to South. Land cells are eliminated in this process. A text file is written which
contains, for each cell, its position i,j in the computational grid, its ID number, its friction value, its
dissipation value, its reflection value, the position of its neighbors and the cell depth corrected for
tidal effect.
The origin of the mesh is in the North-West corner, with the entire domain being positive (Figure 1).
Y
X

Figure 1. Mesh origin

Página 3 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Solving module WAPO_V4


Once the initial condition map has been constructed, the WAPO_V4 program runs. This program
has a main routine and eight subroutines (LEODATA, WVNUM, ZKC, LATERAP, COEFF,
SOLVER, ANGU and GRD).
Main Routine: It reads, from screen, the file name with the list of cases that will be run.
Subroutine LEODAT: Reads the map of initial conditions written by BWAPO4.
Subroutine WVNUM: Computes the local wave number for the entire domain.
Subroutine ZKC: Calculates the dissipation terms for the whole domain.
Subroutine COEFF: Constructs the coefficient matrix of the system of equations.
Subroutine SOLVER: Solves the system of equations.
Subroutine ANGU: Computes the wave direction for each cell of the domain.
Subroutine GRD: Writes the results.

Input Files

List of wave trains to be run


This list must be written in a plain text file and should be named as shown below:
c a s o s P M . t x t  c a s o s _ _ . t x t

The characters “PM” may be substituted by any other to identify the specific list.
In the first line of the file the number of wave trains to be run is written. The following lines have the
name of the input file of wave train.
An example of this is shown in Figure 2.

Number of cases 5
to run PM01WAP.INP
PM02WAP.INP Name of the file of
PM03WAP.INP conditions
PM04WAP.INP
PM05WAP.INP

Figure 2. Sample file with a list of cases

General Data of the Wave Trains


The name of the file containing the data of each wave train is a string of seven characters, the first
two are and ID code indicating the physical scenario and must correspond to the two letters chosen
to identify the list of wave trains; the next two characters identify the specific wave train. The name
ends with the word “WAP” which identifies the file to be an input for WAPO model.
An example of the structure of a general data file is:
P M 0 1 W A P . I N P  L L N N W A P . I N P

The structure of this file is as shown below:


1 C Line for comments
2 C Line for comments

Página 4 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

3 3 IORI IORI Boundary from where waves come


For WAPO alone
= 1 North
= 2 West
= 3 East
= 4 South
For nested meshes OLUCA-UNAM + WAPO
= 5 North
= 6 West
= 7 East
= 8 South
For OLUCA-UNAM alone
= 11 North
= 12 West
= 13 East
= 14 South
4 10.0 T T Period in seconds
5 1.0 A A For IORI ≤ 4 (wave amplitude (H/2) in meters)
6 -45.0 TETA TETA Para IORI ≤ 4 (wave incident angle in degrees)
Para IORI > 4 (cell in X where both meshes coincide)
7 1 IBREAK = 1 (include wave braking)
= 0 (ignore wave braking)
8 1 IWN IWN Wave number approach (Linear = 1, Hedges = 2)
9 0.1 DMIN DMIN Minimum depth considered as water in meters
10 0.0 TLEVEL TLEVEL Tidal level in meters
11 1 Number of regions with different bottom friction factor
12 0.0 1 1 251 251 Value and position i, j of start and end of each region
13 1 Number of regions with different reflection factor, north border
14 0.0 1 251 Value and coordinates of start and end
15 1 Number of regions with different reflection factor, west border
16 0.0 1 251 Value and coordinated of start and end
17 1 Number of regions with different reflection factor, east border
18 0.0 1 251 Value and coordinated of start and end
19 1 Number of regions with different reflection factor, south border
20 0.0 1 251 Value and coordinated of start and end
21 1 Number of regions with different reflection factor, inside (domain)
22 0.0 1 1 251 251 Value and position i, j of start and end of each region

Figure 3 shows an example of this file.

Figure 3. Example of a general data file

Página 5 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

The name of the ASCII GRD SURFER file containing the bathymetry data is given by the two
character ID code of the list file followed by “BAT” or “REF” if the bathymetry is going to be run by
the WAPO or OLUCA-UNAM model, respectively.
P M B A T . G R D  _ _ B A T . G R D

P M B A T . G R D  P M R E F . G R D

For 5 ≤ IORI ≤ 8, the computation will be made by OLUCA-UNAM for the deep water grid and with
the WAPO for the shallow water grid as shown in Figure 4.

7000

MALA
Deep Water Grid
6000 APROXIMACIÓN
(OLUCA-UNAM)
(OLUCA-UNAM)

5000

4000

3000

MALA
Shallow Water Grid
DETALLE
(WAPO_V4)
2000
(WAPO3)

1000

0
0 1000 2000 3000 4000

Figure 4. Grid array for nested runs


It is important to note that for the case of nested grids, the array should be oriented (incident
boundary) to the relative North because of OLUCA-UNAM requirements.
As an additional note, the election of the cell size in the directions X and Y should not exceed the
following relations:
Cell size for the WAPO:

Cell size for the OLUCA-UNAM:

Página 6 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Criteria for establishing the incident wave direction


The angle 0° corresponds to normal incidence relative for each boundary. Positive incident angles
are counter clockwise (Figure 5).

Figure 5. Sign and direction of the incident wave


To ensure precision and numerical noise reduction, the boundary chosen as incident condition (line
3 in the structure of the general conditions file) should coincide with what can be considered
constant depth. If necessary the grid must be rotated to fulfill this condition as shown in Figure 6.

Figure 6. Incorrect and correct domain orientation


An example on how to rotate a bathymetry is presented in ANNEX 1.
Figure 7 shows examples of the recommended criteria for choosing the incident boundary
depending on the wave direction.

Página 7 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Figure 7. Criteria for the incident boundary depending on the wave direction

File containing bathymetry


This is an ASCII GRD SURFER file, as it is a text file it can be easily drawn in other programs, such
as MATLAB.
The bathymetric data is written in this file as illustrated in Figure 8.

DSAA
NY NX
Ymin Ymax
Xmin Xmax
Zmin Zmax
H(NX,1) H(NX,2) H(NX,3) ………… H(NX,NY)
H(NX-1,1) H(NX-1,2) H(NX-1,3) ………… H(NX-1,NY)
H(NX-2,1) H(NX-2,2) H(NX-2,3) ………… H(NX-2,NY)
. . . . .
. . . . .
. . . . .
H(2,1) H(2,2) H(2,3) ………… H(2,NY)
H(1,1) H(1,2) H(1,3) ………… H(1,NY)

Figure 8. Structure of the bathymetry file


Where,
DSAA is a text that used by SURFER to identify the file as GRD
NX is the row number
NY is the column number
Xmin is the X coordinate where the bathymetry starts
Xmax is the X coordinate where the bathymetry ends
Ymin is the Y coordinate where the bathymetry starts
Ymax is the Y coordinate where the bathymetry ends
Zmin is the minimum depth
Zmax is the maximum depth
H(i, j) is the depth of the cell (i,j), where the bathymetric levels are negative and the
topographic levels are positive.

Página 8 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Output files

Intermediate file with all the initial conditions


BWAPO4 module writes this file; it contains all the mapping data of the initial conditions. All the data
is placed in columns as follows:
I, J, II, ID, FR, IDIS, G_1, G_2, G_3, G_4, NEI, H
Where, for each cell:
I row number (X direction)
J column number (Y direction)
II consecutive number (without removing land cells)
ID identifier code
FR local value of the friction factor
IDIS local dissipation value, different from zero only when a land cell was converted in water
G_1, G_2, G_3 and G_4 local absorption value in the North, West, East and South sides of a cell
NEI location of neighbor
H local depth

Intermediate file input to WAPO_V4


Having numbered all the cells and having removed the land cells, this file contains:
I, J, II, ID, FR, IDIS, G_1, G_2, G_3, G_4, NEI, H
The only new variable is II, the consecutive position of the cell.
Finally the following are listed in the file:
IMIT1, IMFT1, IMIT2, IMFT2
IMIL1, IMFL1, IMIL2, IMFL2
IMIR1, IMFR1, IMIR2, IMFR2
IMIB1, IMFB1, IMIB2, IMFB2
Where:
IMIT1 on northern border, first water cell
IMFT1 on northern border, first land cell
IMIT2 on northern border, last water cell
IMFT2 on northern border, last land cell
IMIL1 on western border, first water cell
IMFL1 on western border, first land cell
IMIL2 on western border, last water cell
IMFL2 on western border, last land cell
IMIR1 on eastern border, first water cell
IMFR1 on eastern border, first land cell
IMIR2 on eastern border, last water cell
IMFR2 on eastern border, last land cell
IMIB1 on southern border, first water cell
IMFB1 on southern border, first land cell
IMIB2 on southern border, last water cell
IMFB2 on southern border, last land cell

Página 9 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

File with maximum wave height results


This file is also an ASCII GRD SURFER file named as follows:
P M 0 1 A M P . G R D  L L N N A M P . G R D

The two first two characters correspond to the project identifier, the next two indicate the wave train
and the text “AMP” means it is the wave height file. See Figure 9.

DSAA
NY NX
Ymin Ymax
Xmin Xmax
ALTMI ALTMA
A(NX,1) A(NX,2) A(NX,3) ………… A(NX,NY)
A(NX-1,1) A(NX-1,2) A(NX-1,3) ………… A(NX-1,NY)
A(NX-2,1) A(NX-2,2) A(NX-2,3) ………… A(NX-2,NY)
. . . . .
. . . . .
. . . . .
A(2,1) A(2,2) A(2,3) ………… A(2,NY)
A(1,1) A(1,2) A(1,3) ………… A(1,NY)

Figure 9. Writing for the maximum amplitude file


Where:
ALTMI is the minimum wave height in the domain
ALTMA is the maximum wave height in the domain
NX is the number of cells in direction X
NY is the number of cells in direction Y
A(i, j) is the local wave height

Output file with instant free surface


This file is also an ASCII GRD SURFER file named as follows:
P M 0 1 S U P . G R D  L L N N S U P . G R D

The two first two characters correspond to the project identifier, the next two indicate the wave train
and the text “SUP” means it is the free surface file. The structure is shown in Figure 10.

DSAA
NY NX
Ymin Ymax
Xmin Xmax
SMI SMA
S(NX,1) S(NX,2) S(NX,3) ………… S(NX,NY)
S(NX-1,1) S(NX-1,2) S(NX-1,3) ………… S(NX-1,NY)
S(NX-2,1) S(NX-2,2) S(NX-2,3) ………… S(NX-2,NY)
. . . . .
. . . . .
. . . . .
S(2,1) S(2,2) S(2,3) ………… S(2,NY)
S(1,1) S(1,2) S(1,3) ………… S(1,NY)

Figure 10. File structure for instant free surface


Where:
SMI is the instant free surface to minimum wave in the domain
SMA is the instant free surface to maximum wave in the domain
S(i, j) is the instant free surface to local wave

Página 10 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Running the program


To run the program it is necessary to create a folder where the executable programs, the input and
output files are placed and written.

Executable Files
The required executable files are:
BWAPO4.exe
Mwapo_v4.exe
OLUCA-UNAM.exe
WAPO_V3.exe
The file which will be executed is the mwapo_v4.exe and, although the user can only click twice on
the file, it is preferable to open a command window and execute it manually. In the window, write
the file (with the extension) of the list of the wave trains to run (Figure 11). Automatically the
program will start running.

Figure 11. Start window for the mwapo_v4.exe program


The running time will depend on the processor velocity and the grid size.

Output files
Once the running is finished the window will close and the next files will appear in the folder:
File required for the analysis of currents induced by waves:

P M 0 1 A C D . D A T  L L N N A C D . D A T

File with results of maximum amplitude:


P M 0 1 A M P . G R D  L L N N A M P . G R D

File with results of momentary free surface:


P M 0 1 S U P . G R D  L L N N S U P . G R D

The following files will also be generated, they have data relevant for the program but not for the
end user:
RODO.GRD
RODOX.TXT
RODOY.TXT
INPUT.TMP
BORRA.BAT

Página 11 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Presentation of results
The files LLNNAMP.GRD and LLNNSUP.GRD for each of the wave trains can be plotted as maps
to view the results. The recommended program for plotting is SURFER and the format of the map is
choice of the user, (Figure 2).

Figure 12. Example of presentation of results: left, the maximum wave amplitude, right; the
instantaneous free surface
More information on how to plot on SURFER can be found in ANNEX 2.

Página 12 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

COCO Model

Brief Description
This model estimates the currents induced by waves. It is based on the Nonlinear Shallow Water
Equations, which in their integral form can be written as:

∫ ∮ ̂ ∫

Where

* +

( )

( )
[ ]
Ω is the domain, S is the Ω perimeter, ̂ is the flux vector function, and are the
viscid and non-viscid fluxes. The model solves these equations in a first order finite volume scheme.
More details on the mathematical model can be found in Silva et al. (2010).

Input Files
To execute the program the following files are required:
File ACD obtained for the execution of the WAPO:
P M 0 1 A C D . D A T  L L N N A C D . D A T

Bathymetry used for modeling WAPO:


P M B A T . G R D  _ _ B A T . G R D

File with the general conditions of the specific run:


P M 0 1 . I N P  L L N N . I N P

General conditions file


The structure file is organized as follows:

1 C Line Comment
2 PMBAT.GRD File GRD with the mesh (must be the same input file that WAPO is running)

3 10.0 T T period in seconds


4 1.0 A A wave amplitude in meters
5 0.02 DT DT time step in seconds
6 1.0 TLEVEL TLEVEL tide level in meters
7 180.0 total simulation time in seconds.
8 179.0 time of the first writing
9 1.0 writing step in seconds
10 10.0 EDDY VISCOSTITY
0.02*DxDy/Dt
=1 Courant (Dt)
11 1 IFRIC IFRIC friction coefficient
= 0 Manning

Página 13 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

= 1 Chezy (18*LOG(12*H/K))
12 2.5 If IFRIC
= 0 Mannin´s n
= 1 Nikuradse’s K (2.5*D50)
13 0.3 Minimum depth value considered as water

Output Files
The outputs after each run are:
P M 0 1 N E I G H . D A T  L L N N N E I G H . D A T

P M 0 1 5 9 0 0 . D A T  L L N N 5 9 0 0 . D A T

P M 0 1 6 0 0 0 . D A T  L L N N 6 0 0 0 . D A T

Other outputs are:


SLOPEX.DAT
SLOPEY.DAT
TENS.DAT
The most relevant output file is:
P M 0 1 6 0 0 0 . D A T  L L N N 6 0 0 0 . D A T

This file is a matrix with the following structure:


A B C D E F G H I
CoordY CoordX NumCel SupA VelX VelY Vel Dir Prof

Where:
A–I Are the columns of the matrix and they do not appear in the file.
CoorX X coordinate in the cell beginning from West to East.
CoorY Y coordinate in the cell beginning from North to South.
NumCel Is the identification number of cell.
SupA Is the value of free added surface.
VelX is the X component of the velocity of the current induced by waves in m/s
VelY is the Y component of the velocity of the current induced by waves in m/s
Vel is the value of the velocity of the current induced by waves in m/s
Dir is the angle of the current in each cell
Prof is the depth of the cell; -99 mean land and positive values are the local depths

Página 14 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Running the program


Like WAPO, the execution of the program is very simple. A folder must be created where the
executable COCO2.exe and the required inputs will be.
Click twice on the executable and a window will appear, as is indicated in Figure 13, where you will
write the file name of the general conditions with extension. Press enter and the program will start to
read the input data and will start to calculate the currents.
Unlike WAPO, COCO must be executed case by case.

Figure 13. Example of execution window COCO


At the end a vector map of the currents is given (Figure 14) and the format of the maps is the choice
of the user.

Figure 14. Example results of COCO


More information on how to plot the results of COCO can be found in ANNEX 3.

Página 15 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

ANNEX 1: How to get GRD as INPUT?

From file data X, Y, Z


If you have a topo-bathymetry in a text file with coordinates X, Y, Z, the steps to follow are:
1. Open the program Surfer
2. In the toolbar click Grid → Data (Figure 15). The window indicated in Figure 16 will appear
and you must select the file data. The window shows the structure of the file, click to accept
and other window will be open.

Figure 15. Location of Grid → Data option in Surfer

Figure 16. Window that appears when the points file is selected
3. The window opened is like the window in Figure 17, in which the proprieties of the mesh will
be specified.
The brown box indicates the order of column of the file.
The purple box indicates the kind of the interpolation of the mesh; it has to be the Triangulation with
Linear Interpolation or Kriging.
The orange box specifies the path, kind and name of file.

Página 16 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Coordinates

Interpolation Location and type


Method of file

Size of the
grid

Figure 17. Window mesh specifications


The generated file must be a GRD, of the ASCII kind, when we click the icon to open, a window will
appear and the file mesh created must be selected and saved as GRD Surfer6 Text Grid (*.grd)
(Figure 18).

Figure 18. Type format for the GRD generated


In the green box we must introduce the size of the mesh. The maximum and minimum values of X
and Y can be changed, and also the size of the cell (Figure 19). The last column is the number of
lines of the mesh in both X and Y directions. As with the WAPO program, this number cannot be
bigger than 100.

Figure 19. Mesh size


4. Click to accept and a box dialogue will appear that says the mesh has been created.
The mesh is already created to use as an input file for COCO and WAPO programs.

Página 17 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

From AutoCAD file


If you have an AutoCAD file, geo-referenced points or counters, it is necessary create a file data X,
Y, Z and follow the steps of the previous section. To do this, the file AutoCAD must be saved as
“.dxf”.
To obtain the file of points x, y, z it will use the program Dxf2xyz 2.0.
The steps to follow are shown.
1. Open the program Dxf2xyz 2.0. A window like that shown in Figure 20 will open.

Location of the file Creation of the file

Parameters to
export

Figure 20. Work window at program Dxf2xyz 2.0


2. In the brown box select the file to convert.
3. The box purple indicates the data to export, lines, points, layers.
4. Once the file is selected the green buttons will be activated. Click in one of them and the file
of points x, y, z will be created.
5. To continue with the creation of the mesh it is necessary follow the steps indicated in the
section “From file data X, Y, Z”.

Página 18 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

How to rotate a topo-bathymetry?

When you have a AutoCAD file


If you have an AutoCAD file of counters or points, it is possible to rotate it with the command
“rotate” of AutoCAD. (Figure 21).

Figure 21. Rotation command to AutoCAD


Once you have clicked on the command, you just follow the next steps:
1. Select the elements to rotate.
2. Indicate the base point of spin.
3. Rotate. It can be with base to a reference or directly with the angle of spin.

When you have a file of points X, Y, Z


If you have a file of points X, Y, Z and want to review the configurations (it can be in Surfer) it is
necessary to rotate the mesh, using the GiraC.exe program, which is made in Fortran language.

Input file
To execute this, the file with the (x, y, z) are required. The structure of the file is the following:
Name file: inputdata.txt (the name has to be made of 13 characters, the extension is included)
1 C Commentary line
2 XYZ_COORD.TXT Name file of points (13 characters including the extension)
3 452326.256 Coordinate X of base point of spin
4 2562369.544 Coordinate Y of base point of spin
5 0.0 Value of change of elevation
6 60.0 Angle of spin in degrees
7 XYZ_RESUL.TXT Name file of mesh rotated (13 characters including the extension)

To execute it is necessary to include the executable and the file input in the folder.

Página 19 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Program execution
Once the configuration of the file input is made, the next steps are followed:
1. Click twice on the executable GiraC.exe. A window like that in Figure 22 will open.

Figure 22. Execution window for the GiraC.exe program


2. In the window the name file input is written with the spin conditions. Click enter.
After this step, a file name will be generated with the coordinates. Rotate.

Página 20 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

ANNEX 2: How to graph the WAPO results in Surfer?

Maximum amplitude file


This kind of file can be plotted with the option Contour Map:
1. Open the program Surfer.
2. Click on the following commands: Map → New → Contour Map. A window will open and the
file *AMP.GRD will be chosen. (Figure 23).

Figure 23. Commands to generate a contour map with Surfer


3. A Contour map will be generated, as Figure 24.

Figure 24. Contour map generated with Surfer


4. The user decides to format what is wanted with the contour map options (Figure 25).

Window of
properties for
format of the
map

Figure 25. Properties window to give format of the map

Página 21 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Instantaneous free surface file


This kind of graph has the surface map option. To do this, follow these steps:
1. Open the Surfer program.
2. Follow the commands: Map → New → 3d Surface. After clicking a window will open where
you select the *SUP.GRD file generated with the WAPO program (Figure 26).

Figure 26. Command to generate a surface map with Surfer


3. A surface map is shown in Figure 27.

Figure 27. Surface map generated with Surfer


4. The user decides the format wanted for the surface map with the options and the rotation
command (Figure 28).

Tool to turn the


map

Window of
properties to give
format to the map

Figure 28. Properties window to give format to the map

Página 22 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

ANNEX 3: How graph the COCO results in Surfer?


The results map that is obtained with the COCO program is a combination of two maps, one of
contours and the other of vectors.

To generate the contour map


This first map represents the magnitudes of velocities of the currents in the domain. To achieve this,
follow the steps listed in Annex 1, in the section: From file X, Y, Z, since what is required is the
generation of a GRD with modeling results. The differences for generating this map are (Figure 29):

Coordinates

Interpolation Location and type


Method of file

Size of the
grid

Figure 29. Window for the generation of the velocities maps


Once the results file *6000.DAT is selected
1. In the coordinates box:
For X: the B column from the file (coordinate in X)
For Y: the A column from the file (coordinate in Y)
For Z: the G column from the file (current velocity)
2. In the box for Interpolation method the type Kriging must be selected
3. The mesh size should refer to the dimensions of the bathymetry generated
Once the GRD is obtained it is plotted as shown in Annex 2 and a map like that of Figure 30 is
given.

Figure 30. Velocities map

Página 23 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

Generate the vector map


To add the vector map to the velocity map follow these steps:
1. Right-clicking on the generated map a toolbox appears, select Add → Post Layer.

Figure 31. Step 1 in the generation of the vector map


2. When a window opens select the file corresponding to the executed case with the COCO
results (*6000.DAT). A window as shown in Figure 32 will appear asking to change the map
boundaries, NO should be selected.

Figure 32. Step 2 in the generation of the vector map

Página 24 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

3. In the Object manager window select the point map created and in the properties window
change the columns shown in the orange box in the Figure 33.

Figure 33. Step 3 in the generation of the vector map


Changes required are
X coordinates Column B
Y coordinates Column A
Symbol None
Angle Column H
After doing this the map will look like that shown in Figure 34. The dot frequency is 1, as shown in
the orange box in the same figure.

Figure 34. Map display after changing the values of the properties box

Página 25 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

4. The default symbol given for the program is a cross, this should be changed for an arrow
with the direction to the East (), that can be done in the Property Manager box → Default
Symbol → Marker properties → Symbol. Finally in the same section of the window change the
frequency until the desired display is obtained. The size of the arrow can be changed in the Symbol
size section, the Sizing method should be “Proportional”.Push the button “Scaling” and a window will
open in which the “Worksheet column containing height” must be the Column G (current velocity), as
is shown in Figure 35.

Figure 35. Step 3 in the generation of the vector map

Página 26 de 27
Coastal Erosion and Management for Safer Coasts in a Changing
Climate (CEMSAC), Recife, Brazil
September 9-22, 2013

References
Berkhoff, J. (1972). Computation of combined refraction-diffraction. Proc. 13th. International
Conference on Coastal Engineering, ASCE., Vancouver, Canada.
Chamberlain, P. and D. Porter (1995). "The modified mild-slope equation." Journal Fluid Mechanics
Vol. 29: pp. 393-407.
Kirby, J. and R. Dalrymple (1986). "Modeling waves in surf zone and around the islands." Journal of
Waterway, Port, Coastal and Ocean Division, ASCE. Vol. 112.
Kirby, J. and R. Dalrymple (1994). Combined Refraction/Diffraction Model REF/DIF 1, Version 2.5.
Documentation and User’s Manual. Research Report No. CACR-94-22, Center for Applied Coastal
Research, Department of Civil Engineering, Universidad de Delaware, Newark, USA.
Losada, I., R. Silva, et al. (1996). "Interaction of non-breaking directional random waves with
submerged breakwaters." Coastal Engineering Vol. 28.: pp. 249-266.
Massel, S. (1993). "Extended refraction-diffraction equation for surface waves." Coastal
Engineering Vol. 19.: pp. 97-129.
Silva, R., Borthwick, A., Taylor, R. (2005) “Numerical implementation of the harmonic modified mild-
slope equation” Coastal Engineering Vol. 52.: pp. 391-407.
Silva, R., Baquerizo, A., Losada, M. and. Mendoza E. (2010) “Hydrodynamics of a headland-bay
beach-Nearshore current circulation.” Coastal Engineering Vol. 57.: pp. 160-175.

Página 27 de 27

Das könnte Ihnen auch gefallen