IODA
ioda::ObsVector Class Reference

ObsVector class to handle vectors in observation space for IODA. More...

#include <ObsVector.h>

Inheritance diagram for ioda::ObsVector:
Collaboration diagram for ioda::ObsVector:

Public Member Functions

 ObsVector (ObsSpace &, const std::string &name="", const bool fail=true)
 
 ObsVector (const ObsVector &)
 
 ObsVector (ObsSpace &, const ObsVector &)
 
 ~ObsVector ()
 
ObsVectoroperator= (const ObsVector &)
 
ObsVectoroperator*= (const double &)
 
ObsVectoroperator+= (const ObsVector &)
 
ObsVectoroperator-= (const ObsVector &)
 
ObsVectoroperator*= (const ObsVector &)
 
ObsVectoroperator/= (const ObsVector &)
 
void zero ()
 
void axpy (const double &, const ObsVector &)
 
void invert ()
 
void random ()
 
double dot_product_with (const ObsVector &) const
 
double rms () const
 
std::size_t size () const
 
const double & operator[] (const std::size_t ii) const
 
double & operator[] (const std::size_t ii)
 
unsigned int nobs () const
 
Eigen::VectorXd packEigen () const
 
const double & toFortran () const
 
double & toFortran ()
 
const std::string & obstype () const
 
const oops::Variables & varnames () const
 
std::size_t nvars () const
 
std::size_t nlocs () const
 
void mask (const ObsDataVector< int > &)
 
bool has (const std::string &var) const
 
int64_t getSeed () const
 
void save (const std::string &) const
 
void read (const std::string &, const bool fail=true)
 

Static Public Member Functions

static const std::string classname ()
 

Private Member Functions

void print (std::ostream &) const
 

Private Attributes

ObsSpaceobsdb_
 Associate ObsSpace object. More...
 
oops::Variables obsvars_
 Variables. More...
 
std::size_t nvars_
 Number of variables. More...
 
std::size_t nlocs_
 
std::vector< double > values_
 Vector data. More...
 
const double missing_
 Missing data mark. More...
 

Detailed Description

ObsVector class to handle vectors in observation space for IODA.

This class holds observation vector data. Examples of an obs vector are the y vector and the H(x) vector. The methods of this class that implement vector operations (e.g., bitwise add, bitwise subtract, dot product) are capable of handling missing values in the obs data.

Definition at line 33 of file src/ObsVector.h.

Constructor & Destructor Documentation

◆ ObsVector() [1/3]

ioda::ObsVector::ObsVector ( ObsSpace obsdb,
const std::string &  name = "",
const bool  fail = true 
)

Definition at line 24 of file ObsVector.cc.

Here is the call graph for this function:

◆ ObsVector() [2/3]

ioda::ObsVector::ObsVector ( const ObsVector other)

Definition at line 34 of file ObsVector.cc.

◆ ObsVector() [3/3]

ioda::ObsVector::ObsVector ( ObsSpace obsdb,
const ObsVector other 
)

Definition at line 41 of file ObsVector.cc.

Here is the call graph for this function:

◆ ~ObsVector()

ioda::ObsVector::~ObsVector ( )

Definition at line 52 of file ObsVector.cc.

Member Function Documentation

◆ axpy()

void ioda::ObsVector::axpy ( const double &  zz,
const ObsVector rhs 
)

Definition at line 127 of file ObsVector.cc.

◆ classname()

static const std::string ioda::ObsVector::classname ( )
inlinestatic

Definition at line 36 of file src/ObsVector.h.

◆ dot_product_with()

double ioda::ObsVector::dot_product_with ( const ObsVector other) const

Definition at line 154 of file ObsVector.cc.

Here is the call graph for this function:

◆ getSeed()

int64_t ioda::ObsVector::getSeed ( ) const
inline

Definition at line 74 of file src/ObsVector.h.

◆ has()

bool ioda::ObsVector::has ( const std::string &  var) const
inline

Definition at line 72 of file src/ObsVector.h.

◆ invert()

void ioda::ObsVector::invert ( )

Definition at line 139 of file ObsVector.cc.

◆ mask()

void ioda::ObsVector::mask ( const ObsDataVector< int > &  flags)

Definition at line 240 of file ObsVector.cc.

Here is the call graph for this function:

◆ nlocs()

std::size_t ioda::ObsVector::nlocs ( ) const
inline

