UFO
ufo::ObsErrorCrossVarCov Class Reference

Observation error covariance matrix with cross-variable correlations. More...

#include <ObsErrorCrossVarCov.h>

Inheritance diagram for ufo::ObsErrorCrossVarCov:
Collaboration diagram for ufo::ObsErrorCrossVarCov:

Public Types

typedef ObsErrorCrossVarCovParameters Parameters_
 

Public Member Functions

 ObsErrorCrossVarCov (const Parameters_ &, ioda::ObsSpace &, const eckit::mpi::Comm &timeComm)
 Initialize observation errors. More...
 
void update (const ioda::ObsVector &stddev) override
 Update obs error standard deviations to be equal to stddev. More...
 
void multiply (ioda::ObsVector &y) const override
 
void inverseMultiply (ioda::ObsVector &y) const override
 
void randomize (ioda::ObsVector &y) const override
 Generate y as a random perturbation. More...
 
void save (const std::string &name) const override
 Save obs error standard deviations under name group name. More...
 
double getRMSE () const override
 Return RMS of obs error standard deviations. More...
 
std::unique_ptr< ioda::ObsVector > getObsErrors () const override
 Return obs errors std deviation. More...
 
std::unique_ptr< ioda::ObsVector > getInverseVariance () const override
 Return inverse of obs error variance. More...
 

Private Member Functions

void print (std::ostream &) const override
 Print covariance details (for logging) More...
 

Private Attributes

ioda::ObsVector stddev_
 Observation error standard deviations. More...
 
Eigen::MatrixXd varcorrelations_
 Correlations between variables. More...
 

Detailed Description

Observation error covariance matrix with cross-variable correlations.

Correlations are the same at all locations and are read from the file specified in the configuration. Obs error standard deviations are read from ObsSpace as ObsError group. Full observation error covariance matrix is R = D^{1/2} * C * D^{1/2} where D^{1/2} is a diagonal matrix with stddev_ (ObsError group) on the diagonal, and C is the correlation matrix.

Definition at line 51 of file ObsErrorCrossVarCov.h.

Member Typedef Documentation

◆ Parameters_

The type of parameters passed to the constructor. This typedef is used by the ObsErrorFactory.

Definition at line 55 of file ObsErrorCrossVarCov.h.

Constructor & Destructor Documentation

◆ ObsErrorCrossVarCov()

ufo::ObsErrorCrossVarCov::ObsErrorCrossVarCov ( const Parameters_ options,
ioda::ObsSpace &  obspace,
const eckit::mpi::Comm &  timeComm 
)

Initialize observation errors.

Definition at line 21 of file ObsErrorCrossVarCov.cc.

Member Function Documentation

◆ getInverseVariance()

std::unique_ptr< ioda::ObsVector > ufo::ObsErrorCrossVarCov::getInverseVariance ( ) const
override

Return inverse of obs error variance.

Definition at line 175 of file ObsErrorCrossVarCov.cc.

◆ getObsErrors()

std::unique_ptr< ioda::ObsVector > ufo::ObsErrorCrossVarCov::getObsErrors ( ) const
override

Return obs errors std deviation.

Definition at line 169 of file ObsErrorCrossVarCov.cc.

◆ getRMSE()

double ufo::ObsErrorCrossVarCov::getRMSE ( ) const
inlineoverride

Return RMS of obs error standard deviations.

Definition at line 83 of file ObsErrorCrossVarCov.h.

◆ inverseMultiply()

void ufo::ObsErrorCrossVarCov::inverseMultiply ( ioda::ObsVector &  y) const
override

Multiply y by inverse of this observation error covariance Computed as R^{-1} * dy = D^{-1/2} * C^{-1] * D^{-1/2} * dy where D^{1/2} - diagonal matrix with stddev_ on the diagonal C - correlations

Definition at line 108 of file ObsErrorCrossVarCov.cc.

Here is the call graph for this function:

◆ multiply()

void ufo::ObsErrorCrossVarCov::multiply ( ioda::ObsVector &  y) const
override

Multiply y by this observation error covariance Computed as R * dy = D^{1/2} * C * D^{1/2} * dy where D^{1/2} - diagonal matrix with stddev_ on the diagonal C - correlations

Definition at line 60 of file ObsErrorCrossVarCov.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print()

void ufo::ObsErrorCrossVarCov::print ( std::ostream &  os) const
overrideprivate

Print covariance details (for logging)

Definition at line 183 of file ObsErrorCrossVarCov.cc.

◆ randomize()

void ufo::ObsErrorCrossVarCov::randomize ( ioda::ObsVector &  y) const
override

Generate y as a random perturbation.

Definition at line 156 of file ObsErrorCrossVarCov.cc.

Here is the call graph for this function:

◆ save()

void ufo::ObsErrorCrossVarCov::save ( const std::string &  name) const
override

Save obs error standard deviations under name group name.

Definition at line 163 of file ObsErrorCrossVarCov.cc.

◆ update()

void ufo::ObsErrorCrossVarCov::update ( const ioda::ObsVector &  stddev)
override

Update obs error standard deviations to be equal to stddev.

Definition at line 54 of file ObsErrorCrossVarCov.cc.

Member Data Documentation

◆ stddev_

ioda::ObsVector ufo::ObsErrorCrossVarCov::stddev_
private

Observation error standard deviations.

Definition at line 95 of file ObsErrorCrossVarCov.h.

◆ varcorrelations_

Eigen::MatrixXd ufo::ObsErrorCrossVarCov::varcorrelations_
private

Correlations between variables.

Definition at line 97 of file ObsErrorCrossVarCov.h.


The documentation for this class was generated from the following files: