IODA
ioda::IodaIO Class Referenceabstract

File access class for IODA. More...

#include <IodaIO.h>

Inheritance diagram for ioda::IodaIO:
Collaboration diagram for ioda::IodaIO:

Classes

struct  DimInfoRec
 
struct  FrameInfoRec
 
struct  VarInfoRec
 

Public Types

typedef GroupVarInfoMap::const_iterator GroupIter
 group-variable map, group iterator More...
 
typedef VarInfoMap::const_iterator VarIter
 group-variable map, variable iterator More...
 
typedef DimInfoMap::const_iterator DimIter
 
typedef FrameInfo::const_iterator FrameIter
 
typedef FrameDataMap< int >::FrameStoreIter FrameIntIter
 
typedef FrameDataMap< float >::FrameStoreIter FrameFloatIter
 
typedef FrameDataMap< std::string >::FrameStoreIter FrameStringIter
 

Public Member Functions

 IodaIO (const std::string &FileName, const std::string &FileMode, const std::size_t MaxFrameSize)
 
virtual ~IodaIO ()=0
 
std::string fname () const
 
std::string fmode () const
 
std::size_t nlocs () const
 
std::size_t nvars () const
 
bool unexpected_data_types () const
 
bool excess_dims () const
 
GroupIter group_begin ()
 
GroupIter group_end ()
 
std::string group_name (GroupIter)
 
VarIter var_begin (GroupIter)
 
VarIter var_end (GroupIter)
 
std::string var_name (VarIter)
 
bool grp_var_exists (const std::string &, const std::string &)
 
std::string var_dtype (VarIter)
 
std::string var_dtype (const std::string &, const std::string &)
 
std::vector< std::size_t > var_shape (VarIter)
 
std::vector< std::size_t > var_shape (const std::string &, const std::string &)
 
std::vector< std::size_t > file_shape (VarIter)
 
std::vector< std::size_t > file_shape (const std::string &, const std::string &)
 
std::string file_name (VarIter)
 
std::string file_name (const std::string &, const std::string &)
 
std::string file_type (VarIter)
 
std::string file_type (const std::string &, const std::string &)
 
std::size_t var_id (VarIter)
 
std::size_t var_id (const std::string &, const std::string &)
 
void grp_var_insert (const std::string &GroupName, const std::string &VarName, const std::string &VarType, const std::vector< std::size_t > &VarShape, const std::string &FileVarName, const std::string &FileType, const std::size_t MaxStringSize=0)
 
DimIter dim_begin ()
 
DimIter dim_end ()
 
bool dim_exists (const std::string &)
 
std::string dim_name (DimIter)
 
int dim_id (DimIter)
 
std::size_t dim_size (DimIter)
 
std::size_t dim_id_size (const int &)
 
std::string dim_id_name (const int &)
 
std::size_t dim_name_size (const std::string &)
 
int dim_name_id (const std::string &)
 
void dim_insert (const std::string &, const std::size_t)
 
FrameIter frame_begin ()
 beginning frame iterator More...
 
FrameIter frame_end ()
 ending frame iterator More...
 
void frame_initialize ()
 initialize frame access More...
 
void frame_finalize ()
 finalize frame access More...
 
std::size_t frame_start (FrameIter &)
 start value of current frame More...
 
std::size_t frame_size (FrameIter &)
 size value of current frame More...
 
void frame_info_init (std::size_t MaxVarSize)
 initialize the frame info container More...
 
void frame_info_insert (std::size_t Start, std::size_t Size)
 insert item into the frame info container More...
 
void frame_data_init ()
 initialize the frame data container More...
 
void frame_read (FrameIter &)
 read from the file into the frame containers More...
 
void frame_write (FrameIter &)
 write from the frame containers into the file More...
 
FrameIntIter frame_int_begin ()
 
FrameIntIter frame_int_end ()
 
bool frame_int_has (std::string &GroupName, std::string &VarName)
 
std::vector< int > frame_int_get_data (FrameIntIter &iframe)
 
std::string frame_int_get_gname (FrameIntIter &iframe)
 
std::string frame_int_get_vname (FrameIntIter &iframe)
 
void frame_int_get_data (std::string &GroupName, std::string &VarName, std::vector< int > &VarData)
 
void frame_int_put_data (std::string &GroupName, std::string &VarName, std::vector< int > &VarData)
 
