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
|
required |
keys_en
|
dict
|
Options for the ensemble 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(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
|
|
vintage
|
int
|
the time index for the data |
0
|
aug_coeff
|
bool
|
|
None
|
local_analysis_update()
⚓︎
Function for updates that can be used by all algorithms. Do this once to avoid duplicate code for local analysis.
save_temp_state_assim(ind_save)
⚓︎
Method to save the state variable during the assimilation. It is stored in a list with length = tot. no. assim. steps + 1 (for the init. ensemble). The list of temporary states are also stored as a .npz file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ind_save
|
int
|
Assim. step to save (0 = prior) |
required |
save_temp_state_iter(ind_save, max_iter)
⚓︎
Save a snapshot of state at current iteration. It is stored in a list with length equal to max. iteration length + 1 (due to prior state being 0). The list of temporary states are also stored as a .npz file.
Warning
Max. iterations must be defined before invoking this method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ind_save
|
int
|
Iteration step to save (0 = prior) |
required |
save_temp_state_mda(ind_save)
⚓︎
Save a snapshot of the state during a MDA loop. The temporary state will be stored as a list with length equal to the tot. no. of assimilations + 1 (init. ensemble saved in 0 entry). The list of temporary states are also stored as a .npz file.
Warning
Tot. no. of assimilations must be defined before invoking this method.
Parameter
ind_save : int Assim. step to save (0 = prior)
save_temp_state_ml(ind_save)
⚓︎
Save a snapshot of the state during a ML loop. The temporary state will be stored as a list with length equal to the tot. no. of assimilations + 1 (init. ensemble saved in 0 entry). The list of temporary states are also stored as a .npz file.
Warning
Tot. no. of assimilations must be defined before invoking this method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ind_save
|
int
|
Assim. step to save (0 = prior) |
required |