subscript.field_statistics.field_statistics

Purpose:

Calculate mean and stdev of continuous field parameters Estimate volume fraction of facies (facies probabilities) Works for non-shared grids where nx, ny is fixed, but nz per zone may vary from realization to realization.

Result:

Output mean and stdev for continuous field parameter Output estimate of facies probabilities for facies parameters

exception subscript.field_statistics.field_statistics.ArgumentFileNotFound
class subscript.field_statistics.field_statistics.FieldStatistics

This class defines the ERT workflow hook.

It is constructed to work identical to the command line except

  • field_statistics is upper-cased to FIELD_STATISTICS

  • All option names with double-dash must be enclosed in “” to avoid interference with the ERT comment characters “–“.

run(*args)

Pass the ERT workflow arguments on to the same parser as the command line.

subscript.field_statistics.field_statistics.calc_stats(input_dict, ens_path, facies_per_zone, result_path, ert_config_path, copy_to_geogrid_realization=False)

Calculates mean, stdev of continuous field parameters saved for geomodel grid. Calculates volume fractions (estimated facies probabilities) for facies parameter saved for gemodel grid. Read input for related to where to find the files and where to write the result.

Return type:

None

subscript.field_statistics.field_statistics.calc_temporary_field_stats(input_dict, ens_path, result_path, ert_config_path)

Calculates mean, stdev of continuous fields used as temporary fields in facies and petrophysical modelling. Read input for related to where to find the files and where to write the result.

Return type:

None

subscript.field_statistics.field_statistics.check_if_iterations_exist(ens_path, input_dict)

Get specified interations from specifications and check that the iteration exist in the ensemble.

subscript.field_statistics.field_statistics.get_active_real(iter_list, ens_path, nreal, geogrid_name='')

Get a list of active realizations

Return type:

tuple[list, int]

subscript.field_statistics.field_statistics.get_common_field_specifications(input_dict, ert_config_path=None)

Get specifications of parameters that are common to both main keywords, ‘geogrid_fields’, and ‘temporary_ertbox_fields’.

Return type:

tuple[int, list, bool, dict, dict, str | None, dict[str, tuple[int, int, int]], str | Path]

subscript.field_statistics.field_statistics.get_ertbox_size_per_zone(ertbox_path, zone_names, ertbox_per_zone_dict, ertbox_default)

Read the size of the ertbox grids for each zone if specified. Use a default ertbox grid if ertbox grid for some or all specified zones are not defined. ertbox grid size define the size of the field parameters for the zones. Returns a dictionary with zone name as key and a tuple with the grid size for the ertbox grid for the zone.

Return type:

dict[str, tuple[int, int, int]]

subscript.field_statistics.field_statistics.get_parser()

Define the argparse parser

Return type:

ArgumentParser

subscript.field_statistics.field_statistics.get_parser_ert()

Define the argparse parser

Return type:

ArgumentParser

subscript.field_statistics.field_statistics.legacy_ertscript_workflow(config)

A hook for usage of this script in an ERT workflow, using the legacy hook format.

subscript.field_statistics.field_statistics.main()

Invocated from the command line, parsing command line arguments