Welcome, Guest
Username: Password: Remember me

TOPIC: Importing 2DM mesh problem

Importing 2DM mesh problem 2 years 1 week ago #41541

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 683
  • Thank you received: 178
Great point Christophe; thanks for raising it

For the BK 3.12.8-alpha manual:
  1. When I search for "origin" I find 51 hits; mainly related to grids and GeoTIFFs
  2. When I search for "shift" I find 20 hits; and section 1.8.3.6 "Shifting Data Objects" is the main explanation. There are also hits related to temporal shifting and pressing the shift key.

It looks like there isn't anything explained in the manual related to the SLF origin point.

Is this documented somewhere on the OpenTelemac website? I'd love to add a little explanation into the BK manual about this in order to help people in the future.

Kindly,
Alan
The administrator has disabled public write access.

Importing 2DM mesh problem 2 years 1 week ago #41542

  • ssiddi7
  • ssiddi7's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 66
Okay.

I can use relative coordinate changing the origin (0,0) out of bluekenue what I did before. I used to change the value of the coordinate offsetting a number to reduce the digit from 7 to 4. I made the changes in IS2 file and Bathymetry (XYZ) file.
I am not sure what you are referring by selafin creation? Can you elaborate more please...
The administrator has disabled public write access.

Importing 2DM mesh problem 2 years 1 week ago #41545

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
BK should manage correctly the precision for all data imported so you should probably able to generate a correct mesh without any rounding problem.
In fact the rounding problem arise when you create a selafin file. If you use default parameter (simple precision) there is a rounding to fullfill the requirements of writing coordinates with the significant digits of REAL.
One solution could be to use Double precision but the size of file increase a lot...
Another option is to shift data or BK mesh (as you already process) but this increase the manipulations and you forgot the original location.
That's why it exist in selafin file an option to define an X/Y origin. All the mesh coordinates are then define relatively to this origin. After creating the mesh in BK, choose the location of origin point and give these values when you create the selafin file. There nothing else to do!
Bk, Qgis and probably other post processors will be aware of these origin as the values are stored in the header of the selafin file and automatically replace the result at the right place.
Hope this helps
Christophe
The administrator has disabled public write access.

Importing 2DM mesh problem 2 years 1 week ago #41543

  • ssiddi7
  • ssiddi7's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 66
Hi Alan,

I want to give try to shift my satellite image coordinate. It might be one possible solution. This is a GeoTIFF file. Do you know if I can shift the origin of the geotif in bluekenue, is it possible? Or do I need to use a different software for geotif such as Arcmap....

Thanks again for your reply.
The administrator has disabled public write access.

Importing 2DM mesh problem 2 years 1 week ago #41544

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 683
  • Thank you received: 178
I'd suggest you look more closely at the options when you create a new SLF object, like what Christophe mentioned...

2022-11-09_NewSLF.png


Kindly,
Alan
The administrator has disabled public write access.

Importing 2DM mesh problem 11 months 4 weeks ago #43661

  • colinemathias
  • colinemathias's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 1
Hello Alan,
I have the same problem as above, but these options do not show in the properties of a new Selafin object... Which version of Blue Kenue are you using ? Mine is 3.3.4 (64bits), the one still available to download on BK website.

Thank you very much,
Coline
The administrator has disabled public write access.

Importing 2DM mesh problem 11 months 3 weeks ago #43683

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 683
  • Thank you received: 178
colinemathias wrote:
Hello Alan,
I have the same problem as above, but these options do not show in the properties of a new Selafin object... Which version of Blue Kenue are you using ? Mine is 3.3.4 (64bits), the one still available to download on BK website.

Thank you very much,
Coline

Hi Coline! I am using the most recent alpha version of Blue Kenue, which is version 3.12.10-alpha.

There is no "BK website"; there is, however, the "NRC website", which is likely the one you refer to that contains the most recent released version of Blue Kenue.

There is also the "CHyMS website" that contains the most recent alpha version.

Kindly,
Alan
The administrator has disabled public write access.
The following user(s) said Thank You: colinemathias

Importing 2DM mesh problem 11 months 3 weeks ago #43682

  • colinemathias
  • colinemathias's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 1
Hi all,
I have the same problem as above, but can't run my model like this because it uses TPXO data, which need common coordinates and not shifted ones. If I shift the data before saving the .slf, my finest mesh is modified.

I tried to modify, as suggested, the origin of my slf in Blue Kenue but I don't have the window with these options as showed in message #41544. I'm using latest version 3.4.1. Was this option deprecated ?

I also tried to indicate the shift in TELEMAC with keyword ORIGIN COORDINATES (wiki.opentelemac.org/doku.php?id=news_v5p6:telemac2d) but it seems that this keyword doesn't exist anymore in version v8p4.

Do you have any suggestion on a solution ?

Thanks a lot,
Coline
The administrator has disabled public write access.

Importing 2DM mesh problem 11 months 2 weeks ago #43758

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

If you have a translated geometry file with the known shifted translation vector, you can read the last subsection of the TELEMAC-2D user manual dealing with variables I_ORIGIN and J_ORIGIN.
You can change the values I_ORIGIN and J_ORIGIN of the geometry file (by default = 0;0 with integers, not floats) by running Python script:
run_telfile.py alter --orig I_ORIGIN J_ORIGIN old_geo.slf new_geo.slf (I_ORIGIN J_ORIGIN being integers)
and use the new_geo.slf geometry file and it should work with TPXO.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: colinemathias

Importing 2DM mesh problem 11 months 2 weeks ago #43759

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
And indeed, when this feature was introduced, the keyword ORIGIN COORDINATES was deleted at the same time.
The administrator has disabled public write access.
Moderators: Serrer, a.barton

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