1. Ushant Sea tidal modeling

Table of contents

General input files:

  • mesh file
  • boundary codes file
  • bathymetry file
  • input parameters template file

Tidal input files

  • tidal boundary conditions file
  • spectrum file

Preliminary step:

First, go to T-UGOm training top directory :

cd ~/tuesday

Make sure you have exported the environment variables :

. export_path_aerotp

Exercice I: tidal time-stepping 2D simulation

model setting :

  • 2D mode
  • time step and sub-cycling
  • harmonic analysis

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
ls
  • 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 WAVE.optimal.nc M2 K1 O1 M4

where WAVE.optimal.nc is the naming conventions of the nea-COMAPI atlas files (if you use another atlas with files named M2.foo.nc replace WAVE.optimal.nc by WAVE.foo.nc) 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_ex1 :

cd ../ushant_ex1

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 sequential.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 sequential.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_sequential

Some of them can be visualised with xscan :

xscan -s ushant.startup

A WORD ON OUTPUT FILES ? ENERGY BUDGET EXAMINATION …

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_sequential/validation/
cd output_sequential/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 WAVE.sequential.nc -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 WAVE-AUTO.01.SG.nc M2 K1

The result is in the text file validate.out

more validate.out

Exercice II: tidal spectral 2D simulation

Detailed instructions

model setting:

  • spectral discretisation paire
  • solver

simulation

validation against tide gauges

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
ls
  • 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 WAVE.optimal.nc M2 K1 O1 M4

where WAVE.optimal.nc is the naming conventions of the nea-COMAPI atlas files (if you use another atlas with files named M2.foo.nc replace WAVE.optimal.nc by WAVE.foo.nc) 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

A WORD ON OUTPUT FILES ? ENERGY BUDGET EXAMINATION …

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 WAVE.spectral.nc -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 WAVE-AUTO.01.SG.nc M2 K1

The result is in the text file validate.out

more validate.out

Exercice III: tidal spectral 3D barotropic 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
ls
  • 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 WAVE.optimal.nc M2 K1 O1 S2

where WAVE.optimal.nc is the naming conventions of the nea-COMAPI atlas files (if you use another atlas with files named M2.foo.nc replace WAVE.optimal.nc by WAVE.foo.nc) and the final “M2 K1 O1 S2”  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_ex3

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”)
  • Spectral3D_test*.intg :  4 Tugo-m configuration files defining all the parameters to launch the runs. This is a ascci file so you can edit it manually, or use the tugo-gui-1.0 graphical interface
tugo-gui Spectral3D_test2.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 Spectral3D_test2.intg

4 different configurations:

  1. Spectral3D_test1.intg : 20 layers vertical resolution model of the Ushant sea with constant vertical diffusion.
  2. Spectral3D_test2.intg: 20 layers vertical resolution with a turbulent scheme (non constant Kv)
  3. Spectral3D_test3.intg: 20 layers with a higher roughness coefficient.
  4. Spectral3D_test4.intg: 40 layers model with constant vertical diffusion.

Look at the results :

The model outputs are stored in the subdirectory mentioned  in the configuration files *.intg.

Tugo-m generates a lot of output files :

ls test*

Some of them can be visualised with xscan :

xscan -s ushant.startup

Validate against profilers data :

Now you should be able to load an unstructured 3D file from any of the 4 simulations, and look at the solution fields. (pick a M2.spectral3D.nc first)

You can upload in xscan a file containing the data from profilers:

Load the “Legend and GIS menu” and open the file:

./softs/xscan/data/gauges/profilers/M2_profiles.lgd

Now you can show data->show profile and by clicking on the dot on the map you’ll see the corresponding profile.

Each profile contains 4 columns of data representing respectively the amplitude of u (the meridional velocity), its phase,  the amplitude of v (zonal velocity) and its phase.

Search