Welcome, Guest
Username: Password: Remember me

TOPIC: A bug in telemac_cas.py?

A bug in telemac_cas.py? 4 years 2 months ago #36767

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
I was running script translate_cas.py, and found the spaces between a value and the inline comment will be removed in the translated case files (English and French). The translated case files will not run - I believe the FORTRAN code is expecting at least one space between a value and the following comment.

E.g. the space between 0 and /NO FRICTION is removed in the translated case files
LAW OF BOTTOM FRICTION = 0 /NO FRICTION

I debugged the Python3 script and found lines 375 and 376 in telemac_cas.py may be updated from
fr_lines.append(frline + tail)
gb_lines.append(gbline + tail)

to
fr_lines.append(frline + ' ' + tail)
gb_lines.append(gbline + ' ' + tail)
The administrator has disabled public write access.

A bug in telemac_cas.py? 4 years 1 month ago #36905

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Thanks for finding the bug.

Your solution is adding to many spaces.
But I pushed a correction into the trunk.
If you want to have a look.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
Moderators: borisb

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