UFO
ufo::GeoVaLs Class Reference

GeoVaLs: geophysical values at locations. More...

#include <GeoVaLs.h>

Inheritance diagram for ufo::GeoVaLs:
Collaboration diagram for ufo::GeoVaLs:

Public Member Functions

 GeoVaLs (const eckit::mpi::Comm &)
 Default constructor - does not allocate fields. More...
 
 GeoVaLs (const Locations &, const oops::Variables &)
 Constructor given Locations and Variables. More...
 
 GeoVaLs (const eckit::Configuration &, const ioda::ObsSpace &, const oops::Variables &)
 Constructor for tests. More...
 
 GeoVaLs (const GeoVaLs &, const int &)
 Construct a new GeoVaLs with just one location. More...
 
 GeoVaLs (const GeoVaLs &)
 Copy constructor. More...
 
 ~GeoVaLs ()
 
GeoVaLsoperator= (const GeoVaLs &)
 Copy operator. More...
 
GeoVaLsoperator*= (const double)
 Multiply by a constant scalar. More...
 
GeoVaLsoperator*= (const std::vector< float > &)
 Multiply by a constant scalar for each profile. More...
 
GeoVaLsoperator+= (const GeoVaLs &)
 Add another GeoVaLs. More...
 
GeoVaLsoperator-= (const GeoVaLs &)
 Subtract another GeoVaLs. More...
 
GeoVaLsoperator*= (const GeoVaLs &)
 Multiply another GeoVaLs. More...
 
double dot_product_with (const GeoVaLs &) const
 Scalar product of two GeoVaLs. More...
 
void split (GeoVaLs &, GeoVaLs &) const
 Split two GeoVaLs. More...
 
void merge (const GeoVaLs &, const GeoVaLs &)
 Merge two GeoVaLs. More...
 
void zero ()
 Zero out the GeoVaLs. More...
 
void reorderzdir (const std::string &, const std::string &)
 Reorder GeoVaLs in vertical dimension based on vertical coordinate variable. More...
 
void random ()
 Randomize GeoVaLs. More...
 
double rms () const
 Calculate rms. More...
 
double normalizedrms (const GeoVaLs &) const
 Calculate normalized rms. More...
 
bool has (const std::string &var) const
 
const oops::Variables & getVars () const
 
size_t nlevs (const std::string &var) const
 Return number of levels for a specified variable. More...
 
void get (std::vector< float > &, const std::string &) const
 Return all values for a specific 2D variable. More...
 
void get (std::vector< float > &, const std::string &, const int) const
 Return all values for a specific variable and level. More...
 
void get (std::vector< double > &, const std::string &, const int) const
 Return all values for a specific variable and level. More...
 
void put (const std::vector< double > &, const std::string &, const int) const
 Put values for a specific variable and level. More...
 
void read (const eckit::Configuration &, const ioda::ObsSpace &)
 Read GeoVaLs from the file. More...
 
void write (const eckit::Configuration &) const
 Write GeoVaLs to the file. More...
 
int & toFortran ()
 
const int & toFortran () const
 

Static Public Member Functions

static const std::string classname ()
 

Private Member Functions

void print (std::ostream &) const
 Output GeoVaLs to a stream. More...
 

Private Attributes

F90goms keyGVL_
 
oops::Variables vars_
 
const eckit::mpi::Comm & comm_
 

Detailed Description

GeoVaLs: geophysical values at locations.

Definition at line 38 of file src/ufo/GeoVaLs.h.

Constructor & Destructor Documentation

◆ GeoVaLs() [1/5]

ufo::GeoVaLs::GeoVaLs ( const eckit::mpi::Comm &  comm)
explicit

Default constructor - does not allocate fields.

Definition at line 27 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ GeoVaLs() [2/5]

ufo::GeoVaLs::GeoVaLs ( const Locations locs,
const oops::Variables &  vars 
)

Constructor given Locations and Variables.

This ufo::GeoVaLs constructor is typically used to initialize GeoVaLs for the full time window (ufo::Locations hold all locations within data assimilation window) and all variables (oops::Variables hold all variables specified by the ObsOperator as input varialbes. Note that nothing is allocated in the constructor currently, and getValues is responsible for allocation

Definition at line 46 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ GeoVaLs() [3/5]

ufo::GeoVaLs::GeoVaLs ( const eckit::Configuration &  config,
const ioda::ObsSpace &  obspace,
const oops::Variables &  vars 
)

Constructor for tests.

This ufo::GeoVaLs constructor is typically used in tests, GeoVaLs are read from the file.

Definition at line 60 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ GeoVaLs() [4/5]

ufo::GeoVaLs::GeoVaLs ( const GeoVaLs other,
const int &  index 
)

Construct a new GeoVaLs with just one location.

This ufo::GeoVaLs constructor takes a GeoVaLs object and an index to create a new GeoVaLs with just one location

Definition at line 77 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ GeoVaLs() [5/5]

ufo::GeoVaLs::GeoVaLs ( const GeoVaLs other)

Copy constructor.

Definition at line 89 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ ~GeoVaLs()

ufo::GeoVaLs::~GeoVaLs ( )

Definition at line 99 of file GeoVaLs.cc.

Here is the call graph for this function:

Member Function Documentation

◆ classname()

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

Definition at line 41 of file src/ufo/GeoVaLs.h.

◆ dot_product_with()

double ufo::GeoVaLs::dot_product_with ( const GeoVaLs other) const

Scalar product of two GeoVaLs.

Definition at line 199 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ get() [1/3]

void ufo::GeoVaLs::get ( std::vector< double > &  vals,
const std::string &  var,
const int  lev 
) const

Return all values for a specific variable and level.

Definition at line 288 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ get() [2/3]

void ufo::GeoVaLs::get ( std::vector< float > &  vals,
const std::string &  var 
) const

Return all values for a specific 2D variable.

Definition at line 268 of file GeoVaLs.cc.

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

◆ get() [3/3]

void ufo::GeoVaLs::get ( std::vector< float > &  vals,
const std::string &  var,
const int  lev 
) const

Return all values for a specific variable and level.

Definition at line 278 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ getVars()

const oops::Variables& ufo::GeoVaLs::getVars ( ) const
inline

Definition at line 69 of file src/ufo/GeoVaLs.h.

◆ has()

bool ufo::GeoVaLs::has ( const std::string &  var) const
inline

Definition at line 68 of file src/ufo/GeoVaLs.h.

Here is the caller graph for this function:

◆ merge()

void ufo::GeoVaLs::merge ( const GeoVaLs other1,
const GeoVaLs other2 
)

Merge two GeoVaLs.

Definition at line 216 of file GeoVaLs.cc.

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

◆ nlevs()

size_t ufo::GeoVaLs::nlevs ( const std::string &  var) const

Return number of levels for a specified variable.

Definition at line 259 of file GeoVaLs.cc.

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

◆ normalizedrms()

double ufo::GeoVaLs::normalizedrms ( const GeoVaLs other) const

Calculate normalized rms.

Definition at line 130 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ operator*=() [1/3]

GeoVaLs & ufo::GeoVaLs::operator*= ( const double  zz)

Multiply by a constant scalar.

Definition at line 147 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ operator*=() [2/3]

GeoVaLs & ufo::GeoVaLs::operator*= ( const GeoVaLs other)

Multiply another GeoVaLs.

Definition at line 191 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ operator*=() [3/3]

GeoVaLs & ufo::GeoVaLs::operator*= ( const std::vector< float > &  vals)

Multiply by a constant scalar for each profile.

Definition at line 155 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ operator+=()

GeoVaLs & ufo::GeoVaLs::operator+= ( const GeoVaLs other)

Add another GeoVaLs.

Definition at line 175 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ operator-=()

GeoVaLs & ufo::GeoVaLs::operator-= ( const GeoVaLs other)

Subtract another GeoVaLs.

Definition at line 183 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ operator=()

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

Copy operator.

Definition at line 167 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ print()

void ufo::GeoVaLs::print ( std::ostream &  os) const
private

Output GeoVaLs to a stream.

Verbose print statement (debug mode)

\detail If the min value across all variables is positive, then this may be an error measurement. If so, compute the rms over the vertical profile and tell the user where the maximum rms value occurs, in terms of the observation number and the variable number. This is intended to help with debugging.

Definition at line 224 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ put()

void ufo::GeoVaLs::put ( const std::vector< double > &  vals,
const std::string &  var,
const int  lev 
) const

Put values for a specific variable and level.

Definition at line 298 of file GeoVaLs.cc.

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

◆ random()

void ufo::GeoVaLs::random ( )

Randomize GeoVaLs.

Definition at line 140 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ read()

void ufo::GeoVaLs::read ( const eckit::Configuration &  config,
const ioda::ObsSpace &  obspace 
)

Read GeoVaLs from the file.

Definition at line 308 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ reorderzdir()

void ufo::GeoVaLs::reorderzdir ( const std::string &  varname,
const std::string &  vardir 
)

Reorder GeoVaLs in vertical dimension based on vertical coordinate variable.

Definition at line 113 of file GeoVaLs.cc.

Here is the call graph for this function:

◆ rms()

double ufo::GeoVaLs::rms ( ) const

Calculate rms.

Definition at line 121 of file GeoVaLs.cc.

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

◆ split()

void ufo::GeoVaLs::split ( GeoVaLs other1,
GeoVaLs other2 
) const

Split two GeoVaLs.

Definition at line 208 of file GeoVaLs.cc.

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

◆ toFortran() [1/2]

int& ufo::GeoVaLs::toFortran ( )
inline

Definition at line 80 of file src/ufo/GeoVaLs.h.

Here is the caller graph for this function:

◆ toFortran() [2/2]

const int& ufo::GeoVaLs::toFortran ( ) const
inline

Definition at line 81 of file src/ufo/GeoVaLs.h.

◆ write()

void ufo::GeoVaLs::write ( const eckit::Configuration &  config) const

Write GeoVaLs to the file.

Definition at line 316 of file GeoVaLs.cc.

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

◆ zero()

void ufo::GeoVaLs::zero ( )

Zero out the GeoVaLs.

Definition at line 106 of file GeoVaLs.cc.

Here is the call graph for this function:

Member Data Documentation

◆ comm_

const eckit::mpi::Comm& ufo::GeoVaLs::comm_
private

Definition at line 88 of file src/ufo/GeoVaLs.h.

◆ keyGVL_

F90goms ufo::GeoVaLs::keyGVL_
private

Definition at line 86 of file src/ufo/GeoVaLs.h.

◆ vars_

oops::Variables ufo::GeoVaLs::vars_
private

Definition at line 87 of file src/ufo/GeoVaLs.h.


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