Skip to content

assimilation⚓︎

Descriptive description.

Assimilate ⚓︎

Class for iterative ensemble-based methods. This loop is similar/equal to a deterministic/optimization loop, but since we use ensemble-based method, we need to invoke pipt.fwd_sim.ensemble.Ensemble to get correct hierarchy of classes. The iterative loop will go until the max. iterations OR convergence has been met. Parameters for both these stopping criteria have to be given by the user through methods in their pipt.update_schemes class. Note that only iterative ensemble smoothers can be implemented with this loop (at the moment). Methods needed to be provided by user in their update_schemes class:

calc_analysis
check_convergence

% Copyright © 2019-2022 NORCE, All Rights Reserved. 4DSEIS

__init__(ensemble) ⚓︎

Initialize by passing the PIPT init. file up the hierarchy.

calc_forecast() ⚓︎

Calculate the forecast step.

Run the forward simulator, generating predicted data for the analysis step. First input to the simulator instances is the ensemble of (joint) state to be run and how many to run in parallel. The forward runs are done in a while-loop consisting of the following steps:

    1. Run the simulator for each ensemble member in the background.
    2. Check for errors during run (if error, correct and run again or abort).
    3. Check if simulation has ended; if yes, run simulation for the next ensemble members.
    4. Get results from successfully ended simulations.

The procedure here is general, hence a simulator used here must contain the initial step of setting up the parameters and steps i-iv, if not an error will be outputted. Initialization of the simulator is done when initializing the Ensemble class (see init). The names of the mandatory methods in a simulator are:

    > setup_fwd_sim
    > run_fwd_sim
    > check_sim_end
    > get_sim_results
Notes

Parallel run in "ampersand" mode means that it will be started in the background and run independently of the Python script. Hence, check for simulation finished or error must be conducted!

Info

It is only necessary to get the results from the forward simulations that corresponds to the observed data at the particular assimilation step. That is, results from all data types are not necessary to extract at step iv; if they are not present in the obs_data (indicated by a None type) then this result does not need to be extracted.

Info

It is assumed that no underscore is inputted in DATATYPE. If there are underscores in DATATYPE entries, well, then we may have a problem when finding out which response to extract in get_sim_results below.

post_process_forecast() ⚓︎

Post processing of predicted data after a forecast run

run() ⚓︎

The general loop implemented here is:

  1. Forecast/forward simulation
  2. Check for convergence
  3. If convergence have not been achieved, do analysis/update

% Copyright © 2019-2022 NORCE, All Rights Reserved. 4DSEIS