8 #ifndef FILEIO_NETCDFIO_H_ 9 #define FILEIO_NETCDFIO_H_ 14 #include "fileio/IodaIO.h" 15 #include "oops/util/ObjectCounter.h" 37 private util::ObjectCounter<NetcdfIO> {
46 static const std::string
classname() {
return "ioda::NetcdfIO";}
48 NetcdfIO(
const std::string & FileName,
const std::string & FileMode,
49 const std::size_t & Nlocs,
const std::size_t & Nobs,
50 const std::size_t & Nrecs,
const std::size_t & Nvars);
53 void ReadVar(
const std::string & VarName,
int* VarData);
54 void ReadVar(
const std::string & VarName,
float* VarData);
55 void ReadVar(
const std::string & VarName,
double* VarData);
57 void WriteVar(
const std::string & VarName,
int* VarData);
58 void WriteVar(
const std::string & VarName,
float* VarData);
59 void WriteVar(
const std::string & VarName,
double* VarData);
65 void print(std::ostream & os)
const;
154 #endif // FILEIO_NETCDFIO_H_ void print(std::ostream &os) const
print method for stream output
bool have_nlocs_
This data member is a flag that indicates the existence of the "nlocs" dimension in the opened netcdf...
bool have_nrecs_
This data member is a flag that indicates the existence of the "nrecs" dimension in the opened netcdf...
File access class for IODA.
int nobs_id_
This data member holds the netcdf id of the "nobs" dimension in the opened netcdf file...
Implementation of IodaIO for netcdf.
void ReadDateTime(int *VarDate, int *VarTime)
Read and format the date, time values.
static const std::string classname()
classname method for object counter
int nvars_id_
This data member holds the netcdf id of the "nvars" dimension in the opened netcdf file...
int nlocs_id_
This data member holds the netcdf id of the "nlocs" dimension in the opened netcdf file...
bool have_nobs_
This data member is a flag that indicates the existence of the "nobs" dimension in the opened netcdf ...
int nc_varid_
This data member holds the netcdf id of the current dataset (variable) in the opened netcdf file...
void CheckNcCall(int, std::string &)
check results of netcdf call
bool have_nchans_
This data member is a flag that indicates the existence of the "nchans" dimension in the opened netcd...
int nc_attid_
This data member holds the netcdf id of the current attribute in the opened netcdf file...
bool have_nvars_
This data member is a flag that indicates the existence of the "nvars" dimension in the opened netcdf...
void ReadVar(const std::string &VarName, int *VarData)
Read data from netcdf file to memory.
int nrecs_id_
This data member holds the netcdf id of the "nrecs" dimension in the opened netcdf file...
void WriteVar(const std::string &VarName, int *VarData)
Write data from memory to netcdf file.
int nchans_id_
This data member holds the netcdf id of the "nchans" dimension in the opened netcdf file...
NetcdfIO(const std::string &FileName, const std::string &FileMode, const std::size_t &Nlocs, const std::size_t &Nobs, const std::size_t &Nrecs, const std::size_t &Nvars)