Loading [MathJax]/jax/input/TeX/config.js
IODA
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ioda::ObsIo Class Referenceabstract

#include <ObsIo.h>

Inheritance diagram for ioda::ObsIo:
Collaboration diagram for ioda::ObsIo:

Public Member Functions

 ObsIo ()
 
virtual ~ObsIo ()
 
Dimensions_t maxVarSize () const
 return number of maximum variable size (along first dimension) More...
 
Dimensions_t numLocs () const
 return number of locations from the source More...
 
Dimensions_t numVars () const
 return number of regular variables from the source More...
 
Dimensions_t numDimVars () const
 return number of dimension scale variables from the source More...
 
const VarNameObjectListvarList () const
 return list of regular variable names More...
 
const VarNameObjectListdimVarList () const
 return list of dimension scale variable names More...
 
VarDimMap varDimMap () const
 return map of variables to attached dimension scales More...
 
bool isVarDimByNlocs (const std::string &varName) const
 return true if variable's first dimension is nlocs More...
 
Has_Variablesvars ()
 access to the variables container in the associated ObsGroup More...
 
Has_Attributesatts ()
 access to the attributes container in the associated ObsGroup More...
 
void updateVarDimInfo ()
 update the variable and dimension information More...
 
const std::vector< std::string > & obsGroupingVars () const
 return the names of variables to be used to group observations into records More...
 
virtual bool applyTimingWindow () const
 return true if only observations within the timing window should be retained, false otherwise. More...
 
virtual bool eachProcessGeneratesSeparateObs () const
 return true if each process generates a separate series of observations (e.g. read from different files). More...
 

Protected Member Functions

virtual void print (std::ostream &os) const =0
 print() for oops::Printable base class More...
 

Protected Attributes

ObsGroup obs_group_
 ObsGroup object representing io source/destination. More...
 
Dimensions_t max_var_size_
 maximum variable size (ie, first dimension size) More...
 
Dimensions_t nlocs_
 number of locations from source (file or generator) More...
 
VarNameObjectList var_list_
 list of regular variables from source (file or generator) More...
 
VarNameObjectList dim_var_list_
 list of dimension scale variables from source (file or generator) More...
 
VarDimMap dims_attached_to_vars_
 map containing variables with their attached dimension scales More...
 
std::vector< std::string > obs_grouping_vars_
 names of variables to be used to group observations into records More...
 

Detailed Description

The ObsIo class along with its subclasses are responsible for providing an obs data source (for the ObsSpace constructor) and an obs data destination (for the ObsSpace destructor). An obs data source can either be a file (obsdatain.obsfile YAML specification) or a "generator" (obsdatain.generate YAML specification). The generator provides a means for creating obs data through YAML specification, which is useful for testing purposes, thus bypassing the need for a file.

Author
Stephen Herbener (JCSDA)

Definition at line 36 of file ObsIo.h.

Constructor & Destructor Documentation

◆ ObsIo()

ioda::ObsIo::ObsIo ( )

Definition at line 21 of file ObsIo.cc.

◆ ~ObsIo()

virtual ioda::ObsIo::~ObsIo ( )
inlinevirtual

Definition at line 39 of file ObsIo.h.

Member Function Documentation

◆ applyTimingWindow()

virtual bool ioda::ObsIo::applyTimingWindow ( ) const
inlinevirtual

return true if only observations within the timing window should be retained, false otherwise.

Reimplemented in ioda::ObsIoGenerateRandom, and ioda::ObsIoGenerateList.

Definition at line 85 of file ObsIo.h.

◆ atts()

Has_Attributes& ioda::ObsIo::atts ( )
inline

access to the attributes container in the associated ObsGroup

Definition at line 75 of file ObsIo.h.

◆ dimVarList()

const VarNameObjectList& ioda::ObsIo::dimVarList ( ) const
inline

return list of dimension scale variable names

This routine is only guarenteed to return correct results if updateVarDimInfo has been called and the variables and dimensions haven't been modified since.

Definition at line 63 of file ObsIo.h.

