Welcome, Guest
Username: Password: Remember me

TOPIC: Wrong datetime in binary boundary file generated by convert_to_bnd.py

Wrong datetime in binary boundary file generated by convert_to_bnd.py 2 years 10 months ago #39671

  • Sokolov
  • Sokolov's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 38
  • Thank you received: 13
Dear all,

It seems that in the latest version of telemac (8.3.0) the binary boundary file generated by the scripts/python3/pretel/convert_to_bnd.py has wrong datetime ([1972, 7, 13, 17, 15, 13]) obtained as a default value from the scripts/python3/data_manip/formats/selafin.py (line 97). Correct datetime value from the input slf file is assighed to the boundary slf object in line 230 when the header of the boundary file is already written (line 223).

To correct this misbehaviour the lines 229,230 should be placed after line 178 to ensure that the header has a correct datetime.

Best,

Alexander
The administrator has disabled public write access.
The following user(s) said Thank You: Lux

Wrong datetime in binary boundary file generated by convert_to_bnd.py 2 years 9 months ago #39699

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

I 've come across this as well recently (albeit with v8p2r1).

You can also use the run_selafin.py script to reset the datetime to the correct value after you've run the convert_to_bnd.py script. For example:

run_selafin.py alter your_selafin_file --date 01-01-2020 --time 00:00:00 -r

David
The administrator has disabled public write access.

Wrong datetime in binary boundary file generated by convert_to_bnd.py 2 years 9 months ago #39700

  • Sokolov
  • Sokolov's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 38
  • Thank you received: 13
Thank you, David.

I do hope that this bug will be fixed in the next release :)

Alexander
The administrator has disabled public write access.

Wrong datetime in binary boundary file generated by convert_to_bnd.py 1 year 5 months ago #42729

  • jurjendejong
  • jurjendejong's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 27
  • Thank you received: 12
Just came across the same issue. I think it originates from the missing of the reference/original datetime stamp in the t3d.slf file.

The cleanest solution would be to update the routing for writing the t3d.slf file to include this timestamp. This will also improve the usability in other post-processing tools.
The administrator has disabled public write access.

Wrong datetime in binary boundary file generated by convert_to_bnd.py 1 year 5 months ago #42730

  • jurjendejong
  • jurjendejong's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 27
  • Thank you received: 12
I'm now doubting if my previous post was correct. I am now also getting t3d.slf files that actually have correct datestamps, so maybe my experience was caused by another issue.

The note of @Sokolov on the moving of the datetime lines in convert_to_bnd() is still valid.
The administrator has disabled public write access.

Wrong datetime in binary boundary file generated by convert_to_bnd.py 6 months 4 weeks ago #44642

  • borisb
  • borisb's Avatar
  • OFFLINE
  • Admin
  • Posts: 128
  • Thank you received: 64
Hi Alexander,

I've moved this topic to the Scripts subforum as this is an issue related to Python scripting. The problem with this particular script (convert_to_bnd.py) is that it is not part of TELEMAC validation system as no test has ever been provided by its original author to verify it. This script also relies on the old Selafin class that is not maintained anymore, but is still used by a bunch of similar scripts.

However, if you could provide me with some basic input files, I would be able to add at least one example to the TELEMAC codebase, to ensure that this script is correctly checked during our daily validation tests.
The administrator has disabled public write access.
Moderators: borisb

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