Class represents a netCDF root group. The Ncfile class is the same as the NcGroup class with the additional functionality for opening and closing files.
- Copyright:
- Original C++ API developed by Lynton Appel.
Portions of this software were developed by the Unidata Program at the
University Corporation for Atmospheric Research.
Modifications: Copyright 2013 Colorado State University. All rights reserved.
- Organization:
- Natural Resource Ecology Laboratory
Colorado State University, Fort Collins, CO 80523 USA
www.nrel.colostate.edu
- Project:
- IRC <www.nrel.colostate.edu/projects/irc/>
- Author
- Tom Hilinski tom.h.nosp@m.ilin.nosp@m.ski@c.nosp@m.olos.nosp@m.tate..nosp@m.edu
- Date
- 2013Jan
- Examples:
- Test_AttVectors.cpp, Test_CreateFileNc3.cpp, Test_NcChar.cpp, Test_NcFileMetaCF.cpp, Test_NcString.cpp, Test_NcVarMetaCF.cpp, and Test_Parallel.cpp.
|
| NcFile (MPI::Comm &mpiComm, MPI::Info &mpiInfo, std::string const fileName, FileMode const fileMode, size_t const *const bufrsizeptr=NULL, size_t const initialsize=0) |
| Opens existing netCDF file for parallel MPI I/O; format is NetCDF4. Throws std::exception if failed. More...
|
|
| NcFile (std::string const fileName, FileMode const fileMode, FileFormat const fileFormat=NetCDF4, size_t const *const bufrsizeptr=NULL, size_t const initialsize=0) |
| Opens existing netCDF file for non-parallel I/O. Throws std::exception if failed. More...
|
|
| NcFile (std::string const fileName, FileMode const fileMode=ReadOnly) |
| Opens existing netCDF file for non-parallel I/O using the Classic format. Throws std::exception if failed. More...
|
|
bool | IsParallel () const |
| true if doing parallel IO. This version is parallel version. More...
|
|
MPI::Comm & | Comm () |
|
MPI::Info & | Info () |
|
FileFormat | GetFormat () |
| get NetCDF file format More...
|
|
bool | IsNetCDF3 () |
| true if file format is a NetCDF3 format More...
|
|
std::string | GetFileName () const |
| get copy of file name + path More...
|
|
FileMode | GetFileMode () const |
|
void | Sync () |
| synchronize to disk More...
|
|
void | ToDefineMode () |
| put NetCDF3 dataset into define mode More...
|
|
void | ToDataMode () |
| put NetCDF3 dataset into data mode More...
|
|
void | Close () |
| Close the netCDF file. For parallel-netCDF, this must be called before MPI::Finalize! More...
|
|
virtual | ~NcFile () |
|
| NcGroup () |
| null group More...
|
|
| NcGroup (int const useFileID, int const groupId, std::string const groupName) |
| name of new group More...
|
|
| NcGroup (NcGroup const &rhs) |
|
virtual | ~NcGroup () |
|
bool | operator< (NcGroup const &rhs) const |
|
std::string | GetName (bool fullName=false) const |
|
NcGroup | GetParentGroup () const |
|
int | GetGroupCount (NcGroup::GroupLocation location=ChildrenGrps) const |
|
NcGroupMap | GetGroups (NcGroup::GroupLocation location=ChildrenGrps) const |
|
NcGroupSet | GetGroups (std::string const name, NcGroup::GroupLocation location=ChildrenGrps) const |
|
NcGroup | GetGroup (std::string const name, NcGroup::GroupLocation location=ChildrenGrps) const |
|
NcGroup | AddGroup (std::string const name) const |
|
bool | IsRootGroup () const |
|
int | GetVarCount (NcGroup::Location location=Current) const |
|
bool | HaveVariable (std::string const name, NcGroup::Location const location=Current) const |
|
NcVarMap | GetVars (NcGroup::Location location=Current) const |
|
NcVarSet | GetVars (std::string const name, NcGroup::Location location=Current) const |
|
NcVar | GetVar (std::string const name, NcGroup::Location location=Current) const |
|
NcVar | AddVar (std::string const name, std::string const typeName) const |
| Add a scalar variable of a specified type name. More...
|
|
NcVar | AddVar (std::string const name, NcType const &ncType) const |
| Add a scalar variable of a specifed type. More...
|
|
NcVar | AddVar (std::string const name, std::string const typeName, std::string const dimName) const |
|
NcVar | AddVar (std::string const name, NcType const &ncType, const NcDim &ncDim) const |
|
NcVar | AddVar (std::string const name, std::string const typeName, const std::vector< std::string > &dimNames) const |
|
NcVar | AddVar (std::string const name, NcType const &ncType, const std::vector< NcDim > &ncDimVector) const |
|
NcVar | AddVar (NcVar const &var) |
|
int | GetAttCount (NcGroup::Location const location=Current) const |
|
bool | HaveAttribute (std::string const name, NcGroup::Location const location=Current) const |
|
NcGroupAttMap | GetAttributes (NcGroup::Location location=Current) const |
|
NcGroupAttSet | GetAttributes (std::string const name, NcGroup::Location location=Current) const |
|
NcGroupAtt | GetAtt (std::string const name, NcGroup::Location location=Current) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const unsigned char *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const signed char *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, char const aChar) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, short datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const short *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, unsigned short datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const unsigned short *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, int datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const int *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, long datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const long *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, unsigned int datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const unsigned int *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, float datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const float *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, double datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const double *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, long long datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const long long *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, unsigned long long datumValue) const |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const unsigned long long *dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, size_t len, const char **dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, std::string const &dataValues) const |
|
NcGroupAtt | PutAtt (std::string const name, std::vector< std::string > const &strVec) |
|
NcGroupAtt | PutAtt (std::string const name, NcType const &type, size_t len, const void *dataValues) const |
|
NcGroupAtt | PutAtt (NcGroupAtt const &att) |
|
int | GetDimCount (NcGroup::Location const location=Current) const |
|
NcDimMap | GetDims (NcGroup::Location const location=Current) const |
|
NcDimSet | GetDims (std::string const name, NcGroup::Location const location=Current) const |
|
NcDim | GetDim (std::string const name, NcGroup::Location const location=Current) const |
|
NcDim | AddDim (std::string const name, size_t const dimSize) const |
|
NcDim | AddDim (std::string const name) const |
|
NcDim | AddDim (NcDim const &dim) const |
|
int | GetTypeCount (NcGroup::Location location=Current) const |
|
int | GetTypeCount (NcType::ncType enumType, NcGroup::Location location=Current) const |
|
NcTypeMap | GetTypes (NcGroup::Location location=Current) const |
|
NcTypeSet | GetTypes (std::string const &name, NcGroup::Location location=Current) const |
|
NcTypeSet | GetTypes (NcType::ncType enumType, NcGroup::Location location=Current) const |
|
NcTypeSet | GetTypes (std::string const &name, NcType::ncType enumType, NcGroup::Location location=Current) const |
|
NcType | GetType (std::string const &name, NcGroup::Location location=Current) const |
|
NcEnumType | AddEnumType (std::string const name, NcEnumType::ncEnumType basetype) const |
|
NcVlenType | AddVlenType (std::string const name, NcType &basetype) const |
|
NcOpaqueType | AddOpaqueType (std::string const name, size_t size) const |
|
NcCompoundType | AddCompoundType (std::string const name, size_t size) const |
|
NcGroupMapUnique | GetCoordVars (Location location=Current) const |
|
void | GetCoordVar (std::string &coordVarName, NcDim &ncDim, NcVar &ncVar, NcGroup::Location location=Current) const |
|
virtual | ~NcItem ()=0 |
|
bool | IsNull () const |
|
std::string const & | GetName () const |
|
int | GetID () const |
|
int | GetGroupID () const |
|
int | GetFileID () const |
|
NcItem & | operator= (NcItem const &rhs) |
|
bool | operator== (NcItem const &rhs) const |
|
bool | operator!= (NcItem const &rhs) const |
|
bool | operator< (NcItem const &rhs) const |
|