Closed mgimhof closed 3 years ago
Thanks for highlighting this @mgimhof – I think your analysis is correct. There are probably parts of resqpy code that make assumptions about the semantics or structure of hdf5 internal paths. We should treat that as a bug and modify the code so that it always reads the hdf5 internal paths from the xml and does not make any unnecessary assumptions.
@andy-beer Thanks Andy!
@mgimhof The hdf5_paths branch has changes which should respect arbitrary internal hdf5 parts when using the Model copy_part_from_other_model() or copy_all_parts_from_other_model() methods. Could you please check out the branch in its current form and see whether it resolves the issue for your example dataset.
I will keep the pull request open for now as I need to check the rest of the codebase for other unnecessary assumptions when reading hdf5 data.
@andy-beer yes, your branch resolves my issue with copying this dataset
Thanks for testing @mgimhof – the new code should support any hdf5 internal paths, as long as there is at least one hdf5 group (eg. '/RESQML/') in the path before the final hdf5 dataset name.
For your info, @mgimhof , the hdf5_paths branch has now been merged into master and the code tagged as v1.1.4
Apologies @mgimhof – I just noticed that I failed to create tag v1.1.4 yesterday – it is now in place, with the changes to support arbitrary hdf5 internal paths.
The little snippet fails due to invalid UUID patterns (in hdf5).
It fails with:
because it encounters
'Fault_4346bb9c-68a5-4591-86df-9284316d0dd3' or 'UnstructuredGrid_492f069b-888a-4a17-8cc1-cdc845774f18_Geometry'
I think the issue arises from the hdf paths:
<eml20:PathInHdfFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">RESQML/UnstructuredGrid_492f069b-888a-4a17-8cc1-cdc845774f18_Geometry/USER_CELL_INDEX</eml20:PathInHdfFile>
or<eml20:PathInHdfFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">RESQML/Fault_4346bb9c-68a5-4591-86df-9284316d0dd3/Fault_Cells</eml20:PathInHdfFile>
It could well be that a very well-known vendor is ignoring standard or business rule with regard to naming the hdf path within the h5 file. I have always treated PathInHdfFile as is rather than assuming some semantics.ugrid.zip