IODA
ioda::ObsSpace Class Reference

Observation Space View. More...

#include <ObsSpace.h>

Inheritance diagram for ioda::ObsSpace:
Collaboration diagram for ioda::ObsSpace:

Public Types

typedef std::map< std::size_t, std::vector< std::size_t > > RecIdxMap
 
typedef RecIdxMap::const_iterator RecIdxIter
 

Public Member Functions

 ObsSpace (const eckit::Configuration &, const eckit::mpi::Comm &, const util::DateTime &, const util::DateTime &, const eckit::mpi::Comm &)
 
 ObsSpace (const ObsSpace &, const eckit::geometry::Point2 &, const eckit::Configuration &)
 
 ObsSpace (const ObsSpace &)
 
 ~ObsSpace ()
 
std::size_t gnlocs () const
 
std::size_t nlocs () const
 
std::size_t nrecs () const
 
std::size_t nvars () const
 
const std::vector< std::size_t > & recnum () const
 
const std::vector< std::size_t > & index () const
 
bool has (const std::string &, const std::string &) const
 
ObsDtype dtype (const std::string &, const std::string &) const
 
std::string obs_group_var () const
 
std::string obs_sort_var () const
 
std::string obs_sort_order () const
 
void get_db (const std::string &group, const std::string &name, std::vector< int > &vdata) const
 
void get_db (const std::string &group, const std::string &name, std::vector< float > &vdata) const
 
void get_db (const std::string &group, const std::string &name, std::vector< double > &vdata) const
 
void get_db (const std::string &group, const std::string &name, std::vector< std::string > &vdata) const
 
void get_db (const std::string &group, const std::string &name, std::vector< util::DateTime > &vdata) const
 
void put_db (const std::string &group, const std::string &name, const std::vector< int > &vdata)
 
void put_db (const std::string &group, const std::string &name, const std::vector< float > &vdata)
 
void put_db (const std::string &group, const std::string &name, const std::vector< double > &vdata)
 
void put_db (const std::string &group, const std::string &name, const std::vector< std::string > &vdata)
 
void put_db (const std::string &group, const std::string &name, const std::vector< util::DateTime > &vdata)
 
const RecIdxIter recidx_begin () const
 
const RecIdxIter recidx_end () const
 
bool recidx_has (const std::size_t RecNum) const
 
std::size_t recidx_recnum (const RecIdxIter &Irec) const
 
const std::vector< std::size_t > & recidx_vector (const RecIdxIter &Irec) const
 
const std::vector< std::size_t > & recidx_vector (const std::size_t RecNum) const
 
std::vector< std::size_t > recidx_all_recnums () const
 
const std::vector< std::size_t > & localobs () const
 
const std::string & obsname () const
 
const util::DateTime & windowStart () const
 
const util::DateTime & windowEnd () const
 
const eckit::mpi::Comm & comm () const
 
void printJo (const ObsVector &, const ObsVector &)
 
const oops::Variables & obsvariables () const
 
const std::vector< double > & obsdist () const
 
bool isDistributed () const
 

Static Public Member Functions

static const std::string classname ()
 

Private Member Functions

void print (std::ostream &) const
 

Private Attributes

std::shared_ptr< ObsDataobsspace_
 
std::unique_ptr< LocalObsSpaceParameterslocalopts_
 
std::vector< std::size_t > localobs_
 
bool isLocal_
 
std::vector< double > obsdist_
 

Detailed Description

Observation Space View.

Definition at line 35 of file src/ObsSpace.h.

Member Typedef Documentation

◆ RecIdxIter

typedef RecIdxMap::const_iterator ioda::ObsSpace::RecIdxIter

Definition at line 39 of file src/ObsSpace.h.

◆ RecIdxMap

typedef std::map<std::size_t, std::vector<std::size_t> > ioda::ObsSpace::RecIdxMap

Definition at line 38 of file src/ObsSpace.h.

Constructor & Destructor Documentation

◆ ObsSpace() [1/3]

ioda::ObsSpace::ObsSpace ( const eckit::Configuration &  config,
const eckit::mpi::Comm &  comm,
const util::DateTime &  bgn,
const util::DateTime &  end,
const eckit::mpi::Comm &  time 
)

Config based constructor for an ObsSpace object. This constructor will read in from the obs file and transfer the variables into the obs container. Obs falling outside the DA timing window, specified by bgn and end, will be discarded before storing them in the obs container.

Parameters
[in]configECKIT configuration segment holding obs types specs
[in]bgnDateTime object holding the start of the DA timing window
[in]endDateTime object holding the end of the DA timing window

Definition at line 42 of file ObsSpace.cc.

◆ ObsSpace() [2/3]

ioda::ObsSpace::ObsSpace ( const ObsSpace os,
const eckit::geometry::Point2 &  refPoint,
const eckit::Configuration &  conf 
)

Second constructor for an ObsSpace object. This constructor will search for observations within a distance specified in the conf from a specified refPoint.

Definition at line 61 of file ObsSpace.cc.

Here is the call graph for this function:

◆ ObsSpace() [3/3]

ioda::ObsSpace::ObsSpace ( const ObsSpace )

Copy constructor for an ObsSpace object.

◆ ~ObsSpace()

ioda::ObsSpace::~ObsSpace ( )

Destructor for an ObsSpace object. This destructor will clean up the ObsSpace object and optionally write out the contents of the obs container into the output file. The save-to-file operation is invoked when an output obs file is specified in the ECKIT configuration segment associated with the ObsSpace object.

Definition at line 161 of file ObsSpace.cc.

Member Function Documentation

◆ classname()

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

Definition at line 37 of file src/ObsSpace.h.

◆ comm()

const eckit::mpi::Comm& ioda::ObsSpace::comm ( ) const
inline

This method will return the associated MPI communicator

Definition at line 103 of file src/ObsSpace.h.

Here is the caller graph for this function:

◆ dtype()

ObsDtype ioda::ObsSpace::dtype ( const std::string &  group,
const std::string &  name 
) const

This method returns the data type of the variable stored in the obs container.

Definition at line 292 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ get_db() [1/5]

void ioda::ObsSpace::get_db ( const std::string &  group,
const std::string &  name,
std::vector< double > &  vdata 
) const

Definition at line 197 of file ObsSpace.cc.

◆ get_db() [2/5]

void ioda::ObsSpace::get_db ( const std::string &  group,
const std::string &  name,
std::vector< float > &  vdata 
) const

Definition at line 182 of file ObsSpace.cc.

◆ get_db() [3/5]

void ioda::ObsSpace::get_db ( const std::string &  group,
const std::string &  name,
std::vector< int > &  vdata 
) const

Definition at line 167 of file ObsSpace.cc.

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

◆ get_db() [4/5]

void ioda::ObsSpace::get_db ( const std::string &  group,
const std::string &  name,
std::vector< std::string > &  vdata 
) const

Definition at line 212 of file ObsSpace.cc.

◆ get_db() [5/5]

void ioda::ObsSpace::get_db ( const std::string &  group,
const std::string &  name,
std::vector< util::DateTime > &  vdata 
) const

Definition at line 227 of file ObsSpace.cc.

◆ gnlocs()

std::size_t ioda::ObsSpace::gnlocs ( ) const

This method returns the number of unique locations in the input obs file. Note that nlocs from the obs container may be smaller than nlocs from the input obs file due to the removal of obs outside the DA timing window and/or due to distribution of obs across multiple process elements.

Definition at line 332 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ has()

bool ioda::ObsSpace::has ( const std::string &  group,
const std::string &  name 
) const

This method checks for the existence of the group, name combination in the obs container. If the combination exists, "true" is returned, otherwise "false" is returned.

Definition at line 282 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ index()

const std::vector< std::size_t > & ioda::ObsSpace::index ( ) const

This method returns a reference to the index vector data member. This is for read only access.

Definition at line 386 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ isDistributed()

bool ioda::ObsSpace::isDistributed ( ) const
inline

Definition at line 109 of file src/ObsSpace.h.

Here is the caller graph for this function:

◆ localobs()

const std::vector<std::size_t>& ioda::ObsSpace::localobs ( ) const
inline

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

Here is the caller graph for this function:

◆ nlocs()

std::size_t ioda::ObsSpace::nlocs ( ) const

This method returns the number of unique locations in the obs container. Note that nlocs from the obs container may be smaller than nlocs from the input obs file due to the removal of obs outside the DA timing window and/or due to distribution of obs across multiple process elements.

Definition at line 344 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ nrecs()

std::size_t ioda::ObsSpace::nrecs ( ) const

This method returns the number of unique records in the obs container. A record is an atomic unit of locations that belong together such as a single radiosonde sounding.

Definition at line 358 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ nvars()

std::size_t ioda::ObsSpace::nvars ( ) const

This method returns the number of unique variables in the obs container. "Variables" refers to the quantities that can be assimilated as opposed to meta data.

Definition at line 368 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ obs_group_var()

std::string ioda::ObsSpace::obs_group_var ( ) const

This method returns the setting of the YAML configuration parameter: obsdatain.obsgrouping.group variable

Definition at line 301 of file ObsSpace.cc.

◆ obs_sort_order()

std::string ioda::ObsSpace::obs_sort_order ( ) const

This method returns the setting of the YAML configuration parameter: obsdatain.obsgrouping.sort order

Definition at line 319 of file ObsSpace.cc.

◆ obs_sort_var()

std::string ioda::ObsSpace::obs_sort_var ( ) const

This method returns the setting of the YAML configuration parameter: obsdatain.obsgrouping.sort variable

Definition at line 310 of file ObsSpace.cc.

◆ obsdist()

const std::vector<double>& ioda::ObsSpace::obsdist ( ) const
inline

Definition at line 108 of file src/ObsSpace.h.

Here is the caller graph for this function:

◆ obsname()

const std::string& ioda::ObsSpace::obsname ( ) const
inline

