BASEMENTBasic Simulation Environment for computation of environmental flow and natural hazard simulationLaboratory of Hydraulics, Hydrology and Glaciology (VAW)ETH Zurich |
You are not logged in.
Pages: 1
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
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
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
Can you somehow upload a copy of your results file?
Offline
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
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
Pages: 1