code::NetcdfDataVariable< T > Class Template Reference

List of all members.

Detailed Description

template<class T>
class code::NetcdfDataVariable< T >

The NetcdfDataVariable decides on the fly whether to write itself as a literal 2D grid or as a sparse grid, conserving a lot of space in the process.

Works with any class that SparseGrid2D supports.

Author:
Lakshman Greg Stumpf
Version:
Id
code_NetcdfDataVariable.h,v 1.11 2012/02/28 18:25:58 jeff.brogden Exp


Public Member Functions

 NetcdfDataVariable ()
 NetcdfDataVariable (const T &data, NetcdfFile &ncfile, NcDim *xdim, NcDim *ydim)
 NetcdfDataVariable (const T &data, NetcdfFile &ncfile, NcDim *zdim, NcDim *xdim, NcDim *ydim)
void writeLiteral2D (const T &data)
bool readLiteral2D (T &data)
void writeSparseGrid (const T &data)
bool readSparseGrid (T &data)
void writeData (const T &data)
std::string getDataType () const
 returns RadialSet, LatLonGrid, SparseRadialSet, etc.
bool readData (T &data, short dimx, short dimy, SentinelDouble FILE_MISSING_DATA, SentinelDouble FILE_RANGE_FOLDED)
bool readData (T &data, short dimz, short dimx, short dimy, SentinelDouble FILE_MISSING_DATA, SentinelDouble FILE_RANGE_FOLDED)

Static Public Member Functions

static void setCDMComplianceFlag (bool flag=false)
 Set the CDM compliance flag.
static bool getCDMComplianceFlag ()
static bool checkCDMCompliance (std::string type)
static void setFAAComplianceFlag (bool flag=false)
 Set the FAA compliance flag.
static bool getFAAComplianceFlag ()
static bool checkFAACompliance (std::string type)
static void setSparseGridThreshold (float thresh=0.33)
 Change the threshold at which we will start to use sparse grids.
static float getSparseGridThreshold ()
 See setSparseGridThreshold.
static code::SmartPtr< NetcdfDataVariable<
T > > 
read (const NetcdfFile &ncFile, const std::string &typeName)
 Use this to create a data variable to read from.

Static Protected Member Functions

static bool get (NcVar *, int pos, int *buf, int buf_count)
static bool get (NcVar *, int pos, short *buf, int buf_count)
static bool get (NcVar *, int pos, float *buf, int buf_count)
static void put (NcVar *, int pos, const int *buf, int buf_count)
static void put (NcVar *, int pos, const short *buf, int buf_count)
static void put (NcVar *, int pos, const float *buf, int buf_count)


Constructor & Destructor Documentation

template<class T>
code::NetcdfDataVariable< T >::NetcdfDataVariable (  ) 

template<class T>
code::NetcdfDataVariable< T >::NetcdfDataVariable ( const T &  data,
NetcdfFile ncfile,
NcDim *  xdim,
NcDim *  ydim 
)

template<class T>
code::NetcdfDataVariable< T >::NetcdfDataVariable ( const T &  data,
NetcdfFile ncfile,
NcDim *  zdim,
NcDim *  xdim,
NcDim *  ydim 
)


Member Function Documentation

template<class T>
static bool code::NetcdfDataVariable< T >::checkCDMCompliance ( std::string  type  )  [static]

template<class T>
static bool code::NetcdfDataVariable< T >::checkFAACompliance ( std::string  type  )  [static]

template<class T>
static bool code::NetcdfDataVariable< T >::get ( NcVar *  ,
int  pos,
float *  buf,
int  buf_count 
) [static, protected]

template<class T>
static bool code::NetcdfDataVariable< T >::get ( NcVar *  ,
int  pos,
short *  buf,
int  buf_count 
) [static, protected]

template<class T>
static bool code::NetcdfDataVariable< T >::get ( NcVar *  ,
int  pos,
int *  buf,
int  buf_count 
) [static, protected]

template<class T>
static bool code::NetcdfDataVariable< T >::getCDMComplianceFlag (  )  [static]

template<class T>
std::string code::NetcdfDataVariable< T >::getDataType (  )  const

returns RadialSet, LatLonGrid, SparseRadialSet, etc.

template<class T>
static bool code::NetcdfDataVariable< T >::getFAAComplianceFlag (  )  [static]

template<class T>
static float code::NetcdfDataVariable< T >::getSparseGridThreshold (  )  [static]

See setSparseGridThreshold.

template<class T>
static void code::NetcdfDataVariable< T >::put ( NcVar *  ,
int  pos,
const float *  buf,
int  buf_count 
) [static, protected]

template<class T>
static void code::NetcdfDataVariable< T >::put ( NcVar *  ,
int  pos,
const short *  buf,
int  buf_count 
) [static, protected]

template<class T>
static void code::NetcdfDataVariable< T >::put ( NcVar *  ,
int  pos,
const int *  buf,
int  buf_count 
) [static, protected]

template<class T>
static code::SmartPtr< NetcdfDataVariable<T> > code::NetcdfDataVariable< T >::read ( const NetcdfFile ncFile,
const std::string &  typeName 
) [static]

Use this to create a data variable to read from.

template<class T>
bool code::NetcdfDataVariable< T >::readData ( T &  data,
short  dimz,
short  dimx,
short  dimy,
SentinelDouble  FILE_MISSING_DATA,
SentinelDouble  FILE_RANGE_FOLDED 
)

template<class T>
bool code::NetcdfDataVariable< T >::readData ( T &  data,
short  dimx,
short  dimy,
SentinelDouble  FILE_MISSING_DATA,
SentinelDouble  FILE_RANGE_FOLDED 
)

template<class T>
bool code::NetcdfDataVariable< T >::readLiteral2D ( T &  data  ) 

template<class T>
bool code::NetcdfDataVariable< T >::readSparseGrid ( T &  data  ) 

template<class T>
static void code::NetcdfDataVariable< T >::setCDMComplianceFlag ( bool  flag = false  )  [static]

Set the CDM compliance flag.

template<class T>
static void code::NetcdfDataVariable< T >::setFAAComplianceFlag ( bool  flag = false  )  [static]

Set the FAA compliance flag.

template<class T>
static void code::NetcdfDataVariable< T >::setSparseGridThreshold ( float  thresh = 0.33  )  [static]

Change the threshold at which we will start to use sparse grids.

Currently, we will do so if, by using sparse grids, we can reduce the size of the ensuing file by a third.

Set this number to be -1 if you never want to use sparse grids. Set this number to be 2 if you always want to use sparse grids.

template<class T>
void code::NetcdfDataVariable< T >::writeData ( const T &  data  ) 

template<class T>
void code::NetcdfDataVariable< T >::writeLiteral2D ( const T &  data  ) 

template<class T>
void code::NetcdfDataVariable< T >::writeSparseGrid ( const T &  data  ) 


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7