resqpy.derived_model.zonal_grid
- resqpy.derived_model.zonal_grid(epc_file, source_grid=None, zone_title=None, zone_uuid=None, zone_layer_range_list=None, k0_min=None, k0_max=None, use_dominant_zone=False, inactive_laissez_faire=True, new_grid_title=None, new_epc_file=None)
Extends an existing model with a new version of the source grid converted to a single, thick, layer per zone.
- Parameters:
epc_file (
string) – file name to rewrite the model’s xml to; if source grid is None, model is loaded from this filesource_grid (
grid.Grid object, optional) – a multi-layer RESQML grid object; if None, the epc_file is loaded and it should contain one ijk grid object (or one ‘ROOT’ grid) which is used as the source gridzone_title (
string) – if not None, a discrete property with this as the citation title is used as the zone propertyzone_uuid (
stringoruuid) – if not None, a discrete property with this uuid is used as the zone property (see notes)zone_layer_range_list (
listof(int,int,int)) – each entry being (min_k0, max_k0, zone_index); alternative to working from a zone arrayk0_min (
int, optional) – the minimum layer number in the source grid (zero based) to include in the zonal version; default is zero (ie. top layer in source grid)k0_max (
int, optional) – the maximum layer number in the source grid (zero based) to include in the zonal version; default is nk - 1 (ie. bottom layer in source grid)use_dominant_zone (
boolean, defaultFalse) – if True, the most common zone value in each layer is used for the whole layer; if False, then variation of zone values in active cells in a layer will raise an assertion errorinactive_laissez_faire (
boolean, optional) – if True, a cell in the zonal grid will be set active if any of the corresponding cells in the source grid are active; otherwise all corresponding cells in the source grid must be active for the zonal cell to be active; default is Truenew_grid_title (
string) – used as the citation title text for the new grid objectnew_epc_file (
string, optional) – if None, the source epc_file is extended with the new grid object; if present, a new epc file (& associated h5 file) is created to contain the zonal grid (& crs)
- Returns:
new grid object (grid.Grid) with one layer per zone of the source grid
Notes
usually one of zone_title or zone_uuid or zone_layer_range_list should be passed, if none are passed then a single layer grid is generated; zone_layer_range_list will take precendence if present