Welcome, Guest
Username: Password: Remember me

TOPIC: Spherical coordinates in T3D

Spherical coordinates in T3D 6 years 7 months ago #29399

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Dear colleagues,

I am currently trying to run a T3D config forced by TPXO.
The domain is very large and I am thus trying to use spherical coordinates.

I built a mesh in lon/lat (in degree) and I used the following keywords :

COORDONNEES SPHERIQUES = OUI
SYSTEME GEOGRAPHIQUE =1
TYPE DE PROJECTION SPATIALE =3
BASE DE DONNEES DE MAREE =2

When I run the model, the model crashes at the beginning of the simulation.
The model does not read the initial/boundary conditions from the TPXO database. Furthermore, the result file is expressed in meters (Mercator ?) (while the input file is in lon/lat).
The problem is due to the coordinates system because my reference simulation in Lambert2etendu works well.

Is there a reference configuration in lon/lat (in degree) that I can use as an example ? Or, did I miss something with the keywords?

Thank you.

Kind regards,

Jérôme
The administrator has disabled public write access.

Spherical coordinates in T3D 6 years 7 months ago #29445

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hello Jérôme,

I don't know which version you're using, but I think it's possible since the v7p3r0, in adding the keyword "FICHIER DE RESULTAT EN LONGITUDE-LATITUDE = OUI" and by using the following corrected version of write_mesh.f

File Attachment:

File Name: write_mesh_2018-03-30.f
File Size: 7 KB

Otherwise, you may have to use a projection

I hope it helps !
Laurent
The administrator has disabled public write access.

Spherical coordinates in T3D 6 years 7 months ago #29464

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hi Laurent,
Thank you for your reply.
I am using the v7p1r1.
I think it will be simpler to use a projection.
The problem is that my domain extends over three different utm zones. Do you know the best way to deal with it ?
Thank you.
Kind regards,
Jérôme
The administrator has disabled public write access.
The following user(s) said Thank You: Binguo

Spherical coordinates in T3D 6 years 7 months ago #29470

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi Jérôme,

I don't have v7p1r1 already installed but you can try with the following tpxo modified module and let me know what happens. I tested the same modifications with v7p2r1 and v7p3r0, and it works fine for me. Be sure that the tpxo module is well recompiled.

File Attachment:

File Name: tpxo_v7p1r1.f
File Size: 143 KB

If it works, your results file will still be in projected coordinates (Mercator for Telemac). You'll have to re-associate your lat/lon coordinates either in post-processing by reading your geometry file for example, or you can take inspiration from the previous write_mesh.f subroutine to adapt it for v7p1r1.

Anyway, you have to keep in mind that the code is not written in spherical coordinates and always use a projection. I don't really know the characteristics and validity of the "mercator projection for telemac" over large domain and how the introduced geodetic error can be estimated (and yet I should know it as I have a surveyor degree at the origin, but it's far now...), but maybe people who are used to build global model, ocean model, tsunami model can give us our feedback on this point.

I also attached the modifications of tpxo module and write_mesh.f for v7p3r0 (marked with "modif LLE" tags). I let the developers check it and potentially integrate it for future releases.

File Attachment:

File Name: tpxo_v7p3r0.f
File Size: 174 KB


Best regards,
Laurent
The administrator has disabled public write access.
The following user(s) said Thank You: Thiébot

Spherical coordinates in T3D 6 years 7 months ago #29480

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hi Laurent,
Thank you for your reply.
From your answer, I understand that I will have to use an appropriate projection. It is quite complex as my domain extends over several utm zones (and, unless I am wrong, Telemac only deals with a single utm zone).
I have made several tests to estimate the geodesic errors when projecting the mesh on different utm zones (utm30nord, utm29nord...). I obtain large distorsion (few km).
As you suggest, I would be very interested in the feedback of people who are used to build global model, ocean model, tsunami model...
Kind regards,
Jérôme
The administrator has disabled public write access.

Spherical coordinates in T3D 6 years 7 months ago #29481

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Jérôme,

I would say that even if you use a mesh in spherical coordinates, telemac will project it in a projection named "mercator for telemac" which I don't know the validity domain but it should be quite similar as a classical utm projection.

You can use a modelling domain extending over several mercator zones, telemac is able to deal with it, but it's the validity of the projection outside of its limits that you have to verify, as you're doing.

For very large domains, rigorously, I think it would be better to use a code written in spherical coordinates.

Regards,
Laurent
The administrator has disabled public write access.

Spherical coordinates in T3D 6 years 7 months ago #29495

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hi Laurent,
Thank you for your message.
I will do additional tests to understand exactly what is the "Telemac mercator projection". It is not clear to me yet. I will try to see if the Telemac projection is similar to the classical utm n°x projection (e.g. x=30). I also have to understand what is the "latitude/longitude at origin" at how it affects the projection.
Thank you for yout help.
Kind regrads,
Jérôme
The administrator has disabled public write access.

Spherical coordinates in T3D 6 years 7 months ago #29497

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi Jérôme,

If it can help you, the conversion from lat/lon to "mercator for telemac" projection is done in the bief subroutine read_mesh_coord.f (line 90, IF PROJECTION==3) called by almesh.f and is derived from the "latitude and longitude of origin".
It's a "homemade" mercator projection, and maybe you can come back to a classical mercator num_zone with the suited parameters of lat/lon origin. But the projection validity of the domain will not change.
The reciprocal conversion function (mercator for telemac to lat/lon) is in telemac2d sources: conv_mercator_to_degdec.f (line 202, ELSEIF GEOSSYT==5) and also uses lat/lon of origin.

Regards,
Laurent
The administrator has disabled public write access.

Spherical coordinates in T3D 6 years 7 months ago #29501

  • Thiébot
  • Thiébot's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hi Laurent,
Thank you for the update.
I will have a close look at those routines.
Cheers,
Jérôme
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 5 months ago #36033

  • span
  • span's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Dear Laurent
Although this was posted sometime ago, I am facing the similar difficulties for the new version v8p1r1. The file - tpxo_v7p1r1.f/tpxo_v7p3r0.f did work in running TELEMAC2D with longitude/latitude coordinates and TPXO for v7, but it does not seem to work with the new version. Are there any similar subroutines available? Regards, Shunqi
The administrator has disabled public write access.
Moderators: pham

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