◆ eachProcessGeneratesSeparateObs()

virtual bool ioda::ObsIo::eachProcessGeneratesSeparateObs ( ) const
inlinevirtual

return true if each process generates a separate series of observations (e.g. read from different files).

Reimplemented in ioda::ObsIoFileRead.

Definition at line 89 of file ObsIo.h.

◆ isVarDimByNlocs()

bool ioda::ObsIo::isVarDimByNlocs ( const std::string &  varName) const

return true if variable's first dimension is nlocs

Definition at line 26 of file ObsIo.cc.

◆ maxVarSize()

Dimensions_t ioda::ObsIo::maxVarSize ( ) const
inline

return number of maximum variable size (along first dimension)

Definition at line 42 of file ObsIo.h.

◆ numDimVars()

Dimensions_t ioda::ObsIo::numDimVars ( ) const
inline

return number of dimension scale variables from the source

Definition at line 51 of file ObsIo.h.

◆ numLocs()

Dimensions_t ioda::ObsIo::numLocs ( ) const
inline

return number of locations from the source

Definition at line 45 of file ObsIo.h.

Here is the caller graph for this function:

◆ numVars()

Dimensions_t ioda::ObsIo::numVars ( ) const
inline

return number of regular variables from the source

Definition at line 48 of file ObsIo.h.

◆ obsGroupingVars()

const std::vector<std::string>& ioda::ObsIo::obsGroupingVars ( ) const
inline

return the names of variables to be used to group observations into records

Definition at line 81 of file ObsIo.h.

◆ print()

void ioda::ObsIo::print ( std::ostream &  os) const
protectedpure virtual

print() for oops::Printable base class

Parameters
ostreamoutput stream

Implemented in ioda::ObsIoGenerateRandom, ioda::ObsIoGenerateList, ioda::ObsIoFileRead, and ioda::ObsIoFileCreate.

Definition at line 44 of file ObsIo.cc.

◆ updateVarDimInfo()

void ioda::ObsIo::updateVarDimInfo ( )

update the variable and dimension information

Definition at line 38 of file ObsIo.cc.

Here is the call graph for this function:

◆ varDimMap()

VarDimMap ioda::ObsIo::varDimMap ( ) const
inline

return map of variables to attached dimension scales

Definition at line 66 of file ObsIo.h.

◆ varList()

const VarNameObjectList& ioda::ObsIo::varList ( ) const
inline

return list of regular variable names

This routine is only guarenteed to return correct results if updateVarDimInfo has been called and the variables and dimensions haven't been modified since.

Definition at line 57 of file ObsIo.h.

◆ vars()

Has_Variables& ioda::ObsIo::vars ( )
inline

access to the variables container in the associated ObsGroup

Definition at line 72 of file ObsIo.h.

Member Data Documentation

◆ dim_var_list_

VarNameObjectList ioda::ObsIo::dim_var_list_
protected

list of dimension scale variables from source (file or generator)

Definition at line 106 of file ObsIo.h.

◆ dims_attached_to_vars_

VarDimMap ioda::ObsIo::dims_attached_to_vars_
protected

map containing variables with their attached dimension scales

Definition at line 109 of file ObsIo.h.

◆ max_var_size_

Dimensions_t ioda::ObsIo::max_var_size_
protected

maximum variable size (ie, first dimension size)

Definition at line 97 of file ObsIo.h.

◆ nlocs_

Dimensions_t ioda::ObsIo::nlocs_
protected

number of locations from source (file or generator)

Definition at line 100 of file ObsIo.h.

◆ obs_group_

ObsGroup ioda::ObsIo::obs_group_
protected

ObsGroup object representing io source/destination.

Definition at line 94 of file ObsIo.h.

◆ obs_grouping_vars_

std::vector<std::string> ioda::ObsIo::obs_grouping_vars_
protected

names of variables to be used to group observations into records

Definition at line 112 of file ObsIo.h.

◆ var_list_

VarNameObjectList ioda::ObsIo::var_list_
protected

list of regular variables from source (file or generator)

Definition at line 103 of file ObsIo.h.


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