Experiment Plan - DoCuRi

The Grid Analysis and Display System is a freely available desktop tool that is ... 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 ... cp -rpP /media/cdrom/WAM .
646KB taille 2 téléchargements 460 vues
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

Table of contents

2

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 f i+ 1 =1. 1 ) from 0.0420 to 0.4137 used at met.no is 25 frequencies, logarithmically spaced ( fi 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

● ●





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 2dspectra. 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 and recompile 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 change MOUTP 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

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

2. Installation This is a description of the directories, binaries, and source code found 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

export export export export

WAMDIR=$HOME/WAM GADDIR=$WAMDIR/opt/data GASCRP=$WAMDIR/opt/scripts/ 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-ROM If 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 stick If 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

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/ data/ doc/ Experiments/ input/ install/ opt/ src/ work/

All binaries and scripts provided by Norwegian Meteorological Institute (add to your $PATH ) Miscellaneous data files, for example wind data, to be used in experiments. Various documentation, including this one Contains in- and output files of the experiments described in this document. Make one subdirectory for each experiment Some sample datasets (input files to WAM model and to the program that makes bathymetry file) Contains installation packages of external software (not owned by the Norwegian Meteorological Institute) Installation directory of external software (not provided by Norwegian Meteorological Institute). Add /opt/bin to your $PATH. Contains sources of software provided by the Norwegian Meteorological Institute (except Gribw which is a standard GRIB library) 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 grb2wam wind_ascii_to_seq waves_seq_to_ascii wam2grb

the WAM model converts a GRIB file with wind data to ASCII (preprocessing) the ASCII to WAM binary converter (pre-processing) the WAM binary to ASCII converter (post-processing) converts the ASCII output of WAM to GRIB (postprocessing) 8

constant wind file generator constant wind file generator that reads the lat/lon information from preproc.inp bilingrb Transforms lat-lon GRIB records to new grid using bilinear interpolation ggrib Extracts a smaller area from a lat-lon GRIB file gsplit_wam Creates a text file with timeseries of wave parameters at one location gsplit_wam_file Creates an ASCII file with time series of wave parameters for one location read_wamspectra_gnuplot Converts the spectral output file from binary to text topo_seq_to_ascii Convert WAM topography file to ACSII topo_ascii_to_seq Vice versa etopo Creates WAM topography file from ETOPO2 uvseq_1122 uvseq_1122_topo

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

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. 2. 3. 4. 5. 6.

Define a rectangular geographical region Create a topography file Prepare wind input data Modify WAM input parameters Run pre-processing programs, WAM and post-processing programs Visualize results

These steps will now be explained in detail.

Creating a topography file Typically 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 longitude See Appendix II for a more detailed description on how to prepare the topography file from ETOPO2 data.

Preparing the GRIB wind file, an example Note 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

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



A bathymetry data file, typically $WAMDIR/input/topography/wamtopo_1122.seq Sea 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 file 2. 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 WAM Execute model and prepare GrADS output with the following script.

12

$ cd $WAMDIR/work $ runwam.sh [] runwam.sh does the following. 1. Reads a wind data file [optional] in GRIB format and converts it to ASCII 2. Reads the ASCII file and write the wind data to a sequential, binary file 3. Runs the WAM model 4. Converts the WAM output fields from sequential binary to ASCII 5. Converts the ASCII file to a GRIB file containing wave parameters 6. Creates the Grads control file Output is written to $WAMDIR/work.

Visualising the results Sample lat/lon plot in GrADS Open a shell prompt and type the following commands: $ cd $WAMDIR/work $ gradsc -l # opens the GrADS classic interface ga-> open wamout # opens wamout.grb ga-> q file # queries the contents of the GRIB file ga-> set t 8 # choose timestep 8 ga-> set gxout shaded # choose display type ga-> set csmooth on # apply a cubic smoother ga-> d htsgwsfc # displays significant waveheight [m] ga-> run cbar # display an color index ga-> draw title Sig. wave height # display a title ga-> quit # quits GrADS

Sample timeseries plot in GrADS Open a shell prompt and type the following commands: $ cd $WAMDIR/work $ gradsc -l # opens the GrADS classic interface ga-> open wamout # opens wamout.grb ga-> q file # queries the contents of the GRIB file ga-> set t 1 8 # choose timestep 8 ga-> set lon 130 # choose a longitude ga-> set lat 9 # choose a latitude ga-> set gxout line # choose display type ga-> d htsgwsfc # displays significant waveheight [m] ga-> draw ylab [m]# label y-axis ga-> draw title Sig. wave height # display a title ga-> quit # quits GrADS

Sample spectral plot The 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

16.00 115.00 17.00 115.00 ..(etc).. latitude,longitude 19,115

# This list is the same as what was # defined in $WAMDIR/input/wam/outspec.list.

# 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 hrs 2: 1997-11-1 +6 hrs ..(etc).. Select a date (enter to quit): Sample time series The script timeseriesplot.sh shows time series of various parameters: $ $WAMDIR/bin/timeseriesplot.sh Filename WAM-data wam.dat # type the name of the binary output file of # the WAM model, try wam.dat latitude, longitude 19,115 # type lat,lon position separated by a comma. After this a menu is shown of the available parameters. One or two parameters can be plotted in one plot: Time Series plotting utility =============================== Position: 6.00,N 113.00E PARAMETERS Wind: 1. Wsp 2. Dir Total sea: 3. Hs 4. Tp 5. TM 6. Dir Wind sea: 7. Hs 8. Tp 9. Dir Swell sea: 10. Hs 11. Tp 12. Dir Select first parameter (enter to quit):

14

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

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. Exercises A1: 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 coordinates NJFINE = Northernmost position of the fine grid in coarse grid coordinates WIFINE = Westernmost position of the fine grid in coarse grid coordinates EIFINE = 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

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

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

Figure 1 were created using GrADS. The following commands were used: $ gradsc -l ga-> open wamout ga-> q file ga-> set t 24 ga-> set gxout shaded ga-> d htsgwsfc ga-> run cbar ga-> set gxout vector ga-> set ccolor 0 ga-> set arrscl 0.2 ga-> 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 pos Position = 9.86563 4.76619 1 0 ga-> draw string 9.86563 4.76619 [m] ga-> printim wave_72.png ga-> quit

Animation To 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 -l ga-> open wamout ga-> set t 1 63 Time values set: 2004:11:15:3 2004:11:22:21 ga-> xanim -script wave.gs

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

19

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.grb

Run 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

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

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

Appendix I: About Linux Source: Wikipedia, the free encyclopedia (http://en.wikipedia.org) GNU/Linux Linux 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. Distributions Linux 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

Appendix II: Creating a bathymetry file from ETOPO2 A 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



and recompile WAM: $ compile_all.sh

25

Appendix III: Examples of WAM input and output files Binary forcing data files Wind 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 Producer number Grid area number Data type (1 or 3 is analysis, 2 is prognosis) Time parameter (Hours from start of «prognosis») Vertical coordinate (1=pressure, 2=sigma, 3=height) Parameter number (not the same parameter numbers as in grib

1 2 3 4 5 6 files) *) 7 8 9 10 11 12 13 14 15 16 17 18 19 20

) ) ) )

Level 1 Level 2 Gridtype – rectangular/geographical (2=lat/long grid) Number of grid points in x-direction / longitude Number og grid points in y-direction / latitude Year Month*100+day Hour*100+minute Geogr- Latitude of origin * 100 aphical Longitude of origin * 100 grid Grid distance in latitude * 100 Grid distance in longitude * 100 Not used 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 sea 201: Peak period total sea 201: Mean period total sea 203 : Peak direction total sea 204: Mean direction total sea 210 : Hs wind sea 211 : Peak period wind sea 212 : Peak direction wind sea 213 : Mean period wind sea 214 : Mean direction of wind sea 220: Hs swell 221 : Peak period swell 222 : Peak direction swell 223 : Mean period swell 224 : Mean direction swell

26

wam.inc C wam.inc C ------C C ---------------------------------------------------------------------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. C C *NMAXC* INTEGER NUMBER OF BOUNDARY OUTPUT POINTS, IF C THIS IS A COARSE GRID; ELSE = 1. C *NMAXF* INTEGER NUMBER OF BOUNDARY POINTS, IF THIS IS C A FINE GRID RUN; ELSE = 1. C *NBINP* INTEGER NUMBER OF BOUNDARY INPUT POINTS FROM A C PREVIOUS COARSE GRID RUN, IF THIS IS A C 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) C C* *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) C C* C

