Skip to content

simple_models⚓︎

A collection of trivial toy models.

lin_1d ⚓︎

linear 1x150 model (or whatever), just make observations of the state at given positions.

__init__(input_dict=None, m=None) ⚓︎

Two inputs here. A dictionary of keys, or parameter directly.

Parameters:

Name Type Description Default
input_dict dict

Dictionary containing all information required to run the simulator. It may come from, for example, an init file.

None
m int

Parameter to make predicted data.

None
Changelog
  • ST 7/9-15

nonlin_onedimmodel ⚓︎

Class of simple 1D forward model for testing purposes.

__init__(input_dict=None) ⚓︎

Two inputs here. A dictionary of keys, or parameter directly.

Parameters:

Name Type Description Default
input_dict

contains all information the run the simulator (may come from, e.g., an init file)

None

sevenmountains ⚓︎

The objective function is the elevations of the seven mountains around bergen, to test optimization algorithm

__init__(input_dict=None, state=None) ⚓︎

Two inputs here. A dictionary of keys, or parameter directly.

Parameters:

Name Type Description Default
input_dict dict

contains all information the run the simulator (may come from, e.g., an init file)

None
state any

Parameter to make predicted data

None
Changelog
  • ST 9/5-18

call_sim(path=None) ⚓︎

Run the simple 1D forward model

Parameters:

Name Type Description Default
path str

Alternative folder where the MARE2DEM input files are located.

None

Returns:

Name Type Description
d object

Predicted data.

Changelog
  • ST 3/6-16

check_sim_end(current_run) ⚓︎

Check if a simulation that has run in the background is finished. For ensemble-based methods, there can possibly be several folders with simulations, and each folder must be checked for finished runs. To check if simulation is done we search for .resp file which is the output in a successful run.

Parameters:

Name Type Description Default
current_run list

List of ensemble members currently running simulation.

required

Returns:

Name Type Description
member int

Ensemble member that is finished.

Changelog
  • ST 9/5-18

get_sim_results(which_resp, ext_data_info=None, member=None) ⚓︎

Get forward simulation results. Simply load the numpy array...

Parameters:

Name Type Description Default
which_resp str

Specifies which of the responses is to be outputted (just one data type in this case).

required
member int

Ensemble member that is finished.

None

Returns:

Name Type Description
y ndarray

Array containing the predicted data (response).

Changelog
  • ST 3/6-16

run_fwd_sim(en_member=None, folder=os.getcwd(), wait_for_proc=False) ⚓︎

Set up and run a forward simulation in an fwd_sim. The parameters for the forward simulation is set in setup_fwd_run. All the steps to set up and run a forward simulation is done in this object.

Parameters:

Name Type Description Default
en_member int

Index of the ensemble member to be run.

None
folder str

Folder where the forward simulation is run.

getcwd()
Changelog
  • ST 3/6-16

setup_fwd_run(state, assim_ind=None, true_ind=None) ⚓︎

Set input parameters from an fwd_sim in the simulation to get predicted data. Parameters can be an ensemble or a single array.

Parameters:

Name Type Description Default
state dict

Dictionary of input parameter. It can be either a single 'state' or an ensemble of 'state'.

required

Other Parameters:

Name Type Description
true_ind list

The list of observed data assimilation indices.

assim_ind list

List with information on assimilation order for ensemble-based methods.

Changelog
  • ST 3/6-16