TODO: A bit about Error Models...
Error Models¶
Error Models’ Base Class¶

class
ErrorModelsBase
(model, configs=None, *argv, **kwargs)¶ Bases:
object
Base class for models describing uncertatinties associated with different sources of information in the Data Assimilation framework. This class should support all (at least basic) tasks/functionalities related to uncertainty and errors associated with information sources such as Model, Prior, and observations.
Base class for models describing uncertatinties associated with different sources of information in the Data Assimilation framework. A base class for error models such as:
 Observation errors model,
 Background errors model,
 Model errors model.
Parameters:  model – reference to the model object to which the error model will be attached.
 configs – a configurations dictionary for the error model to be created.
 should override whatever present in the model configurations if is not None. (This) –
Methods

__init__
(model, configs=None, *argv, **kwargs)¶

construct_error_covariances
(*argv, **kwargs)¶ Construct error covariance matrix/model of the errors attached to this specific source of information. For example construct the observation error covariance matrix of Gaussian observational errors.
Parameters:  *argv –
 **kwargs –
Returns:

error_covariances_inv_prod_vec
(in_state, in_place=True, *argv, **kwargs)¶ Evaluate and return the product of inverse of the error covariance matrix by a vector
Parameters:  in_state – model.state_vector
 in_place (default True) – multiply the inverse of the covariance matrix of associated errors by the
 vector in place. This overwrites the passed state. (passed) – If False, a new model.state_vector object is created and returned.
 *argv –
 **kwargs –
Returns: model.state_vecotr; the product of inverse of the error covariance matrix by in_state
Return type: out_state

error_covariances_prod_vec
(in_state, in_place=True, *argv, **kwargs)¶ Evaluate and return the product of the error covariance matrix by a vector. This method might be not needed!
Parameters:  in_state – model.state_vector
 in_place (default True) – multiply the covariance matrix of associated errors by the passed vector in place. This overwrites the passed state. If False, a new model.state_vector object is created and returned.
 *argv –
 **kwargs –
Returns: model.state_vecotr; the product of the error covariance matrix by in_state.
Return type: out_state

error_covariances_sqrt_prod_vec
(in_state, in_place=True, *argv, **kwargs)¶ Evaluate and return the product of square root of the error covariance matrix by a vector
Parameters:  in_state – model.state_vector
 in_place (default True) – multiply the square root (e.g. Cholesky decomposition) of the covariance
 of associated errors by the passed vector in place. This overwrites the passed state. (matrix) – If False, a new model.state_vector object is created and returned.
 *argv –
 **kwargs –
Returns: model.state_vecotr; the product of square root of the error covariance matrix by in_state.
Return type: out_state

generate_noise_vec
(*argv, **kwargs)¶ Generate a random vector sampled from the Probability Distribution Fuction describing the errors implemented in this model. E.g. Gaussian observation noise vector with zero mean, and specified observational error covariance matrix
Parameters:  *argv –
 **kwargs –
Returns: model.state_vecotr; a random noise vector sampled from the PDF of this errors model
Return type: out_state