*PARAMETER* OF GLOBAL CONSTANTS. PARAMETER (G = 9.806, PI = 3.14159265358978, CIRC = 40000000., ZPI = 2.*PI, RAD = PI/180., DEG = 180./PI, R = CIRC/ZPI)

1 2 C C* C

*PARAMETER*

FOR ARRAY DIMENSIONS FOR CURRENT INPUT.

PARAMETER (NCC = C C* C

*PARAMETER*

81, NRC =

51)

FOR ARRAY DIMENSIONS FOR PREPROC ONLY.

PARAMETER (NBMAX = (NGX+NGY)*2-4) C C* C

*PARAMETER*

FOR ARRAY DIMENSIONS OF TOPOGRAPHIE DATA.

PARAMETER (JLONI = NGX, JLATI = NGY, IOUTA = 80) C C* C

*PARAMETER*

FOR WIND INPUT ARRAY DIMENSIONS.

27

PARAMETER (NC = NGX, NR = NGY) C 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) C C ---------------------------------------------------------------------C C* DNMI WAM stuff C CCC 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

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

29

preproc.inp C USER INPUT OF PREPROC. CREATED 19/4/91 C ====================== C C SET-UP OF SWAMP CASE 2 GRID WITH CURRENT REFRACTION AND NEST. C C USER INFORMATION IS BEING READ BY SUB. UIPREP C WITH THE PRESUMPTIONS THAT: C 1. EVERY LINE STARTING WITH 'C' IS A COMMENT LINE C 2. VALUES ARE PUT IN BELOW POSITIONS INDICATED WITH '-' C (RIGHT-JUSTIFIED) C C ---------------------------------------------------------------------C C **** HEADER OF MODEL RUN **** C C HEADER CHARACTER*70 TEXT TO BE PRINTED C CHEADER C---------+---------+---------+---------+---------+---------+---------+ DNMI-FORECAST WAVE MODEL RUN PREPROC VERSION 4.0 C C **** FREQUENCY AND DIRECTION GRID **** C C 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 GRID C ITOP = 0 TOPOGRAPHY ON SAME GRID C IPREP INTEGER*5 IPREP = 1 ONLY PREPROC WILL BE RUN C IPREP = 0 FULL MODEL RUN C C C ML KL FR(1) ITOP IPREP C----- ----- ---------- ----- ----25 24 .04177248 0 0 C C C PATH OF RESULT FILES C C------------------------------------------------------------./ C C C NAME OF TOPOGRAPHY FILE C C------------------------------------------------------------../input/wam/wamtopo_1122.seq C C C NAME OF ICE FILE C C------------------------------------------------------------./noicefile C C C NAME OF OUTPUT BOUNDARY VALUE FILE C C------------------------------------------------------------./NO_OUTPUT_FILE C C C NAME OF INPUT BOUNDARY VALUE FILE C C------------------------------------------------------------./NO_INPUT_FILE C C C **** AREAS TO BE CHANGED IN GRID **** C

30

C SPECIFY A LIST WITH UP TO 80 AREAS. C C 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) C C XOUTS XOUTN XOUTW XOUTE NOUTD C---------- ---------- ---------- ---------- ---------C C THE LIST HAS TO BE CLOSED BY 'END' C END C C **** OUTPUT LOCATIONS OF SPECTRA **** C C SPECIFY A FILE WITH UP TO 100 SIDES. C C OUTLAT REAL LATITUDE (DEGREE). C OUTLONG REAL LONGITUDE (DEGREE). C C FULL NAME (WITH PATH) OF FILE WITH OUTPUT LOCATIONS OF SPECTRA C C------------------------------------------------------------../input/wam/outspec.list C C C C **** MODEL OPTIONS **** C C 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 LEVEL C = 0 NO TEST OUTPUT C ITESTB INTEGER TEST OUTPUT LEVEL BLOCKS IF ITEST > 0. C > 0 FOR BLOCK LEVEL TEST OUTPUT C CIREFRA ITEST ITESTB C------ ------ -----1 0 4 C C **** NESTED GRIDS **** C C IBOUNC INTEGER FLAG FOR THE COURSE GRID C = 1 INFORMATION FOR A NESTED (FINE) C GRID WILL BE GENERATED. C IBOUNF INTEGER FLAG FOR THE FINE GRID C = 1 THIS IS A FINE GRID RUN, BOUNDARY C INFORMATION IS EXPECTED FROM A C 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 GIVEN C IF IBOUNC = 1) C CIBOUNC IBOUNF AMOSOC AMONOC AMOWEC AMOEAC C------ ------ ---------- ---------- ---------- ---------C 0 0 -12.40 -10.6 1.85 3.65 CIBOUNC IBOUNF SJFINE NJFINE WIFINE EIFINE C------ ------ ---------- ---------- ---------- ---------0 0 25 52 90 100 C C ---------------------------------------------------------------------C END OF USER INPUT OF PREPROC C ---------------------------------------------------------------------EOD

