resqpy.olio.fine_coarse.tartan_refinement

resqpy.olio.fine_coarse.tartan_refinement(coarse_extent_kji, coarse_fovea_box, fovea_ratios_kji, decay_rates_kji=None, decay_mode='exponential', within_coarse_box=None)[source]

Returns a new FineCoarse object set to a tartan grid refinement; fine extent is determined from arguments.

Parameters
  • coarse_extent_kji (triple int) – the extent of the coarse grid being refined

  • coarse_fovea_box (numpy int array of shape (2, 3)) – the central box within the coarse grid to receive maximum refinement

  • fovea_ratios_kji (triple int) – the maximum refinement ratios, to be applied in the coarse_fovea_box

  • decay_rates_kji (triple float or triple int, optional) – controls how quickly refinement ratio reduces in slices away from fovea; if None then default values will be generated; see notes for more details

  • decay_mode (str, default 'exponential') – ‘exponential’ or ‘linear’; see notes

  • within_coarse_box (numpy int array of shape (2, 3), optional) – if present, is preserved in FineCoarse for possible use in setting resqml ParentWindow or generating Nexus CARTREF

Returns

FineCoarse object holding the tartan refinement mapping

Notes

each axis is treated independently; the fovea (box of maximum refinement) may be a column of cells (for a vertical well) or any other logical cuboid; the refinement factor is reduced monotonically in slices moving away from the fovea; two refinement factor decay functions are available: ‘exponential’ and ‘linear’, with different meaning to decay_rates_kji; for exponential decay, each decay rate should be a float in the range 0.0 to 1.0, with 0.0 causing immediate change to no refinement (factor 1), and 1.0 causing no decay (constant refinement at fovea factor); for linear decay, each decay rate should typically be a non-negative integer (though float is also okay), with 0 causing no decay, 1 causing a reduction in refinement factor of 1 per coarse slice, 2 meaning refinement factor reduces by 2 with each coarse slice etc.; in all cases, the refinement factor is given a lower limit of 1; the factor is rounded to an int for each slice, when working with floats; if decay rates are not passed as arguments, suitable values are generated to give a gradual reduction in refinement to a ratio of one at the boundary of the grid