FrameFloatIter frame_float_begin ()
 
FrameFloatIter frame_float_end ()
 
bool frame_float_has (std::string &GroupName, std::string &VarName)
 
std::vector< float > frame_float_get_data (FrameFloatIter &iframe)
 
std::string frame_float_get_gname (FrameFloatIter &iframe)
 
std::string frame_float_get_vname (FrameFloatIter &iframe)
 
void frame_float_get_data (std::string &GroupName, std::string &VarName, std::vector< float > &VarData)
 
void frame_float_put_data (std::string &GroupName, std::string &VarName, std::vector< float > &VarData)
 
FrameStringIter frame_string_begin ()
 
FrameStringIter frame_string_end ()
 
bool frame_string_has (std::string &GroupName, std::string &VarName)
 
std::vector< std::string > frame_string_get_data (FrameStringIter &iframe)
 
std::string frame_string_get_gname (FrameStringIter &iframe)
 
std::string frame_string_get_vname (FrameStringIter &iframe)
 
void frame_string_get_data (std::string &GroupName, std::string &VarName, std::vector< std::string > &VarData)
 
void frame_string_put_data (std::string &GroupName, std::string &VarName, std::vector< std::string > &VarData)
 

Static Public Member Functions

static void ExtractGrpVarName (const std::string &Name, std::string &GroupName, std::string &VarName)
 

Protected Types

typedef std::map< std::string, VarInfoRecVarInfoMap
 variable information map More...
 
typedef std::map< std::string, VarInfoMapGroupVarInfoMap
 group-variable information map More...
 
typedef std::map< std::string, DimInfoRecDimInfoMap
 dimension information map More...
 
typedef std::vector< FrameInfoRecFrameInfo
 frame information map More...
 

Protected Member Functions

virtual void DimInsert (const std::string &Name, const std::size_t Size)=0
 
virtual void InitializeFrame ()=0
 
virtual void FinalizeFrame ()=0
 
virtual void ReadFrame (IodaIO::FrameIter &iframe)=0
 
virtual void WriteFrame (IodaIO::FrameIter &iframe)=0
 
virtual void GrpVarInsert (const std::string &GroupName, const std::string &VarName, const std::string &VarType, const std::vector< std::size_t > &VarShape, const std::string &FileVarName, const std::string &FileType, const std::size_t MaxStringSize)=0
 

Protected Attributes

std::string fname_
 file name More...
 
std::string fmode_
 file mode More...
 
std::size_t nlocs_
 number of unique locations More...
 
std::size_t nvars_
 number of unique variables More...
 
std::size_t num_unexpect_dtypes_
 count of unexpected data types More...
 
std::size_t num_excess_dims_
 count of too many dimensions More...
 
GroupVarInfoMap grp_var_info_
 group-variable information map More...
 
DimInfoMap dim_info_
 dimension information map More...
 
FrameInfo frame_info_
 frame information vector More...
 
std::size_t max_frame_size_
 maximum frame size More...
 
std::unique_ptr< FrameDataMap< int > > int_frame_data_
 Containers for file frame. More...
 
std::unique_ptr< FrameDataMap< float > > float_frame_data_
 
std::unique_ptr< FrameDataMap< std::string > > string_frame_data_
 

Detailed Description

File access class for IODA.

The IodaIO class provides the interface for file access. Note that IodaIO is an abstract base class.

There are two dimensions defined in the file:

nlocs: number of locations nvars: number of variables

Files are logically organized as a 2D array (table) where the rows are locations (nlocs) and the columns are variables (nvars). To avoid reading in the entire file into a table, and then selecting observations, the selection process is done on the fly. The table in the file is partitioned into "frames" where a frame is cut along a row. For example, the first frame consists of the first n rows; the second frame, the next n rows; etc.

The frame idea is taken from ODB file organization. It is possible to treat a netcdf file as consisting of frames using the netcdf hyperslab access scheme. Treating both ODB and netcdf files as sets of frames allows IodaIO to remain file agnostic, making it easier to handle both ODB and netcdf files.

Missing values are allowed for variable data. The native scheme for each file type is recognized and when reading/writing file data, the missing values are converted to the JEDI in-memory missing values. This again aids in keeping IodaIO file agnostic.

IodaIO provides access to files via a frame object. The idea, when reading, is to iterate over frames where the first action of each iteration is to read the frame from the file (frame_read method) then walk through the frame to read the individual variable data values (for that frame). Similarly, when writing, the first action is to fill in a frame object with the individual variable values (for that frame) and then write that frame to the file (frame_write method). For details see the code examples in the test_ioda_io test and the ObsData class methods InitFromFile and SaveToFile.

Author
Stephen Herbener (JCSDA)

Definition at line 116 of file src/io/IodaIO.h.

Member Typedef Documentation

◆ DimInfoMap

typedef std::map<std::string, DimInfoRec> ioda::IodaIO::DimInfoMap
protected

dimension information map

This typedef is dimension information map which containes information about the dimensions of the variables.

Definition at line 171 of file src/io/IodaIO.h.

◆ DimIter

typedef DimInfoMap::const_iterator ioda::IodaIO::DimIter

Definition at line 256 of file src/io/IodaIO.h.

◆ FrameFloatIter

typedef FrameDataMap<float>::FrameStoreIter ioda::IodaIO::FrameFloatIter

Definition at line 316 of file src/io/IodaIO.h.

◆ FrameInfo

typedef std::vector<FrameInfoRec> ioda::IodaIO::FrameInfo
protected

frame information map

This typedef contains information about the frames in the file

Definition at line 188 of file src/io/IodaIO.h.

◆ FrameIntIter

typedef FrameDataMap<int>::FrameStoreIter ioda::IodaIO::FrameIntIter

Definition at line 291 of file src/io/IodaIO.h.

◆ FrameIter

typedef FrameInfo::const_iterator ioda::IodaIO::FrameIter

Definition at line 275 of file src/io/IodaIO.h.

◆ FrameStringIter

typedef FrameDataMap<std::string>::FrameStoreIter ioda::IodaIO::FrameStringIter

Definition at line 341 of file src/io/IodaIO.h.

◆ GroupIter

typedef GroupVarInfoMap::const_iterator ioda::IodaIO::GroupIter

group-variable map, group iterator

This typedef is defining the iterator for the group key in the group-variable map. See the GrpVarInfoMap typedef for details.

Definition at line 218 of file src/io/IodaIO.h.

◆ GroupVarInfoMap

typedef std::map<std::string, VarInfoMap> ioda::IodaIO::GroupVarInfoMap
protected

group-variable information map

This typedef is defining the group-variable map which is a nested map containing information about the variables in the input file. This map is keyed first by group name, then by variable name and is used to pass information to the caller so that the caller can iterate through the contents of the input file.

Definition at line 157 of file src/io/IodaIO.h.

◆ VarInfoMap

typedef std::map<std::string, VarInfoRec> ioda::IodaIO::VarInfoMap
protected

variable information map

This typedef is part of the group-variable map which is a nested map containing information about the variables in the input file (see GroupVarInfoMap typedef for details).

Definition at line 146 of file src/io/IodaIO.h.

◆ VarIter

typedef VarInfoMap::const_iterator ioda::IodaIO::VarIter

group-variable map, variable iterator

This typedef is defining the iterator for the variable key in the group-variable map. See the GrpVarInfoMap typedef for details.

Definition at line 230 of file src/io/IodaIO.h.

Constructor & Destructor Documentation

◆ IodaIO()

ioda::IodaIO::IodaIO ( const std::string &  FileName,
const std::string &  FileMode,
const std::size_t  MaxFrameSize 
)

Definition at line 20 of file IodaIO.cc.

◆ ~IodaIO()

ioda::IodaIO::~IodaIO ( )
pure virtual

Definition at line 27 of file IodaIO.cc.

Member Function Documentation

◆ dim_begin()

IodaIO::DimIter ioda::IodaIO::dim_begin ( )

This method returns the begin iterator for the dimension container

Definition at line 419 of file IodaIO.cc.

◆ dim_end()

IodaIO::DimIter ioda::IodaIO::dim_end ( )

This method returns the end iterator for the dimension container

Definition at line 428 of file IodaIO.cc.

◆ dim_exists()

bool ioda::IodaIO::dim_exists ( const std::string &  name)

This method returns a flag indicating the existence of the given dimension name. True indicates the dimension exists, false indicates the dimension does not exist.

Parameters
[in]nameDimension name

Definition at line 410 of file IodaIO.cc.

Here is the caller graph for this function:

◆ dim_id()

int ioda::IodaIO::dim_id ( IodaIO::DimIter  idim)

This method returns the dimension id given a dimension iterator.

Parameters
[in]idimDimension iterator

Definition at line 450 of file IodaIO.cc.

◆ dim_id_name()

std::string ioda::IodaIO::dim_id_name ( const int &  id)

This method returns the dimension name given a dimension id.

Parameters
[in]idDimension id

Definition at line 496 of file IodaIO.cc.

◆ dim_id_size()

std::size_t ioda::IodaIO::dim_id_size ( const int &  id)

This method returns the dimension size given a dimension id.

Parameters
[in]idDimension id

Definition at line 472 of file IodaIO.cc.

Here is the caller graph for this function:

◆ dim_insert()

void ioda::IodaIO::dim_insert ( const std::string &  Name,
const std::size_t  Size 
)

This method inserts an entry into the dim info container

Parameters
[in]nameDimension name

Definition at line 551 of file IodaIO.cc.

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

◆ dim_name()

std::string ioda::IodaIO::dim_name ( IodaIO::DimIter  idim)

This method returns the dimension name given a dimension iterator.

Parameters
[in]idimDimension iterator

Definition at line 439 of file IodaIO.cc.

◆ dim_name_id()

int ioda::IodaIO::dim_name_id ( const std::string &  name)

This method returns the dimension id given a dimension name.

Parameters
[in]nameDimension name

Definition at line 536 of file IodaIO.cc.

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

◆ dim_name_size()

std::size_t ioda::IodaIO::dim_name_size ( const std::string &  name)

This method returns the dimension size given a dimension name.

Parameters
[in]nameDimension name

Definition at line 520 of file IodaIO.cc.

Here is the call graph for this function:

◆ dim_size()

std::size_t ioda::IodaIO::dim_size ( IodaIO::DimIter  idim)

This method returns the dimension size given a dimension iterator.

Parameters
[in]idimDimension iterator

Definition at line 461 of file IodaIO.cc.

◆ DimInsert()

virtual void ioda::IodaIO::DimInsert ( const std::string &  Name,
const std::size_t  Size 
)
protectedpure virtual

Implemented in ioda::NetcdfIO.

Here is the caller graph for this function:

◆ excess_dims()

bool ioda::IodaIO::excess_dims ( ) const

This method returns whether any variables with excess dimensions were encountered when reading the input file.

Definition at line 79 of file IodaIO.cc.

◆ ExtractGrpVarName()

void ioda::IodaIO::ExtractGrpVarName ( const std::string &  Name,
std::string &  GroupName,
std::string &  VarName 
)
static

This method extracts the group and variable names from the given compound name.

Parameters
[in]NameCompound name (eg, Temperature@ObsValue)
[out]GroupNameGroup name (eg, ObsValue)
[out]VarNameVariable name (eg, Temperature)

Definition at line 678 of file IodaIO.cc.

Here is the caller graph for this function:

◆ file_name() [1/2]

std::string ioda::IodaIO::file_name ( const std::string &  GroupName,
const std::string &  VarName 
)

This method returns the variable name in the file for the group name, variable name combination in the group, variable information map.

Parameters
[in]GroupNameGroup key for GrpVarInfoMap
[in]VarNameVariable key for GrpVarInfoMap

Definition at line 307 of file IodaIO.cc.

Here is the call graph for this function:

◆ file_name() [2/2]

std::string ioda::IodaIO::file_name ( IodaIO::VarIter  ivar)

This method returns the variable name in the file for the current iteration in the group, variable information map.

Parameters
[in]ivarVariable iterator for GrpVarInfoMap

Definition at line 294 of file IodaIO.cc.

Here is the caller graph for this function:

◆ file_shape() [1/2]

std::vector< std::size_t > ioda::IodaIO::file_shape ( const std::string &  GroupName,
const std::string &  VarName 
)

This method returns the variable shape in the file for the group name, variable name combination in the group, variable information map.

Parameters
[in]GroupNameGroup key for GrpVarInfoMap
[in]VarNameVariable key for GrpVarInfoMap

Definition at line 273 of file IodaIO.cc.

Here is the call graph for this function:

