NetCDF4 C++ API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NcIndexedGridBase.h
Go to the documentation of this file.
1 
53 #ifndef INC_netcdf_NcIndexedGridBase_h
54 #define INC_netcdf_NcIndexedGridBase_h
55 
56 #include "NcFile.h"
57 #include "NcSpatial.h"
58 
59 namespace netcdf {
60 
61 
63 {
64  protected:
65 
67  short const useCompressionLevel = 5)
68  : recordDimName ( dimNames[0] ),
69  latLongName ( longNames[0] ),
70  lonLongName ( longNames[1] ),
71  compressionLevel (useCompressionLevel)
72  {
73  }
74 
75  public:
76 
77  static char const * const dimNames[];
78  static char const * const varNames[];
79  static char const * const longNames[];
80 
82  std::string const useRecordDimName )
83  { recordDimName = useRecordDimName; }
84 
86  std::string const useLatLongName,
87  std::string const useLonLongName)
88  {
89  latLongName = useLatLongName;
90  lonLongName = useLonLongName;
91  }
92 
93  std::string const & GetRecordDimName () const { return recordDimName; }
94 
95  void Create (
96  NcFile & ncFile,
97  unsigned short const latDimSize,
98  unsigned short const lonDimSize,
99  NcSpatial::TAnchor const anchor);
100 
101  virtual ~NcIndexedGridBase () = 0;
102 
103  protected:
104 
106  short const compressionLevel;
107 
108  private:
109 
110 };
111 
113 
114 
115 } // namespace netcdf
116 
117 #endif // INC_netcdf_NcIndexedGridBase_h
NcIndexedGridBase(short const useCompressionLevel=5)
Definition: NcIndexedGridBase.h:66
static char const *const dimNames[]
names of dimensions
Definition: NcIndexedGridBase.h:77
short const compressionLevel
Definition: NcIndexedGridBase.h:106
std::string latLongName
Definition: NcIndexedGridBase.h:105
std::string lonLongName
Definition: NcIndexedGridBase.h:105
void SetRecordDimName(std::string const useRecordDimName)
Definition: NcIndexedGridBase.h:81
void Create(NcFile &ncFile, unsigned short const latDimSize, unsigned short const lonDimSize, NcSpatial::TAnchor const anchor)
Definition: NcIndexedGridBase.cpp:39
void SetLatLonLongNames(std::string const useLatLongName, std::string const useLonLongName)
Definition: NcIndexedGridBase.h:85
virtual ~NcIndexedGridBase()=0
Definition: NcIndexedGridBase.h:112
std::string recordDimName
Definition: NcIndexedGridBase.h:105
Manages the opening, creating, and closing of netCDF files. Represents the netCDF root group...
Definition: NcFile.h:31
TAnchor
location of zero coordinate on a rectangular grid
Definition: NcSpatial.h:29
Class providing an interface to a NetCDF file containing a indexed (packed) latitude/longitude grid...
Definition: NcIndexedGridBase.h:62
static char const *const longNames[]
long_names attributes of variables
Definition: NcIndexedGridBase.h:79
std::string const & GetRecordDimName() const
Definition: NcIndexedGridBase.h:93
static char const *const varNames[]
names of variables
Definition: NcIndexedGridBase.h:78