create selafin file for meteorological conditions

Dear [name removed]

I could create a selafin files WIND (u10, V10) and ATMOSPHERIC PRESSURE (PATM)over the mesh nodes each timestep from external data. Could tomawac/telemac2d read it and use it and how? which subroutine? any example?

Thanks in advance for any comments, any tips…

[name removed]

Hello,

I am not sure to understand your question if you want to read a serafin in tomawac file with wind on nodes you just specify the wind file with the keyword BINARY WINDS FILE.

hope it helps

Dear [name removed],

I have created a SELAFIN file with wind and pressure data, but its timestep (10 min) differs from my simulation (10 s). Due to file size constraints, I can’t generate data at 10 s intervals.

Unlike wind_txy example, which works without interpolation, may I need to modify READ_BIN_2D.F to interpolate in time ? I’ve reviewed meteo.f, find_variable.f, get_data_timestep, get_data_ntimestep.f… I believe find_variable.f helps locate time AT in the SELAFIN file.

Could you guide me on modifying the code to find T1 and T2 (T1 < AT < T2) and perform linear interpolation for wind and air pressure?

Best regards,

Hello

you can find an example of interpolation between time TV1 and TV2 in the routine noudon.f of the sources of tomawac

[name removed]

Thank you Mr. [name removed] for pointing me towards .f! I really appreciate your help.

noudon.f is indeed the function that loads the two timesteps surrounding AT and interpolates the variables from the SELAFIN file. Since noudon.f is part of TOMAWAC, So I don’t need to provide a Fortran file to read the variables (u10, v10, patm) from my SELAFIN file and interpolate them at the correct time (AT). NOUDON will do it automatically.

However, for the TELEMAC2D simulation, I may need to modify meteo_from_binary_file.f or read_bin_2d.f, taking inspiration from noudon.f. I’m not sure—does this seem like the right approach?

[name removed]

Dear [name removed],

Thank you for your guidance regarding the use of the noudon.f subroutine for temporal interpolation of meteorological variables in TOMAWAC.

To confirm my understanding:

- My meteorological input file (SELAFIN) provides data at 10-minute intervals (600 seconds),



- While my simulation time step is 5 seconds.

The noudon subroutine appears designed to automatically locate the two time records bracketing the simulation time AT and perform a linear interpolation between them, providing the interpolated wind components (u10, v10) and atmospheric pressure (patm) at the exact simulation time.

Could you please confirm if this subroutine works as-is for such a difference in time steps, and therefore if it is not necessary to include it explicitly in the .cas file (unless modifications are made)?

Thank you very much for your assistance.

[name removed]

[name removed],

I am not sure to understand what you ask, but if you want a confirmation that noudon will work to interpolate every 5 s when your data are every 10 mn the answer is yes.

as for using noudon in telemac2d and not in tomawac i have never done it, but i guess that it would need some modifications and then you would have to use it as a fortran user so include it in the cas file.

hope it helps

kind regards

Dear [name removed],

I have two questions for you, if possible.

In a standalone TOMAWAC simulation, the initial conditions are imposed using the following keywords:

INITIAL STILL WATER LEVEL = 0.

TYPE OF INITIAL DIRECTIONAL SPECTRUM = 6

INITIAL SIGNIFICANT WAVE HEIGHT = 4.8

INITIAL PEAK FREQUENCY = 0.125

INITIAL PEAK FACTOR = 3.3

INITIAL ANGULAR DISTRIBUTION FUNCTION = 3

INITIAL WEIGHTING FACTOR FOR ADF = 1.0

INITIAL MAIN DIRECTION 1 = 84.60

INITIAL DIRECTIONAL SPREAD 1 = 2.0

  1. In a TELEMAC-2D (tides) – [name removed] (waves) coupling, knowing that I use TPXO as the initial water level conditions in TELEMAC-2D, should I keep or remove the keyword

INITIAL STILL WATER LEVEL = 0. in TOMAWAC?

And more generally, should I also keep/remove the initial wave spectrum definition keywords shown above?

  1. I want to impose a directional spectrum at each time step, for each liquid boundary node.

So, in the imposed spectral SELAFIN file, for each time step I must provide in RESULT a 2D matrix of (p * q) rows × n columns, where:

p = number of frequencies



q = number of directions



n = number of liquid boundary nodes

For each column (each boundary node), how should the spectral values be ordered?

Option 1: Frequencies first

(F1: D1, D2, …, Dq),

(F2: D1, D2, …, Dq),

… up to Fp.



Option 2: Directions first

(D1: F1, F2, …, [name removed]),

(D2: F1, F2, …, [name removed]),

… up to Dq.

Thanks in advance,

[name removed]

Hello [name removed],

When you couple with telemac the water depth is given by telemac so the keyword

INITIAL STILL WATER LEVEL = 0. will be ignored.

For the other initial conditions it is up to what you want but it is not dependent of coupling with telemac, so if those initial conditions are suitable in a standalone simulation they are still suitable in a coupling condition.

As for imposing a spectrum on each point of the boundary you can use the keyword IMPOSED SPECTRA FILE and FILE WITH COORDINATES OF SPECTRA TO IMPOSE.

the spectra file won’t be a matrix as you seem to think it but it will be a file at the format as if it was created by the fortran routine ecrspe.f

An example of the use of scrips/python3/pretel/spectrum.py is given in the notebook makespectrum. I think that reading the file spectrum.py will help you to construct the spectrum on the boundary.

kind regards

1 Like

Hello [name removed],

Thank you very much for your clear explanations and guidance.

[name removed]

Hello [name removed],

Thank you for your previous answer.

I have a question regarding the Telemac2D–Tomawac coupling:

When running a coupled simulation, do I still need to specify the number of processors in the Tomawac steering file (PARALLEL PROCESSORS) or is it automatically handled by Telemac2D?

[name removed]

Hello [name removed],

As for me i prefer to specify the number of processor when i launch the calculation and not in the steering file, i find it more logical. But to answer your question the number of processors will be handled by telemac2D not with tomawac.

[name removed]

Hello [name removed],

I have a quick question about the Telemac2D–Tomawac coupling.

Telemac2D alone works very well, whether for tides only or tides with meteorological conditions (wind and Patm in SELAFIN file).

I am now coupling it with Tomawac using imposed spectra at the open boundaries. The directional spectrum is generated from Copernicus wave parameters (NetCDF), following the standard Tomawac workflow (as described in spectrum.py). I ran three simulations:

  • Spectra imposed on all three open boundaries (south, north, offshore)

  • Spectra imposed on the offshore boundary and partly on the south and north boundaries

    Only the offshore boundary forced with spectra

Attached are comparisons of Hm0 between:

- the Copernicus model and a buoy



- the Telemac2D–Tomawac results and the same buoy

You will also find attached the Tomawac and Telemac2D cas files (relevant inputs).

In all cases, the coupling significantly underestimates HS peaks during [name removed] (26/02/2010 and 28/10/2010), and there is also a clear phase shift, while Copernicus matches the buoy much better.

Do you think there could be something wrong in my Tomawac input or in the way the coupling is set up?

tomawac_t2d_tom_couplingX_deep.cas (4.17 KB)

Thank you for your help.

[name removed]

Hello [name removed],

It seems you forgot to attach your results.

When you say “significantly underestimates” how much do you underestimates.

I am going to ask my colleagues who are working on Anemoc and [name removed] if they have the same results. They work with a real spectrum produced by Anemoc through a nested mesh.

1 Like