lowEBMs.Packages.Variables¶
Package which defines a large set of variables and functions to process them.
The variables defined are divided into three types:
The centre piece of this package is the class Variables.Vars
:
Vars |
Variables.Vars defines any variable desired to store and access from another module’s functions. |
All variables defined in Variable.Vars
can be read and written with:
from lowEBMs.Packages.Variable import Vars
Vars.x #returns the current value of variable x in Vars
Vars.x = y #variable x in Vars is permanently set to value y
Functions to process variables before a simulation run are, for single simulations
variable_importer |
Executes all relevant functions to import variables for a single simulation run. |
builtin_importer |
Adds the most important variables to the python-builtin functions which are globally accessible. |
initial_importer |
Calculates the initial conditions of the primary variables from the initials -section. |
output_importer |
and for parallelized ensemble simulations
variable_importer_parallelized |
|
builtin_importer_parallelized |
|
initial_importer_parallelized |
|
output_importer_parallelized |
Important
Variables.variable_importer
and executes the in the list following processing functions which has to be executed before a simulation can be run for more information see How to use). For parallelized simulations this can be swapped to Variables.variable_importer_parallelized
.
Functions to process variables during or after a simulation run are:
reset |
Resets the given variable to the initial value specified in Vars.__init__. |
datareset |
Resets the primary variables to their initial values. |
All modules defined in lowEBMs.Packages.Variables
are: