IODA Bundle
oops::interface::ObsErrorBase< OBS > Class Template Referenceabstract

Base class for OBS-specific implementations of the ObsError interface. More...

#include <ObsErrorBase.h>

Inheritance diagram for oops::interface::ObsErrorBase< OBS >:
[legend]
Collaboration diagram for oops::interface::ObsErrorBase< OBS >:
[legend]

Public Member Functions

 ObsErrorBase (const eckit::mpi::Comm &timeComm)
 
void multiply (ObsVector< OBS > &dy) const final
 Multiply a Departure dy by \(R\). More...
 
void inverseMultiply (ObsVector< OBS > &dy) const final
 Multiply a Departure dy by \(R^{-1}\). More...
 
void randomize (ObsVector< OBS > &dy) const final
 Generate random perturbation in dy. More...
 
ObsVector< OBS > obserrors () const final
 
void update (const ObsVector< OBS > &dy) final
 Set the diagonal of the covariance matrix to stddev squared. More...
 
ObsVector< OBS > inverseVariance () const final
 Return the vector of inverse obs error variances. More...
 
virtual void multiply (ObsVector_ &dy) const =0
 Multiply a Departure dy by \(R\). More...
 
virtual void inverseMultiply (ObsVector_ &dy) const =0
 Multiply a Departure dy by \(R^{-1}\). More...
 
virtual void randomize (ObsVector_ &dy) const =0
 Generate a random perturbation in dy. More...
 
virtual std::unique_ptr< ObsVector_getObsErrors () const =0
 
virtual void update (const ObsVector_ &stddev)=0
 Set the diagonal of the covariance matrix to stddev squared. More...
 
virtual std::unique_ptr< ObsVector_getInverseVariance () const =0
 Return the vector of inverse obs error variances. More...
 
- Public Member Functions inherited from oops::ObsErrorBase< OBS >
 ObsErrorBase ()=default
 
virtual ~ObsErrorBase ()=default
 
virtual void save (const std::string &name) const =0
 Save obs errors to the group name. More...
 
virtual double getRMSE () const =0
 Get mean error for Jo table. More...
 

Private Types

typedef OBS::ObsSpace ObsSpace_
 
typedef OBS::ObsVector ObsVector_
 

Private Attributes

const eckit::mpi::Comm & timeComm_
 

Detailed Description

template<typename OBS>
class oops::interface::ObsErrorBase< OBS >

Base class for OBS-specific implementations of the ObsError interface.

interface::ObsErrorBase overrides oops::ObsErrorBase methods to pass OBS-specific implementations of ObsVector to OBS-specific implementations of ObsError.

Note: subclasses need to provide a constructor with the following signature:

ObsErrorBase(const eckit::Configuration &config, OBS::ObsSpace &obsspace,
             const eckit::mpi::Comm &timeComm);

and pass timeComm to the constructor of this class.

Definition at line 43 of file interface/ObsErrorBase.h.

Member Typedef Documentation

◆ ObsSpace_

template<typename OBS >
typedef OBS::ObsSpace oops::interface::ObsErrorBase< OBS >::ObsSpace_
private

Definition at line 44 of file interface/ObsErrorBase.h.

◆ ObsVector_

template<typename OBS >
typedef OBS::ObsVector oops::interface::ObsErrorBase< OBS >::ObsVector_
private

Definition at line 45 of file interface/ObsErrorBase.h.

Constructor & Destructor Documentation

◆ ObsErrorBase()

template<typename OBS >
oops::interface::ObsErrorBase< OBS >::ObsErrorBase ( const eckit::mpi::Comm &  timeComm)
inlineexplicit

Definition at line 48 of file interface/ObsErrorBase.h.

Member Function Documentation

◆ getInverseVariance()

template<typename OBS >
virtual std::unique_ptr<ObsVector_> oops::interface::ObsErrorBase< OBS >::getInverseVariance ( ) const
pure virtual

Return the vector of inverse obs error variances.

Here is the caller graph for this function:

◆ getObsErrors()

