resqpy.rq_import.import_vdb_ensemble
- resqpy.rq_import.import_vdb_ensemble(epc_file, ensemble_run_dir, existing_epc=False, keyword_list=None, property_kind_list=None, vdb_static_properties=True, vdb_recurrent_properties=True, decoarsen=True, timestep_selection='all', create_property_set_per_realization=True, create_property_set_per_timestep=True, create_complete_property_set=False, extent_ijk=None, corp_xy_units='m', corp_z_units='m', corp_z_inc_down=True, ijk_handedness='right', geometry_defined_everywhere=True, treat_as_nan=None, resqml_xy_units='m', resqml_z_units='m', resqml_z_inc_down=True, shift_to_local=True, local_origin_place='centre', max_z_void=0.1, split_pillars=True, split_tolerance=0.01, progress_fn=None)
Adds properties from all vdb’s within an ensemble directory tree to a single RESQML dataset.
Referencing a shared grid.
- Parameters:
epc_file (
string) – filename of epc file to be extended with ensemble propertiesensemble_run_dir (
string) – path of main ensemble run directory; vdb’s within this directory tree are source of importexisting_epc (
boolean, defaultFalse) – if True, the epc_file must already exist and contain the compatible gridkeyword_list (
listofstrings, optional) – if present, only properties for keywords within the list are includedproperty_kind_list (
listofstrings, optional) – if present, only properties which are mapped to these resqml property kinds are included in the importvdb_static_properties (
boolean, defaultTrue) – if False, no static properties are included, regardless of keyword and/or property kind matchesvdb_recurrent_properties (
boolean, defaultTrue) – if False, no recurrent properties are included, regardless of keyword and/or property kind matchesdecoarsen (
boolean, defaultTrue) – if True and ICOARSE property exists for a grid in a case, the associated property data is decoarsened; if False, the property data is as stored in the vdbtimestep_selection (
string, default'all') – may be ‘first’, ‘last’, ‘first and last’, or ‘all’, controlling which reporting timesteps are included when loading recurrent datacreate_property_set_per_realization (
boolean, defaultTrue) – if True, a property set object is created for each realizationcreate_property_set_per_timestep (
boolean, defaultTrue) – if True, a property set object is created for each timestep included in the recurrent data importcreate_complete_property_set (
boolean, defaultFalse) – if True, a property set object is created containing all the properties imported; only really useful to differentiate from other properties related to the gridextent_ijk (
triple int, optional) – this and remaining arguments are only used if existing_epc is False; the extent is only needed in case automatic determination of the extent failscorp_xy_units (
string, default'm') – the units of x & y values in the vdb corp data; typically ‘m’ (metres), ‘ft’ (feet) or ‘cm’ (centimetres, for lab scale models)corp_z_units (
string, default'm') – the units of z values in the vdb corp data; typically ‘m’ (metres), ‘ft’ (feet) or ‘cm’ (centimetres, for lab scale models)corp_z_inc_down (
boolean, defaultTrue) – set to True if corp z values are depth; False if elevationijk_handedness (
string, default'right') – set to the handedness of the IJK axes in the Nexus model; ‘right’ or ‘left’geometry_defined_everywhere (
boolean, defaultTrue) – set to False if inactive cells do not have valid geometry; deprecated - use treat_as_nan argument insteadtreat_as_nan (
string, optional) – if not None, one of ‘dots’, ‘ij_dots’, ‘inactive’; controls which inactive cells have their geometry set to undefinedresqml_xy_units (
string, default'm') – the units of x & y values to use in the generated resqml grid; typically ‘m’ (metres), ‘ft’ (feet) or ‘cm’ (centimetres, for lab scale models)resqml_z_units (
string, default'm') – the units of z values to use in the generated resqml grid; typically ‘m’ (metres), ‘ft’ (feet) or ‘cm’ (centimetres, for lab scale models)resqml_z_inc_down (
boolean, defaultTrue) – set to True if resqml z values are to be depth; False for elevationsshift_to_local (
boolean, defaultTrue) – if True, the resqml coordinate reference system will use a local originlocal_origin_place (
string, default'centre') – where to place the local origin; ‘centre’ or ‘minimum’; only relevant if shift_to_local is Truemax_z_void (
float, default0.1) – the tolerance of voids between layers, in z direction; voids greater than this will cause the grid import to failsplit_pillars (
boolean, defaultTrue) – if False, a grid is generated without split pillarssplit_tolerance (
float, default0.01) – the tolerance applied to each of x, y, & z values, beyond which a corner point (and hence pillar) will be splitprogress_fn (
function(float), optional) – if present, this function is called at intervals during processing; it must accept one floating point argument which will range from 0.0 to 1.0
- Returns:
resqpy.Model object containing properties for all the realisations; hdf5 and epc files having been updated
Note
if existing_epc is True, the epc file must already exist and contain one grid (or one grid named ROOT) which must have the correct extent for all realisations within the ensemble; if existing_epc is False, the resqml dataset is created afresh with a grid extracted from the first realisation in the ensemble; either way, the single grid is used as the representative grid in the ensemble resqml dataset being generated; all vdb directories within the directory tree headed by ensemble_run_dir are included in the import; by default all properties will be imported; the keyword_list, property_kind_list, vdb_static_properties, vdb_recurrent_properties and timestep_selection arguments can be used to filter the required properties; if both keyword_list and property_kind_list are provided, a property must match an item in both lists in order to be included; if recurrent properties are being included then all vdb’s should contain the same number of reporting steps in their recurrent data and these should relate to the same set of timestamps; timestamp data is extracted from a summary file for the first realisation; no check is made to ensure that reporting timesteps in different realisations are actually for the same date.