◆ file_shape() [2/2]

std::vector< std::size_t > ioda::IodaIO::file_shape ( IodaIO::VarIter  ivar)

This method returns the variable shape in the file for the current iteration in the group, variable information map.

Parameters
[in]ivarVariable iterator for GrpVarInfoMap

Definition at line 260 of file IodaIO.cc.

Here is the caller graph for this function:

◆ file_type() [1/2]

std::string ioda::IodaIO::file_type ( const std::string &  GroupName,
const std::string &  VarName 
)

This method returns the variable type in the file for the group name, variable name combination in the group, variable information map.

Parameters
[in]GroupNameGroup key for GrpVarInfoMap
[in]VarNameVariable key for GrpVarInfoMap

Definition at line 340 of file IodaIO.cc.

Here is the call graph for this function:

◆ file_type() [2/2]

std::string ioda::IodaIO::file_type ( IodaIO::VarIter  ivar)

This method returns the variable type in the file for the current iteration in the group, variable information map.

Parameters
[in]ivarVariable iterator for GrpVarInfoMap

Definition at line 327 of file IodaIO.cc.

Here is the caller graph for this function:

◆ FinalizeFrame()

virtual void ioda::IodaIO::FinalizeFrame ( )
protectedpure virtual

Implemented in ioda::NetcdfIO.

Here is the caller graph for this function:

◆ fmode()

std::string ioda::IodaIO::fmode ( ) const

This method returns the mode (read, write, etc) for access to the file.

Definition at line 43 of file IodaIO.cc.

◆ fname()

std::string ioda::IodaIO::fname ( ) const

This method returns the path to the file.

Definition at line 34 of file IodaIO.cc.

◆ frame_begin()

IodaIO::FrameIter ioda::IodaIO::frame_begin ( )

beginning frame iterator

Definition at line 559 of file IodaIO.cc.

◆ frame_data_init()

void ioda::IodaIO::frame_data_init ( )

initialize the frame data container

Definition at line 644 of file IodaIO.cc.

Here is the caller graph for this function:

◆ frame_end()

IodaIO::FrameIter ioda::IodaIO::frame_end ( )

ending frame iterator

Definition at line 568 of file IodaIO.cc.

◆ frame_finalize()

void ioda::IodaIO::frame_finalize ( )

finalize frame access

Definition at line 586 of file IodaIO.cc.

Here is the call graph for this function:

◆ frame_float_begin()

FrameFloatIter ioda::IodaIO::frame_float_begin ( )
inline

Definition at line 317 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_float_end()

FrameFloatIter ioda::IodaIO::frame_float_end ( )
inline

Definition at line 318 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_float_get_data() [1/2]

std::vector<float> ioda::IodaIO::frame_float_get_data ( FrameFloatIter iframe)
inline

Definition at line 322 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_float_get_data() [2/2]

void ioda::IodaIO::frame_float_get_data ( std::string &  GroupName,
std::string &  VarName,
std::vector< float > &  VarData 
)
inline

Definition at line 331 of file src/io/IodaIO.h.

◆ frame_float_get_gname()

std::string ioda::IodaIO::frame_float_get_gname ( FrameFloatIter iframe)
inline

Definition at line 325 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_float_get_vname()

std::string ioda::IodaIO::frame_float_get_vname ( FrameFloatIter iframe)
inline

Definition at line 328 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_float_has()

bool ioda::IodaIO::frame_float_has ( std::string &  GroupName,
std::string &  VarName 
)
inline

Definition at line 319 of file src/io/IodaIO.h.

◆ frame_float_put_data()

void ioda::IodaIO::frame_float_put_data ( std::string &  GroupName,
std::string &  VarName,
std::vector< float > &  VarData 
)
inline

Definition at line 335 of file src/io/IodaIO.h.

◆ frame_info_init()

void ioda::IodaIO::frame_info_init ( std::size_t  MaxVarSize)

initialize the frame info container

Definition at line 613 of file IodaIO.cc.

Here is the caller graph for this function:

◆ frame_info_insert()

void ioda::IodaIO::frame_info_insert ( std::size_t  Start,
std::size_t  Size 
)

insert item into the frame info container

Definition at line 634 of file IodaIO.cc.

◆ frame_initialize()

void ioda::IodaIO::frame_initialize ( )

initialize frame access