template<typename OBS >
virtual std::unique_ptr<ObsVector_> oops::interface::ObsErrorBase< OBS >::getObsErrors ( ) const
pure virtual

Return a copy of obs error std. dev. If this ObsVector_ is modified (e.g. by obs filters), it should be passed back to update() to ensure the covariance matrix stays consistent.

Here is the caller graph for this function:

◆ inverseMultiply() [1/2]

template<typename OBS >
void oops::interface::ObsErrorBase< OBS >::inverseMultiply ( ObsVector< OBS > &  dy) const
inlinefinalvirtual

Multiply a Departure dy by \(R^{-1}\).

Implements oops::ObsErrorBase< OBS >.

Definition at line 58 of file interface/ObsErrorBase.h.

◆ inverseMultiply() [2/2]

template<typename OBS >
virtual void oops::interface::ObsErrorBase< OBS >::inverseMultiply ( ObsVector_ dy) const
pure virtual

Multiply a Departure dy by \(R^{-1}\).

Implements oops::ObsErrorBase< OBS >.

◆ inverseVariance()

template<typename OBS >
ObsVector<OBS> oops::interface::ObsErrorBase< OBS >::inverseVariance ( ) const
inlinefinalvirtual

Return the vector of inverse obs error variances.

Implements oops::ObsErrorBase< OBS >.

Definition at line 74 of file interface/ObsErrorBase.h.

Here is the call graph for this function:

◆ multiply() [1/2]

template<typename OBS >
void oops::interface::ObsErrorBase< OBS >::multiply ( ObsVector< OBS > &  dy) const
inlinefinalvirtual

Multiply a Departure dy by \(R\).

Implements oops::ObsErrorBase< OBS >.

Definition at line 54 of file interface/ObsErrorBase.h.

◆ multiply() [2/2]

template<typename OBS >
virtual void oops::interface::ObsErrorBase< OBS >::multiply ( ObsVector_ dy) const
pure virtual

Multiply a Departure dy by \(R\).

Implements oops::ObsErrorBase< OBS >.

◆ obserrors()

template<typename OBS >
ObsVector<OBS> oops::interface::ObsErrorBase< OBS >::obserrors ( ) const
inlinefinalvirtual

Return a copy of obs error std. dev. If this ObsVector_ is modified (e.g. by obs filters), it should be passed back to update() to ensure the covariance matrix stays consistent.

Implements oops::ObsErrorBase< OBS >.

Definition at line 66 of file interface/ObsErrorBase.h.

Here is the call graph for this function:

◆ randomize() [1/2]

template<typename OBS >
void oops::interface::ObsErrorBase< OBS >::randomize ( ObsVector< OBS > &  dy) const
inlinefinalvirtual

Generate random perturbation in dy.

Implements oops::ObsErrorBase< OBS >.

Definition at line 62 of file interface/ObsErrorBase.h.

◆ randomize() [2/2]

template<typename OBS >
virtual void oops::interface::ObsErrorBase< OBS >::randomize ( ObsVector_ dy) const
pure virtual

Generate a random perturbation in dy.

Implements oops::ObsErrorBase< OBS >.

◆ update() [1/2]

template<typename OBS >
void oops::interface::ObsErrorBase< OBS >::update ( const ObsVector< OBS > &  stddev)
inlinefinalvirtual

Set the diagonal of the covariance matrix to stddev squared.

Implements oops::ObsErrorBase< OBS >.

Definition at line 70 of file interface/ObsErrorBase.h.

◆ update() [2/2]

template<typename OBS >
virtual void oops::interface::ObsErrorBase< OBS >::update ( const ObsVector_ stddev)
pure virtual

Set the diagonal of the covariance matrix to stddev squared.

Implements oops::ObsErrorBase< OBS >.

Member Data Documentation

◆ timeComm_

template<typename OBS >
const eckit::mpi::Comm& oops::interface::ObsErrorBase< OBS >::timeComm_
private

Definition at line 102 of file interface/ObsErrorBase.h.


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