You are on page 1of 37

Wave Modelling with WAM

TCP / JCOMM
Fifth Regional Workshop on Storm Surge and Wave Forecasting
Melbourne, Australia, 1 - 5 ecember !""#
Magnar Reistad
Oyvind Breivik
Reinoud Bokhorst
Norwegian Meteorological Institute met.no
Bergen, Norway
(magnar.reistad@met.no, oyvind.breivik@met.no
!
Table of contents
"
1. Technical description of WAM model
#ome technical details o$ the Norwegian im%lementation o$ the &'M model are described(
)he &'M model describes the evolution o$ a two*dimensional ocean wave s%ectrum. In
contrast to $irst and second generation models, the third generation model &'M introduces no
ad hoc assum%tions on the s%ectral sha%e. It com%utes the evolution o$ the "*d wave s%ectrum
through integration o$ the s%ectral energy*balance e+uation(
F(f,,, is the s%ectral wave energy density, f denotes $re+uency ,-./, the direction, and
are latitude and longitude, c
g
is the grou% velocity ,m0s/.
)he terms on the right hand side re%resent the source terms(
S
in
is the energy in%ut due to wind $orcing,
S
nl
is the non*linear energy trans$er by wave*wave interactions,
S
d
is the dissi%ation o$ energy.
)he &'M model runs $or any given regional or global grid with a %rescribed to%ogra%hic
dataset. It runs $or dee% and shallow water, and de%th and current re$raction can be included.
)he model %er$orms best in water de%ths greater than "1 meters. )he grid resolution can be
arbitrary in s%ace and time.
't met.no cycle 2 o$ the wave model &'M is set u% to run on a rotated s%herical grid on 3ni4
and 5inu4 work stations and on %arallel com%uters. )he %arallel version o$ the &'M model
runs on several %rocessors at the same time, using the Message 6assing Inter$ace (M6I
#tandard. )he %arallel version will not be a%%lied in this &orksho%.
)he hori.ontal grid resolution can be chosen arbitrary, but note that in the model set u% that we
use in the &orksho% it is not %ossible to have more than two decimals in the grid distances.
)he s%ectral resolution can also be chosen by altering the %re%roc.in%ut $ile. ' standard set u%
used at met.no is "7 $re+uencies, logarithmically s%aced (
f
i+!
f
i
=!. ! $rom 1.12"1 to 1.2!89
-., and "2 directions, e+ually s%aced.
)he bottom to%ogra%hy that is available $or this worksho% has been taken $rom the :arth
)o%ogra%hy )wo Minutes ;rid (:)O6O" database at a resolution o$ " minutes o$ latitude and
longitude.
)he current set u% o$ the &'M model re+uires(
&ind data $ile (;RIB, BIN'R<
Bathymetry data $ile (BIN'R<
(#ea ice data, BIN'R<. I$ ice in%ut $ile ($ile name is given in %re%roc.in% is an em%ty $ile
(.0noice$ile, no ice data is used.
8
preset.inp ('#=II( In%ut data $or cold start o$ the model.
preproc.inp ('#=II( $re+0dir s%ectral grid in$ormation (note( changes in s%ectral grid
re+uire alterations in $WAMDIR/src/wam.inc.
Nesting in$ormation( IBO3N=>! i$ coarse resolution run %re%aring $or nested $ine resolution
run. IBO3N?>! i$ $ine resolution run with in%ut s%ectra $rom coarse resolution model.
Includes also name o$ bathymetry data $ile and name o$ $ile with %ositions $or out%ut o$ "d*
s%ectra.
wammodel.inp ('#=II includes start time, duration, time ste%s (mind the =?5 criterion,
out%ut time intervals (currently 8 hrs, and name o$ wind in%ut $ile. Note that IBO3N= and
IBO3N? must also s%eci$ied here.
outspec.list ('#=II lat0lon %ositions $or which you want to store "*dimensional
s%ectral in$ormation (energy as $unction o$ $re+uency and direction, used $or e4am%le by
%olar%lot.sh
NO):# ON wam.inc(
I$ you make modi$ications in the model setu% you may have to alter the $ile wam.inc and
recom%ile the &'M model. I$ you change the s%ectral grid in preproc.inp you will have
to change NANG and NFRE. I$ the grid area is changed then NGX and NGY must be changed,
and i$ it leads to an increased number o$ ocean %oints also NIBLA and NIBLO may have to be
increased. I$ the number o$ ocean %oints is decreased then NIBLA and NIBLO can be reduced
to make the run more e$$icient. IM6OR)'N)( Number o$ ocean %oints must not e4ceed
NIBLA and NIBLO.
&ith modi$ied grid area RLATS, RLATN, RLONL, RLONR must be changed.
I$ number o$ out%ut %ositions is changed in outspec.list, it may be necessary to change
MOUTP which is the ma4imum number o$ out%ut %ositions.
I$ you set u% a coarse run and %re%are $or nesting, remember to check the %arameter NM'@=
(Ma4imum number o$ boundary out%ut %oints in the coarse grid.
I$ you run a $ine grid with nesting $rom a coarse grid, remember that you may have to alter the
%arameters NM'@? ( Ma4imum number o$ boundary %oints in the $ine grid and NBIN6
(Ma4imum number o$ boundary %oints $rom the %revious coarse grid run
I$ you make modi$ications in wam.inc you have to com%ile the model.
Model out%ut ('$ter %ost*%rocessing o$ the out $rom the &'M model(
work/preproc.output( In$ormation about the model setu% ('#=II
work/runwam.log( In$ormation about the model run ('#=II
work/wamout.grb( Integrated %arameters $or selected time ste%s (;RIB
work/spk.dat: "A s%ectra in selected grid %oints (BIN'R<
work/wamout.grb.idx
work/wamout.ctl: ;r'A# inde4 and control $iles associated with ;RIB out%ut
2
Methods to graphically display the model results:
;r'A#(
)he Grid Analysis and Dis%lay System is a $reely available deskto% tool that is used to
dis%lay earth science data (data that ty%ically have 2 dimensions( latitude, longitude, level
and time. It is ca%able o$ dis%laying both gridded and ungridded data and su%%ort $ormats
like ;RIB, -A?, Net=A? and binary.
;nu%lot(
;nu%lot is a more general %lotting utility to visuali.e mathematical $unctions and data. It is
$reely available and runs on most %lat$orms. Our %rimary use o$ ;nu%lot is to dis%lay data in
a te4t $ile in a sim%le manner.
<our notes(
7
2. Installation
)his is a descri%tion o$ the directories, binaries, and source code
$ound on the accom%anying =A*ROM.
)he binaries were success$ully com%iled under 5inu4 (Redhat B, ?edora =ore 807 and #cienti$ic
5inu4. <ou may try the e4ecutables as %rovided on the =A*ROM but it is recommended that
you recom%ile.
In the $ollowing a $ew 5inu4 commands are shown. ' C$C re%resents the 5inu4
shell %rom%t.
Preliminaries
Re+uired so$tware (all $reeware(
g77 and gcc(
)he ;N3 com%ilers $or ?ortran 99 and =, available with 5IN3@
6erl7(
=omes with 5inu4 (available at www.perl.com
;r'A#(
'vailable in the Install directory and at http://grads.iges.org/grads
wgrib and gribmap(
'vailable with the ;r'A# binary (or $rom the ;RIB home%age
http://www.cpc.ncep.noaa.gov/products/wesley/index.html
gnuplot 2.1 or higher (must include pm3d module(
'vailable in the Install directory and at htt%(00www.gnu%lot.in$o0.
<ou will need a user account on the 5inu4 6=.
R:M'RD( the scri%t Cgrib"ctl.%lC was changed by Oyvind Breivik. #ee the correction on line
79E o$ grib"ctl.%l. Be sure to use this version and not the standard version as $ound on
htt%(00grads.iges.org0grads.
Set environment variables
5ogin to your user account and o%en a 5inu4 shell window. O%en the .bashrc $ile in a te4t editor
by issuing the $ollowing command(
$ gedit .bashrc
)he .bashrc is a $ile that is e4ecuted every time you logon to your account. Note that the C.C at
the start o$ $ilename means that it is a hidden $ile.
'dd this at the end o$ the $ile (e4am%le is %rovided in F&'MAIR0install0bashrc(
G
export WAMDIR=$HOME/WAM
export GADDIR=$WAMDIR/opt/data
export GASCRP=$WAMDIR/opt/scripts/
export PATH=$WAMDIR/bin:$WAMDIR/opt/bin:$GADDIR:$PATH
'$ter that log out and log on again to activate these settings (advanced users may use the
CsourceC command instead.
:4%lanation(
F&'MAIR is the installation directory $or the &'M model. It may be anywhere in the
$ilesystem where you have write access but in this worksho% it will be your home directory
(F-OM:.
F;'AAIR and F;'#=R6 are environment variables $or ;raA#, in those directories it will
look $or data and scri%ts.
F6')- is a variable used by the system. It tells the system in which directories it has to
look $or commands.
Alternative 1: Copy from CD-ROM
I$ you have received a =A*ROM with data %lease $ollow these instructions.
6ut in the =A*ROM labelled HNorwegian &'M model, Installation =AI.
On modern 5inu4 systems the =A*ROM is automatically recognised and mounted. )he mount
directory may di$$er however $rom distribution to distribution. 3sually it would be one o$ the
$ollowing(
/media/disk
/media/cdrom
/mnt/cdrom
It may have to be mounted (by su%er*user(
# mount /dev/cdrom media/cdrom
Once you have $ound out where the =A*ROM is mounted issue the $ollowing commands to
co%y its contents and to make it writeable(
$ cd $HOME
$ cp -rpP /media/cdrom/WAM .
$ chmod - ug!" $WAM#$/%
$ cd $WAM#$/opt/bin
$ chmod !& %
$ c'ean("ork.sh
Alternative 2: Copy from USB stic
I$ you have received a 3#B stick with data %lease $ollow these instructions.
Insert the 3#B stick and locate it on your 5inu4 6=. It may a%%ear as an icon on the deskto% or
you may have to locate and sometimes mount it (see 'lternative ! $or instructions on
mounting. It will ty%ically a%%ear under directory 0media as a subdirectory with name
9
de%ending on the name o$ the 3#B stick, here assumed to be )O()AME. -ere is a ty%ical
session $or co%ying the contents o$ the 3#B stick onto your local directory.
$ cd $HOME
$ cp /media/)O()AME/Workshop/Met.no(Wave(Mode'/WAM.tar .
$ tar &v* WAM.tar
$ chmod - ug!" $WAM#$/%
$ cd $WAM#$/opt/bin
$ chmod !& %
$ c'ean("ork.sh
)he $ollowing directory structure is created(
bin/ 'll binaries and scri%ts %rovided by Norwegian Meteorological
Institute (add to your $PATH
data/ Miscellaneous data $iles, $or e4am%le wind data, to be used in
e4%eriments.
doc/ Jarious documentation, including this one
E&periments/ =ontains in* and out%ut $iles o$ the e4%eriments described in
this document. Make one subdirectory $or each e4%eriment
input/ #ome sam%le datasets (in%ut $iles to &'M model and to the
%rogram that makes bathymetry $ile
insta''/ =ontains installation %ackages o$ e4ternal so$tware (not owned
by the Norwegian Meteorological Institute
opt/ Installation directory o$ e4ternal so$tware (not %rovided by
Norwegian Meteorological Institute. 'dd /opt/bin to your
$PATH.
src/ =ontains sources o$ so$tware %rovided by the Norwegian
Meteorological Institute (e4ce%t Gribw which is a standard
;RIB library
"ork/ )he working directory. 'll out%ut $iles should go to this
directory (also all intermediate $iles
Compile soft!are
)o com%ile the &'M model and the %re* and %ost%rocessing so$tware(
$ compi'e(a''.sh
)his generates the $ollowing e4ecutables in $WAMDIR/bin(
wammodel the &'M model
grb2wam converts a ;RIB $ile with wind data to '#=II (%re*
%rocessing
wind_ascii_to_seq the '#=II to &'M binary converter (%re*%rocessing
waves_seq_to_ascii the &'M binary to '#=II converter (%ost*%rocessing
wam2grb converts the '#=II out%ut o$ &'M to ;RIB (%ost*
%rocessing
E
uvseq_1122 constant wind $ile generator
uvseq_1122_topo constant wind $ile generator that reads the lat0lon
in$ormation $rom preproc.inp
bilingrb )rans$orms lat*lon ;RIB records to new grid using bilinear
inter%olation
ggrib :4tracts a smaller area $rom a lat*lon ;RIB $ile
gsplit_wam =reates a te4t $ile with timeseries o$ wave %arameters at
one location
gsplit_wam_file =reates an '#=II $ile with time series o$ wave %arameters
$or one location
read_wamspectra_gnuplot =onverts the s%ectral out%ut $ile $rom binary to te4t
topo_seq_to_ascii =onvert &'M to%ogra%hy $ile to '=#II
topo_ascii_to_seq Jice versa
etopo =reates &'M to%ogra%hy $ile $rom :)O6O"
)o com%ile K install gnu%lot(
$ cd $WAM#$/insta''
$ tar &+* gnup'ot-,.-.-.tar.g+
$ cd gnup'ot-,.-.-
$ ./con*igure .-pre*i&/$WAM#$/opt
$ make 00 make insta''
)o com%ile K install ;r'A#(
$ cd $WAM#$/insta''
$ tar &+* grads-1.2b,-'inu&H2.tar.g+
$ cd grads-1.2b,
$ cp -r bin data $WAM#$/opt/
O%tional(
)o com%ile bst2grib %rovided by LM'(
$ cd $WAM#$/opt/3MA/src
$ rm %.o
$ make
$ cp bst4grib $WAM#$/opt/bin/
B
3. Running WAM
-ere the ste%s re+uired to run the &'M model $or a new geogra%hical region will be
e4%lained. ' $ull cycle o$ running the &'M model will look as $ollows(
!. Ae$ine a rectangular geogra%hical region
". =reate a to%ogra%hy $ile
8. 6re%are wind in%ut data
2. Modi$y &'M in%ut %arameters
7. Run %re*%rocessing %rograms, &'M and %ost*%rocessing %rograms
G. Jisuali.e results
)hese ste%s will now be e4%lained in detail.
Creatin" a topo"rap#y file
)y%ically you will start with de$ining the grid that you want the model to run on. )he grid is
de$ined by(
southernmost latitude
westernmost longitude
number o$ grid %oints west to east (4 and south to north (y
grid resolution in degrees $or latitude and longitude
#ee Appendix II $or a more detailed descri%tion on how to %re%are the to%ogra%hy $ile $rom
:)O6O" data.
Preparin" t#e $R%B !in& file' an e(ample
Note that the WAM model requires that the grid of the wind input file eactly matches the grid
of topography file. I$ that is not the case, you can use bilingrb to e4tract the correct grid
$rom your ;RIB $ile.
:nter the data directory(
$ cd $WAMDIR/data
=ollect data(
<ou will need to obtain a ;RIB $ile with wind $orcing data that covers at least the area o$
your model grid ($or e4am%le $rom NO;'6#, NO''0N=:6, or LM'.
&eed and tidy u% ;RIB $ile(
#u%%ose you have downloaded the latest %rognosis $rom N=:6 (browse
ftp://polar.ncep.noaa.gov/waves/ $or the latest date and $ind the $ile
nww3.all.grb, see :4ercise B and =. Now throw away all %arameters e4ce%t the east
and north wind com%onents and make sure your $ile is sorted chronologically (east
com%onent, u, then north com%onent, !, and so $orth by e4ecuting(
$ create_grib_wind.sh nww3.all.grb my_wind.grib
)runcate ;RIB $ile(
I$ you donCt want to start with the $irst wind $ile at the wind $ile the wind $ile must be
!1
truncated to contain only records $rom a chosen start time. )o remove undesired wind
records, $irst list the contents using wgrib(
$ wgrib -v my_wind.grib
)he out%ut 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]
)he $irst number on each line is the recordCs number in the ;RIB $ile. )o truncate the $ile,
select which record to start with. "emem#er to start with a record containing the east
component of the wind $UGRD or 10U if you use %&MWF data'.
)runcate $ile(
$ grib_timefilter.sh my_wind.grib my_shortwind.grib 353
-ere, my_shortwind.grib is the new $ile, 353 is the $irst desired record o$ the original
$ile my_wind.grib.
Inter%olate to new grid( #u%%ose you want to run the model $or the region !"M : to 81M :, 8M
N to !7M N with a grid resolution o$ 1."7M. )o create a ;RIB $ile $or your chosen
geogra%hical region and correct resolution do the $ollowing(
$ bilingrb my_shortwind.grib my_region_wind.grib 12 3 0.25 0.25 73 49 4
!" is the westernmost longitude o$ the new grid (wlon
8 is the southernmost latitude (slat
1."7 is the .onal resolution (dlon
1."7 is the meridional resolution (dlat
98 is the number o$ .onal grid %oints (nlon
2B is the number o$ meridional grid %oints (nlat
2 is an inter%olation %arameter which should not #e changed.
Note that you ha!e to calculate the num#er of grid points in longitude $()' and latitude $*+'
Mo&ifyin" )AM inp*t parameters
Modi$y the $ollowing $iles to the &'M model setu% (you $ind these $iles in
$WAMDIR/input/wam(
runwam.sh re+uires(
'n o%tional wind $ile in ;RIB $ormat. I$ no wind $ile is s%eci$ied a constant wind $ile will
be generated with given wind s%eed blowing $rom west to east (%rogram uvseq_1122.
Note that runwam.sh
$ cd $WAMDIR/work
!!
' bathymetry data $ile, ty%ically
$WAMDIR/input/topography/wamtopo_1122.seq
#ea ice data N not used. $WAMDIR/input/wam must contain an em%ty $ile named
noicefile to ignore ice e4tent.
In%ut $iles under $WAMDIR/input/wam/ that may re+uire editing(
wammodel.inp N #ets start time, duration, time ste%s (mind the =?5 criterion
!. IDELWI is the time di$$erence between two wind $ields in the wind in%ut $ile. )his
must match the tem%oral resolution o$ your ;RIB $ile.
". IDELWO is the time increment o$ the winds used as in%ut in the &'M model. Note
that you must have IDELWI=N*IDELWO, where N iis integer. I$ N is greater than !,
the wind $ields are inter%olated in time.
8. IDELT is the time ste% o$ the source $unction (IDELT greater than "1 minutes is not
recommended.
2. IDELPRO is the %ro%agation time ste%. It must $ul$ill( IDELWO=M*IDELT and
IDELPRO=L*IDELT, where M and L are integers.
7. Out%ut time intervals (currently 8 hrs
G. Name o$ wind in%ut $ile
outspec.list * lat0lon %ositions $or which you want to store "A s%ectral in$ormation
(energy as $unction o$ $re+uency and direction used by polarplot.sh
preset.inp * in%ut data $or cold start o$ the model (normally no editing is re+uired here
preproc.inp * $re+0dir s%ectral grid in$ormation (normally no editing is re+uired here.
Note( re+uires $urther alterations in $WAMDIR/src/wam.inc.
!. Name o$ bathymetry data $ile
". Name o$ $ile with %ositions $or out%ut o$ "A s%ectra
Note that i$ you are doing nested runs it is re+uired to edit %re%roc.in%, see :4ercise '".
NOTE: If you have hanged the topography file you will have to edit the file
$WAMDIR/src/wam/wam.inc:
$ gedit $WAMDIR/src/wam/wam.inc
)he 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)

&hen you have changed $WAMDIR/src/wam/wam.inc then recom%ile &'M(
$ compile_all.sh
R*nnin" )AM
:4ecute model and %re%are ;r'A# out%ut with the $ollowing scri%t.
!"
$ cd $WAM#$/"ork
$ run"am.sh 56"ind *i'e78
runwam.sh does the $ollowing.
!. Reads a wind data $ile ,o%tional/ in ;RIB $ormat and converts it to '#=II
". Reads the '#=II $ile and write the wind data to a se+uential, binary $ile
8. Runs the &'M model
2. =onverts the &'M out%ut $ields $rom se+uential binary to '#=II
7. =onverts the '#=II $ile to a ;RIB $ile containing wave %arameters
G. =reates the ;rads control $ile
Out%ut is written to $WAMDIR/work.
+is*alisin" t#e res*lts
#am%le lat0lon %lot in ;r'A#
O%en a shell %rom%t and ty%e the $ollowing commands(
$ cd $WAM#$/"ork
$ gradsc -' # opens the 9rA#: c'assic inter*ace
ga-7 open "amout # opens "amout.grb
ga-7 ; *i'e # ;ueries the contents o* the 9$< *i'e
ga-7 set t = # choose timestep =
ga-7 set g&out shaded # choose disp'a> t>pe
ga-7 set csmooth on # app'> a cubic smoother
ga-7 d htsg"s*c # disp'a>s signi*icant "aveheight 5m8
ga-7 run cbar # disp'a> an co'or inde&
ga-7 dra" tit'e :ig. "ave height # disp'a> a tit'e
ga-7 ;uit # ;uits 9rA#:
#am%le timeseries %lot in ;r'A#
O%en a shell %rom%t and ty%e the $ollowing commands(
$ cd $WAM#$/"ork
$ gradsc -' # opens the 9rA#: c'assic inter*ace
ga-7 open "amout # opens "amout.grb
ga-7 ; *i'e # ;ueries the contents o* the 9$< *i'e
ga-7 set t 1 = # choose timestep =
ga-7 set 'on 1?- # choose a 'ongitude
ga-7 set 'at 2 # choose a 'atitude
ga-7 set g&out 'ine # choose disp'a> t>pe
ga-7 d htsg"s*c # disp'a>s signi*icant "aveheight 5m8
ga-7 dra" >'ab 5m8# 'abe' >-a&is
ga-7 dra" tit'e :ig. "ave height # disp'a> a tit'e
ga-7 ;uit # ;uits 9rA#:
#am%le s%ectral %lot
)he scri%t polarplot.sh dis%lays a !A and "A s%ectral %lot $or one location (lon0lat(
$ $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.
!8
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,longitude
19,115 # lat,lon position separated by a comma
'$ter this a list o$ dates is %resented(
Wave spectrum p'ot uti'it>
//////////////////////////
Position@
12.--) 11A.--E
Avai'ab'e dates@
1@ 122B-11-1 !? hrs
4@ 122B-11-1 !C hrs
..DetcE..
Select a date (enter to quit):
:amp'e time series
Fhe script timeseriesp'ot.sh sho"s time series o* various parameters@
$ $WAM#$/bin/timeseriesp'ot.sh
Gi'ename WAM-data
"am.dat # t>pe the name o* the binar> output *i'e o*
# the WAM mode'H tr> "am.dat
'atitudeH 'ongitude
12H11A # t>pe 'atH'on position separated b> a comma.
A*ter this a menu is sho"n o* the avai'ab'e parameters. One or t"o parameters
can be
p'otted in one p'ot@
Fime :eries p'otting uti'it>
///////////////////////////////
Position@ C.--H) 11?.--E
PAAMEFE:
Wind@
1. Wsp
4. #ir
Fota' sea@
?. Hs
,. Fp
A. FM
C. #ir
Wind sea@
B. Hs
=. Fp
2. #ir
:"e'' sea@
1-. Hs
11. Fp
14. #ir
:e'ect *irst parameter Denter to ;uitE@
!2
4. Eercise! "etup # Installation
Main goals(
Become ac+uainted with 5inu4
Be able to set u% the environment $or running the &'M model and to e4%lain the directory
layout.
Dnow about the ($reeware so$tware0scri%ts that are used during the e4%eriments
?ortran K g99, gcc, 6erl, ;rads, &grib, ;nu%lot, various scri%ts.
:4ercise(
#etu% the environment needed $or this worksho% as described in cha%ter ". )he =A*ROM will
be %rovided by the Norwegian Meteorological Institute. )he %ur%ose is to get some training in
doing this so that you can re%eat it at your home institute.
<our notes(
!7
$. Eperiment A! %onstant &ind
Main goal(
)he $irst e4%eriment is meant to gain some e4%erience and H$eelingI with running the &'M
model and looking at its results using the so$tware as %rovided. )he model is run with a
constant $rom west to east. In the second %art o$ the e4%eriment we will learn how to do nested
runs with the &'M model. )hat is to run with $iner resolution $or a small area using boundary
s%ectra $rom a coarse grid model.
:4ercises
'!(
3se an area with no land. )o%ogra%hy $ile must be %re%ared in advance (see '%%endi4 II.
Runs with di$$erent wind s%eed should be %er$ormed. 6ro%osed wind s%eeds are( !1 m0s, !7
m0s, "1 m0s, "7 m0s. ?or each run use ;rads to study the wave $ields (how the waves grow with
di$$erent wind s%eeds, what is $ully develo%ed sea, how long does it take to reach $ully
develo%ed sea. 6lot some time series and two*dimensional wave s%ectra.
'"(
Nested run. )wo to%ogra%hy $iles must be %re%ared, one $or the coarse grid and one $or the $ine
grid. )he coarse may be taken $rom e4ercise '!.
(Remember to edit grid dimensions in F&'MAIR0src0wam0wam.inc and recom%ile
?irst run the &'M model $or the coarse grid. #et IBO3N=>! and IBO3N?>1 in %re%roc.in%
and wammodel.in% and $ind the coordinates o$ the corner %oints o$ the $ine grid in the coarse
grid and write those numbers in %re%roc.in%(

#L?IN: > #outhernmost %osition o$ the $ine grid in coarse grid coordinates
NL?IN: > Northernmost %osition o$ the $ine grid in coarse grid coordinates
&I?IN: > &esternmost %osition o$ the $ine grid in coarse grid coordinates
:I?IN: > :asternmost %osition o$ the $ine grid in coarse grid coordinates
)hen run the $ine grid with IBO3N=>1 and IBO3N?>! in %re%roc.in% and wammodel.in%
#tudy the di$$erences between the coarse and the $ine grid runs near the islands.

!G
?igure !( 6eak wave direction and signi$icant wave height -s a$ter 9" hours
constant wind o$ "1 m0s $rom the west (e4ercise '!.

?igure "( )ime series o$ signi$icant wave height $or total sea and swell at
!!O #, !!1O & (e4ercise '!.

!9
?igure 8( )wo*dimensional wave s%ectrum a$ter 9" hours at !!O #, !!1O &
(e4ercise '!.
?igure 2( Aevelo%ment in time o$ one*dimensional wave s%ectrum at
!!O #, !!1O & (e4ercise '!.

Note(
!E
?igure ! were created using ;r'A#. )he $ollowing commands were used(
$ gradsc -'
ga-7 open "amout
ga-7 ; *i'e
ga-7 set t 4,
ga-7 set g&out shaded
ga-7 d htsg"s*c
ga-7 run cbar
ga-7 set g&out vector
ga-7 set cco'or -
ga-7 set arrsc' -.4
ga-7 d skipDsinDdirp"s*c%?.1,/1=-EHAHAEIcosDdirp"s*c%?.1,/1=-E
ga-7 dra" tit'e Peak "ave direction and Hs D!B4hE
ga-7 ; pos
Position / 2.=CAC? ,.BCC12 1 -
ga-7 dra" string 2.=CAC? ,.BCC12 5m8
ga-7 printim "ave(B4.png
ga-7 ;uit
'nimation
)o animate the wave develo%ment use the standard ;r'A# xanim scri%t. -ere it calls a scri%t
wave.gs that was created $or this case as an e4am%le(
$ gradsc -'
ga-7 open "amout
ga-7 set t 1 C?
Fime va'ues set@ 4--,@11@1A@? 4--,@11@44@41
ga-7 &anim -script "ave.gs
#ee xanim.gs in the ;r'A# scri%t directory $or more details on how to use it.
<our notes(
!B
'. Eperiment (! Run WAM for o&n area &ith )%E* &inds
Main goal(
6ractice how to set u% a new model grid. 5earn how to download N=:6 data and adPust them to
your grid. 5ear how to make a warm start o$ the &'M model.
Make your bathymetry $ile.

Aownload N=:6 data.
;lobal !E1*hour %rognoses and archived 8*hourly wind data (One $ile $or each month are
available $rom the NO''0N=:6 on !."7M4!.1M resolution(
6rognoses(
*tp@//po'ar.ncep.noaa.gov/pub/"aves/4--=11?-.t14+/n""?.a''.grb
'rchive(
*tp@//po'ar.ncep.noaa.gov/pub/histor>/"aves/n""?."ind.4--=1-.grb
Run &'M with wind data $rom N=:6 %rognosis $rom yesterday. #ave s%ectra $or warm start
by setting IR:#)>! in wammodel.in%. )he %arameter IR#)A gives the number o$ hours a$ter
model start where you will make a warm start o$ the ne4t model run.
)he s%ectra $or warm start is saved on $ile R:#)'R).out%ut
Run the model with warm start with todays N=:6 %rognosis. Make the necessary wind grib
$ ile. =o%y the $ile R:#)'R).out%ut to R:#)'R).in%ut

#tudy the wave $ields with ;r'A#
"1
+.,ptional Eperiment %! -urricane .atrina
Main goal(
#tudy wave conditions during -urricane Datrina 'ugust "117, download N=:6 data, com%are
model wave height with measurents.
Make a bathymetry $ile $or ;ul$ o$ Me4ico B7& N 97&, !9N N 8!N, grid resolution 1."7
degrees.

Run &'M with winds $rom N=:6. Aownload wind data $or the month 'ugust "117.
;lobal !E1*hour %rognoses and archived 8*hourly wind data (One $ile $or each month are
available $rom the NO''0N=:6 on !."7M4!.1M resolution(
6rognoses(
ftp://polar.ncep.noaa.gov/pub/waves/20050905.t00z/nww3.all.grb
'rchive(
ftp://polar.ncep.noaa.gov/pub/history/waves/nww3.wind.200508.grb
#tudy the $eatures o$ the wave $ields. <ou may want to use the ;r'A# $unction 4wave to
dis%lay the wave height and direction (see below. =om%are the wave data $rom the model with
measuremenst.
"!
?igure B( -s and %eak direction with N=:6 wind $ields $or hurricane Datrina at "117*1E*"B)1G
3)=.
?igure !1( N=:6 wind $ield $or hurricane Datrina at "117*1E*"B)18 3)=.
""
Appendi I! About /inu
Source: &iki%edia, the $ree encyclo%edia (http://en.wikipedia.org
;N305inu4
5inu4 is a com%uter o%erating system and its kernel. It is one o$ the most $amous e4am%les o$
$ree so$tware and o$ o%en*source develo%ment( unlike other maPor o%erating systems (such as
&indows or Mac O#, its underlying source code is available to the %ublic and anyone can
$reely use, modi$y, and redistribute it.
)he term 5inu4 strictly re$ers to the 5inu4 kernel, but is commonly used to describe entire
3ni4*like o%erating systems (also known as ;N305inu4 that are based on the 5inu4 kernel
combined with libraries and tools $rom the ;N3 %roPect. 5inu4 distributions o$ten bundle large
+uantities o$ so$tware with the core system, and over 811 distributions are available ,!/.
Initially, 5inu4 was %rimarily develo%ed and used by individual enthusiasts. #ince then, 5inu4
has gained the su%%ort o$ maPor cor%orations such as IBM, -ewlett*6ackard and Novell $or use
in servers and is beginning to make inroads into the deskto% market. 6ro%onents and analysts
attribute this success to its vendor inde%endence, low cost, security, and reliability.
5inu4 was originally develo%ed $or Intel 8EG micro%rocessors and now su%%orts a variety o$
com%uter architectures. It is de%loyed in a%%lications ranging $rom %ersonal com%uters to
su%ercom%uters and embedded systems such as mobile %hones and %ersonal video recorders.
Aistributions
5inu4 is dominantly used as %art o$ a 5inu4 distribution (distro. )hese are com%iled by
individuals, loose*knit teams, and various %ro$essional organi.ations. )hey include any number
o$ additional system so$tware and a%%lication %rograms, as well as certain %rocesses to install
these systems on a com%uter. Aistributions are created $or many di$$erent %ur%oses, including
locali.ation, architecture su%%ort, real*time a%%lications, and embedded systems, and many o$
which deliberately include only $ree so$tware.
' ty%ical general*%ur%ose distribution includes the 5inu4 kernel, the ;N3 libraries and tools,
command*line shells, and thousands o$ a%%lication so$tware %ackages, $rom o$$ice suites and
the gra%hical @ &indow #ystem to com%ilers, te4t editors, and scienti$ic tools.
:4am%les o$ main*stream distributions(
3buntu
?edora
#u#:
Aebian
"8
Appendi II! %reating a bath0metr0 file from ET,*,2
' global data set o$ to%ogra%hy is $ound in $WAMDIR/input/topography/etopo2.dat.
)he to%ogra%hy data are taken $rom the :arth )o%ogra%hy )wo Minutes ;rid (:)O6O"
database at a resolution o$ " minutes o$ latitude and longitude.
' %rogram to e4tract data $or a given area is %rovided. )o create a new grid area(
;o to the to%ogra%hy directory(
$ cd $WAMDIR/input/topography
:dit the in%ut $ile (using e.g. gedit(
$ gedit etopo.input
)he 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
)his generates a to%ogra%hy $ile called wamtopo_1122.seq. <ou may change this name in
etopo.input.
Move the new to%ogra%hy $ile to $WAMDIR/input/wam/:
I$ you want to save the to%ogra%hy $ile $or later use, you can co%y it to another name, $.e4..
$ cp wamtopo_1122.seq wamtopo_experiment_A.seq
$ mv wamtopo_1122.seq $WAMDIR/input/wam/
)he $ile name must be the same as what is written in the C%re%roc.in%C in%ut $ile. In this
worksho% it is wamtopo_1122.seq. I$ you want to use a di$$erent name $or the to%ogra%hy
$ile you will have to edit $WAMDIR/input/wam/preproc.inp.
Note that when you run the &'M model $or a new grid area, you will usually have to make
changes in $WAMDIR/src/wam/wam.inc(
$ gedit $WAMDIR/src/wam/wam.inc
"2
and recom%ile &'M(
$ compile_all.sh
"7
Appendi III! Eamples of WAM input and output files
Binary forcin" &ata files
&ind in%ut $ile, to%ogra%hy in%ut $ile, and out%ut $ile with wave %arameters are se+uential,
binary $iles with a s%ecial structure. Necessary %re%rocessing and %ost%rocessing %rograms are
%rovided so that the wind in%ut and the wave %arameter out%ut are re$ormatted to grib $ormat
(Re$. descri%tion o$ runwam.sh. -owever, an overview o$ the se+uential binary $ile structure
may be use$ul.
)he data are given as !G*bits integers (INTEGER*2 in ?ortran. Be$ore each data $ield there is
a "1*word header that describes the $ield(
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
)hen $ollow the data $or the $irst latitude, data $or the second latitude and so on.
Q #ome %arameter 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
"G
!am,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* *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)
C
C* *PARAMETER* FOR ARRAY DIMENSIONS FOR CURRENT INPUT.
C
PARAMETER (NCC = 81, NRC = 51)
C
C* *PARAMETER* FOR ARRAY DIMENSIONS FOR PREPROC ONLY.
C
PARAMETER (NBMAX = (NGX+NGY)*2-4)
C
C* *PARAMETER* FOR ARRAY DIMENSIONS OF TOPOGRAPHIE DATA.
C
PARAMETER (JLONI = NGX, JLATI = NGY, IOUTA = 80)
C
C* *PARAMETER* FOR WIND INPUT ARRAY DIMENSIONS.
C
"9
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, o.breivik@met.no)
real tol
parameter (tol=1.0E-5)
integer msmax
parameter (msmax=50)
C
parameter (idprod=88,idgrid=1122)
C
"E
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
"B
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
81
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
8!
!ammo&el,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
8"
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
88
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
82
o*tspec,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 END
C
END
C
87
Appendi I1! WAM flo&chart
8G
Appendi 1! 2rA3" Tips # Tric4s
Blac on !#ite plots
By de$ault, ;r'A# uses a black background with white annotations. &hile this looks nice on
screen, it is not best suited $or %rinting. )he scri%t wamRbRw.gs reverses the color scheme to
black on white background. Issue this command(
set im%run wamRbRw.gs
Animation
set loo%ing on,off
set loo%incr incr
set loo%dim ,y,-,t
4anim.gs
Panels: several plot on one pa"e
wamR%anels.gs
Number o$ rows( "
Number o$ cols( !
#tart t ( !
dt ( "
6arameter ( htsgws$c
)itle te4t ( #igni$icant wave height
Symbols - Marers
w4sym.gs
+ %os
draw w4sym sym#ol y si-e .color.thic/ness00
+ %os
draw mark mar/type y si-e
!ine graph"
set g4out line$il
d htsgws$cSconst(htsgws$c,7,*a
89

You might also like