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 property

  • grid_uuid (uuid.UUID or str, optional) – required unless the model has only one grid, or one named ROOT

  • zone_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 belongs

  • zone_by_cell_property_uuid (uuid.UUID or str, 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 belongs

  • use_dominant_zone (boolean, default False) – 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 None

  • use_local_property_kind (boolean, default True) – 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 property

  • realization (int, optional) – if present the new zone by layer property is marked as belonging to this realization

  • extra_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