+ All Categories
Home > Documents > Miwam Melbourne

Miwam Melbourne

Date post: 26-Dec-2015
Category:
Upload: master007
View: 14 times
Download: 0 times
Share this document with a friend
Popular Tags:
37
Wave Modelling with WAM TCP / JCOMM Fifth Regional Workshop on Storm Surge and Wave Forecasting Melbourne, Australia, 1 - 5 December 2008 Magnar Reistad Oyvind Breivik Reinoud Bokhorst Norwegian Meteorological Institute met.no Bergen, Norway ([email protected] , [email protected]) 1
Transcript
Page 1: Miwam Melbourne

Wave Modelling with WAM

TCP / JCOMMFifth Regional Workshop on Storm Surge and Wave Forecasting

Melbourne, Australia, 1 - 5 December 2008

Magnar Reistad Oyvind BreivikReinoud BokhorstNorwegian Meteorological Institute met.noBergen, Norway([email protected], [email protected])

1

Page 2: Miwam Melbourne

Table of contents

2

Page 3: Miwam Melbourne

1. Technical description of WAM model

Some technical details of the Norwegian implementation of the WAM model are described:

The WAM model describes the evolution of a two-dimensional ocean wave spectrum. In contrast to first and second generation models, the third generation model WAM introduces no ad hoc assumptions on the spectral shape. It computes the evolution of the 2-d wave spectrum through integration of the spectral energy-balance equation:

F(f,θ,ϕ,λ) is the spectral wave energy density, f denotes frequency [Hz], θ the direction, ϕ and λ are latitude and longitude, cg is the group velocity [m/s].

The terms on the right hand side represent the source terms:Sin is the energy input due to wind forcing,Snl is the non-linear energy transfer by wave-wave interactions,Sd is the dissipation of energy.

The WAM model runs for any given regional or global grid with a prescribed topographic dataset. It runs for deep and shallow water, and depth and current refraction can be included. The model performs best in water depths greater than 20 meters. The grid resolution can be arbitrary in space and time.

At met.no cycle 4 of the wave model WAM is set up to run on a rotated spherical grid on Unix and Linux work stations and on parallel computers. The parallel version of the WAM model runs on several processors at the same time, using the Message Passing Interface (MPI) Standard. The parallel version will not be applied in this Workshop.

The horizontal grid resolution can be chosen arbitrary, but note that in the model set up that we use in the Workshop it is not possible to have more than two decimals in the grid distances. The spectral resolution can also be chosen by altering the preproc.input file. A standard set up

used at met.no is 25 frequencies, logarithmically spaced (f i+ 1

f i

=1.1 ) from 0.0420 to 0.4137

Hz, and 24 directions, equally spaced.

The bottom topography that is available for this workshop has been taken from the Earth Topography Two Minutes Grid (ETOPO2) database at a resolution of 2 minutes of latitude and longitude.

The current set up of the WAM model requires:● Wind data file (GRIB, BINARY)● Bathymetry data file (BINARY)● (Sea ice data, BINARY). If ice input file (file name is given in preproc.inp) is an empty file

(./noicefile), no ice data is used.

3

Page 4: Miwam Melbourne

● preset.inp (ASCII): Input data for cold start of the model. ● preproc.inp (ASCII): freq/dir spectral grid information (note: changes in spectral grid

require alterations in $WAMDIR/src/wam.inc).Nesting information: IBOUNC=1 if coarse resolution run preparing for nested fine resolution run. IBOUNF=1 if fine resolution run with input spectra from coarse resolution model. Includes also name of bathymetry data file and name of file with positions for output of 2d-spectra.

● wammodel.inp (ASCII) includes start time, duration, time steps (mind the CFL criterion), output time intervals (currently 3 hrs), and name of wind input file. Note that IBOUNC and IBOUNF must also specified here.

● outspec.list (ASCII) lat/lon positions for which you want to store 2-dimensional spectral information (energy as function of frequency and direction), used for example by polarplot.sh

NOTES ON wam.inc:If you make modifications in the model setup you may have to alter the file wam.inc andrecompile the WAM model. If you change the spectral grid in preproc.inp you will have to change NANG and NFRE. If the grid area is changed then NGX and NGY must be changed, and if it leads to an increased number of ocean points also NIBLA and NIBLO may have to be increased. If the number of ocean points is decreased then NIBLA and NIBLO can be reduced to make the run more efficient. IMPORTANT: Number of ocean points must not exceed NIBLA and NIBLO.

With modified grid area RLATS, RLATN, RLONL, RLONR must be changed.If number of output positions is changed in outspec.list, it may be necessary to changeMOUTP which is the maximum number of output positions.

If you set up a coarse run and prepare for nesting, remember to check the parameter NMAXC (Maximum number of boundary output points in the coarse grid).

If you run a fine grid with nesting from a coarse grid, remember that you may have to alter the parameters NMAXF ( Maximum number of boundary points in the fine grid) and NBINP (Maximum number of boundary points from the previous coarse grid run)

If you make modifications in wam.inc you have to compile the model.

Model output (After post-processing of the out from the WAM model):● work/preproc.output: Information about the model setup (ASCII)● work/runwam.log: Information about the model run (ASCII)● work/wamout.grb: Integrated parameters for selected time steps (GRIB)● work/spk.dat: 2D spectra in selected grid points (BINARY)● work/wamout.grb.idx● work/wamout.ctl: GrADS index and control files associated with GRIB output

4

Page 5: Miwam Melbourne

Methods to graphically display the model results:• GrADS:

The Grid Analysis and Display System is a freely available desktop tool that is used to display earth science data (data that typically have 4 dimensions: latitude, longitude, level and time). It is capable of displaying both gridded and ungridded data and support formats like GRIB, HDF, NetCDF and binary.

• Gnuplot:Gnuplot is a more general plotting utility to visualize mathematical functions and data. It is freely available and runs on most platforms. Our primary use of Gnuplot is to display data in a text file in a simple manner.

Your notes:

5

Page 6: Miwam Melbourne

2. Installation

This is a description of the directories, binaries, and source codefound on the accompanying CD-ROM.

The binaries were successfully compiled under Linux (Redhat 9, Fedora Core 3/5 and Scientific Linux). You may try the executables as provided on the CD-ROM but it is recommended that you recompile.

In the following a few Linux commands are shown. A '$' represents the Linux shell prompt.

Preliminaries

Required software (all freeware):• g77 and gcc:

The GNU compilers for Fortran 77 and C, available with LINUX• Perl5:

Comes with Linux (available at www.perl.com)• GrADS:

Available in the Install directory and at http://grads.iges.org/grads• wgrib and gribmap:

