resqpy.derived_model.add_edges_per_column_property_array
- resqpy.derived_model.add_edges_per_column_property_array(epc_file, a, property_kind, grid_uuid=None, source_info='imported', title=None, discrete=False, uom=None, time_index=None, time_series_uuid=None, string_lookup_uuid=None, null_value=None, facet_type=None, facet=None, realization=None, local_property_kind_uuid=None, extra_metadata={}, new_epc_file=None)
Adds an edges per column grid property from a numpy array to an existing resqml dataset.
- Parameters:
epc_file (
string) – file name to load model resqml model from (and rewrite to if new_epc_file is None)a (
3D numpy array) – the property array to be added to the model; expected shape (nj,ni,2,2) or (nj,ni,4)property_kind (
string) – the resqml property kindgrid_uuid (
uuid objectorstring, optional) – the uuid of the grid to which the property relates; if None, the property is attached to the ‘main’ gridsource_info (
string) – typically the name of a file from which the array has been read but can be any information regarding the source of the datatitle (
string) – this will be used as the citation title when a part is generated for the array; for simulation models it is desirable to use the simulation keyword when appropriatediscrete (
boolean, defaultFalse) – if True, the array should contain integer (or boolean) data; if False, floatuom (
string, defaultNone) – the resqml units of measure for the data; not relevant to discrete datatime_index (
integer, defaultNone) – if not None, the time index to be used when creating a part for the arraytime_series_uuid (
uuid objectorstring, defaultNone) – required if time_index is not Nonestring_lookup_uuid (
uuid objectorstring, optional) – required if the array is to be stored as a categorical property; set to None for non-categorical discrete data; only relevant if discrete is Truenull_value (
int, defaultNone) – if present, this is used in the metadata to indicate that this value is to be interpreted as a null value wherever it appears in the data (use for discrete data only)facet_type (
string) – resqml facet type, or Nonefacet (
string) – resqml facet, or Nonerealization (
int) – realization number, or Nonelocal_property_kind_uuid (
uuid.UUIDorstring) – uuid of local property kind, or Noneextra_metadata (
dict, optional) – any items in this dictionary are added as extra metadata to the new propertynew_epc_file (
string, optional) – if None, the source epc_file is extended with the new property object; if present, a new epc file (& associated h5 file) is created to contain a copy of the grid and the new property
- Returns:
uuid.UUID - the uuid of the newly created property
Notes
the RESQML protocol for saving edges per column properties uses a clockwise ordering of the 4 edges of a column; the resqpy protocol uses 2 dimensions of extent 2, being the axis (J, I) and face (-, +); this function assumes the array is in RESQML protocol if it has shape (nj, ni, 4) and resqpy protocol if it has shape (nj, ni, 2, 2); when reloading the property it will be presented in RESQML protocol; calling code can use property module functions reformat_column_edges_from_resqml_format() and reformat_column_edges_to_resqml_format() to convert between the protocols if needed