ocssw V2020
dataset.h
Go to the documentation of this file.
1 /*
2  * dataset.cpp
3  *
4  * Created on: Dec 20, 2019
5  * Author: Sam Anderson
6  */
7 
8 #ifndef INCLUDE_DATASET_H_
9 #define INCLUDE_DATASET_H_
10 
11 #include <string>
12 #include <vector>
13 #include <netcdf>
14 using namespace std;
15 using namespace netCDF;
16 
17 enum class dtype
18 {
19  BYTE = NC_BYTE,
20  CHAR = NC_CHAR,
21  SHORT = NC_SHORT,
22  INT = NC_INT,
23  FLOAT = NC_FLOAT,
24  DOUBLE = NC_DOUBLE,
25  UBYTE = NC_UBYTE,
26  USHORT = NC_USHORT,
27  UINT = NC_UINT,
28  INT64 = NC_INT64,
29  UINT64 = NC_UINT64,
30  STRING = NC_STRING
31 };
32 
33 class dataset
34 {
35 public:
36  dataset();
37  dataset(const string& name, dtype type, vector<size_t>& dimv, const void* ptr);
38  dataset(const string& name, NcVar& var, const void* ptr);
39  virtual ~dataset();
40 
41  dtype get_type();
42 
43  string name;
45  vector<size_t> dimv;
46  const void* ptr;
47 };
48 
49 
50 
51 #endif
@ STRING
string
@ SHORT
signed 2 byte integer
@ DOUBLE
double precision floating point number
string name
Definition: dataset.h:43
@ UINT64
unsigned 8-byte int
dtype
Definition: dataset.h:17
unsigned char BYTE
Definition: elements.h:4
@ UBYTE
unsigned 1 byte int
const void * ptr
Definition: dataset.h:46
vector< size_t > dimv
Definition: dataset.h:45
@ INT
signed 4 byte integer
@ USHORT
unsigned 2-byte int
but the philosophy of the MODIS L1 routines is that the output granule must be if it contains even a single packet of useable data Some of the spacecraft ancillary data in L0 datasets is available only on a cycle that repeates every seconds MOD_PR01 therefore looks backwards up to for such packets If the seconds preceeding the start of an MOD_PR01 run are covered by a different L0 dataset
Definition: MOD_PR01_pr.txt:33
@ FLOAT
single precision floating point number
@ UINT
unsigned 4-byte int
char * name
Definition: Granule.c:1234
@ INT64
signed 8-byte int
@ CHAR
ISO/ASCII character.
dtype type
Definition: dataset.h:44
int get_type(int32 fileID, const char sdsname[], int32 *dtype)