OOPS
oops::Departures< OBS > Class Template Reference

Difference between two observation vectors. More...

#include <Departures.h>

Inheritance diagram for oops::Departures< OBS >:
Collaboration diagram for oops::Departures< OBS >:

Public Member Functions

 Departures (const ObsSpaces_ &, const std::string &name="")
 create Departures for all obs (read from ObsSpace if name is specified) More...
 
size_t size () const
 Access. More...
 
ObsVector_operator[] (const size_t ii)
 
const ObsVector_operator[] (const size_t ii) const
 
Departuresoperator+= (const Departures &)
 
Departuresoperator-= (const Departures &)
 
Departuresoperator*= (const double &)
 
Departuresoperator*= (const Departures &)
 
Departuresoperator/= (const Departures &)
 
void zero ()
 
void ones ()
 
void random ()
 
void invert ()
 
void axpy (const double &, const Departures &)
 
double dot_product_with (const Departures &) const
 
double rms () const
 
size_t nobs () const
 Return number of departures (excluding departures that are masked out) More...
 
void mask (ObsDataVec_< int >)
 Mask out departures where the passed in qc flags are > 0. More...
 
void mask (const Departures &mask)
 Mask out departures where mask has missing values. More...
 
Eigen::VectorXd packEigen (const Departures &) const
 Pack departures in an Eigen vector (excluding departures that are masked out) More...
 
size_t packEigenSize (const Departures &) const
 Size of departures packed into an Eigen vector. More...
 
void save (const std::string &) const
 Save departures values. More...
 
- Public Member Functions inherited from oops::GeneralizedDepartures
 GeneralizedDepartures ()
 
virtual ~GeneralizedDepartures ()
 

Private Types

typedef ObsSpaces< OBS > ObsSpaces_
 
typedef ObsVector< OBS > ObsVector_
 
template<typename DATA >
using ObsData_ = ObsDataVector< OBS, DATA >
 
template<typename DATA >
using ObsDataVec_ = std::vector< std::shared_ptr< ObsData_< DATA > >>
 

Private Member Functions

void print (std::ostream &) const
 

Private Attributes

std::vector< ObsVector_dep_
 Data. More...
 

Detailed Description

template<typename OBS>
class oops::Departures< OBS >

Difference between two observation vectors.

A departure is the difference between two observations. The archetypal example is \( \mathbf{y} - {\cal H}(\mathbf{x}) \).

Keeping an observation space vector here is necessary for the implementation of generic observation error covariance matrices.

Definition at line 44 of file Departures.h.

Member Typedef Documentation

◆ ObsData_

template<typename OBS >
template<typename DATA >
using oops::Departures< OBS >::ObsData_ = ObsDataVector<OBS, DATA>
private

Definition at line 47 of file Departures.h.

◆ ObsDataVec_

template<typename OBS >
template<typename DATA >
using oops::Departures< OBS >::ObsDataVec_ = std::vector<std::shared_ptr<ObsData_<DATA> >>
private

Definition at line 48 of file Departures.h.

◆ ObsSpaces_

template<typename OBS >
typedef ObsSpaces<OBS> oops::Departures< OBS >::ObsSpaces_
private

Definition at line 45 of file Departures.h.

◆ ObsVector_

template<typename OBS >
typedef ObsVector<OBS> oops::Departures< OBS >::ObsVector_
private

Definition at line 46 of file Departures.h.

Constructor & Destructor Documentation

◆ Departures()

template<typename OBS >
oops::Departures< OBS >::Departures ( const ObsSpaces_ obsdb,
const std::string &  name = "" 
)
explicit

create Departures for all obs (read from ObsSpace if name is specified)

Definition at line 98 of file Departures.h.

Here is the call graph for this function:

Member Function Documentation

◆ axpy()

template<typename OBS >
void oops::Departures< OBS >::axpy ( const double &  zz,
const Departures< OBS > &  rhs 
)

Definition at line 177 of file Departures.h.

◆ dot_product_with()

template<typename OBS >
double oops::Departures< OBS >::dot_product_with ( const Departures< OBS > &  other) const

