Welcome, Guest
Username: Password: Remember me

TOPIC: How to read a temporal-spatial varying wind and air pressure data

How to read a temporal-spatial varying wind and air pressure data 8 months 1 week ago #44378

  • tomsail
  • tomsail's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 43
  • Thank you received: 17
Hi all,

To include pressure effects in the version v8p5, the binary wind file has to contain the following variable names:
WINDX
WINDY
PATM

If you want to generate a correct wind & pressure file for v8p5 simulations you need to use the fix-issue-981 branch:
git clone https://gitlab.pam-retd.fr/otm/telemac-mascaret.git
git checkout fix-issue-981
..
[COMPILE TELEMAC]
which should be merged soon in main

For linux users, it should be easier: I have pre-compiled a version in a conda environment that you can load directly:
conda create -n telemac -c tomsail opentelemac

which should contain the latest modification for wind / pressure forcing for V8P5.

Then to create the file:
1. either have a look at the routine I have implemented in pyPoseidon (that creates the BINARY WIND FILE directly from a xarray.Dataset and a GEOMETRY file) or,
2. if you have already the file from your wind provider at the SLF format, use the generate_atm routine with :
converter.py generate_atm [-h] [--ll2utm LL2UTM] geo_file slf_file atm_file 

For V8P4, if I remember well, the variable for pressure was 'SURFACE PRESSURE'.

Comment on the paper: despite the feature could have been beneficial for storm surge models at the time, nowadays a multitude of python toolbox can generate wind fields based on track data:
github.com/adcirc/gahm
github.com/ec-jrc/pyStorms
github.com/CLIMADA-project/climada_pytho...rd_TropCyclone.ipynb

(there could be many more.. These are the ones referenced in github.com/orgs/oceanmodeling/projects/4/views/1)
that you could then convert in a xr.Dataset to generate directly an BINARY WIND FILE.
The administrator has disabled public write access.
The following user(s) said Thank You: rjj, e.roome

How to read a temporal-spatial varying wind and air pressure data 8 months 1 week ago #44380

  • e.roome
  • e.roome's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 3
Hi Tom,

Thanks for your detailed reply...

So am I correct in thinking that there are two methods here: (1) the ASCII or (2) the BINARY data files?

Is the latter the recommended option in the most recent version?

I currently use an ASCII file along with the modified idwm_t2d.f to implement just winds. It seems that this method breaks down when wanting to also include pressure.

cheers
Ed.
The administrator has disabled public write access.

How to read a temporal-spatial varying wind and air pressure data 8 months 1 week ago #44381

  • tomsail
  • tomsail's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 43
  • Thank you received: 17
Yes there are 2 methods.
Although ASCII requires custom implementation in the FORTRAN as stated in the manual: gitlab.pam-retd.fr/otm/telemac-mascaret/...emac2d_user_v8p5.pdf

That's why I'd recommend to use the BINARY atm file with:

WINDX
WINDY
PATM

for the variable names.
I have never come to use ASCII files because I deal with huge meteo files, so I can't really help you with your routine
The administrator has disabled public write access.
The following user(s) said Thank You: e.roome

How to read a temporal-spatial varying wind and air pressure data 8 months 1 week ago #44382

  • e.roome
  • e.roome's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 3
Thanks Tom,

I will have to reconsider my choice of method!

My meteo file is already 4GB when in ASCII format. I suspect that this will be slow to run using my current setup.

cheers,
Ed
The administrator has disabled public write access.

How to read a temporal-spatial varying wind and air pressure data 8 months 6 days ago #44437

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Ed,

As told in the TELEMAC-2D user manual and by Tom, if you have wind (and/or pressure, air temperature, etc) varying in time and space and do not want to implement any Fortran lines, the easiest way is to use BINARY ATMOSPHERIC DATA FILE). In that case, you have to generate input files defined for every node of your mesh.

If you only have data for a few locations and are not able to define data for every node of your mesh, you can use ASCII ATMOSPHERIC DATA FILE, but you have to implement the reading and interpolation by yourself, e.g. using what is done in wind_txy example (only for wind, you have to change things for other variables).

If you have big input files, maybe you can consider the use of BINARY ATMOSPHERIC DATA FILE with FREE FORMAT FOR ATMOSPHERIC DATA FILE = YES and implement the reading and interpolation by yourself.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.

How to read a temporal-spatial varying wind and air pressure data 8 months 1 week ago #44399

  • e.roome
  • e.roome's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 3
Hi Tom

In your telemac.py script in pyPoseidon, you use 'from utils.geometry import get_weights'

I cannot find this function in the latest update of telemac that you provided.

Can you see where I am going wrong here?

cheers,
Ed
The administrator has disabled public write access.

How to read a temporal-spatial varying wind and air pressure data 8 months 1 week ago #44402

  • tomsail
  • tomsail's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 43
  • Thank you received: 17
Hi Ed,

Indeed this is another Merge Request that has yet to be integrated in the main branch.

If you use my conda package, I have integrated the 3 latest MR (Merge Requests) gitlab.pam-retd.fr/otm/telemac-mascaret/-/merge_requests

Otherwise, you'll have to wait for an update in the main version.

A "dirty" fix would be to just copy/paste the function it in the generate_atm routine.

You have 3 options, I let you decide :)
The administrator has disabled public write access.
The following user(s) said Thank You: e.roome

How to read a temporal-spatial varying wind and air pressure data 8 months 1 week ago #44428

  • e.roome
  • e.roome's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 3
The new release seems to be working (with the Binary atmos file).

Thanks for your help on this Tom,

Ed.
The administrator has disabled public write access.

How to read a temporal-spatial varying wind and air pressure data 6 months 2 weeks ago #44702

  • e.roome
  • e.roome's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 3
Hi Tom,

This is slightly off the topic of our last message, but I was wondering if you were aware of any ways to convert a selafin file to the format of another hydrodynamic model output e.g. Shiscm. I am using openDrift (particle tracking model) and I have had difficulties with their selafin reader.

cheers,
Ed
The administrator has disabled public write access.

How to read a temporal-spatial varying wind and air pressure data 6 months 2 weeks ago #44705

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
The selafin reader in openDrift is the Telemac Selafin reader so sounds strange to have difficulties here...

By the way, in Telemac there is also an include particle tracking model...
Christophe
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.