Welcome, Guest
Username: Password: Remember me

TOPIC: Bug in spherical coordinates output file

Bug in spherical coordinates output file 2 years 11 months ago #39524

  • DHaverson
  • DHaverson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 4
Hi

I believe I have found a bug when using spherical coordinates. I am currently using Telemac3d v8p2r0 with two tracers (temperature and salinity).

I noticed that the first time step of my results file, the free surface variable values were the longitude of the mesh coordinates and not the initial conditions of free surface (regardless of how they were initilized). The second time step is correct.

However, I believe the problem lies in the creation of the results file and does not impact the results. If I set RESULT FILE IN LONGITUDE-LATITUDE = NO, the first time step of the free surface is the correct value. Whereas, if it is set to YES the results file wrong.

I have not found where it is going wrong, but I thought I would share so someone who is more informed might be able to find the bug.

Cheers

David
The administrator has disabled public write access.

Bug in spherical coordinates output file 2 years 11 months ago #39527

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

Can you share your input files please? In particular the steering file and potential user Fortran files. With every file, it could be possible to reproduce your issue.

Thanks,

Chi-Tuan
The administrator has disabled public write access.

Bug in spherical coordinates output file 2 years 11 months ago #39539

  • DHaverson
  • DHaverson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 4
Hi Chi-Tuan

Many thanks, find attached the setup. Have stripped out some sensitive project information, such as the mesh bathy is set as a constant -50m but have tested and still get the same results. The cas file is set up for only two processors for ten (5s) time steps just for simplicity as its only really the first two time steps you really need to see the effect.

The problem appears limited to only the 2D results file, the 3D results file the first timestep of elevation at the surface layer is correct.

The set up uses TPXO for the boundary forcing, do you have that data or would you like that as well?

Many thanks

David

File Attachment:

File Name: steering_file.cas
File Size: 6 KB




File Attachment:

File Name: boundary_BC.cli
File Size: 837 KB
The administrator has disabled public write access.

Bug in spherical coordinates output file 2 years 11 months ago #39542

  • DHaverson
  • DHaverson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 4
Sorry mesh didnt upload. Here's the mesh.

File Attachment:

File Name: mesh.zip
File Size: 909 KB
The administrator has disabled public write access.

Bug in spherical coordinates output file 2 years 11 months ago #39543

  • DHaverson
  • DHaverson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 4
This is what I see in the first time set of the free surface, instead of a constant 0.4 m.

freesurface.png
The administrator has disabled public write access.

Bug in spherical coordinates output file 2 years 11 months ago #39544

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

Many thanks for having raised this bug and leading me to the fix.

Indeed, this bug appears when using RESULT FILE IN LONGITUDE-LATITUDE = YES. It overwrites working arrays T2_01 and T2_02 when calling WRITE_MESH subroutine in TELEMAC3D_INIT subroutine, whereas the free surface is stored in T2_01 when calling PRERES_TELEMAC3D (the same bug would also occur if you tried to write the Froude number). Thus, this last subroutine should be moved in TELEMAC3D_INIT subroutine.

Please find enclosed a tentative fix. I have to validate it deeper before committing to the main, but it should better work for you.

Can you tell me if it is now OK for you, please?

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

Bug in spherical coordinates output file 2 years 11 months ago #39545

  • DHaverson
  • DHaverson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 4
Hi Chi-Tuan

Yes I can confirm that fixed it and is working as expected.

Many thanks for your assistance.

David
The administrator has disabled public write access.
Moderators: pham

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