Definition at line 70 of file src/ObsVector.h.

Here is the caller graph for this function:

◆ nobs()

unsigned int ioda::ObsVector::nobs ( ) const

Definition at line 252 of file ObsVector.cc.

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

◆ nvars()

std::size_t ioda::ObsVector::nvars ( ) const
inline

Definition at line 69 of file src/ObsVector.h.

Here is the caller graph for this function:

◆ obstype()

const std::string& ioda::ObsVector::obstype ( ) const
inline

Definition at line 67 of file src/ObsVector.h.

Here is the call graph for this function:

◆ operator*=() [1/2]

ObsVector & ioda::ObsVector::operator*= ( const double &  zz)

Definition at line 60 of file ObsVector.cc.

◆ operator*=() [2/2]

ObsVector & ioda::ObsVector::operator*= ( const ObsVector rhs)

Definition at line 95 of file ObsVector.cc.

◆ operator+=()

ObsVector & ioda::ObsVector::operator+= ( const ObsVector rhs)

Definition at line 69 of file ObsVector.cc.

◆ operator-=()

ObsVector & ioda::ObsVector::operator-= ( const ObsVector rhs)

Definition at line 82 of file ObsVector.cc.

◆ operator/=()

ObsVector & ioda::ObsVector::operator/= ( const ObsVector rhs)

Definition at line 108 of file ObsVector.cc.

◆ operator=()

ObsVector & ioda::ObsVector::operator= ( const ObsVector rhs)

Definition at line 55 of file ObsVector.cc.

◆ operator[]() [1/2]

double& ioda::ObsVector::operator[] ( const std::size_t  ii)
inline

Definition at line 60 of file src/ObsVector.h.

◆ operator[]() [2/2]

const double& ioda::ObsVector::operator[] ( const std::size_t  ii) const
inline

Definition at line 59 of file src/ObsVector.h.

◆ packEigen()

Eigen::VectorXd ioda::ObsVector::packEigen ( ) const

Definition at line 229 of file ObsVector.cc.

Here is the call graph for this function:

◆ print()

void ioda::ObsVector::print ( std::ostream &  os) const
private

Definition at line 271 of file ObsVector.cc.

Here is the call graph for this function:

◆ random()

void ioda::ObsVector::random ( )

Definition at line 147 of file ObsVector.cc.

◆ read()

void ioda::ObsVector::read ( const std::string &  name,
const bool  fail = true 
)

Definition at line 186 of file ObsVector.cc.

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

◆ rms()

double ioda::ObsVector::rms ( ) const

Definition at line 169 of file ObsVector.cc.

Here is the call graph for this function:

◆ save()

void ioda::ObsVector::save ( const std::string &  name) const

Definition at line 211 of file ObsVector.cc.

Here is the call graph for this function:

◆ size()

std::size_t ioda::ObsVector::size ( ) const
inline

Definition at line 58 of file src/ObsVector.h.

◆ toFortran() [1/2]

double & ioda::ObsVector::toFortran ( )

Definition at line 267 of file ObsVector.cc.

◆ toFortran() [2/2]

const double & ioda::ObsVector::toFortran ( ) const

Definition at line 263 of file ObsVector.cc.

◆ varnames()

const oops::Variables& ioda::ObsVector::varnames ( ) const
inline

Definition at line 68 of file src/ObsVector.h.

◆ zero()

void ioda::ObsVector::zero ( )

Definition at line 121 of file ObsVector.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ missing_

const double ioda::ObsVector::missing_
private

Missing data mark.

Definition at line 97 of file src/ObsVector.h.

◆ nlocs_

std::size_t ioda::ObsVector::nlocs_
private

Definition at line 91 of file src/ObsVector.h.

◆ nvars_

std::size_t ioda::ObsVector::nvars_
private

Number of variables.

Definition at line 90 of file src/ObsVector.h.

◆ obsdb_

ObsSpace& ioda::ObsVector::obsdb_
private

Associate ObsSpace object.

Definition at line 84 of file src/ObsVector.h.

◆ obsvars_

oops::Variables ioda::ObsVector::obsvars_
private

Variables.

Definition at line 87 of file src/ObsVector.h.

◆ values_

std::vector<double> ioda::ObsVector::values_
private

Vector data.

Definition at line 94 of file src/ObsVector.h.


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