UFO
ufo::ObsBias Class Reference

#include <ObsBias.h>

Inheritance diagram for ufo::ObsBias:
Collaboration diagram for ufo::ObsBias:

Public Types

typedef ObsBiasParameters Parameters_
 

Public Member Functions

 ObsBias (ioda::ObsSpace &, const Parameters_ &)
 
 ObsBias (const ObsBias &, const bool)
 
ObsBiasoperator+= (const ObsBiasIncrement &)
 
ObsBiasoperator= (const ObsBias &)
 
void read (const Parameters_ &)
 Read bias correction coefficients from file. More...
 
void write (const Parameters_ &) const
 
double norm () const
 
std::size_t size () const
 
double operator() (size_t jpred, size_t jvar) const
 
const Eigen::VectorXd & data () const
 Return bias correction coefficients (for variable predictors) More...
 
const oops::Variables & requiredVars () const
 
const oops::Variables & requiredHdiagnostics () const
 
const std::vector< std::string > & requiredPredictors () const
 
const Predictorspredictors () const
 Return a reference to the vector of all (static and variable) predictors. More...
 
std::vector< std::shared_ptr< const PredictorBase > > variablePredictors () const
 Return the vector of variable predictors. More...
 
const oops::Variables & correctedVars () const
 Return the list of bias-corrected variables. More...
 
void zero ()
 Set all variable predictors coefficients to zero (used in the test) More...
 
 operator bool () const
 

Static Public Member Functions

static const std::string classname ()
 

Private Member Functions

void print (std::ostream &) const override
 
size_t index (size_t jpred, size_t jvar) const
 index in the flattened biascoeffs_ for predictor jpred and variable jvar More...
 
void initPredictor (const PredictorParametersWrapper &params)
 

Private Attributes

Eigen::VectorXd biascoeffs_
 bias correction coefficients (npredictors x nprimitivevariables) More...
 
Predictors predictors_
 bias correction predictors More...
 
std::vector< std::string > prednames_
 predictor names More...
 
std::size_t numStaticPredictors_
 number of static predictors (i.e. predictors with fixed coefficients all equal to 1) More...
 
std::size_t numVariablePredictors_
 number of variable predictors (i.e. predictors with variable coefficients) More...
 
oops::Variables vars_
 corrected variables names (for now has to be same as "simulated variables") More...
 
oops::Variables geovars_
 Variables that need to be requested from the model (for computation of predictors) More...
 
oops::Variables hdiags_
 Diagnostics that need to be requested from the obs operator (for computation of predictors) More...
 
size_t rank_
 MPI rank, used to determine whether the task should output bias coeffs to a file. More...
 

Detailed Description

Class to handle observation bias correction coefficients

contains information on what predictors are used for bias correction application

Definition at line 43 of file src/ufo/ObsBias.h.

Member Typedef Documentation

◆ Parameters_

Definition at line 46 of file src/ufo/ObsBias.h.

Constructor & Destructor Documentation

◆ ObsBias() [1/2]

ufo::ObsBias::ObsBias ( ioda::ObsSpace &  odb,
const Parameters_ params 
)

Definition at line 34 of file ObsBias.cc.

Here is the call graph for this function:

◆ ObsBias() [2/2]

ufo::ObsBias::ObsBias ( const ObsBias other,
const bool  copy 
)

Definition at line 64 of file ObsBias.cc.

Member Function Documentation

◆ classname()

static const std::string ufo::ObsBias::classname ( )
inlinestatic

Definition at line 48 of file src/ufo/ObsBias.h.

◆ correctedVars()

const oops::Variables& ufo::ObsBias::correctedVars ( ) const
inline

Return the list of bias-corrected variables.

Definition at line 85 of file src/ufo/ObsBias.h.

Here is the caller graph for this function:

◆ data()

const Eigen::VectorXd& ufo::ObsBias::data ( ) const
inline

Return bias correction coefficients (for variable predictors)

Definition at line 71 of file src/ufo/ObsBias.h.

Here is the caller graph for this function:

◆ index()

size_t ufo::ObsBias::index ( size_t  jpred,
size_t  jvar 
) const
inlineprivate

index in the flattened biascoeffs_ for predictor jpred and variable jvar

Definition at line 99 of file src/ufo/ObsBias.h.

Here is the caller graph for this function:

◆ initPredictor()

void ufo::ObsBias::initPredictor ( const PredictorParametersWrapper params)
private

Definition at line 294 of file ObsBias.cc.

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

◆ norm()

double ufo::ObsBias::norm ( ) const

