NetCDF4 C++ API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NcUtil.cpp File Reference
#include "NcUtil.h"
#include "NcDim.h"
#include "NcVar.h"
#include "NcFile.h"
#include "NcCheck.h"
#include "NcException.h"
#include <cstring>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fstream>
+ Include dependency graph for NcUtil.cpp:

Namespaces

 netcdf
 

Functions

char ** netcdf::MakeCStringArray (int const numStrings, short const size)
 Allocates array and copies strings. More...
 
char ** netcdf::ToCStringArray (std::vector< std::string > const &strVec)
 
void netcdf::FreeCStringArray (char **&cStrArray, std::size_t const numStrings)
 
bool netcdf::IsRecordVariable (int const groupID, int const varID)
 
std::size_t netcdf::GetTotalSize (NcVar const &var)
 Get total number of elements of data from the dimensions of a variable. throws error if netcdf error. returns zero if has no sizes > 0. Unlimited dimensions are counted only if > zero. More...
 
std::size_t netcdf::GetTotalSize (int const groupID, int const varID)
 
std::size_t netcdf::GetTotalSize (int const groupID, int const varID, std::vector< std::size_t > const &count)
 
void netcdf::GetTypeName (NcGroup const &group,NcType::ncType const typeID,std::string &name)
 Gets the netCDF name of existing type object from the type ID. More...
 
NcGroup netcdf::GetGroup (NcFile const &ncFile, int const groupID)
 Get item info from netCDF ID numbers. More...
 
std::string netcdf::GetVarName (int const groupID, int const varID)
 
NcVar netcdf::GetVar (NcFile const &ncFile, int const groupID, int const varID)
 
void netcdf::GetNcDims (int const groupID, int const varID, std::vector< NcDim > &ncDims)
 Get the dimensions for a variable as vector of NcDim objects. More...
 
std::size_t netcdf::GetDimSize (int const groupID,int const varID,int const dimIndex)
 Get the size of a variable's dimension. More...