Available with the GrADS binary (or from the GRIB homepage http://www.cpc.ncep.noaa.gov/products/wesley/index.html)

• gnuplot 4.0 or higher (must include pm3d module):Available in the Install directory and at http://www.gnuplot.info/.

You will need a user account on the Linux PC.

REMARK: the script 'grib2ctl.pl' was changed by Oyvind Breivik. See the correction on line 578 of grib2ctl.pl. Be sure to use this version and not the standard version as found on http://grads.iges.org/grads.

Set environment variables

Login to your user account and open a Linux shell window. Open the .bashrc file in a text editor by issuing the following command:

$ gedit .bashrc

The .bashrc is a file that is executed every time you logon to your account. Note that the '.' at the start of filename means that it is a hidden file.

Add this at the end of the file (example is provided in $WAMDIR/install/bashrc):

6

Page 7: Miwam Melbourne

export WAMDIR=$HOME/WAM export GADDIR=$WAMDIR/opt/data export GASCRP=$WAMDIR/opt/scripts/ export PATH=$WAMDIR/bin:$WAMDIR/opt/bin:$GADDIR:$PATH

After that log out and log on again to activate these settings (advanced users may use the 'source' command instead).

Explanation:• $WAMDIR is the installation directory for the WAM model. It may be anywhere in the

filesystem where you have write access but in this workshop it will be your home directory ($HOME).

• $GADDIR and $GASCRP are environment variables for GraDS, in those directories it will look for data and scripts.

• $PATH is a variable used by the system. It tells the system in which directories it has to look for commands.

Alternative 1: Copy from CD-ROMIf you have received a CD-ROM with data please follow these instructions.

Put in the CD-ROM labelled “Norwegian WAM model, Installation CD”.

On modern Linux systems the CD-ROM is automatically recognised and mounted. The mount directory may differ however from distribution to distribution. Usually it would be one of the following:– /media/disk– /media/cdrom– /mnt/cdrom

It may have to be mounted (by super-user): # mount /dev/cdrom media/cdrom

Once you have found out where the CD-ROM is mounted issue the following commands to copy its contents and to make it writeable:

$ cd $HOME $ cp -rpP /media/cdrom/WAM . $ chmod -R ug+w $WAMDIR/* $ cd $WAMDIR/opt/bin $ chmod +x * $ clean_work.sh

Alternative 2: Copy from USB stickIf you have received a USB stick with data please follow these instructions.

Insert the USB stick and locate it on your Linux PC. It may appear as an icon on the desktop or you may have to locate and sometimes mount it (see Alternative 1 for instructions on mounting). It will typically appear under directory /media as a subdirectory with name

7

Page 8: Miwam Melbourne

depending on the name of the USB stick, here assumed to be NO_NAME. Here is a typical session for copying the contents of the USB stick onto your local directory.

$ cd $HOME $ cp /media/NO_NAME/Workshop/Met.no_Wave_Model/WAM.tar . $ tar xvf WAM.tar $ chmod -R ug+w $WAMDIR/* $ cd $WAMDIR/opt/bin $ chmod +x * $ clean_work.sh

The following directory structure is created:

bin/ All binaries and scripts provided by Norwegian Meteorological Institute (add to your $PATH )

data/ Miscellaneous data files, for example wind data, to be used in experiments.

doc/ Various documentation, including this oneExperiments/ Contains in- and output files of the experiments described in

this document. Make one subdirectory for each experimentinput/ Some sample datasets (input files to WAM model and to the

program that makes bathymetry file)install/ Contains installation packages of external software (not owned

by the Norwegian Meteorological Institute)opt/ Installation directory of external software (not provided by

Norwegian Meteorological Institute). Add /opt/bin to your $PATH.

src/ Contains sources of software provided by the Norwegian Meteorological Institute (except Gribw which is a standard GRIB library)

work/ The working directory. All output files should go to this directory (also all intermediate files)

Compile software

To compile the WAM model and the pre- and postprocessing software:

$ compile_all.sh

This generates the following executables in $WAMDIR/bin:

wammodel the WAM modelgrb2wam converts a GRIB file with wind data to ASCII (pre-

processing)wind_ascii_to_seq the ASCII to WAM binary converter (pre-processing)waves_seq_to_ascii the WAM binary to ASCII converter (post-processing)wam2grb converts the ASCII output of WAM to GRIB (post-

processing)

8

Page 9: Miwam Melbourne

uvseq_1122 constant wind file generator uvseq_1122_topo constant wind file generator that reads the lat/lon

information from preproc.inpbilingrb Transforms lat-lon GRIB records to new grid using bilinear

interpolationggrib Extracts a smaller area from a lat-lon GRIB filegsplit_wam Creates a text file with timeseries of wave parameters at

one locationgsplit_wam_file Creates an ASCII file with time series of wave parameters

for one locationread_wamspectra_gnuplot Converts the spectral output file from binary to texttopo_seq_to_ascii Convert WAM topography file to ACSIItopo_ascii_to_seq Vice versaetopo Creates WAM topography file from ETOPO2

To compile & install gnuplot:$ cd $WAMDIR/install$ tar xzf gnuplot-4.0.0.tar.gz$ cd gnuplot-4.0.0$ ./configure –-prefix=$WAMDIR/opt$ make && make install

To compile & install GrADS:$ cd $WAMDIR/install$ tar xzf grads-1.9b4-linuxRH9.tar.gz$ cd grads-1.9b4$ cp -r bin data $WAMDIR/opt/

Optional: To compile bst2grib provided by JMA:$ cd $WAMDIR/opt/JMA/src$ rm *.o$ make$ cp bst2grib $WAMDIR/opt/bin/

9

Page 10: Miwam Melbourne

3. Running WAM

Here the steps required to run the WAM model for a new geographical region will be explained. A full cycle of running the WAM model will look as follows:

1. Define a rectangular geographical region2. Create a topography file3. Prepare wind input data4. Modify WAM input parameters5. Run pre-processing programs, WAM and post-processing programs6. Visualize results

These steps will now be explained in detail.

Creating a topography fileTypically you will start with defining the grid that you want the model to run on. The grid is defined by:• southernmost latitude• westernmost longitude• number of grid points west to east (x) and south to north (y)• grid resolution in degrees for latitude and longitudeSee Appendix II for a more detailed description on how to prepare the topography file from ETOPO2 data.

Preparing the GRIB wind file, an exampleNote that the WAM model requires that the grid of the wind input file exactly matches the grid of topography file. If that is not the case, you can use bilingrb to extract the correct grid from your GRIB file.

• Enter the data directory:

$ cd $WAMDIR/data

• Collect data: You will need to obtain a GRIB file with wind forcing data that covers at least the area of your model grid (for example from NOGAPS, NOAA/NCEP, or JMA).

• Weed and tidy up GRIB file: Suppose you have downloaded the latest prognosis from NCEP (browse ftp://polar.ncep.noaa.gov/waves/ for the latest date and find the file nww3.all.grb, see Exercise B and C). Now throw away all parameters except the east and north wind components and make sure your file is sorted chronologically (east component, u, then north component, v, and so forth) by executing:

$ create_grib_wind.sh nww3.all.grb my_wind.grib

• Truncate GRIB file: If you don't want to start with the first wind file at the wind file the wind file must be

10

Page 11: Miwam Melbourne

truncated to contain only records from a chosen start time. To remove undesired wind records, first list the contents using wgrib:

$ wgrib -v my_wind.grib

The output should look something like this:

1:0:D=2005080100:UGRD:sfc:kpds=33,1,1:anl:"u wind [m/s] 2:50430:D=2005080100:VGRD:sfc:kpds=34,1,1:anl:"v wind [m/s] 3:104584:D=2005080103:UGRD:sfc:kpds=33,1,1:anl:"u wind [m/s] 4:155014:D=2005080103:VGRD:sfc:kpds=34,1,1:anl:"v wind [m/s] ... 495:26338712:D=2005083121:UGRD:sfc:kpds=33,1,1:anl:"u wind [m/s] 496:26392866:D=2005083121:VGRD:sfc:kpds=34,1,1:anl:"v wind [m/s] 497:26447020:D=2005090100:UGRD:sfc:kpds=33,1,1:anl:"u wind [m/s] 498:26501174:D=2005090100:VGRD:sfc:kpds=34,1,1:anl:"v wind [m/s]

The first number on each line is the record's number in the GRIB file. To truncate the file, select which record to start with. Remember to start with a record containing the east component of the wind (UGRD or 10U if you use ECMWF data).

Truncate file:

$ grib_timefilter.sh my_wind.grib my_shortwind.grib 353

Here, my_shortwind.grib is the new file, 353 is the first desired record of the original file my_wind.grib.

• Interpolate to new grid: Suppose you want to run the model for the region 12º E to 30º E, 3º N to 15º N with a grid resolution of 0.25º. To create a GRIB file for your chosen geographical region and correct resolution do the following:

$ bilingrb my_shortwind.grib my_region_wind.grib 12 3 0.25 0.25 73 49 4

• 12 is the westernmost longitude of the new grid (wlon)• 3 is the southernmost latitude (slat)• 0.25 is the zonal resolution (dlon)• 0.25 is the meridional resolution (dlat)• 73 is the number of zonal grid points (nlon)• 49 is the number of meridional grid points (nlat)• 4 is an interpolation parameter which should not be changed.

Note that you have to calculate the number of grid points in longitude (73) and latitude (49)

Modifying WAM input parameters Modify the following files to the WAM model setup (you find these files in $WAMDIR/input/wam):

runwam.sh requires: • An optional wind file in GRIB format. If no wind file is specified a constant wind file will

be generated with given wind speed blowing from west to east (program uvseq_1122). Note that runwam.sh

• $ cd $WAMDIR/work

11

Page 12: Miwam Melbourne

• A bathymetry data file, typically $WAMDIR/input/topography/wamtopo_1122.seqSea ice data – not used. $WAMDIR/input/wam must contain an empty file named noicefile to ignore ice extent.

Input files under $WAMDIR/input/wam/ that may require editing:• wammodel.inp – Sets start time, duration, time steps (mind the CFL criterion)

1. IDELWI is the time difference between two wind fields in the wind input file. This must match the temporal resolution of your GRIB file.

2. IDELWO is the time increment of the winds used as input in the WAM model. Note that you must have IDELWI=N*IDELWO, where N iis integer. If N is greater than 1, the wind fields are interpolated in time.

3. IDELT is the time step of the source function (IDELT greater than 20 minutes is not recommended).

4. IDELPRO is the propagation time step. It must fulfill: IDELWO=M*IDELT and IDELPRO=L*IDELT, where M and L are integers.

5. Output time intervals (currently 3 hrs)6. Name of wind input file

• outspec.list - lat/lon positions for which you want to store 2D spectral information (energy as function of frequency and direction) used by polarplot.sh

• preset.inp - input data for cold start of the model (normally no editing is required here) • preproc.inp - freq/dir spectral grid information (normally no editing is required here.

Note: requires further alterations in $WAMDIR/src/wam.inc).1. Name of bathymetry data file2. Name of file with positions for output of 2D spectra

Note that if you are doing nested runs it is required to edit preproc.inp, see Exercise A2.

NOTE: If you have changed the topography file you will have to edit the file $WAMDIR/src/wam/wam.inc:

$ gedit $WAMDIR/src/wam/wam.inc

The lines to change may look something like this:CCC Change NGX and NGY PARAMETER (NGX = 81, NGY = 51, 1 NANG = 24, NFRE = 25, 2 MOUTP = 100, MOUTT = 125)

...C INPUT WIND GRID SPECIFICATIONS.CCC Set RLATS, RLATN, RLONL, RLONR to southernmost, n-most, w-most and e-most lat and lon. PARAMETER ( RLATS = -2.5, RLATN = 2.5, RLONL = -93.0, 2 RLONR = -85.0, ICODE = 3, IWPER = 0, ICOORD = 1)

When you have changed $WAMDIR/src/wam/wam.inc then recompile WAM:

$ compile_all.sh

Running WAMExecute model and prepare GrADS output with the following script.

12

Page 13: Miwam Melbourne

$ cd $WAMDIR/work $ runwam.sh [<wind file>]

runwam.sh does the following.1. Reads a wind data file [optional] in GRIB format and converts it to ASCII2. Reads the ASCII file and write the wind data to a sequential, binary file3. Runs the WAM model4. Converts the WAM output fields from sequential binary to ASCII5. Converts the ASCII file to a GRIB file containing wave parameters6. Creates the Grads control file

Output is written to $WAMDIR/work.

Visualising the results

Sample lat/lon plot in GrADSOpen a shell prompt and type the following commands:

$ cd $WAMDIR/work$ gradsc -l # opens the GrADS classic interfacega-> open wamout # opens wamout.grb ga-> q file # queries the contents of the GRIB filega-> set t 8 # choose timestep 8ga-> set gxout shaded # choose display typega-> set csmooth on # apply a cubic smootherga-> d htsgwsfc # displays significant waveheight [m]ga-> run cbar # display an color indexga-> draw title Sig. wave height # display a titlega-> quit # quits GrADS

Sample timeseries plot in GrADSOpen a shell prompt and type the following commands:

$ cd $WAMDIR/work$ gradsc -l # opens the GrADS classic interfacega-> open wamout # opens wamout.grb ga-> q file # queries the contents of the GRIB filega-> set t 1 8 # choose timestep 8ga-> set lon 130 # choose a longitudega-> set lat 9 # choose a latitudega-> set gxout line # choose display typega-> d htsgwsfc # displays significant waveheight [m]ga-> draw ylab [m]# label y-axisga-> draw title Sig. wave height # display a titlega-> quit # quits GrADS

Sample spectral plotThe script polarplot.sh displays a 1D and 2D spectral plot for one location (lon/lat):

$ $WAMDIR/bin/polarplot.sh input filename spk.dat # type the name of the binary spectral output

# file of the wam model, try spk.dat ..(etc).. # a list is presented with all lat/lon positions.

13

Page 14: Miwam Melbourne

16.00 115.00 # This list is the same as what was 17.00 115.00 # defined in $WAMDIR/input/wam/outspec.list. ..(etc).. latitude,longitude19,115 # lat,lon position separated by a comma

After this a list of dates is presented:Wave spectrum plot utility==========================

Position:19.00N 115.00E

Available dates:1: 1997-11-1 +3 hrs2: 1997-11-1 +6 hrs..(etc)..Select a date (enter to quit):

Sample time seriesThe script timeseriesplot.sh shows time series of various parameters:

$ $WAMDIR/bin/timeseriesplot.sh Filename WAM-datawam.dat # type the name of the binary output file of# the WAM model, try wam.dat latitude, longitude19,115 # type lat,lon position separated by a comma.

After this a menu is shown of the available parameters. One or two parameters can beplotted in one plot:

Time Series plotting utility===============================

Position: 6.00,N 113.00E

PARAMETERS

Wind: 1. Wsp 2. DirTotal sea: 3. Hs 4. Tp 5. TM 6. DirWind sea: 7. Hs 8. Tp 9. DirSwell sea: 10. Hs 11. Tp 12. Dir

Select first parameter (enter to quit):

14

Page 15: Miwam Melbourne

4. Exercise: Setup & Installation

Main goals:• Become acquainted with Linux• Be able to set up the environment for running the WAM model and to explain the directory

layout.• Know about the (freeware) software/scripts that are used during the experiments

Fortran & g77, gcc, Perl, Grads, Wgrib, Gnuplot, various scripts.

Exercise:Setup the environment needed for this workshop as described in chapter 2. The CD-ROM will be provided by the Norwegian Meteorological Institute. The purpose is to get some training in doing this so that you can repeat it at your home institute.

Your notes:

15

Page 16: Miwam Melbourne

5. Experiment A: Constant wind

Main goal:The first experiment is meant to gain some experience and “feeling” with running the WAM model and looking at its results using the software as provided. The model is run with a constant from west to east. In the second part of the experiment we will learn how to do nested runs with the WAM model. That is to run with finer resolution for a small area using boundary spectra from a coarse grid model.

ExercisesA1:Use an area with no land. Topography file must be prepared in advance (see Appendix II).Runs with different wind speed should be performed. Proposed wind speeds are: 10 m/s, 15 m/s, 20 m/s, 25 m/s. For each run use Grads to study the wave fields (how the waves grow with different wind speeds, what is fully developed sea, how long does it take to reach fully developed sea. Plot some time series and two-dimensional wave spectra.

A2:Nested run. Two topography files must be prepared, one for the coarse grid and one for the fine grid. The coarse may be taken from exercise A1. (Remember to edit grid dimensions in $WAMDIR/src/wam/wam.inc and recompile)

First run the WAM model for the coarse grid. Set IBOUNC=1 and IBOUNF=0 in preproc.inp and wammodel.inp and find the coordinates of the corner points of the fine grid in the coarse grid and write those numbers in preproc.inp: SJFINE = Southernmost position of the fine grid in coarse grid coordinatesNJFINE = Northernmost position of the fine grid in coarse grid coordinatesWIFINE = Westernmost position of the fine grid in coarse grid coordinatesEIFINE = Easternmost position of the fine grid in coarse grid coordinates

Then run the fine grid with IBOUNC=0 and IBOUNF=1 in preproc.inp and wammodel.inp

Study the differences between the coarse and the fine grid runs near the islands.

16

Page 17: Miwam Melbourne

Figure 1: Peak wave direction and significant wave height Hs after 72 hours constant wind of 20 m/s from the west (exercise A1).

Figure 2: Time series of significant wave height for total sea and swell at 11° S, 110° W (exercise A1).

17

Page 18: Miwam Melbourne

Figure 3: Two-dimensional wave spectrum after 72 hours at 11° S, 110° W (exercise A1).

Figure 4: Development in time of one-dimensional wave spectrum at 11° S, 110° W (exercise A1).

Note:

18

Page 19: Miwam Melbourne

Figure 1 were created using GrADS. The following commands were used:

$ gradsc -lga-> open wamoutga-> q filega-> set t 24ga-> set gxout shadedga-> d htsgwsfcga-> run cbarga-> set gxout vectorga-> set ccolor 0ga-> set arrscl 0.2ga-> d skip(sin(dirpwsfc*3.14/180),5,5);cos(dirpwsfc*3.14/180)ga-> draw title Peak wave direction and Hs (+72h)ga-> q posPosition = 9.86563 4.76619 1 0ga-> draw string 9.86563 4.76619 [m]ga-> printim wave_72.pngga-> quit

AnimationTo animate the wave development use the standard GrADS xanim script. Here it calls a script wave.gs that was created for this case as an example:

$ gradsc -lga-> open wamoutga-> set t 1 63Time values set: 2004:11:15:3 2004:11:22:21ga-> xanim -script wave.gs

See xanim.gs in the GrADS script directory for more details on how to use it.

Your notes:

19

Page 20: Miwam Melbourne

6. Experiment B: Run WAM for own area with NCEP winds

Main goal: Practice how to set up a new model grid. Learn how to download NCEP data and adjust them to your grid. Lear how to make a warm start of the WAM model. Make your bathymetry file. Download NCEP data.Global 180-hour prognoses and archived 3-hourly wind data (One file for each month) are available from the NOAA/NCEP on 1.25ºx1.0º resolution:Prognoses: ftp://polar.ncep.noaa.gov/pub/waves/20081130.t12z/nww3.all.grb

Archive: ftp://polar.ncep.noaa.gov/pub/history/waves/nww3.wind.200810.grbRun WAM with wind data from NCEP prognosis from yesterday. Save spectra for warm start by setting IREST=1 in wammodel.inp. The parameter IRSTD gives the number of hours after model start where you will make a warm start of the next model run.The spectra for warm start is saved on file RESTART.output

Run the model with warm start with todays NCEP prognosis. Make the necessary wind grib f ile. Copy the file RESTART.output to RESTART.input Study the wave fields with GrADS

20

Page 21: Miwam Melbourne

7.Optional Experiment C: Hurricane Katrina

Main goal: Study wave conditions during Hurricane Katrina August 2005, download NCEP data, compare model wave height with measurents.

Make a bathymetry file for Gulf of Mexico 95W – 75W, 17N – 31N, grid resolution 0.25 degrees. Run WAM with winds from NCEP. Download wind data for the month August 2005.

Global 180-hour prognoses and archived 3-hourly wind data (One file for each month) are available from the NOAA/NCEP on 1.25ºx1.0º resolution:

Prognoses: ftp://polar.ncep.noaa.gov/pub/waves/20050905.t00z/nww3.all.grb

Archive: ftp://polar.ncep.noaa.gov/pub/history/waves/nww3.wind.200508.grb

Study the features of the wave fields. You may want to use the GrADS function xwave to display the wave height and direction (see below). Compare the wave data from the model with measuremenst.

21

Page 22: Miwam Melbourne

Figure 9: Hs and peak direction with NCEP wind fields for hurricane Katrina at 2005-08-29T06 UTC.

Figure 10: NCEP wind field for hurricane Katrina at 2005-08-29T03 UTC.

22

Page 23: Miwam Melbourne

Appendix I: About Linux

Source: Wikipedia, the free encyclopedia (http://en.wikipedia.org)

GNU/LinuxLinux is a computer operating system and its kernel. It is one of the most famous examples of free software and of open-source development: unlike other major operating systems (such as Windows or Mac OS), its underlying source code is available to the public and anyone can freely use, modify, and redistribute it.

The term Linux strictly refers to the Linux kernel, but is commonly used to describe entire Unix-like operating systems (also known as GNU/Linux) that are based on the Linux kernel combined with libraries and tools from the GNU project. Linux distributions often bundle large quantities of software with the core system, and over 300 distributions are available [1].

Initially, Linux was primarily developed and used by individual enthusiasts. Since then, Linux has gained the support of major corporations such as IBM, Hewlett-Packard and Novell for use in servers and is beginning to make inroads into the desktop market. Proponents and analysts attribute this success to its vendor independence, low cost, security, and reliability.

Linux was originally developed for Intel 386 microprocessors and now supports a variety of computer architectures. It is deployed in applications ranging from personal computers to supercomputers and embedded systems such as mobile phones and personal video recorders.

DistributionsLinux is dominantly used as part of a Linux distribution (distro). These are compiled by individuals, loose-knit teams, and various professional organizations. They include any number of additional system software and application programs, as well as certain processes to install these systems on a computer. Distributions are created for many different purposes, including localization, architecture support, real-time applications, and embedded systems, and many of which deliberately include only free software.

A typical general-purpose distribution includes the Linux kernel, the GNU libraries and tools, command-line shells, and thousands of application software packages, from office suites and the graphical X Window System to compilers, text editors, and scientific tools.

Examples of main-stream distributions:• Ubuntu• Fedora• SuSE• Debian

23

Page 24: Miwam Melbourne

Appendix II: Creating a bathymetry file from ETOPO2A global data set of topography is found in $WAMDIR/input/topography/etopo2.dat. The topography data are taken from the Earth Topography Two Minutes Grid (ETOPO2) database at a resolution of 2 minutes of latitude and longitude.

A program to extract data for a given area is provided. To create a new grid area:● Go to the topography directory:

$ cd $WAMDIR/input/topography

● Edit the input file (using e.g. gedit):

$ gedit etopo.input

The numbers that must be edited are on a line that may look like this: grid.geo= 88, 1122, 144, 113, 99.0,-3.0,0.25, 0.25 88 = producer number (need not change) 1122 = area number (need not change) 144 = number of points west to east 113 = number of points south to north 99.0 = most western longitude -3.0 = most southern latitude 0.25 = grid distance in longitude 0.25 = grid distance in latitude

● Run etopo:

$ $WAMDIR/bin/etopo etopo.input

This generates a topography file called wamtopo_1122.seq. You may change this name in etopo.input.

● Move the new topography file to $WAMDIR/input/wam/:

If you want to save the topography file for later use, you can copy it to another name, f.ex..

$ cp wamtopo_1122.seq wamtopo_experiment_A.seq

$ mv wamtopo_1122.seq $WAMDIR/input/wam/

The file name must be the same as what is written in the 'preproc.inp' input file. In this workshop it is wamtopo_1122.seq. If you want to use a different name for the topography file you will have to edit $WAMDIR/input/wam/preproc.inp.

● Note that when you run the WAM model for a new grid area, you will usually have to make changes in $WAMDIR/src/wam/wam.inc:

$ gedit $WAMDIR/src/wam/wam.inc

24

Page 25: Miwam Melbourne

● and recompile WAM:

$ compile_all.sh

25

Page 26: Miwam Melbourne

Appendix III: Examples of WAM input and output files

Binary forcing data filesWind input file, topography input file, and output file with wave parameters are sequential, binary files with a special structure. Necessary preprocessing and postprocessing programs are provided so that the wind input and the wave parameter output are reformatted to grib format (Ref. description of runwam.sh). However, an overview of the sequential binary file structure may be useful.

The data are given as 16-bits integers (INTEGER*2 in Fortran). Before each data field there is a 20-word header that describes the field:Number Description 1 Producer number 2 Grid area number 3 Data type (1 or 3 is analysis, 2 is prognosis) 4 Time parameter (Hours from start of «prognosis») 5 Vertical coordinate (1=pressure, 2=sigma, 3=height) 6 Parameter number (not the same parameter numbers as in grib files) *) 7 Level 1 8 Level 2 9 Gridtype – rectangular/geographical (2=lat/long grid) 10 Number of grid points in x-direction / longitude 11 Number og grid points in y-direction / latitude 12 Year 13 Month*100+day 14 Hour*100+minute

15 ) Geogr- Latitude of origin * 100 16 ) aphical Longitude of origin * 100 17 ) grid Grid distance in latitude * 100 18 ) Grid distance in longitude * 100 19 Not used 20 Scaling factor E. All data values are multiplied by 10**E

Then follow the data for the first latitude, data for the second latitude and so on.

*) Some parameter numbers:33: u (east to west) component of wind.34: v (south to north) component of wind.

200 : Significant wave height total sea201: Peak period total sea201: Mean period total sea203 : Peak direction total sea204: Mean direction total sea210 : Hs wind sea211 : Peak period wind sea212 : Peak direction wind sea213 : Mean period wind sea214 : Mean direction of wind sea220: Hs swell221 : Peak period swell222 : Peak direction swell223 : Mean period swell224 : Mean direction swell

26

Page 27: Miwam Melbourne

wam.inc

C wam.incC -------CC ----------------------------------------------------------------------C* VARIABLE. TYPE. PURPOSE.C --------- ------- --------C *NANG* INTEGER NUMBER OF ANGLES.C *NFRE* INTEGER NUMBER OF FREQUENCIES.C *NGX* INTEGER NUMBER OF LONGITUDES IN GRID.C *NGY* INTEGER NUMBER OF LATITUDES IN GRID.C *NIBLA* INTEGER NUMBER OF POINTS (TOTAL).C *NIBLO* INTEGER NUMBER OF POINTS (EACH PROCESSOR IF MPP).C *MOUTP* INTEGER MAXIMUM NUMBER OF OUTPUT POINTS.C *MOUTT* INTEGER MAXIMUM NUMBER OF OUTPUT TIMES.CC *NMAXC* INTEGER NUMBER OF BOUNDARY OUTPUT POINTS, IFC THIS IS A COARSE GRID; ELSE = 1.C *NMAXF* INTEGER NUMBER OF BOUNDARY POINTS, IF THIS ISC A FINE GRID RUN; ELSE = 1.C *NBINP* INTEGER NUMBER OF BOUNDARY INPUT POINTS FROM AC PREVIOUS COARSE GRID RUN, IF THIS IS AC A FINE GRID RUN; ELSE = 1.C *NIBLD* INTEGER = NIBLO IF DEPTH OR CURRENT REFRACTION.C = 1 ELSE.C *NIBLC* INTEGER = NIBLO IF CURRENT REFRACTION.C = 1 ELSE.C ----------------------------------------------------------------------C PARAMETER (NDEPTH = 52)C PARAMETER (ITAUMAX=100, JUMAX=100, IUSTAR=100, IALPHA=100)CC* *PARAMETER* FOR ARRAY DIMENSIONS.C PARAMETER (NIBLA=10000) PARAMETER (NIBLO=10000)CCC Change NGX and NGY PARAMETER (NGX = 81, NGY = 51, 1 NANG = 24, NFRE = 25, 2 MOUTP = 100, MOUTT = 125)

PARAMETER (NMAXC = 60, NMAXF = 2000, NBINP = 52)C PARAMETER (NIBLD = NIBLO, NIBLC = 1)CC* *PARAMETER* OF GLOBAL CONSTANTS.C PARAMETER (G = 9.806, PI = 3.14159265358978, CIRC = 40000000., 1 ZPI = 2.*PI, RAD = PI/180., DEG = 180./PI, 2 R = CIRC/ZPI)CC* *PARAMETER* FOR ARRAY DIMENSIONS FOR CURRENT INPUT.C PARAMETER (NCC = 81, NRC = 51)CC* *PARAMETER* FOR ARRAY DIMENSIONS FOR PREPROC ONLY.C PARAMETER (NBMAX = (NGX+NGY)*2-4)CC* *PARAMETER* FOR ARRAY DIMENSIONS OF TOPOGRAPHIE DATA.C PARAMETER (JLONI = NGX, JLATI = NGY, IOUTA = 80)CC* *PARAMETER* FOR WIND INPUT ARRAY DIMENSIONS.C

27

Page 28: Miwam Melbourne

PARAMETER (NC = NGX, NR = NGY)CC INPUT WIND GRID SPECIFICATIONS.CCC Set RLATS, RLATN, RLONL, RLONR to southernmost, n-most, w-most and e-most lat and lon. PARAMETER ( RLATS = -2.5, RLATN = 2.5, RLONL = -93.0, 2 RLONR = -85.0, ICODE = 3, IWPER = 0, ICOORD = 1)CC ----------------------------------------------------------------------CC* DNMI WAM stuffCCCC Floating point tolerance (2006-04-04, [email protected])

real tol parameter (tol=1.0E-5)

integer msmax parameter (msmax=50)C parameter (idprod=88,idgrid=1122)C

28

Page 29: Miwam Melbourne

preset.inp

CC USER INPUT OF PRESET. CREATED 19/4/91C =====================CC USER INFORMATION IS BEING READ WITH THE PRESUMPTIONS THAT:C 1. EVERY LINE STARTING WITH 'C' IS A COMMENT LINEC 2. VALUES ARE PUT IN BELOW POSITIONS INDICATED WITH '-'C (RIGHT-JUSTIFIED, BUT CHARACTER LEFT-JUSTIFIED)CC ----------------------------------------------------------------------CC **** HEADER OF MODEL RUN ****CC HEADER CHARACTER*70 TEXT TO BE PRINTEDCCHEADERC---------+---------+---------+---------+---------+---------+---------+ DNMI-FORECAST WAVE MODEL RUN PRESET VERSION 4.0CC **** OPTION FOR INITIAL SPECTRA ****CC IOPTI = 0 WIND INDEPENDENT INITIAL VALUES.C = 1 WIND DEPENDENT INITIAL VALUES ANDC ENERGY EQUAL ZERO IF WINDSPEED IS ZEROC = 2 WIND DEPENDENT INITIAL VALUES ANDC ENERGY COMPUTED FROM GIVEN PARAMETERS IFC WINDSPEED IS ZERO.CC IOPTI C------- 1 CC **** PARAMETER OF INITIAL SPECTRUM ****CC ALPHA = PHILLIPS' PARAMETER (NOT USED IF IOPTI = 1)C FM = PEAK FREQUENCY (HZ) AND/OR MAXIMUM FREQUENCYC GAMMA = OVERSHOOT FACTORC SIGMAA = LEFT PEAK WIDTHC SIGMAB = RIGHT PEAK WIDTHC THETAQ = WAVE DIRECTION (DEG) (NOT USED IF IOPTI = 1)C FETCH = FETCH IN METRES (IF ZERO THEN 0.5 OF THEC LATITUDE INCREMENT IS USED.)CC ALPHA FM GAMMA SIGMAA SIGMAB THETAQC---------- ---------- ---------- ---------- ---------- ---------- 0.01800 0.20000 3.00000 0.07000 0.09000 0.00000CC FETCHC---------- 30000.CC END OF USER INPUT PROG. PRESET.C ----------------------------------------------------------------------EOD

29

Page 30: Miwam Melbourne

preproc.inp

C USER INPUT OF PREPROC. CREATED 19/4/91C ======================CC SET-UP OF SWAMP CASE 2 GRID WITH CURRENT REFRACTION AND NEST.CC USER INFORMATION IS BEING READ BY SUB. UIPREPC WITH THE PRESUMPTIONS THAT:C 1. EVERY LINE STARTING WITH 'C' IS A COMMENT LINEC 2. VALUES ARE PUT IN BELOW POSITIONS INDICATED WITH '-'C (RIGHT-JUSTIFIED)CC ----------------------------------------------------------------------CC **** HEADER OF MODEL RUN ****CC HEADER CHARACTER*70 TEXT TO BE PRINTEDCCHEADERC---------+---------+---------+---------+---------+---------+---------+ DNMI-FORECAST WAVE MODEL RUN PREPROC VERSION 4.0CC **** FREQUENCY AND DIRECTION GRID ****CC ML INTEGER*5 NUMBER OF FREQUENCIES.C KL INTEGER*5 NUMBER OF DIRECTIONS.C FR(1) REAL*10 LOWEST FREQUENCY IN HERTZ.C TOPIN INTEGER*5 ITOP = 1 TOPOGRAPHY ON DIFFERENT GRIDC ITOP = 0 TOPOGRAPHY ON SAME GRIDC IPREP INTEGER*5 IPREP = 1 ONLY PREPROC WILL BE RUNC IPREP = 0 FULL MODEL RUNC CC ML KL FR(1) ITOP IPREPC----- ----- ---------- ----- ----- 25 24 .04177248 0 0CCC PATH OF RESULT FILESCC------------------------------------------------------------- ./CCC NAME OF TOPOGRAPHY FILECC------------------------------------------------------------- ../input/wam/wamtopo_1122.seqCCC NAME OF ICE FILECC------------------------------------------------------------- ./noicefileCCC NAME OF OUTPUT BOUNDARY VALUE FILECC------------------------------------------------------------- ./NO_OUTPUT_FILECCC NAME OF INPUT BOUNDARY VALUE FILECC------------------------------------------------------------- ./NO_INPUT_FILECCC **** AREAS TO BE CHANGED IN GRID ****C

30

Page 31: Miwam Melbourne

C SPECIFY A LIST WITH UP TO 80 AREAS.CC XOUTS REAL SOUTHERN-MOST LATITUDE (DEGREE).C XOUTN REAL NORTHERN-MOST LATITUDE (DEGREE).C XOUTW REAL WESTERN-MOST LONGITUDE (DEGREE).C XOUTE REAL EASTERN-MOST LONGITUDE (DEGREE).C NOUTD INTEGER NEW DEPTH IN METRES (-999 IS LAND)CC XOUTS XOUTN XOUTW XOUTE NOUTDC---------- ---------- ---------- ---------- ----------CC THE LIST HAS TO BE CLOSED BY 'END'C ENDCC **** OUTPUT LOCATIONS OF SPECTRA ****CC SPECIFY A FILE WITH UP TO 100 SIDES.CC OUTLAT REAL LATITUDE (DEGREE).C OUTLONG REAL LONGITUDE (DEGREE).CC FULL NAME (WITH PATH) OF FILE WITH OUTPUT LOCATIONS OF SPECTRACC------------------------------------------------------------- ../input/wam/outspec.listCCCC **** MODEL OPTIONS ****CC IREFRA INTEGER = 2 A CURRENT FIELD IS PROCESSED.C OTHERWISE NOTHING IS DONE.C ITEST INTEGER TEST OUTPUT LEVEL..C > 0 FOR OUPUT UP TO SUBROUTINE LEVELC = 0 NO TEST OUTPUTC ITESTB INTEGER TEST OUTPUT LEVEL BLOCKS IF ITEST > 0.C > 0 FOR BLOCK LEVEL TEST OUTPUTCCIREFRA ITEST ITESTBC------ ------ ------ 1 0 4CC **** NESTED GRIDS ****CC IBOUNC INTEGER FLAG FOR THE COURSE GRIDC = 1 INFORMATION FOR A NESTED (FINE)C GRID WILL BE GENERATED.C IBOUNF INTEGER FLAG FOR THE FINE GRIDC = 1 THIS IS A FINE GRID RUN, BOUNDARYC INFORMATION IS EXPECTED FROM AC PREVIOUS COARSE GRID RUN.C AMOSOC REAL SOUTHERN-MOST LONGITUDE OF NEST (DEGREE)C AMONOC REAL NORTHERN-MOST LONGITUDE OF NEST (DEGREE)C AMOWEC REAL WESTERN-MOST LATITUDE OF NEST (DEGREE)C AMOEAC REAL EASTERN-MOST LATITUDE OF NEST (DEGREE)C (THESE NEST BOUNDARIES HAVE TO BE GIVENC IF IBOUNC = 1)CCIBOUNC IBOUNF AMOSOC AMONOC AMOWEC AMOEACC------ ------ ---------- ---------- ---------- ----------C 0 0 -12.40 -10.6 1.85 3.65 CIBOUNC IBOUNF SJFINE NJFINE WIFINE EIFINEC------ ------ ---------- ---------- ---------- ---------- 0 0 25 52 90 100 CC ----------------------------------------------------------------------C END OF USER INPUT OF PREPROCC ----------------------------------------------------------------------EOD

31

Page 32: Miwam Melbourne

wammodel.inp

C USER INPUT OF CHIEF. CREATED 19/4/91C ====================CC USER INFORMATION IS BEING READ WITH THE PRESUMPTIONS THAT:C 1. EVERY LINE STARTING WITH 'C' IS A COMMENT LINEC 2. VALUES ARE PUT IN BELOW POSITIONS INDICATED WITH '-'C (RIGHT-JUSTIFIED, BUT CHARACTER LEFT-JUSTIFIED)CC ----------------------------------------------------------------------CC **** HEADER OF MODEL RUN ****CC HEADER CHARACTER*70 TEXT TO BE PRINTEDCCHEADERC---------+---------+---------+---------+---------+---------+---------+ DNMI-FORECAST WAVE MODEL RUN MODEL VERSION 4.0CC **** PERIOD OF MODEL RUN ****CC IANAY START YEAR OF RUNC IF (IANAY.LE.0) START DATE IS READ FROM WIND AND RESTART FILESC IDATEA START MONTH,DAY,HOUR AN MINUTE OF RUN (MMDDHHMM)C NHRUN DURATION OF PROGNOSTIC RUN I HOURSC C STRT=COLD or STRT=WARM COLD OR WARMSTART C The variable STRT will only be used when (IANAY.GT.0) CCCIANAY IDATEA NHRUN STRT C---- -------- ----- ---- 2004 11150000 72 COLDCC **** MODEL TIME STEPS ****CC IDELPRO INTERGER*7 PROPAGATION TIMESTEPC IDELT INTERGER*7 SOURCE TIME STEPC IDELWO INTERGER*7 OUTPUT WIND TIMESTEPC IDELWI INTERGER*7 TIMESTEP ON INPUT WIND FILEC U CHARACTER*1 TIME UNIT S SECONDS OR H HOURSCC -------- --------------------------------------------C DEMAND : ALL RATIO'S ARE N OR 1/N AND N IS AN INTEGERC -------- --------------------------------------------CCIDELPRO U IDELT U IDELWO U IDELWI UC------- - ------- - ------- - ------- - 900 S 900 S 1800 S 3600 SCC **** OUTPUT TIME IN FIXED INTERVALS ****CC ------------------------------------------------------------C DEMAND : ALL OUTPUT TIMESTEPS MUST BE MULTIPLE OF IDELPRO.C ------------------------------------------------------------CC IDELINT INTERGER*7 INTEGRATED PARAMETER OF TOTAL SEAC IDELINS INTERGER*7 INTEGRATED PARAMETER OF SWELLC IDELSPT INTERGER*7 SPECTRA OF TOTAL SEAC IDELSPS INTERGER*7 SPECTRA OF SWELLC IDELRES INTERGER*7 BOUNDARY FILES ARE SAVEDC IRSTD INTERGER*7 RESTART FILES ARE SAVED (HOURS FROM T=0)C U CHARACTER*1 TIME UNIT S SECONDS OR H HOURSCCIDELINT U IDELINS U IDELSPT U IDELSPS U IDELRES U IRSTD UC------- - ------- - ------- - ------- - ------- - ----- - 3 H 3 H 3 H 3 H 24 H 24 HCC **** SELECTION OF OUTPUT DATA ****C

32

Page 33: Miwam Melbourne

C P CHARACTER*1 PRINTER OUTPUT..C Y DATA ARE PRINTED, OTHERWISE NO OUTPUTC F CHARACTER*1 FILE OUTPUT..C Y DATA ARE WRITTEN TO FILE, OTHERWISE NO OUTPUTCCP F P FC- - - - N Y SIGNIFICANT WAVE HEIGHT N Y MEAN WAVE DIRECTION N Y WAVE MEAN PERIOD N N FRICTION VELOCITY N Y WIND DIRECTION N Y WAVE PEAK frek. N N DRAG COEFFICIENT N N NORMALISED WAVE STRESS N Y SWELL WAVE HEIGHT N Y SWELL DIRECTION N Y WIND WAVE DIRECTION N Y SWELL MEAN FREQUENCY N Y SPECTRA OF TOTAL SEA N N SWELL SPECTRA N N STOKES DRIFTCC **** MODEL OPTIONS ****CC ICASE INTEGER*7 PROPAGATION OPTION..C 1 SPHERICAL, OTHERWISE CARTESIAN PROPAGATIONC ISHALLO INTEGER*7 SHALLOW WATER FLAG..C 1 DEEP, OTHERWISE SHALLOW WATER MODELC IREFRA INTEGER*7 REFRACTION OPTION..C 0 IF REFRACTION IS NOT USEDC 1 IF DEPTH REFRACTION IS USEDC 2 IF DEPTH AND CURRENT REFRACTION IS USEDC ITEST INTEGER*7 TEST OUTPUT LEVEL..C > 0 FOR OUPUT UPTO SUBROUTINE LEVELC 0 NO TEST OUTPUTC ITESTB INTEGER*7 TEST OUTPUT LEVEL BLOCKS..C > 0 FOR BLOCK LEVEL TEST OUTPUT IF ITEST > 0C IREST INTEGER*7 RESTART OPTION..C 1 RESTART FILES ARE SAVED, OTHERWISE FILES ARE NOT SAVED.CC ICASE ISHALLO IREFRA ITEST ITESTB IRESTC------- ------- ------- ------- ------- ------- 1 0 0 3 1 0CC **** BOUNDARY POINTS *****CC IBOUNC = COURSE GRID OPTIONC IBOUNF = FINE GRID OPTIONCC IBOUNC MUST BE: 1 FOR COURSE GRID OUTPUTC OTHERWISE NO BOUNDARY POINTSC IBOUNF MUST BE: 1 FOR FINE GRID INPUTC OTHERWISE NO BOUNDARY POINTSCC IBOUNC IBOUNFC------- ------- 0 0CC **** FILE NAMES ****CC UID = USERID CHARACTER*3C RID = RUN IDENTIFIER CHARACTER*3C PATH = PATH NAME OF RESULT FILES CHARACTER*60CCUSD RID PATHC--- --- ---------+---------+---------+---------+---------+---------+ FOU wam ./CC WIPATH = NAME OF WIND FILE CHARACTER*60CCWIPATHC---------+---------+---------+---------+---------+---------+ ./wamwind.datCCC **** ASSIMILATION **** CC IASSIM INTEGER*7 ASSIMILATION OPTIONC 1 ASSIMILATION OF SIGNIFICANT WAVE HEIGHTC OTHERWISE NO ASSIMILATION

33

Page 34: Miwam Melbourne

C IASINT INTEGER*7 INTERVAL BETWEEN ASSIMILATION C U CHARACTER*1 TIME UNIT S SECONDS OR H HOURS CCIASSIM IASINT UC------ ------ - 0 1 HCC ----------------------------------------------------------------------C END OF USER INPUT PROG CHIEF.C ----------------------------------------------------------------------C

34

Page 35: Miwam Melbourne

outspec.list

C OUTLAT OUTLONGC---------- ---------- -11.00 -134.75 -11.00 -134.50 -11.00 -134.25 -11.00 -134.00 -11.00 -133.75 -11.00 -133.50 -11.00 -133.25 -11.00 -133.00 -11.00 -132.75 -11.00 -132.50 -11.00 -132.25 -11.00 -132.00 -11.00 -131.75 -11.00 -131.50 -11.00 -131.25 -11.00 -131.00 -11.00 -130.75 -11.00 -130.50 -11.00 -130.25 -11.00 -130.00 -11.00 -129.00 -11.00 -128.00 -11.00 -127.00 -11.00 -126.00 -11.00 -125.00 -11.00 -122.50 -11.00 -120.00 -11.00 -117.50 -11.00 -115.00 -11.00 -112.50 -11.00 -110.00 -11.00 -107.50 -11.00 -105.00CC THE LIST HAS TO BE CLOSED BY ENDC ENDC

35

Page 36: Miwam Melbourne

Appendix IV: WAM flowchart

36

Page 37: Miwam Melbourne

Appendix V: GrADS Tips & Tricks

Black on white plots

By default, GrADS uses a black background with white annotations. While this looks nice on screen, it is not best suited for printing. The script wam_b_w.gs reverses the color scheme to black on white background. Issue this command:

set imprun wam_b_w.gs

Animation

set looping on|offset loopincr incrset loopdim x|y|z|t

xanim.gs

Panels: several plot on one page

wam_panels.gs

Number of rows: 2Number of cols: 1Start t : 1dt : 2Parameter : htsgwsfcTitle text : Significant wave height

Symbols / Markers

wxsym.gsq posdraw wxsym symbol x y size <color<thickness>>

q posdraw mark marktype x y size

Line graphs

set gxout linefil

d htsgwsfc;const(htsgwsfc,5,-a)

37


Recommended