Skip to content. | Skip to navigation

Laboratoire d’Etudes en Géophysique et Océanographie Spatiales

Personal tools

This is SunRain Plone Theme


Exercise II

by ECOLA last modified Mar 19, 2012 10:59 AM
spectral 2D tidal simulation

Exercice II: tidal spectral 2D simulation

model setting:

  • spectral solver
  • dominant waves

Prepare the input data:

First, go to today's directory :

cd ~/tuesday

Make sure you have exported the environment variables :

. export_path_aerotp

You can now go to the Ushant directory :

cd Ushant 

Here you have a data directory containing the input data necessary to run the model (all of them are editable ASCII files). The same datas will be used for Exercise II and Exercise III:

cd data
  • a final mesh version : mesh.nei
  • the boundary element description file : mesh.bel
  • the bathymetry, interpolated on the mesh vertices : topo.s2r (s2r stands for Scalar Real)
  • the bathymetry gradient : slope.v2r (for Vector Real)

All of these files have been created previously (from your meshing directory) possibly using ztugo (see Exercice 0), and copied here.

If you have taste for risk, you can replace these files by your own ones.


The last step is to create

  • the open boundary conditions file : tides.obc specifying the tidal elevation at the open boundary.

This file contains the tidal elevation (amplitude and phase) from a tidal atlas, interpolated at the open boundary points of your mesh. To create it, use the atlas2obc command line tool :

atlas2obc -m mesh.nei -b mesh.bel -p $DATA/tides/nea-COMAPI/ -c M2 K1 O1 M4

where is the naming conventions of the nea-COMAPI atlas files (if you use another atlas with files named replace by and the final "M2 K1 O1 M4"  is the wave list you want to use to force the model (you can use more waves if you want and if they are available in the atlas). You can look at the cmdline.atlas2obc for examples (this file keeps a history of calls to atlas2obc).

You now have  the tide.obc filewhich is a concatenation of all the WAVE.obc files just created by the atlas2obc program.


Launch the model :

You can now change directory to ushant_ex2 :

cd ../ushant_ex2

where you will find

  • ushant.startup: a startup for xscan (defining zoom frames, default coastline, etc.)  which wiil be useful to look at the model outputs (run xscan -s ushant.startup at the command line prompt)
  • meshll.nei : a symbolic link to the mesh.nei (tugo needs to have it here with a name finishing by "ll.nei")
  • sequential.intg : a Tugo-m configuration file defining all the parameters to launch the run. Better than a long explanation, take a look at it. This is a ascci file so you can edit it manually, or use the tugo-gui-1.0 graphical interface
tugo-gui spectral.intg

Once you're done, click on FILE -> save complete to save your changes.

Launch the model (redirect the output to a text file log00):

tugo spectral.intg > log00 &

You can look at the progression (ctrl+c to stop) :

tail -f log00

Or stop the process :

ps -edf | grep tugo

to get the PID (first number of the tugo line of the previous command), then :

kill -9 the_pid

kill -9 `ps -edf | grep tugo | head -n1 | cut -d' ' -f5`


Look at the results :

The model outputs are stored in the subdirectory output_sequential (or any other name according to what you put in the sequential.intg configuration file).

Tugo-m generates a lot of output files :

ls output_spectral 

Some of them can be visualised with xscan :

xscan -s ushant.startup



Validate against tide gauges :

You will now validate the tidal model outputs (harmonic constants from tugo's harmonic analysis) against available tide gauges (or altimetry) data :

Create a validation directory in output_sequential :

mkdir output_spectral/validation/
cd output_spectral/validation

Launch the tides-validate tool with the -h option to get help :

tides-validate -h

Here is an example to perform the validation of the model results (on unstructured LGP1 grid ) against tide gauges data (iroise-tg.mgr) :

tides-validate -p ../ -g $DATA/gauges/validation/nea/iroise-tg.mgr -a -unstructured LGP1 M2 K1

Here is another  example to perform the validation of the model results (on structured grid ) against altimetry data (iroise-alti.mgr) :

tides-validate -p ../ -g $DATA/gauges/validation/nea/iroise-alti.mgr -a M2 K1

The result is in the text file validate.out

more validate.out

Document Actions