User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2021-11-08 11:00:21

Eva Ammann
User
Registered: 2021-08-26
Posts: 6

Problem with BMv3NodestringResults.py script

Hello, I am trying to get the BMv3NodestringResults.py script to run with my results. The script works fine for the results.h5 file I generated in the Flaz-Tutorial. However, when I insert the results.h5 file from my model, I always get this error message:

Traceback (most recent call last):
  File "C:\Users\evama\Documents\Tutrorials_TestCases\Python_Versuch\main_python.py", line 18, in <module>
    NodeStrg0 = f['/RESULTS/NodeStrg/StateVar/']
  File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "C:\Users\evama\PycharmProjects\pythonProject\venv\lib\site-packages\h5py\_hl\group.py", line 305, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py\h5o.pyx", line 190, in h5py.h5o.open
KeyError: 'Unable to open object (component not found)'

Can anybody help me with that?

Cheers,
Eva

Offline

#2 2021-11-08 11:33:06

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: Problem with BMv3NodestringResults.py script

Hi Eva,

i suggest you to try and put the script in your simulation folder and run it from there. In the folder where you put the script (i.e. the folder from where you run it) there should be only one file with the name ending with "results.h5".

Cheers
Matteo

Last edited by Matteo Facchini (2021-11-08 11:35:02)

Offline

#3 2021-11-08 11:39:50

Eva Ammann
User
Registered: 2021-08-26
Posts: 6

Re: Problem with BMv3NodestringResults.py script

Hi Matteo,

even when I put the file to the scenario folder I get the same error. In the folder there is only one results.h5 file. I also get the error regardless of whether I am using an absolute or a relative path.

Cheers, Eva

Offline

#4 2021-11-15 12:49:36

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: Problem with BMv3NodestringResults.py script

Can you somehow upload a copy of your results file?

Offline

#5 2021-11-15 13:55:02

Eva Ammann
User
Registered: 2021-08-26
Posts: 6

Re: Problem with BMv3NodestringResults.py script

Hi Matteo,

I have zipped the entire scenario folder and uploaded it here: https://we.tl/t-urLb6nX3rc
The results.h5 file is within the .zip file.

Thank you very much for your help,
Eva

Offline

#6 2021-11-16 14:25:42

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 281

Re: Problem with BMv3NodestringResults.py script

Hi Eva,

you are missing the proper output in your simulation.json file. Refer

  • to the tutorial "Hydrodynamics and sediment transport at the river
    Flaz" (particularly, the paragraph "Setup the Configuration File simulation.json") or

  • to the User Menu paragraph "Postprocessing", table 2.1 on page 12

to better understand how to use the nodestring results.

Best
Matteo

PS: as the error says, the py file looks for [/RESULTS/NodeStrg/StateVar/] inside your results.h5 file. With HDFview you can open and explore your results to see if there is anything under /RESULTS/NodeStrg/StateVar/. That's how I saw you were missing something

Last edited by Matteo Facchini (2022-05-10 08:15:35)

Offline

Board footer

Powered by FluxBB