Open sindre-nistad opened 4 years ago
A will need an example of such a grid for fix + testing
In my preliminary testing using a grid with staircase reverse faults which implies that the grid is of the type having dual grid indexing, the error reported here still is present in version 2.14. Not only the methods to_roxar and from_roxar but also reading properties into such grid fails. Several functions need to updated to handle dual grid indexing. Also utility functions estimating grid conformity type fails or give wrong results such that proportional gridding ends up being classified as mixed conform with top and base 'erosion' due to misinterpretation of layering for grids with duala grid indexing.
An advantage of fixing this issue will be that the APSGUI plugin can work on al types of corner point grids, not only grids where the roxar API attribute for grid: grid.has_dual_index_system is False. In grids with dual grid index system, grid_indexer and simbox_indexer are different. For grids where there are only one index system, both the grid_indexer and the simbox_indexer give the same indexing scheme and are identical.
zarr will not be in sorted order if zonation ranges are not in sorted order. So for instance in a grid with dual index, the simbox index will be in sorted order, but the grid index might not
grid = project.grid_models["some_reverse_fault_grid"].get_grid()
print(grid.grid_indexer.zonation())
>>> {0: [range(0,2), range(4,6)], 1: [range(2,4), range(6,8)]}
print(grid.simbox_indexer.zonation())
>>> {0: [range(0,2)], 1: [range(2,4)]}
So for the simbox indexing system, the zones are contigous, but when we look at the grid_indexer, they are not. Instead
if set(zarr) != set(range(1, self._nlay + 1)):
raise ValueError(
"Arrays are not valid as the do not sum to "
"vertical range, {}".format(zarr)
)
would correctly check that zonations span the entire vertical range, although, other parts of the code might assume that zarr
is in sorted order.
Hi, When extracting a grid (with reverse faults) from RMS, using
xtgeo.grid_from_roxar
, the program hangs for a long time (maybe 10 - 20 minutes) before throwing an error message.I tried extracting a different grid in the same project, and that worked as expected.
The version of xtgeo used is
2.6.0
.