Skip to content

ensemble⚓︎

Descriptive description.

Ensemble ⚓︎

Bases: Ensemble

Class for organizing/initializing misc. variables and simulator for an ensemble-based inversion run. Inherits the PET ensemble structure

__init__(keys_da, keys_en, sim) ⚓︎

Parameters:

Name Type Description Default
keys_da dict

Options for the data assimilation class

  • daalg: spesification of the method, first the main type (e.g., "enrml"), then the solver (e.g., "gnenrml")
  • analysis: update flavour ("approx", "full" or "subspace")
  • energy: percent of singular values kept after SVD
  • obsvarsave: save the observations as a file (default false)
  • restart: restart optimization from a restart file (default false)
  • restartsave: save a restart file after each successful iteration (defalut false)
  • analysisdebug: specify which class variables to save to the result files
  • truedataindex: order of the simulated data (for timeseries this is points in time)
  • obsname: unit for truedataindex (for timeseries this is days or hours or seconds, etc.)
  • truedata: the data, e.g., provided as a .csv file
  • assimindex: index for the data that will be used for assimilation
  • datatype: list with the name of the datatypes
  • staticvar: name of the static variables
  • dynamicvar: name of the dynamic variables
  • datavar: data variance, e.g., provided as a .csv file
required
keys_en dict

Options for the ensemble class

  • ne: number of perturbations used to compute the gradient
  • state: name of state variables passed to the .mako file
  • prior_: the prior information the state variables, including mean, variance and variable limits

NB: If keys_en is empty dict, it is assumed that the prior info is contained in keys_da. The merged dict keys_da|keys_en is what is sent to the parent class.

required
sim callable

The forward simulator (e.g. flow)

required

check_assimindex_sequential() ⚓︎

Check if assim. indices is given as a 2D list as is needed in sequential updating. If not, make it a 2D list

check_assimindex_simultaneous() ⚓︎

Check if assim. indices is given as a 1D list as is needed in simultaneous updating. If not, make it a 2D list with one row.

compress_manager(data=None, vintage=0, aug_coeff=None) ⚓︎

Compress the input data using wavelets.

Parameters:

Name Type Description Default
data

data to be compressed If data is None, all data (true and simulated) is re-compressed (used if leading indices are updated)

None
vintage int

the time index for the data

0
aug_coeff bool
  • False: in this case the leading indices for wavelet coefficients are computed
  • True: in this case the leading indices are augmented using information from the ensemble
  • None: in this case simulated data is compressed
None

local_analysis_update() ⚓︎

Function for updates that can be used by all algorithms. Do this once to avoid duplicate code for local analysis.

set_observations() ⚓︎

Generate the perturbed observed data ensemble