resqpy.rq_import.import_nexus¶
- resqpy.rq_import.import_nexus(resqml_file_root, extent_ijk=None, vdb_file=None, vdb_case=None, corp_file=None, corp_bin_file=None, corp_xy_units='m', corp_z_units='m', corp_z_inc_down=True, ijk_handedness='right', corp_eight_mode=False, geometry_defined_everywhere=True, treat_as_nan=None, active_mask_file=None, use_binary=False, resqml_xy_units='m', resqml_z_units='m', resqml_z_inc_down=True, shift_to_local=False, local_origin_place='centre', max_z_void=0.1, split_pillars=True, split_tolerance=0.01, property_array_files=None, summary_file=None, vdb_static_properties=True, vdb_recurrent_properties=False, timestep_selection='all', use_compressed_time_series=True, decoarsen=True, ab_property_list=None, create_property_set=False, ensemble_case_dirs_root=None, ensemble_property_dictionary=None, ensemble_size_limit=None, grid_title='ROOT', mode='w', progress_fn=None, vdb_property_list=None)¶
Read a Nexus grid geometry (from ascii input or vdb) and optionally grid properties.
- Parameters
resqml_file_root (-) – output path and file name without .epc or .h5 extension
extent_ijk (-) – ijk extents (fortran ordering)
vdb_file (-) – vdb input file, either this or corp_file should be not None; required if importing from a vdb
vdb_case (-) – required if the vdb contains more than one case; if None, first case in vdb is used
corp_file (-) – required if importing from corp ascii file; corp ascii input file containing nexus corp data without keyword
corp_bin_file (-) – required if importing from corp binary file
corp_xy_units (-) – xy length units
corp_z_units (-) – z length units
corp_z_inc_down (-) – if True z values increase with depth
ijk_handedness (-) – ‘right’ or ‘left’
corp_eight_mode (-) – if True the ordering of corner point data is in nexus EIGHT mode
geometry_defined_everywhere (-) – if False then inactive cells are marked as not having geometry
treat_as_nan (-) – if a value is provided corner points with this value will be assigned not-a-number
active_mask_file (-) – ascii property file holding values 0 or 1, with 1 indicating active cells
use_binary (-) – if True a cached binary version of ascii files will be used (pure binary, not corp bin format)
resqml_xy_units (-) – output xy units for resqml file
resqml_z_units (-) – output z units for resqml file
resqml_z_inc_down (-) – if True z values increase with depth for output resqml file
shift_to_local (-) – if True then a local origin will be used in the CRS
local_origin_place (-) – ‘centre’ or ‘minimum’; if ‘centre’ the local origin is placed at the centre of the grid; ignored if shift_to_local is False
max_z_void (-) – maximum z gap between vertically neighbouring corner points; vertical gaps greater than this will introduce k gaps into resqml grid; units are corp z units
split_pillars (-) – if False an unfaulted grid will be generated
split_tolerance (-) – maximum distance between neighbouring corner points before a pillar is considered ‘split’; applies to each of x, y, z differences
property_array_files (-) – list of (filename, keyword, uom, time_index, null_value, discrete)
summary_file (-) – nexus output summary file, used to extract timestep dates when loading recurrent data from vdb
vdb_static_properties (-) – if True, static vdb properties are imported; only relevant if vdb_file is not None; see also vdb_property_list
vdb_recurrent_properties (-) – if True, recurrent vdb properties are imported; only relevant if vdb_file is not None; see also vdb_property_list
timestep_selection (-) – ‘first’, ‘last’, ‘first and last’, ‘all’, or list of ints being reporting timestep numbers; ignored if vdb_recurrent_properties is False
use_compressed_time_series (-) – generates reduced time series containing timesteps with recurrent properties from vdb, rather than full nexus summary time series
decoarsen (-) – where ICOARSE is present, redistribute data to uncoarse cells
ab_property_list (-) – list of (file_name, keyword, property_kind, facet_type, facet, uom, time_index, null_value, discrete)
create_property_set (-) – if True a resqml PropertySet is created
ensemble_case_dirs_root (-) – path up to but excluding realisation number
ensemble_property_dictionary (-) – dictionary mapping title (or keyword) to (filename, property_kind, facet_type, facet, uom, time_index, null_value, discrete)
ensemble_size_limit (-) – if present processing of ensemble will terminate after this number of cases is reached
grid_title (-) – grid citation title
mode (-) – ‘w’ or ‘a’, mode to write or append to hdf5
progress_fn (-) – if present function must have one floating argument with value increasing from 0.0 to 1.0, and is called at intervals to indicate progress
vdb_property_list (-) – list of vdb static and/or recurrent properties to include in the import; if None, all properties are imported; vdb_static_properties and vdb_recurrent_properties boolean arguments must also be set True for respective properties to be included; ignored if not importing from vdb
- Returns
resqml model in memory & written to disc