Welcome, Guest
Username: Password: Remember me

TOPIC: .sortie file incomplete

.sortie file incomplete 1 year 4 months ago #42935

Hi,

In a Telemac2d FE case, I try to infer volume fluxes by using the postel scripts described in the HOMETEL/telemac2d/bump/ example with the following python code:
# python
[...] # some framing stuff
out_fluxes = out_file.get_value_history_output("voltotal;volfluxes;volerror")
print(out_fluxes)


But the Python code fails to retrieve information from the .sortie file:
Traceback (most recent call last):
scripts/python3/postel/parser_output.py", line 223, in get_volume_profile
    raise TelemacException(
utils.exceptions.TelemacException: ... Could not parse RELATIVE ERROR IN VOLUME 

I ran the simulation with (see attached

File Attachment:

File Name: steady2d4sortie.cas
File Size: 4 KB
file)
# terminal
telemac2d.py steady2d4sortie.cas -s

Now, if I run the same simulation with multiple cores (e.g.,
telemac2d.py steady2d4sortie.cas --ncsize=4 -s
), the code manages to retrieve information from the .sortie file, but all volume fluxes are empty:
print(ouf_fluxes)
> (('Time (s)', array([   0.,  100.,  200.,  300.,  400.,  500.,  600.,  700.,  800.,
        900., 1000.])), [('Volumes (m3/s)', []), ('Fluxes (-)', [], []), ('Error (-)', [0.0])])

My .cas file contains all (I believe) relevant parameters:
GRAPHIC PRINTOUT PERIOD : 100
LISTING PRINTOUT PERIOD : 100
MASS-BALANCE : YES 
VARIABLES FOR GRAPHIC PRINTOUTS : 'U,V,S,B,Q,F,H'
VARIABLES TO BE PRINTED : 'U,V,S,B,Q,F,H'
PRINTING CUMULATED FLOWRATES : YES

Does anyone have an idea why:
  1. reading the .sortie file with the postel-Python script crashes when I run the simulation with one core only?
  2. the fluxes and volume rates are all empty?

Alas, I could not find any hint in the reference and user manuals or anywhere else.

Thanks for any help.

Best,
Sebastian
The administrator has disabled public write access.

.sortie file incomplete 1 year 4 months ago #42943

For anyone having similar issues, I found the problem in the following Python script:

HOMETEL/scripts/python3/postel/paerser_output.py

in lines 220-224, it says:
while not proc:
    iline = iline + 1
    if iline >= len(self.output):
        raise TelemacException(
            '... Could not parse RELATIVE ERROR IN VOLUME ')

This code block makes the script stopping for no real reason and deleting it makes the script running as wanted.

Additionally, telapy, postel etc use the variable type "np.float" and multiple instances. This is deprecated since numpy v1.20 and should be replaced with "float" (see the release notes).
The administrator has disabled public write access.
Moderators: borisb

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