Welcome, Guest
Username: Password: Remember me

TOPIC: Spherical coordinates in T3D

Spherical coordinates in T3D 4 years 5 months ago #36046

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi Shunqi,

Indeed, it appears that these suggested changes have not been considered in recent code updates.
Can you please try with the following sources for v8p1r1 version :

File Attachment:

File Name: tpxo_v8p1r1.f
File Size: 160 KB

File Attachment:

File Name: write_mesh_v8p1r1.f
File Size: 7 KB


(As tpxo.f is a module and write_mesh.f a part of bief library, you should recompile the whole telemac system)

Regards,
Laurent
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 5 months ago #36051

  • span
  • span's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Many thanks, Laurent.That's a great help.
Regards, Shunqi
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 5 months ago #36127

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

I did not read your post 2 years ago (neither did my colleagues I think).
For TELEMAC-3D and the WRITE_MESH subroutine, you are right, NPOIN should be the number of 2D nodes, not 3D.
Anyway, I have to check a few things with my colleague working on TOMAWAC to be sure that this modification would not break something for TOMAWAC after.

For the TPXO module (but also whenever interpolating any tidal data on TELEMAC nodes), what is expected when calling it for the GEOGRAPHIC SYSTEM keyword is the one at that time, not the format of the original geometry.
Giving GEOGRAPHIC SYSTEM = 5 should do the job without modifying the module.
I know this may be tricky.
The documentation may have to be clearer or a change in TELEMAC should be done so that the user does not mistake (combo long/lat + Mercator projection + spherical coordinates). I will think of that before next release.

Thanks for reminding me of these suggestions,

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

Spherical coordinates in T3D 4 years 4 months ago #36289

  • greeve
  • greeve's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 4
I am also having issues running Telemac3D with TXPO boundary conditions. I am in the process of converting a 2D tidal model which is using TXPO boundary forcing’s. I’m using Telemac version v8p1r1 and the model runs fine in 2D (either parallel or sequential). But produces an error relating to CPSTVC when converted to a 10-layer 3D model.
CPSTVC : FORBIDDEN CASE FOR X AND Y:
X=X SIZE : 126260
Y=TR2D1 MAXIMUM SIZE: 12626
The code seems to be reading the 3D array size for the X variable and the 2D array size for the Y variable. I have tried adding Laurent’s modified Fortran scripts “txpo_v8p1r1.f and write_mesh_v8p1r1.f” from post #36046. However, the model is still producing the error. If I compile the code with Laurent’s “write_mesh_2018-03-30.f” from post #29445 the model fails to compile when set to run with parallel processes, but will compile and run fine when set to a sequential configuration.

Regards
Glen
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 4 months ago #36291

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

Can you send your STEERING FILE + FORTRAN FILE (the whole directory if you have several files) + output file showing the errors (from the beginning) please?
Can you also add the keyword DEBUGGER = 1 and send the output file please?

Do you also use spherical coordinates?

Chi-Tuan
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 4 months ago #36301

  • greeve
  • greeve's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 4
Hi Chi-Tuan,

Yes we are using spherical coordinates, because we want to include the extra tide generating forces as the domain is quite large. Attached is a *.zip file with the model. Note, I haven't include the TXPO database files as they are quite large. Happy to upload these to an FTP/SFTP if you need them.

Glen
Attachments:
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 4 months ago #36302

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

The problem is that is given the 3D mesh (size NPOIN3 = NPOIN2*NPLAN) and a 2D work array (size NPOIN2). It is strange that nobody else who use this feature (spherical coordinates in 3D coming from longitude/latitude coordinates and wanting to keep the results in the same format) have not seen the same error.

@Laurent, if you read this post, could you confirm or not, you have not seen such issue in your case(s)?

I have to think of the best and smartest fix.

Chi-Tuan
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 4 months ago #36303

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi Chi-Tuan and Glen,

I remember having this problem too.
I no longer know why I deleted these calls to CPSTVC, it would be better to use something like
CALL CPSTVC(MESH2D%X,T1)
but MESH2D is not know in this routine, and this fix would not work for 2D case.

As CPSTVC just copies the structure of the bief vector, maybe another 2D attribute of the MESH object could suit.
@Chi-Tuan, I let you find the best/smartest fix ;)


I hope it helps.

Regards,
Laurent
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 4 months ago #36304

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

Laurent, you are all right. I wonder how it could work with the same files.

Glen, can you try the temporary fix so that you can work (it may not be the final solution but it could help you to continue, at least).

3 files to add or change in your FORTRAN FILE user_fortran.

Hope this helps,

Chi-Tuan
Attachments:
The administrator has disabled public write access.

Spherical coordinates in T3D 4 years 4 months ago #36305

  • greeve
  • greeve's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 4
Hi Chi-Tuan and Laurent

With the code compiled using Chi-Tuan supplied scripts, the model will run in sequential but fails in parallel. When the model is run sequentially the outputs are only written out in spherical coordinates not Lat/Lon. Trying to run in parallel the model produces this error: "Program received signal SIGSEGV: Segmentation fault - invalid memory reference". Its unclear from the log file where the error is being produced, but I'm assuming the code is now unhappy with the mesh structure?

Thanks for your help.
Attachments:
The administrator has disabled public write access.
Moderators: pham

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