UFO
|
GeoVaLs: geophysical values at locations. More...
#include <GeoVaLs.h>
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 () | |
GeoVaLs & | operator= (const GeoVaLs &) |
Copy operator. More... | |
GeoVaLs & | operator*= (const double) |
Multiply by a constant scalar. More... | |
GeoVaLs & | operator*= (const std::vector< float > &) |
Multiply by a constant scalar for each profile. More... | |
GeoVaLs & | operator+= (const GeoVaLs &) |
Add another GeoVaLs. More... | |
GeoVaLs & | operator-= (const GeoVaLs &) |
Subtract another GeoVaLs. More... | |
GeoVaLs & | operator*= (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_ |
GeoVaLs: geophysical values at locations.
Definition at line 38 of file src/ufo/GeoVaLs.h.
|
explicit |
Default constructor - does not allocate fields.
Definition at line 27 of file GeoVaLs.cc.
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.
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.
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.
ufo::GeoVaLs::GeoVaLs | ( | const GeoVaLs & | other | ) |
Copy constructor.
Definition at line 89 of file GeoVaLs.cc.
ufo::GeoVaLs::~GeoVaLs | ( | ) |
|
inlinestatic |
Definition at line 41 of file src/ufo/GeoVaLs.h.
double ufo::GeoVaLs::dot_product_with | ( | const GeoVaLs & | other | ) | const |
Scalar product of two GeoVaLs.
Definition at line 199 of file GeoVaLs.cc.
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.
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.
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.
|
inline |
Definition at line 69 of file src/ufo/GeoVaLs.h.
|
inline |
Merge two GeoVaLs.
Definition at line 216 of file GeoVaLs.cc.
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.
double ufo::GeoVaLs::normalizedrms | ( | const GeoVaLs & | other | ) | const |
Calculate normalized rms.
Definition at line 130 of file GeoVaLs.cc.
GeoVaLs & ufo::GeoVaLs::operator*= | ( | const double | zz | ) |
Multiply by a constant scalar.
Definition at line 147 of file GeoVaLs.cc.
Multiply another GeoVaLs.
Definition at line 191 of file GeoVaLs.cc.
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.
Add another GeoVaLs.
Definition at line 175 of file GeoVaLs.cc.
Subtract another GeoVaLs.
Definition at line 183 of file GeoVaLs.cc.
|
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.
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.
void ufo::GeoVaLs::random | ( | ) |
Randomize GeoVaLs.
Definition at line 140 of file GeoVaLs.cc.
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.
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.
double ufo::GeoVaLs::rms | ( | ) | const |
Calculate rms.
Definition at line 121 of file GeoVaLs.cc.
Split two GeoVaLs.
Definition at line 208 of file GeoVaLs.cc.
|
inline |
|
inline |
Definition at line 81 of file src/ufo/GeoVaLs.h.
void ufo::GeoVaLs::write | ( | const eckit::Configuration & | config | ) | const |
Write GeoVaLs to the file.
Definition at line 316 of file GeoVaLs.cc.
void ufo::GeoVaLs::zero | ( | ) |
Zero out the GeoVaLs.
Definition at line 106 of file GeoVaLs.cc.
|
private |
Definition at line 88 of file src/ufo/GeoVaLs.h.
|
private |
Definition at line 86 of file src/ufo/GeoVaLs.h.
|
private |
Definition at line 87 of file src/ufo/GeoVaLs.h.