Definition at line 577 of file IodaIO.cc.

Here is the call graph for this function:

◆ frame_int_begin()

FrameIntIter ioda::IodaIO::frame_int_begin ( )
inline

Definition at line 292 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_int_end()

FrameIntIter ioda::IodaIO::frame_int_end ( )
inline

Definition at line 293 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_int_get_data() [1/2]

std::vector<int> ioda::IodaIO::frame_int_get_data ( FrameIntIter iframe)
inline

Definition at line 297 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_int_get_data() [2/2]

void ioda::IodaIO::frame_int_get_data ( std::string &  GroupName,
std::string &  VarName,
std::vector< int > &  VarData 
)
inline

Definition at line 306 of file src/io/IodaIO.h.

◆ frame_int_get_gname()

std::string ioda::IodaIO::frame_int_get_gname ( FrameIntIter iframe)
inline

Definition at line 300 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_int_get_vname()

std::string ioda::IodaIO::frame_int_get_vname ( FrameIntIter iframe)
inline

Definition at line 303 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_int_has()

bool ioda::IodaIO::frame_int_has ( std::string &  GroupName,
std::string &  VarName 
)
inline

Definition at line 294 of file src/io/IodaIO.h.

◆ frame_int_put_data()

void ioda::IodaIO::frame_int_put_data ( std::string &  GroupName,
std::string &  VarName,
std::vector< int > &  VarData 
)
inline

Definition at line 310 of file src/io/IodaIO.h.

◆ frame_read()

void ioda::IodaIO::frame_read ( IodaIO::FrameIter iframe)

read from the file into the frame containers

Definition at line 655 of file IodaIO.cc.

Here is the call graph for this function:

◆ frame_size()

std::size_t ioda::IodaIO::frame_size ( IodaIO::FrameIter iframe)

size value of current frame

Definition at line 604 of file IodaIO.cc.

Here is the caller graph for this function:

◆ frame_start()

std::size_t ioda::IodaIO::frame_start ( IodaIO::FrameIter iframe)

start value of current frame

Definition at line 595 of file IodaIO.cc.

Here is the caller graph for this function:

◆ frame_string_begin()

FrameStringIter ioda::IodaIO::frame_string_begin ( )
inline

Definition at line 342 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_string_end()

FrameStringIter ioda::IodaIO::frame_string_end ( )
inline

Definition at line 343 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_string_get_data() [1/2]

std::vector<std::string> ioda::IodaIO::frame_string_get_data ( FrameStringIter iframe)
inline

Definition at line 347 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_string_get_data() [2/2]

void ioda::IodaIO::frame_string_get_data ( std::string &  GroupName,
std::string &  VarName,
std::vector< std::string > &  VarData 
)
inline

Definition at line 356 of file src/io/IodaIO.h.

◆ frame_string_get_gname()

std::string ioda::IodaIO::frame_string_get_gname ( FrameStringIter iframe)
inline

Definition at line 350 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_string_get_vname()

std::string ioda::IodaIO::frame_string_get_vname ( FrameStringIter iframe)
inline

Definition at line 353 of file src/io/IodaIO.h.

Here is the caller graph for this function:

◆ frame_string_has()

bool ioda::IodaIO::frame_string_has ( std::string &  GroupName,
std::string &  VarName 
)
inline

Definition at line 344 of file src/io/IodaIO.h.

◆ frame_string_put_data()

void ioda::IodaIO::frame_string_put_data ( std::string &  GroupName,
std::string &  VarName,
std::vector< std::string > &  VarData 
)
inline

Definition at line 360 of file src/io/IodaIO.h.

◆ frame_write()

void ioda::IodaIO::frame_write ( IodaIO::FrameIter iframe)

write from the frame containers into the file

Definition at line 664 of file IodaIO.cc.

Here is the call graph for this function:

◆ group_begin()

IodaIO::GroupIter ioda::IodaIO::group_begin ( )

This method returns the begin iterator for the groups contained in the group, variable information map.

Definition at line 89 of file IodaIO.cc.

Here is the caller graph for this function:

◆ group_end()

IodaIO::GroupIter ioda::IodaIO::group_end ( )

This method returns the end iterator for the groups contained in the group, variable information map.

Definition at line 99 of file IodaIO.cc.

Here is the caller graph for this function:

