Welcome, Guest
Username: Password: Remember me

TOPIC: convert_to_bnd.py not parsing correct date

convert_to_bnd.py not parsing correct date 2 years 11 months ago #39455

  • greeve
  • greeve's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 4
Greetings,

I've run into an issue where the convert_to_bnd.py function is not parsing the correct date string to the output boundary selafin file. The hycom data that I'm reading in has a base time of 2012,06,01,00,00,24. I can see in the code (line 231: bnd.datetime = slf.datetime) that it should be parsing the date from the input hycom.slf to the output boundary.slf file. However, when I read the output boundary file with MATLAB the date is set to 1972,07,13,17,15,13. This might also be the issue in Telemac3d thread #38100. As I get a similar time error message relating to an input timestamp, when I try to run the model. TIME: 4845225482.0000000 IS NOT WITHIN THE RANGE OF THE FILE I.E.[ 3586612480.0000000 - 3605102080.0000000 ]

Python -v 3.7.10
Telemac v8p2r1

Does anyone have a fix or work around for this?
also, does anyone have a python script or and example of how to read the binary boundary file produce bu convert_to_bnd.py? I've tried pputils and pyteltools-serafin.

Serafin gives an error "The number of nodes per element is not equal to 6"
pputils ppmodules.selafin_io_pp will open the file but the data field is full of zeros. which isn't the case according to MATLAB.

Thanks
The administrator has disabled public write access.

convert_to_bnd.py not parsing correct date 2 years 10 months ago #39578

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hi greeve,
I experienced the same problem with you. It has been some time but if you haven't found a solution, here is what I have found.
convert_to_bnd.py is using the Selafin class from data_manip.formats.selafin. There is becomes obvious that the developer of the script is celebrating this date and hardcoded it everywhere. So, every file that is manipulated with this class, is imprinted with this date.
If you change the date to "[1900, 1, 1, 0, 0, 0]", it would be closer to the TELEMAC default, so it would be better, but still, the bug remains.
If you would like to examine a SLF file, I would suggest to use the TelemacFile class from data_manip.extraction.telemac_file. It usage is as simple as:
slf = TelemacFile(path_to\my_results.slf)
slf.print_info()
Costas
The administrator has disabled public write access.

convert_to_bnd.py not parsing correct date 2 years 10 months ago #39674

  • Lux
  • Lux's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 39
It seems this issue is probably due to the bug identified by Solokov in this page: www.opentelemac.org/index.php/kunena/21-...by-convert-to-bnd-py.
The administrator has disabled public write access.
Moderators: borisb

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