This method will return the name of the obs type being stored

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

Here is the caller graph for this function:

◆ obsvariables()

const oops::Variables& ioda::ObsSpace::obsvariables ( ) const
inline

Definition at line 107 of file src/ObsSpace.h.

Here is the caller graph for this function:

◆ print()

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

This method provides a way to print an ObsSpace object in an output stream. It simply prints a dummy message for now.

Definition at line 458 of file ObsSpace.cc.

◆ printJo()

void ioda::ObsSpace::printJo ( const ObsVector dy,
const ObsVector grad 
)

This method provides a means for printing Jo in an output stream. For now a dummy message is printed.

Definition at line 468 of file ObsSpace.cc.

◆ put_db() [1/5]

void ioda::ObsSpace::put_db ( const std::string &  group,
const std::string &  name,
const std::vector< double > &  vdata 
)

Definition at line 256 of file ObsSpace.cc.

◆ put_db() [2/5]

void ioda::ObsSpace::put_db ( const std::string &  group,
const std::string &  name,
const std::vector< float > &  vdata 
)

Definition at line 249 of file ObsSpace.cc.

◆ put_db() [3/5]

void ioda::ObsSpace::put_db ( const std::string &  group,
const std::string &  name,
const std::vector< int > &  vdata 
)

Definition at line 242 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ put_db() [4/5]

void ioda::ObsSpace::put_db ( const std::string &  group,
const std::string &  name,
const std::vector< std::string > &  vdata 
)

Definition at line 263 of file ObsSpace.cc.

◆ put_db() [5/5]

void ioda::ObsSpace::put_db ( const std::string &  group,
const std::string &  name,
const std::vector< util::DateTime > &  vdata 
)

Definition at line 270 of file ObsSpace.cc.

◆ recidx_all_recnums()

std::vector< std::size_t > ioda::ObsSpace::recidx_all_recnums ( ) const

This method returns the all of the record numbers from the recidx_ data member (ie, all the key values) in a vector.

Definition at line 449 of file ObsSpace.cc.

◆ recidx_begin()

const ObsSpace::RecIdxIter ioda::ObsSpace::recidx_begin ( ) const

This method returns the begin iterator associated with the recidx_ data member.

Definition at line 395 of file ObsSpace.cc.

◆ recidx_end()

const ObsSpace::RecIdxIter ioda::ObsSpace::recidx_end ( ) const

This method returns the end iterator associated with the recidx_ data member.

Definition at line 404 of file ObsSpace.cc.

◆ recidx_has()

bool ioda::ObsSpace::recidx_has ( const std::size_t  RecNum) const

This method returns a boolean value indicating whether the given record number exists in the recidx_ data member.

Definition at line 413 of file ObsSpace.cc.

◆ recidx_recnum()

std::size_t ioda::ObsSpace::recidx_recnum ( const RecIdxIter Irec) const

This method returns the current record number, pointed to by the given iterator, from the recidx_ data member.

Definition at line 422 of file ObsSpace.cc.

◆ recidx_vector() [1/2]

const std::vector< std::size_t > & ioda::ObsSpace::recidx_vector ( const RecIdxIter Irec) const

This method returns the current vector, pointed to by the given iterator, from the recidx_ data member.

Definition at line 431 of file ObsSpace.cc.

◆ recidx_vector() [2/2]

const std::vector< std::size_t > & ioda::ObsSpace::recidx_vector ( const std::size_t  RecNum) const

This method returns the current vector, pointed to by the given iterator, from the recidx_ data member.

Definition at line 440 of file ObsSpace.cc.

◆ recnum()

const std::vector< std::size_t > & ioda::ObsSpace::recnum ( ) const

This method returns a reference to the record number vector data member. This is for read only access.

Definition at line 377 of file ObsSpace.cc.

Here is the caller graph for this function:

◆ windowEnd()

const util::DateTime& ioda::ObsSpace::windowEnd ( ) const
inline

This method will return the end of the DA timing window

Definition at line 101 of file src/ObsSpace.h.

◆ windowStart()

const util::DateTime& ioda::ObsSpace::windowStart ( ) const
inline

This method will return the start of the DA timing window

Definition at line 99 of file src/ObsSpace.h.

Member Data Documentation

◆ isLocal_

bool ioda::ObsSpace::isLocal_
private

Definition at line 117 of file src/ObsSpace.h.

◆ localobs_

std::vector<std::size_t> ioda::ObsSpace::localobs_
private

Definition at line 116 of file src/ObsSpace.h.

◆ localopts_

std::unique_ptr<LocalObsSpaceParameters> ioda::ObsSpace::localopts_
private

Definition at line 115 of file src/ObsSpace.h.

◆ obsdist_

std::vector<double> ioda::ObsSpace::obsdist_
private

Definition at line 118 of file src/ObsSpace.h.

◆ obsspace_

std::shared_ptr<ObsData> ioda::ObsSpace::obsspace_
private

Definition at line 114 of file src/ObsSpace.h.


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