Definition at line 184 of file Departures.h.

◆ invert()

template<typename OBS >
void oops::Departures< OBS >::invert

Definition at line 170 of file Departures.h.

◆ mask() [1/2]

template<typename OBS >
void oops::Departures< OBS >::mask ( const Departures< OBS > &  mask)

Mask out departures where mask has missing values.

Definition at line 216 of file Departures.h.

◆ mask() [2/2]

template<typename OBS >
void oops::Departures< OBS >::mask ( ObsDataVec_< int >  qcflags)

Mask out departures where the passed in qc flags are > 0.

Definition at line 209 of file Departures.h.

Here is the caller graph for this function:

◆ nobs()

template<typename OBS >
size_t oops::Departures< OBS >::nobs

Return number of departures (excluding departures that are masked out)

Definition at line 200 of file Departures.h.

Here is the caller graph for this function:

◆ ones()

template<typename OBS >
void oops::Departures< OBS >::ones

Definition at line 156 of file Departures.h.

Here is the caller graph for this function:

◆ operator*=() [1/2]

template<typename OBS >
Departures< OBS > & oops::Departures< OBS >::operator*= ( const Departures< OBS > &  rhs)

Definition at line 133 of file Departures.h.

◆ operator*=() [2/2]

template<typename OBS >
Departures< OBS > & oops::Departures< OBS >::operator*= ( const double &  zz)

Definition at line 125 of file Departures.h.

◆ operator+=()

template<typename OBS >
Departures< OBS > & oops::Departures< OBS >::operator+= ( const Departures< OBS > &  rhs)

Definition at line 109 of file Departures.h.

◆ operator-=()

template<typename OBS >
Departures< OBS > & oops::Departures< OBS >::operator-= ( const Departures< OBS > &  rhs)

Definition at line 117 of file Departures.h.

◆ operator/=()

template<typename OBS >
Departures< OBS > & oops::Departures< OBS >::operator/= ( const Departures< OBS > &  rhs)

Definition at line 141 of file Departures.h.

◆ operator[]() [1/2]

template<typename OBS >
ObsVector_& oops::Departures< OBS >::operator[] ( const size_t  ii)
inline

Definition at line 56 of file Departures.h.

◆ operator[]() [2/2]

template<typename OBS >
const ObsVector_& oops::Departures< OBS >::operator[] ( const size_t  ii) const
inline

Definition at line 57 of file Departures.h.

◆ packEigen()

template<typename OBS >
Eigen::VectorXd oops::Departures< OBS >::packEigen ( const Departures< OBS > &  mask) const

Pack departures in an Eigen vector (excluding departures that are masked out)

Definition at line 223 of file Departures.h.

Here is the caller graph for this function:

◆ packEigenSize()

template<typename OBS >
size_t oops::Departures< OBS >::packEigenSize ( const Departures< OBS > &  mask) const

Size of departures packed into an Eigen vector.

Definition at line 240 of file Departures.h.

◆ print()

template<typename OBS >
void oops::Departures< OBS >::print ( std::ostream &  os) const
privatevirtual

Implements oops::GeneralizedDepartures.

Definition at line 256 of file Departures.h.

◆ random()

template<typename OBS >
void oops::Departures< OBS >::random

Definition at line 163 of file Departures.h.

◆ rms()

template<typename OBS >
double oops::Departures< OBS >::rms

Definition at line 193 of file Departures.h.

Here is the caller graph for this function:

◆ save()

template<typename OBS >
void oops::Departures< OBS >::save ( const std::string &  name) const

Save departures values.

Definition at line 249 of file Departures.h.

Here is the caller graph for this function:

◆ size()

template<typename OBS >
size_t oops::Departures< OBS >::size ( ) const
inline

Access.

Definition at line 55 of file Departures.h.

◆ zero()

template<typename OBS >
void oops::Departures< OBS >::zero

Definition at line 149 of file Departures.h.

Member Data Documentation

◆ dep_

template<typename OBS >
std::vector<ObsVector_> oops::Departures< OBS >::dep_
private

Data.

Definition at line 92 of file Departures.h.


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