◆ group_name()

std::string ioda::IodaIO::group_name ( IodaIO::GroupIter  igrp)

This method returns the group name for the current iteration in the group, variable information map.

Parameters
[in]igrpGroup iterator for GrpVarInfoMap

Definition at line 111 of file IodaIO.cc.

Here is the caller graph for this function:

◆ grp_var_exists()

bool ioda::IodaIO::grp_var_exists ( const std::string &  GroupName,
const std::string &  VarName 
)

This method returns the variable data type for the current iteration in the group, variable information map.

Parameters
[in]GroupNameGroup key for GrpVarInfoMap
[in]VarNameVariable key for GrpVarInfoMap

Definition at line 172 of file IodaIO.cc.

Here is the caller graph for this function:

◆ grp_var_insert()

void ioda::IodaIO::grp_var_insert ( const std::string &  GroupName,
const std::string &  VarName,
const std::string &  VarType,
const std::vector< std::size_t > &  VarShape,
const std::string &  FileVarName,
const std::string &  FileType,
const std::size_t  MaxStringSize = 0 
)

This method adds an entry to the group, variable information map.

Parameters
[in]GroupNameGroup key for GrpVarInfoMap
[in]VarNameVariable key for GrpVarInfoMap
[in]

Definition at line 394 of file IodaIO.cc.

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

◆ GrpVarInsert()

virtual void ioda::IodaIO::GrpVarInsert ( const std::string &  GroupName,
const std::string &  VarName,
const std::string &  VarType,
const std::vector< std::size_t > &  VarShape,
const std::string &  FileVarName,
const std::string &  FileType,
const std::size_t  MaxStringSize 
)
protectedpure virtual

Implemented in ioda::NetcdfIO.

Here is the caller graph for this function:

◆ InitializeFrame()

virtual void ioda::IodaIO::InitializeFrame ( )
protectedpure virtual

Implemented in ioda::NetcdfIO.

Here is the caller graph for this function:

◆ nlocs()

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

This method returns the number of unique locations in the obs data.

Definition at line 52 of file IodaIO.cc.

◆ nvars()

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

This method returns the number of unique variables in the obs data.

Definition at line 61 of file IodaIO.cc.

◆ ReadFrame()

virtual void ioda::IodaIO::ReadFrame ( IodaIO::FrameIter iframe)
protectedpure virtual

Implemented in ioda::NetcdfIO.

Here is the caller graph for this function:

◆ unexpected_data_types()

bool ioda::IodaIO::unexpected_data_types ( ) const

This method returns whether any unexpected data types were encountered on variables from the input file.

Definition at line 70 of file IodaIO.cc.

◆ var_begin()

IodaIO::VarIter ioda::IodaIO::var_begin ( GroupIter  igrp)

This method returns the begin iterator for the variables, of a particular group, contained in the group, variable information map.

Parameters
[in]igrpGroup iterator for GrpVarInfoMap

Definition at line 123 of file IodaIO.cc.

Here is the caller graph for this function:

◆ var_dtype() [1/2]

std::string ioda::IodaIO::var_dtype ( const std::string &  GroupName,
const std::string &  VarName 
)

This method returns the variable data type for the group name, variable name combination in the group, variable information map.

Parameters
[in]GroupNameGroup key for GrpVarInfoMap
[in]VarNameVariable key for GrpVarInfoMap

Definition at line 206 of file IodaIO.cc.

Here is the call graph for this function:

◆ var_dtype() [2/2]

std::string ioda::IodaIO::var_dtype ( IodaIO::VarIter  ivar)

This method returns the variable data type for the current iteration in the group, variable information map.

Parameters
[in]ivarVariable iterator for GrpVarInfoMap

Definition at line 159 of file IodaIO.cc.

Here is the caller graph for this function:

◆ var_end()

IodaIO::VarIter ioda::IodaIO::var_end ( GroupIter  igrp)

This method returns the end iterator for the variables, of a particular group, contained in the group, variable information map.

Parameters
[in]igrpGroup iterator for GrpVarInfoMap

Definition at line 135 of file IodaIO.cc.

Here is the caller graph for this function:

◆ var_id() [1/2]

std::size_t ioda::IodaIO::var_id ( const std::string &  GroupName,
const std::string &  VarName 
)

This method returns the variable id for the group name, variable name combination in the group, variable information map.