31

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

32

C P CHARACTER*1 PRINTER OUTPUT.. C Y DATA ARE PRINTED, OTHERWISE NO OUTPUT C F CHARACTER*1 FILE OUTPUT.. C Y DATA ARE WRITTEN TO FILE, OTHERWISE NO OUTPUT C CP F P F C- - 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 DRIFT C C **** MODEL OPTIONS **** C C ICASE INTEGER*7 PROPAGATION OPTION.. C 1 SPHERICAL, OTHERWISE CARTESIAN PROPAGATION C ISHALLO INTEGER*7 SHALLOW WATER FLAG.. C 1 DEEP, OTHERWISE SHALLOW WATER MODEL C IREFRA INTEGER*7 REFRACTION OPTION.. C 0 IF REFRACTION IS NOT USED C 1 IF DEPTH REFRACTION IS USED C 2 IF DEPTH AND CURRENT REFRACTION IS USED C ITEST INTEGER*7 TEST OUTPUT LEVEL.. C > 0 FOR OUPUT UPTO SUBROUTINE LEVEL C 0 NO TEST OUTPUT C ITESTB INTEGER*7 TEST OUTPUT LEVEL BLOCKS.. C > 0 FOR BLOCK LEVEL TEST OUTPUT IF ITEST > 0 C IREST INTEGER*7 RESTART OPTION.. C 1 RESTART FILES ARE SAVED, OTHERWISE FILES ARE NOT SAVED. C C ICASE ISHALLO IREFRA ITEST ITESTB IREST C------- ------- ------- ------- ------- ------1 0 0 3 1 0 C C **** BOUNDARY POINTS ***** C C IBOUNC = COURSE GRID OPTION C IBOUNF = FINE GRID OPTION C C IBOUNC MUST BE: 1 FOR COURSE GRID OUTPUT C OTHERWISE NO BOUNDARY POINTS C IBOUNF MUST BE: 1 FOR FINE GRID INPUT C OTHERWISE NO BOUNDARY POINTS C C IBOUNC IBOUNF C------- ------0 0 C C **** FILE NAMES **** C C UID = USERID CHARACTER*3 C RID = RUN IDENTIFIER CHARACTER*3 C PATH = PATH NAME OF RESULT FILES CHARACTER*60 C CUSD RID PATH C--- --- ---------+---------+---------+---------+---------+---------+ FOU wam ./ C C WIPATH = NAME OF WIND FILE CHARACTER*60 C CWIPATH C---------+---------+---------+---------+---------+---------+ ./wamwind.dat C C C **** ASSIMILATION **** C C IASSIM INTEGER*7 ASSIMILATION OPTION C 1 ASSIMILATION OF SIGNIFICANT WAVE HEIGHT C OTHERWISE NO ASSIMILATION

33

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

34

outspec.list C OUTLAT OUTLONG C---------- ----------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.00 C C THE LIST HAS TO BE CLOSED BY C END C

END

35

Appendix IV: WAM flowchart

36

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|off set loopincr incr set loopdim x|y|z|t xanim.gs

Panels: several plot on one page wam_panels.gs Number of rows: 2 Number of cols: 1 Start t :1 dt :2 Parameter : htsgwsfc Title text : Significant wave height

Symbols / Markers wxsym.gs q pos draw wxsym symbol x y size q pos draw mark marktype x y size

Line graphs set gxout linefil d htsgwsfc;const(htsgwsfc,5,-a)

37