resqpy.rq_import.grid_from_cp
- resqpy.rq_import.grid_from_cp(model, cp_array, crs_uuid, active_mask=None, geometry_defined_everywhere=True, treat_as_nan=None, dot_tolerance=1.0, morse_tolerance=5.0, max_z_void=0.1, split_pillars=True, split_tolerance=0.01, ijk_handedness='right', known_to_be_straight=False)
Create a resqpy.grid.Grid object from a 7D corner point array.
- Parameters:
model (
resqpy.model.Model) – model to which the grid will be addedcp_array (
numpy float array) – 7 dimensional numpy array of nexus corner point data, in nexus orderingcrs_uuid (
uuid.UUID) – uuid for the coordinate reference systemactive_mask (
3d numpy bool array) – array indicating which cells are activegeometry_defined_everywhere (
bool, defaultTrue) – if False then inactive cells are marked as not having geometrytreat_as_nan (
float, defaultNone) – if a value is provided corner points with this value will be assigned nandot_tolerance (
float, default1.0) – minimum manhatten distance of primary diagonal of cell, below which cell is treated as inactivemorse_tolerance (
float, default5.0) – maximum ratio of i and j face vector lengths, beyond which cells are treated as inactivemax_z_void (
float, default0.1) – maximum z gap between vertically neighbouring corner points. Vertical gaps greater than this will introduce k gaps into resqml grid. Units are corp z unitssplit_pillars (
bool, defaultTrue) – if False an unfaulted grid will be generatedsplit_tolerance (
float, default0.01) – maximum distance between neighbouring corner points before a pillar is considered ‘split’. Applies to each of x, y, z differencesijk_handedness (
str, default'right') – ‘right’ or ‘left’known_to_be_straight (
bool, defaultFalse) – if True pillars are forced to be straight
Notes
this function sets up all the geometry arrays in memory but does not write to hdf5 nor create xml: use Grid methods; geometry_defined_everywhere is deprecated, use treat_as_nan instead