Definition at line 227 of file ObsBias.cc.

◆ operator bool()

ufo::ObsBias::operator bool ( ) const
inline

Definition at line 91 of file src/ufo/ObsBias.h.

◆ operator()()

double ufo::ObsBias::operator() ( size_t  jpred,
size_t  jvar 
) const
inline

Return the coefficient of predictor jpred for variable jvar.

Note: jpred may be the index of a static or a variable predictor.

Definition at line 65 of file src/ufo/ObsBias.h.

Here is the call graph for this function:

◆ operator+=()

ObsBias & ufo::ObsBias::operator+= ( const ObsBiasIncrement dx)

Definition at line 84 of file ObsBias.cc.

Here is the call graph for this function:

◆ operator=()

ObsBias & ufo::ObsBias::operator= ( const ObsBias rhs)

Definition at line 91 of file ObsBias.cc.

Here is the call graph for this function:

◆ predictors()

const Predictors& ufo::ObsBias::predictors ( ) const
inline

Return a reference to the vector of all (static and variable) predictors.

Definition at line 79 of file src/ufo/ObsBias.h.

Here is the caller graph for this function:

◆ print()

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

Definition at line 261 of file ObsBias.cc.

Here is the call graph for this function:

◆ read()

void ufo::ObsBias::read ( const Parameters_ params)

Read bias correction coefficients from file.

Definition at line 108 of file ObsBias.cc.

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

◆ requiredHdiagnostics()

const oops::Variables& ufo::ObsBias::requiredHdiagnostics ( ) const
inline

Definition at line 75 of file src/ufo/ObsBias.h.

Here is the caller graph for this function:

◆ requiredPredictors()

const std::vector<std::string>& ufo::ObsBias::requiredPredictors ( ) const
inline

Definition at line 76 of file src/ufo/ObsBias.h.

◆ requiredVars()

const oops::Variables& ufo::ObsBias::requiredVars ( ) const
inline

Definition at line 74 of file src/ufo/ObsBias.h.

◆ size()

std::size_t ufo::ObsBias::size ( ) const
inline

Definition at line 60 of file src/ufo/ObsBias.h.

Here is the caller graph for this function:

◆ variablePredictors()

std::vector< std::shared_ptr< const PredictorBase > > ufo::ObsBias::variablePredictors ( ) const

Return the vector of variable predictors.

Definition at line 254 of file ObsBias.cc.

Here is the caller graph for this function:

◆ write()

void ufo::ObsBias::write ( const Parameters_ params) const

Definition at line 194 of file ObsBias.cc.

Here is the call graph for this function:

◆ zero()

void ufo::ObsBias::zero ( )

Set all variable predictors coefficients to zero (used in the test)

Definition at line 248 of file ObsBias.cc.

Member Data Documentation

◆ biascoeffs_

Eigen::VectorXd ufo::ObsBias::biascoeffs_
private

bias correction coefficients (npredictors x nprimitivevariables)

Definition at line 104 of file src/ufo/ObsBias.h.

◆ geovars_

oops::Variables ufo::ObsBias::geovars_
private

Variables that need to be requested from the model (for computation of predictors)

Definition at line 119 of file src/ufo/ObsBias.h.

◆ hdiags_

oops::Variables ufo::ObsBias::hdiags_
private

Diagnostics that need to be requested from the obs operator (for computation of predictors)

Definition at line 121 of file src/ufo/ObsBias.h.

◆ numStaticPredictors_

std::size_t ufo::ObsBias::numStaticPredictors_
private

number of static predictors (i.e. predictors with fixed coefficients all equal to 1)

Definition at line 111 of file src/ufo/ObsBias.h.

◆ numVariablePredictors_

std::size_t ufo::ObsBias::numVariablePredictors_
private

number of variable predictors (i.e. predictors with variable coefficients)

Definition at line 113 of file src/ufo/ObsBias.h.

◆ predictors_

Predictors ufo::ObsBias::predictors_
private

bias correction predictors

Definition at line 107 of file src/ufo/ObsBias.h.

◆ prednames_

std::vector<std::string> ufo::ObsBias::prednames_
private

predictor names

Definition at line 109 of file src/ufo/ObsBias.h.

◆ rank_

size_t ufo::ObsBias::rank_
private

MPI rank, used to determine whether the task should output bias coeffs to a file.

Definition at line 124 of file src/ufo/ObsBias.h.

◆ vars_

oops::Variables ufo::ObsBias::vars_
private

corrected variables names (for now has to be same as "simulated variables")

Definition at line 116 of file src/ufo/ObsBias.h.


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