NetCDF4 C++ API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NcLatLonRecordBase.h
Go to the documentation of this file.
1 
34 
36 
37 #ifndef INC_netcdf_NcLatLonRecordBase_h
38 #define INC_netcdf_NcLatLonRecordBase_h
39 
40 #include "NcFile.h"
41 
42 namespace netcdf {
43 
44 
46 {
47  protected:
48 
50  short const useCompressionLevel = 5)
51  : recordDimName ( dimNames[0] ),
52  latLongName ( longNames[0] ),
53  lonLongName ( longNames[1] ),
54  compressionLevel (useCompressionLevel)
55  {
56  }
57 
58  public:
59 
60  static char const * const dimNames[];
61  static char const * const varNames[];
62  static char const * const longNames[];
63 
65  std::string const useRecordDimName )
66  { recordDimName = useRecordDimName; }
67 
69  std::string const useLatLongName,
70  std::string const useLonLongName)
71  {
72  latLongName = useLatLongName;
73  lonLongName = useLonLongName;
74  }
75 
76  std::string const & GetRecordDimName () const { return recordDimName; }
77 
78  void Create (
79  NcFile & ncFile);
80 
81  void Create (
82  NcFile & ncFile,
83  unsigned int const numRecords);
84 
85  virtual ~NcLatLonRecordBase () = 0;
86 
87  protected:
88 
90  short const compressionLevel;
91 
92  private:
93 
94  void CreateCommon (
95  NcFile & ncFile);
96 
97 };
98 
100 
101 
102 } // namespace netcdf
103 
104 #endif // INC_netcdf_NcLatLonRecordBase_h
NcLatLonRecordBase(short const useCompressionLevel=5)
Definition: NcLatLonRecordBase.h:49
std::string recordDimName
Definition: NcLatLonRecordBase.h:89
void SetRecordDimName(std::string const useRecordDimName)
Definition: NcLatLonRecordBase.h:64
short const compressionLevel
Definition: NcLatLonRecordBase.h:90
static char const *const dimNames[]
names of dimensions
Definition: NcLatLonRecordBase.h:60
static char const *const longNames[]
long_names attributes of variables
Definition: NcLatLonRecordBase.h:62
Class providing an interface to a NetCDF file containing a record-based latitude/longitude data...
Definition: NcLatLonRecordBase.h:45
static char const *const varNames[]
names of variables
Definition: NcLatLonRecordBase.h:61
std::string latLongName
Definition: NcLatLonRecordBase.h:89
virtual ~NcLatLonRecordBase()=0
Definition: NcLatLonRecordBase.h:99
void SetLatLonLongNames(std::string const useLatLongName, std::string const useLonLongName)
Definition: NcLatLonRecordBase.h:68
std::string lonLongName
Definition: NcLatLonRecordBase.h:89
Manages the opening, creating, and closing of netCDF files. Represents the netCDF root group...
Definition: NcFile.h:31
void Create(NcFile &ncFile)
Definition: NcLatLonRecordBase.cpp:72
std::string const & GetRecordDimName() const
Definition: NcLatLonRecordBase.h:76