Parameters
[in]GroupNameGroup key for GrpVarInfoMap
[in]VarNameVariable key for GrpVarInfoMap

Definition at line 373 of file IodaIO.cc.

Here is the call graph for this function:

◆ var_id() [2/2]

std::size_t ioda::IodaIO::var_id ( IodaIO::VarIter  ivar)

This method returns the variable id for the current iteration in the group, variable information map.

Parameters
[in]ivarVariable iterator for GrpVarInfoMap

Definition at line 360 of file IodaIO.cc.

Here is the caller graph for this function:

◆ var_name()

std::string ioda::IodaIO::var_name ( IodaIO::VarIter  ivar)

This method returns the variable name for the current iteration in the group, variable information map.

Parameters
[in]ivarVariable iterator for GrpVarInfoMap

Definition at line 147 of file IodaIO.cc.

Here is the caller graph for this function:

◆ var_shape() [1/2]

std::vector< std::size_t > ioda::IodaIO::var_shape ( const std::string &  GroupName,
const std::string &  VarName 
)

This method returns the variable shape for the group name, variable name combination in the group, variable information map.

Parameters
[in]GroupNameGroup key for GrpVarInfoMap
[in]VarNameVariable key for GrpVarInfoMap

Definition at line 239 of file IodaIO.cc.

Here is the call graph for this function:

◆ var_shape() [2/2]

std::vector< std::size_t > ioda::IodaIO::var_shape ( IodaIO::VarIter  ivar)

This method returns the variable shape for the current iteration in the group, variable information map.

Parameters
[in]ivarVariable iterator for GrpVarInfoMap

Definition at line 226 of file IodaIO.cc.

Here is the caller graph for this function:

◆ WriteFrame()

virtual void ioda::IodaIO::WriteFrame ( IodaIO::FrameIter iframe)
protectedpure virtual

Implemented in ioda::NetcdfIO.

Here is the caller graph for this function:

Member Data Documentation

◆ dim_info_

DimInfoMap ioda::IodaIO::dim_info_
protected

dimension information map

Definition at line 409 of file src/io/IodaIO.h.

◆ float_frame_data_

std::unique_ptr<FrameDataMap<float> > ioda::IodaIO::float_frame_data_
protected

Definition at line 419 of file src/io/IodaIO.h.

◆ fmode_

std::string ioda::IodaIO::fmode_
protected

file mode

File modes that are accepted are: "r" -> read, "w" -> overwrite, and "W" -> create and write.

Definition at line 391 of file src/io/IodaIO.h.

◆ fname_

std::string ioda::IodaIO::fname_
protected

file name

Definition at line 383 of file src/io/IodaIO.h.

◆ frame_info_

FrameInfo ioda::IodaIO::frame_info_
protected

frame information vector

Definition at line 412 of file src/io/IodaIO.h.

◆ grp_var_info_

GroupVarInfoMap ioda::IodaIO::grp_var_info_
protected

group-variable information map

Definition at line 406 of file src/io/IodaIO.h.

◆ int_frame_data_

std::unique_ptr<FrameDataMap<int> > ioda::IodaIO::int_frame_data_
protected

Containers for file frame.

Definition at line 418 of file src/io/IodaIO.h.

◆ max_frame_size_

std::size_t ioda::IodaIO::max_frame_size_
protected

maximum frame size

Definition at line 415 of file src/io/IodaIO.h.

◆ nlocs_

std::size_t ioda::IodaIO::nlocs_
protected

number of unique locations

Definition at line 394 of file src/io/IodaIO.h.

◆ num_excess_dims_

std::size_t ioda::IodaIO::num_excess_dims_
protected

count of too many dimensions

Definition at line 403 of file src/io/IodaIO.h.

◆ num_unexpect_dtypes_

std::size_t ioda::IodaIO::num_unexpect_dtypes_
protected

count of unexpected data types

Definition at line 400 of file src/io/IodaIO.h.

◆ nvars_

std::size_t ioda::IodaIO::nvars_
protected

number of unique variables

Definition at line 397 of file src/io/IodaIO.h.

◆ string_frame_data_

std::unique_ptr<FrameDataMap<std::string> > ioda::IodaIO::string_frame_data_
protected

Definition at line 420 of file src/io/IodaIO.h.


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