IODA
ioda::detail::Has_Variables_Backend Class Reference

#include <Has_Variables.h>

Inheritance diagram for ioda::detail::Has_Variables_Backend:
Collaboration diagram for ioda::detail::Has_Variables_Backend:

Public Member Functions

virtual ~Has_Variables_Backend ()
 
FillValuePolicy getFillValuePolicy () const override
 Get the fill value policy used for Variables within this Group. More...
 
void attachDimensionScales (const std::vector< std::pair< Variable, std::vector< Variable >>> &mapping) override
 Attach dimension scales to many Dimension Numbers in a set of Variables. More...
 
- Public Member Functions inherited from ioda::detail::Has_Variables_Base
virtual ~Has_Variables_Base ()
 
virtual void setLayout (std::shared_ptr< const detail::DataLayoutPolicy >)
 
virtual Type_ProvidergetTypeProvider () const
 Query the backend and get the type provider. More...
 
virtual bool exists (const std::string &name) const
 Does a Variable with the specified name exist? More...
 
virtual void remove (const std::string &name)
 Delete an Attribute with the specified name. More...
 
virtual Variable open (const std::string &name) const
 Open a Variable by name. More...
 
Variable operator[] (const std::string &name) const
 Open a Variable by name. More...
 
virtual std::vector< std::string > list () const
 
std::vector< std::string > operator() () const
 
void stitchComplementaryVariables (bool removeOriginals=true)
 Combines all complementary variables as specified in the mapping file, opens them, and optionally removes the originals from the ObsGroup. More...
 
void convertVariableUnits (std::ostream &out=std::cerr)
 Converts unit to SI for all eligible variables. If conversion function not defined, stores unit as attribute. More...
 
virtual Variable create (const std::string &name, const Type &in_memory_dataType, const std::vector< Dimensions_t > &dimensions={1}, const std::vector< Dimensions_t > &max_dimensions={}, const VariableCreationParameters &params=VariableCreationParameters())
 Create a Variable without setting its data. More...
 
Variable _create_py (const std::string &name, BasicTypes dataType, const std::vector< Dimensions_t > &cur_dimensions={1}, const std::vector< Dimensions_t > &max_dimensions={}, const std::vector< Variable > &dimension_scales={}, const VariableCreationParameters &params=VariableCreationParameters())
 
Variable create (const std::string &name, const Type &in_memory_dataType, const ioda::Dimensions &dims, const VariableCreationParameters &params=VariableCreationParameters())
 
template<class DataType >
Variable create (const std::string &name, const std::vector< Dimensions_t > &dimensions={1}, const std::vector< Dimensions_t > &max_dimensions={}, const VariableCreationParameters &params=VariableCreationParameters::defaulted< DataType >())
 Create a Variable without setting its data. More...
 
template<class DataType >
Variable create (const std::string &name, const ioda::Dimensions &dims, const VariableCreationParameters &params=VariableCreationParameters::defaulted< DataType >())
 
template<class DataType >
Variable createWithScales (const std::string &name, const std::vector< Variable > &dimension_scales, const VariableCreationParameters &params=VariableCreationParameters::defaulted< DataType >())
 Convenience function to create a Variable from certain dimension scales. More...
 
void createWithScales (const NewVariables_t &newvars)
 Collective function optimized to mass-construct variables and attach scales. More...
 

Protected Member Functions

 Has_Variables_Backend ()
 
- Protected Member Functions inherited from ioda::detail::Has_Variables_Base
 Has_Variables_Base (std::shared_ptr< Has_Variables_Backend >, std::shared_ptr< const DataLayoutPolicy >=nullptr)
 

Detailed Description

Definition at line 393 of file Has_Variables.h.

Constructor & Destructor Documentation

◆ Has_Variables_Backend()

ioda::detail::Has_Variables_Backend::Has_Variables_Backend ( )
protected

Definition at line 36 of file Has_Variables.cpp.

◆ ~Has_Variables_Backend()

ioda::detail::Has_Variables_Backend::~Has_Variables_Backend ( )
virtualdefault

Member Function Documentation

◆ attachDimensionScales()

void ioda::detail::Has_Variables_Backend::attachDimensionScales ( const std::vector< std::pair< Variable, std::vector< Variable >>> &  mapping)
overridevirtual

Attach dimension scales to many Dimension Numbers in a set of Variables.

Parameters
DimensionNumber
mappingis the scale mappings for each variable. The first part of the pair refers to the variable that you are attaching scales to. The second part is a sequence of scales that are attached along each dimension (indexed by the vector).

For some backends, particularly HDF5, attaching a dimension scale to a variable is a slow procedure when you have many variables. This function batches low-level calls and avoids loops.

Reimplemented from ioda::detail::Has_Variables_Base.

Reimplemented in ioda::detail::Engines::HH::HH_HasVariables.

Definition at line 347 of file Has_Variables.cpp.

Here is the call graph for this function:

◆ getFillValuePolicy()

FillValuePolicy ioda::detail::Has_Variables_Backend::getFillValuePolicy ( ) const
overridevirtual

Get the fill value policy used for Variables within this Group.

The backend has to be consulted for this operation. Storage of this policy is backend-dependent.

Reimplemented from ioda::detail::Has_Variables_Base.

Reimplemented in ioda::detail::Engines::HH::HH_HasVariables.

Definition at line 54 of file Has_Variables.cpp.


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