resqpy.derived_model.add_zone_by_layer_property
- resqpy.derived_model.add_zone_by_layer_property(epc_file, grid_uuid=None, zone_by_layer_vector=None, zone_by_cell_property_uuid=None, use_dominant_zone=False, use_local_property_kind=True, null_value=-1, title='ZONE', realization=None, extra_metadata={})
Adds a discrete zone property (and local property kind) with indexable element of layers.
- Parameters:
epc_file (
string) – file name to load resqml model from and to update with the zonal propertygrid_uuid (
uuid.UUIDorstr, optional) – required unless the model has only one grid, or one named ROOTzone_by_layer_vector (
nk integers, optional) – either this or zone_by_cell_property_uuid must be given; a 1D numpy array, tuple or list of ints, being the zone number to which each layer belongszone_by_cell_property_uuid (
uuid.UUIDorstr, optional) – either this or zone_by_layer_vector must be given; the uuid of a discrete property with grid as supporting representation and cells as indexable elements, holidng the zone to which the cell belongsuse_dominant_zone (
boolean, defaultFalse) – if True and more than one zone is represented within the cells of a layer, then the whole layer is assigned to the zone with the biggest count of cells in the layer; if False, an exception is raised if more than one zone is represented by the cells of a layer; ignored if zone_by_cell_property_uuid is Noneuse_local_property_kind (
boolean, defaultTrue) – if True, the new zone by layer property is given a local property kind titled ‘zone’; if False, the property kind will be set to ‘discrete’null_value (
int, default-1) – the value to use if a layer does not belong to any zone (rarely used)title (
str, default'ZONE') – the citation title of the new zone by layer propertyrealization (
int, optional) – if present the new zone by layer property is marked as belonging to this realizationextra_metadata (
dict, optional) – any items in this dictionary are added as extra metadata to the new property
- Returns:
numpy vector of zone numbers (by layer), uuid of newly created property