OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
hdf_bin.h
Go to the documentation of this file.
1 #ifndef hdf_bin_h
2 #define hdf_bin_h
3 
4 #pragma GCC diagnostic ignored "-Wpadded"
5 #include "bin_util.h"
6 #include "meta_l3b.h"
7 #include "L3Shape.h"
8 
9 namespace Hdf {
10 class hdf_bin;
11 
12 hdf_bin* openBinObject(const char* binFileName);
13 
14 class hdf_bin {
15 protected:
16  int32_t n_data_prod;
19 
21 
22  size_t binListPtr;
25 
26 public:
27  hdf_bin();
28  virtual ~hdf_bin();
29 
30  virtual int query();
31  virtual int query(char* product_list);
32  virtual int query(char ***prod_array);
33  virtual int get_prodname(int iprod, char *prodname);
34  virtual void setProductList(int numProducts, char* prodNames[]);
35 
36  virtual const char* getProdName(int prodNum) const;
37  virtual int getProdIndex(const char *prodname) const;
38  virtual const char* getActiveProdName(int prodNum) const;
39 
40  virtual int read(char* product_list);
41 
42  virtual int64_t get_beg() = 0;
43  virtual int get_ext() = 0;
44 
45  virtual int open(const char* l3b_filename) = 0;
46  virtual int create(const char* l3b_filename, int32_t nrows) = 0;
47 
48  virtual int readBinIndex(int row_num_to_read) = 0;
49  virtual int readBinList(int nbins_to_read) = 0;
50  virtual int readBinList(int nbins_to_read, int32_t list_reset_ptr) = 0;
51  virtual int readBinList() = 0;
52 
53  virtual int writeBinList(int32_t nbins_to_write) = 0;
54  virtual int readQual(uint8_t* qual, int32_t nbins_to_read) = 0;
55  virtual int readQual(uint8_t* qual, int32_t nbins_to_read,
56  int32_t row_num_to_read) = 0;
57 
65  virtual int readSums(float* sums, int32_t nbins_to_read, int iprod) = 0;
66  virtual int readSums(float* sums, int32_t* listOfBins,
67  int32_t nbins_to_read, int iprod) = 0;
68  virtual int writeQual(uint8_t* qual, int32_t nbins_to_write) = 0;
69  virtual int writeSums(float* sums, int32_t nbins_to_write,
70  const char *prodname) = 0;
71 
72  virtual int64_t get_numbin(int irow) {
73  return binShape->getNumCols(irow);
74  };
75 
76  virtual int64_t get_basebin(int irow) {
77  return binShape->getBaseBin(irow);
78  };
79 
80  virtual void bin2latlon(int64_t bin_num, float &lat, float &lon) {
81  binShape->bin2latlon(bin_num, lat, lon);
82  }
83 
84  virtual int64_t get_bin_num(int kbin) = 0;
85  virtual int get_nobs(int kbin) = 0;
86  virtual int get_nscenes(int kbin) = 0;
87  virtual float get_weights(int kbin) = 0;
88  virtual float get_time_rec(int kbin) = 0;
89 
90  virtual hid_t get_index_table() = 0;
91  virtual hid_t get_list_table() = 0;
92  virtual hid_t get_data_table(int i) = 0;
93 
94  virtual int clear_binlist() = 0;
95  virtual int copy_binlist(int src, int dest) = 0;
96  virtual int set_bin_num(int offset, int64_t bin_num) = 0;
97  virtual int inc_nobs(int offset, int nobs) = 0;
98  virtual int inc_nscenes(int offset, int nscenes) = 0;
99  virtual int inc_weights(int offset, float weights) = 0;
100  virtual int set_weights(int offset, float weights) = 0;
101  virtual int inc_time_rec(int offset, float time_rec) = 0;
102  virtual bool has_qual() = 0;
103  virtual int setDataPtr(int nbins_to_read) = 0;
104  virtual int setDataPtrAbsolute(int32_t recordNum) = 0;
105  virtual int incNumRec(int n_write) = 0;
106  virtual int close() = 0;
107 
108  virtual int32_t nprod() {
109  return n_data_prod;
110  }
111 
112  virtual int32_t get_list_ptr() {
113  return binListPtr;
114  }
115 
116  virtual int copymeta(int32_t nfiles, Hdf::hdf_bin *input_binfile[]);
117 
118  int64_t totbins;
119  int32_t nrows;
120 
122  int32_t n_data_records;
123  int32_t n_active_prod;
124  bool isHDF5;
125  bool isCDF4;
126  bool hasQual;
127  bool hasNoext;
128 
129  uint32_t deflate;
130 
132 };
133 
134 class hdf4_bin : public hdf_bin {
135  int32_t file_id;
136  int32_t sd_id;
137  int32_t vg_id;
138  int32_t access_mode;
139 
140  int32_t vdata_id[MAXNVDATA];
141  int32_t seagrid_idx;
142  int32_t binindex_idx;
143  int32_t binlist_idx;
144  int32_t bin_ptr;
145  //int32_t list_reset_ptr;
146  int32_t bindata_idx;
147  int32_t binqual_idx;
148 
149  int32_t aid[MAXNPROD];
150 
151  binIndexStruct binIndex;
152  binListStruct *binList;
153 
154 public:
155  hdf4_bin();
156  virtual ~hdf4_bin();
157 
158  int64_t get_beg() {
159  return binIndex.beg;
160  }
161 
162  int get_ext() {
163  return binIndex.ext;
164  }
165 
166  int create(const char* l3b_filename, int32_t nrows);
167  int open(const char* l3b_filename);
168 
169  int readBinIndex(int row_num_to_read);
170 
171  using hdf_bin::read;
172  int read(float* data, binListStruct* binList);
173  int read(float* data, float* var, binListStruct* binList);
174  int read(float* data, binListStruct* binList, int nbins_to_read);
175  int read(float* data, float* var, binListStruct* binList,
176  int nbins_to_read);
177 
178  int readBinList(int nbins_to_read);
179  int readBinList();
180  int readBinList(int nbins_to_read, int32_t list_reset_ptr);
181  int readQual(uint8_t* qual, int32_t nbins_to_read);
182  int readQual(uint8_t* qual, int32_t nbins_to_read, int32_t row_num_to_read);
183 
184  int readSums(float* sums, int32_t nbins_to_read, int iprod);
185  int readSums(float* sums, int32_t* listOfBins, int32_t nbins_to_read,
186  int iprod);
187 
188  int64_t get_bin_num(int kbin) {
189  return binList[kbin].bin_num;
190  }
191 
192  int get_nobs(int kbin) {
193  return binList[kbin].nobs;
194  }
195 
196  int get_nscenes(int kbin) {
197  return binList[kbin].nscenes;
198  }
199 
200  float get_weights(int kbin) {
201  return binList[kbin].weights;
202  }
203 
204  float get_time_rec(int kbin) {
205  return binList[kbin].time_rec;
206  }
207 
208  int set_bin_num(int offset, int64_t bin_num) {
209  binList[offset].bin_num = bin_num;
210  return 0;
211  }
212 
213  int inc_nobs(int offset, int nobs) {
214  binList[offset].nobs += nobs;
215  return 0;
216  }
217 
218  int inc_nscenes(int offset, int nscenes) {
219  binList[offset].nscenes += nscenes;
220  return 0;
221  }
222 
223  int inc_weights(int offset, float weights) {
224  binList[offset].weights += weights;
225  return 0;
226  }
227 
228  int set_weights(int offset, float weights) {
229  binList[offset].weights = weights;
230  return 0;
231  }
232 
233  int inc_time_rec(int offset, float time_rec) {
234  binList[offset].time_rec += time_rec;
235  return 0;
236  }
237 
239  memset(binList, 0, 2 * nrows * sizeof (binListStruct));
240  return 0;
241  }
242 
243  int copy_binlist(int src, int dest) {
244  memcpy(&binList[dest], &binList[src], sizeof (binListStruct));
245  return 0;
246  }
247 
248  int write(char *product_list, int32_t nwrite, float *data,
249  binListStruct* binList);
250  int writeBinList(int32_t nbins_to_write);
251  int writeQual(uint8_t* qual, int32_t nbins_to_write);
252  int writeSums(float* sums, int32_t nbins_to_write, const char *prodname);
253 
254  int copy(char *product_list, int32_t nwrite, int32_t*binsToCopy,
255  Hdf::binListStruct *inBinList,
256  Hdf::hdf4_bin *input_binfile);
257 
258  int close();
259 
260  bool has_qual();
261 
262  int setDataPtr(int nbins_to_read) {
263  return 0;
264  }
265  int setDataPtrAbsolute(int32_t recordNum);
266 
267  int incNumRec(int n_write) {
268  return 0;
269  }
270 
271  hid_t get_index_table() {
272  return 0;
273  }
274 
275  hid_t get_list_table() {
276  return 0;
277  }
278 
279  hid_t get_data_table(int i) {
280  return 0;
281  }
282 
283  int32_t noext;
284 
285 };
286 
287 class hdf5_bin : public hdf_bin {
288  hid_t h5fid;
289  hid_t grp0, grp1;
290  hid_t access_mode;
291 
292  int32_t n_datasets;
293  hid_t h5table_id[3][MAXNPROD];
294 
295  int32_t bindata_idx;
296  int32_t binlist_idx;
297  int32_t binindex_idx;
298 
299  binIndexStruct binIndex;
300  binListStruct_hdf5 *binList;
301 
302 public:
303  hdf5_bin();
304  ~hdf5_bin();
305 
306  int64_t get_beg() {
307  return binIndex.beg;
308  }
309 
310  int get_ext() {
311  return binIndex.ext;
312  }
313 
314  int open(const char* l3b_filename);
315  int create(const char* l3b_filename, int32_t nrows);
316 
317  int readBinIndex(int row_num_to_read);
318  int readBinList(int nbins_to_read);
319  int readBinList(int nbins_to_read, int32_t list_reset_ptr);
320  int readBinList();
321 
322  int readQual(unsigned char* qual, int32_t nbins_to_read);
323  int readQual(unsigned char* qual, int32_t nbins_to_read,
324  int32_t row_num_to_read);
325  int readSums(float* sums, int32_t nbins_to_read, int iprod);
326  int readSums(float* sums, int32_t* listOfBins, int32_t nbins_to_read,
327  int iprod);
328 
329  int writeBinList(int32_t nbins_to_write);
330 
331  int writeSums(float* sums, int32_t nbins_to_write, const char *prodname);
332 
333  int writeQual(uint8_t* qual, int32_t nbins_to_write) {
334  return 0;
335  }
336 
337  int write(const char *product_list, hsize_t nwrite, float *data,
338  binListStruct_hdf5* binList);
339  int close();
340 
341  bool has_qual() {
342  return false;
343  }
344 
345  hid_t get_index_table() {
346  return h5table_id[0][binindex_idx];
347  }
348 
349  hid_t get_list_table() {
350  return h5table_id[0][binlist_idx];
351  }
352 
353  hid_t get_data_table(int i) {
354  return h5table_id[0][bindata_idx + i];
355  }
356 
357  hid_t get_grp0() {
358  return grp0;
359  }
360 
361  int64_t get_bin_num(int kbin) {
362  return binList[kbin].bin_num;
363  }
364 
365  int get_nobs(int kbin) {
366  return binList[kbin].nobs;
367  }
368 
369  int get_nscenes(int kbin) {
370  return binList[kbin].nscenes;
371  }
372 
373  float get_weights(int kbin) {
374  return binList[kbin].weights;
375  }
376 
377  float get_time_rec(int kbin) {
378  return 0.0;
379  }
380 
381  int set_bin_num(int offset, int64_t bin_num) {
382  binList[offset].bin_num = bin_num;
383  return 0;
384  }
385 
386  int inc_nobs(int offset, int nobs) {
387  binList[offset].nobs += nobs;
388  return 0;
389  }
390 
391  int inc_nscenes(int offset, int nscenes) {
392  binList[offset].nscenes += nscenes;
393  return 0;
394  }
395 
396  int inc_weights(int offset, float weights) {
397  binList[offset].weights += weights;
398  return 0;
399  }
400 
401  int set_weights(int offset, float weights) {
402  binList[offset].weights = weights;
403  return 0;
404  }
405 
406  int inc_time_rec(int offset, float time_rec) {
407  return 0;
408  }
409 
411  memset(binList, 0, 2 * nrows * sizeof (binListStruct_hdf5));
412  return 0;
413  }
414 
415  int copy_binlist(int src, int dest) {
416  memcpy(&binList[dest], &binList[src], sizeof (binListStruct_hdf5));
417  return 0;
418  }
419 
420  int setDataPtr(int nbins_to_read) {
421  binDataPtr += nbins_to_read;
422  return 0;
423  }
424 
425  int setDataPtrAbsolute(int32_t recordNum) {
426  binDataPtr = recordNum;
427  return 0;
428  }
429 
430  int incNumRec(int n_write) {
431  n_data_records += n_write;
432  return 0;
433  }
434 
435  hsize_t binDataPtr;
436 };
437 
438 class cdf4_bin : public hdf_bin {
439  bool is64bit;
440  int ncid;
441  int grp0, grp1;
442  int access_mode;
443 
444  int n_datasets;
445 
446  int bindata_idx;
447  int binqual_idx;
448  int binlist_idx;
449  int binindex_idx;
450 
451  size_t binDataPtr;
452  size_t binQualityPtr;
453 
454  binIndexStruct_cdf4 binIndex;
455  binListStruct_cdf4 *binList;
456 
457  binIndexStruct64_cdf4 binIndex64;
458  binListStruct64_cdf4 *binList64;
459 
460 public:
461  cdf4_bin();
462  ~cdf4_bin();
463 
464  int64_t get_beg() {
465  if(is64bit)
466  return binIndex64.beg;
467  else
468  return binIndex.beg;
469  }
470 
471  int get_ext() {
472  if(is64bit)
473  return binIndex64.ext;
474  else
475  return binIndex.ext;
476  }
477 
478  int open(const char* l3b_filename);
479  int create(const char* l3b_filename, int32_t nrows);
480 
481  int readBinIndex(int row_num_to_read);
482  int readBinList(int nbins_to_read);
483  int readBinList(int nbins_to_read, int32_t list_reset_ptr);
484  int readBinList();
485 
486  int readQual(unsigned char* qual, int32_t nbins_to_read);
487  int readQual(unsigned char* qual, int32_t nbins_to_read,
488  int32_t row_num_to_read);
489  int readSums(float* sums, int32_t nbins_to_read, int iprod);
490  int readSums(float* sums, int32_t* listOfBins, int32_t nbins_to_read,
491  int iprod);
492 
493  int writeBinList(int32_t nbins_to_write);
494 
495  int writeSums(float* sums, int32_t nbins_to_write, const char *prodname);
496  int writeQual(uint8_t* qual, int32_t nbins_to_write);
497 
498  int write(const char *product_list, hsize_t nwrite, float *data,
499  binListStruct_cdf4* binList);
500  int close();
501 
502  bool has_qual();
503 
504  hid_t get_grp0() {
505  return grp0;
506  }
507 
508  hid_t get_index_table() {
509  return 0;
510  }
511 
512  hid_t get_list_table() {
513  return 0;
514  }
515 
516  hid_t get_data_table(int i) {
517  return 0;
518  }
519 
520  int64_t get_bin_num(int kbin) {
521  if(is64bit)
522  return binList64[kbin].bin_num;
523  else
524  return binList[kbin].bin_num;
525  }
526 
527  int get_nobs(int kbin) {
528  if(is64bit)
529  return binList64[kbin].nobs;
530  else
531  return binList[kbin].nobs;
532  }
533 
534  int get_nscenes(int kbin) {
535  if(is64bit)
536  return binList64[kbin].nscenes;
537  else
538  return binList[kbin].nscenes;
539  }
540 
541  float get_weights(int kbin) {
542  if(is64bit)
543  return binList64[kbin].weights;
544  else
545  return binList[kbin].weights;
546  }
547 
548  float get_time_rec(int kbin) {
549  if(is64bit)
550  return binList64[kbin].time_rec;
551  else
552  return binList[kbin].time_rec;
553  }
554 
555  int set_bin_num(int offset, int64_t bin_num) {
556  if(is64bit)
557  binList64[offset].bin_num = bin_num;
558  else
559  binList[offset].bin_num = bin_num;
560  return 0;
561  }
562 
563  int inc_nobs(int offset, int nobs) {
564  if(is64bit)
565  binList64[offset].nobs += nobs;
566  else
567  binList[offset].nobs += nobs;
568  return 0;
569  }
570 
571  int inc_nscenes(int offset, int nscenes) {
572  if(is64bit)
573  binList64[offset].nscenes += nscenes;
574  else
575  binList[offset].nscenes += nscenes;
576  return 0;
577  }
578 
579  int inc_weights(int offset, float weights) {
580  if(is64bit)
581  binList64[offset].weights += weights;
582  else
583  binList[offset].weights += weights;
584  return 0;
585  }
586 
587  int set_weights(int offset, float weights) {
588  if(is64bit)
589  binList64[offset].weights = weights;
590  else
591  binList[offset].weights = weights;
592  return 0;
593  }
594 
595  int inc_time_rec(int offset, float time_rec) {
596  if(is64bit)
597  binList64[offset].time_rec += time_rec;
598  else
599  binList[offset].time_rec += time_rec;
600  return 0;
601  }
602 
604  if(is64bit)
605  memset(binList64, 0, 2 * nrows * sizeof (binListStruct64_cdf4));
606  else
607  memset(binList, 0, 2 * nrows * sizeof (binListStruct_cdf4));
608  return 0;
609  }
610 
611  int copy_binlist(int src, int dest) {
612  if(is64bit)
613  memcpy(&binList64[dest], &binList64[src], sizeof (binListStruct64_cdf4));
614  else
615  memcpy(&binList[dest], &binList[src], sizeof (binListStruct_cdf4));
616  return 0;
617  }
618 
619  int setDataPtr(int nbins_to_read) {
620  binDataPtr += nbins_to_read;
621  return 0;
622  }
623 
624  int setDataPtrAbsolute(int32_t recordNum) {
625  binDataPtr = recordNum;
626  return 0;
627  }
628 
629  int incNumRec(int n_write) {
630  n_data_records += n_write;
631  return 0;
632  }
633 
634 };
635 
636 }
637 
638 #endif
hid_t get_list_table()
Definition: hdf_bin.h:512
virtual int64_t get_bin_num(int kbin)=0
int set_bin_num(int offset, int64_t bin_num)
Definition: hdf_bin.h:208
int incNumRec(int n_write)
Definition: hdf_bin.h:267
virtual int get_nobs(int kbin)=0
virtual void bin2latlon(int64_t bin_num, float &lat, float &lon)
Definition: hdf_bin.h:80
int inc_weights(int offset, float weights)
Definition: hdf_bin.h:223
virtual int32_t get_list_ptr()
Definition: hdf_bin.h:112
int writeQual(uint8_t *qual, int32_t nbins_to_write)
Definition: hdf_bin.h:333
int readSums(float *sums, int32_t nbins_to_read, int iprod)
Definition: bin_io.cpp:2448
size_t binListPtr
Definition: hdf_bin.h:22
Definition: bin_io.cpp:23
int set_weights(int offset, float weights)
Definition: hdf_bin.h:587
int32_t bin_num
Definition: bin_util.h:55
virtual const char * getActiveProdName(int prodNum) const
Definition: bin_io.cpp:2858
virtual bool has_qual()=0
int copy_binlist(int src, int dest)
Definition: hdf_bin.h:243
int write(char *product_list, int32_t nwrite, float *data, binListStruct *binList)
Definition: bin_io.cpp:608
virtual int32_t getNumCols(int32_t row) const =0
virtual int readSums(float *sums, int32_t nbins_to_read, int iprod)=0
virtual ~hdf_bin()
Definition: bin_io.cpp:100
virtual hid_t get_index_table()=0
int64_t get_bin_num(int kbin)
Definition: hdf_bin.h:188
virtual void setProductList(int numProducts, char *prodNames[])
Definition: bin_io.cpp:2807
int setDataPtr(int nbins_to_read)
Definition: hdf_bin.h:619
float get_weights(int kbin)
Definition: hdf_bin.h:200
bool has_qual()
Definition: bin_io.cpp:2749
int64_t get_beg()
Definition: hdf_bin.h:158
int create(const char *l3b_filename, int32_t nrows)
Definition: bin_io.cpp:1147
int copy_binlist(int src, int dest)
Definition: hdf_bin.h:611
int readBinList()
Definition: bin_io.cpp:2363
char proddata_name[MAXNPROD][80]
Definition: hdf_bin.h:17
int16_t time_rec
Definition: bin_util.h:58
int clear_binlist()
Definition: hdf_bin.h:603
int writeBinList(int32_t nbins_to_write)
Definition: bin_io.cpp:855
int16_t * qual
Definition: l2bin.cpp:86
virtual int inc_weights(int offset, float weights)=0
int inc_time_rec(int offset, float time_rec)
Definition: hdf_bin.h:595
hsize_t binDataPtr
Definition: hdf_bin.h:435
hdf_bin * openBinObject(const char *binFileName)
Definition: bin_io.cpp:32
int64_t get_bin_num(int kbin)
Definition: hdf_bin.h:361
int inc_nobs(int offset, int nobs)
Definition: hdf_bin.h:213
int64_t get_bin_num(int kbin)
Definition: hdf_bin.h:520
virtual int create(const char *l3b_filename, int32_t nrows)=0
int inc_weights(int offset, float weights)
Definition: hdf_bin.h:579
int writeBinList(int32_t nbins_to_write)
Definition: bin_io.cpp:2506
float * lat
float get_weights(int kbin)
Definition: hdf_bin.h:373
virtual int close()=0
virtual int64_t get_numbin(int irow)
Definition: hdf_bin.h:72
int writeQual(uint8_t *qual, int32_t nbins_to_write)
Definition: bin_io.cpp:883
bool active_data_prod[MAXNVDATA]
Definition: hdf_bin.h:121
virtual int64_t get_beg()=0
virtual int copy_binlist(int src, int dest)=0
int lastNumBins
Definition: hdf_bin.h:24
virtual int get_nscenes(int kbin)=0
int set_bin_num(int offset, int64_t bin_num)
Definition: hdf_bin.h:381
hid_t get_grp0()
Definition: hdf_bin.h:504
l3::L3Shape * binShape
Definition: hdf_bin.h:20
int32_t nobs
Definition: atrem_cor.h:93
int32_t n_data_prod
Definition: hdf_bin.h:16
int get_ext()
Definition: hdf_bin.h:310
hid_t get_list_table()
Definition: hdf_bin.h:275
int inc_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:571
virtual int readQual(uint8_t *qual, int32_t nbins_to_read)=0
int set_bin_num(int offset, int64_t bin_num)
Definition: hdf_bin.h:555
int readBinIndex(int row_num_to_read)
Definition: bin_io.cpp:2344
hid_t get_data_table(int i)
Definition: hdf_bin.h:516
int writeQual(uint8_t *qual, int32_t nbins_to_write)
Definition: bin_io.cpp:2516
int setDataPtrAbsolute(int32_t recordNum)
Definition: hdf_bin.h:624
virtual int getProdIndex(const char *prodname) const
Definition: bin_io.cpp:2842
virtual int get_ext()=0
virtual int query()
Definition: bin_io.cpp:2764
#define MAXNPROD
Definition: bin_util.h:20
bool hasNoext
Definition: hdf_bin.h:127
int inc_nobs(int offset, int nobs)
Definition: hdf_bin.h:563
int inc_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:218
virtual hid_t get_list_table()=0
int writeBinList(int32_t nbins_to_write)
Definition: bin_io.cpp:1780
hid_t get_data_table(int i)
Definition: hdf_bin.h:279
int get_nobs(int kbin)
Definition: hdf_bin.h:192
virtual int set_weights(int offset, float weights)=0
virtual int copymeta(int32_t nfiles, Hdf::hdf_bin *input_binfile[])
Definition: bin_io.cpp:2874
int write(const char *product_list, hsize_t nwrite, float *data, binListStruct_hdf5 *binList)
Definition: bin_io.cpp:1595
hid_t get_list_table()
Definition: hdf_bin.h:349
int64_t get_beg()
Definition: hdf_bin.h:306
virtual int64_t get_basebin(int irow)
Definition: hdf_bin.h:76
int create(const char *l3b_filename, int32_t nrows)
Definition: bin_io.cpp:160
int32_t n_active_prod
Definition: hdf_bin.h:123
int readQual(uint8_t *qual, int32_t nbins_to_read)
Definition: bin_io.cpp:746
int setDataPtr(int nbins_to_read)
Definition: hdf_bin.h:262
int32_t nrows
Definition: hdf_bin.h:119
int16_t nscenes
Definition: bin_util.h:57
hid_t get_index_table()
Definition: hdf_bin.h:345
float get_time_rec(int kbin)
Definition: hdf_bin.h:548
int readQual(unsigned char *qual, int32_t nbins_to_read)
Definition: bin_io.cpp:1450
int write(const char *product_list, hsize_t nwrite, float *data, binListStruct_cdf4 *binList)
Definition: bin_io.cpp:2501
virtual int32_t nprod()
Definition: hdf_bin.h:108
int incNumRec(int n_write)
Definition: hdf_bin.h:629
int inc_time_rec(int offset, float time_rec)
Definition: hdf_bin.h:233
int inc_nobs(int offset, int nobs)
Definition: hdf_bin.h:386
int get_nobs(int kbin)
Definition: hdf_bin.h:527
int set_weights(int offset, float weights)
Definition: hdf_bin.h:228
int readBinList()
Definition: bin_io.cpp:1443
int readSums(float *sums, int32_t nbins_to_read, int iprod)
Definition: bin_io.cpp:778
virtual int setDataPtrAbsolute(int32_t recordNum)=0
virtual int64_t getBaseBin(int32_t row) const =0
bool hasQual
Definition: hdf_bin.h:126
meta_l3bType meta_l3b
Definition: hdf_bin.h:131
int setDataPtr(int nbins_to_read)
Definition: hdf_bin.h:420
virtual void bin2latlon(int64_t bin, double &lat, double &lon)
Definition: L3Shape.cpp:99
int get_nobs(int kbin)
Definition: hdf_bin.h:365
virtual int open(const char *l3b_filename)=0
int copy(char *product_list, int32_t nwrite, int32_t *binsToCopy, Hdf::binListStruct *inBinList, Hdf::hdf4_bin *input_binfile)
Definition: bin_io.cpp:673
int readQual(unsigned char *qual, int32_t nbins_to_read)
Definition: bin_io.cpp:2408
bool isCDF4
Definition: hdf_bin.h:125
virtual int incNumRec(int n_write)=0
int setDataPtrAbsolute(int32_t recordNum)
Definition: bin_io.cpp:847
virtual int writeSums(float *sums, int32_t nbins_to_write, const char *prodname)=0
virtual int setDataPtr(int nbins_to_read)=0
hid_t get_index_table()
Definition: hdf_bin.h:508
virtual float get_time_rec(int kbin)=0
int open(const char *l3b_filename)
Definition: bin_io.cpp:1172
virtual int readBinList()=0
float get_weights(int kbin)
Definition: hdf_bin.h:541
int get_ext()
Definition: hdf_bin.h:162
bool has_qual()
Definition: bin_io.cpp:1135
int get_nscenes(int kbin)
Definition: hdf_bin.h:369
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
Definition: HISTORY.txt:356
float get_time_rec(int kbin)
Definition: hdf_bin.h:377
int readBinList()
Definition: bin_io.cpp:568
int incNumRec(int n_write)
Definition: hdf_bin.h:430
int inc_weights(int offset, float weights)
Definition: hdf_bin.h:396
int open(const char *l3b_filename)
Definition: bin_io.cpp:233
int get_nscenes(int kbin)
Definition: hdf_bin.h:534
int get_ext()
Definition: hdf_bin.h:471
int inc_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:391
int readBinIndex(int row_num_to_read)
Definition: bin_io.cpp:333
virtual int get_prodname(int iprod, char *prodname)
Definition: bin_io.cpp:2802
int clear_binlist()
Definition: hdf_bin.h:410
char * product_array[MAXNPROD]
Definition: hdf_bin.h:18
int writeSums(float *sums, int32_t nbins_to_write, const char *prodname)
Definition: bin_io.cpp:2523
virtual const char * getProdName(int prodNum) const
Definition: bin_io.cpp:2831
virtual int inc_nobs(int offset, int nobs)=0
virtual hid_t get_data_table(int i)=0
int read(float *data, binListStruct *binList)
Definition: bin_io.cpp:590
int open(const char *l3b_filename)
Definition: bin_io.cpp:2247
bool isHDF5
Definition: hdf_bin.h:124
hid_t get_data_table(int i)
Definition: hdf_bin.h:353
int16_t * nscenes
Definition: l2bin.cpp:86
int64_t get_beg()
Definition: hdf_bin.h:464
int32_t noext
Definition: hdf_bin.h:283
#define MAXNVDATA
int clear_binlist()
Definition: hdf_bin.h:238
float * lon
virtual int set_bin_num(int offset, int64_t bin_num)=0
virtual int clear_binlist()=0
int64_t totbins
Definition: hdf_bin.h:118
int set_weights(int offset, float weights)
Definition: hdf_bin.h:401
int readSums(float *sums, int32_t nbins_to_read, int iprod)
Definition: bin_io.cpp:1463
hid_t get_index_table()
Definition: hdf_bin.h:271
virtual int read(char *product_list)
Definition: bin_io.cpp:358
int writeSums(float *sums, int32_t nbins_to_write, const char *prodname)
Definition: bin_io.cpp:905
size_t lastBinListPtr
Definition: hdf_bin.h:23
int32_t n_data_records
Definition: hdf_bin.h:122
virtual int readBinIndex(int row_num_to_read)=0
int readBinIndex(int row_num_to_read)
Definition: bin_io.cpp:1312
l2prod offset
virtual int inc_time_rec(int offset, float time_rec)=0
int inc_time_rec(int offset, float time_rec)
Definition: hdf_bin.h:406
int setDataPtrAbsolute(int32_t recordNum)
Definition: hdf_bin.h:425
int i
Definition: decode_rs.h:71
hid_t get_grp0()
Definition: hdf_bin.h:357
int writeSums(float *sums, int32_t nbins_to_write, const char *prodname)
Definition: bin_io.cpp:1866
virtual int writeQual(uint8_t *qual, int32_t nbins_to_write)=0
int get_nscenes(int kbin)
Definition: hdf_bin.h:196
virtual int inc_nscenes(int offset, int nscenes)=0
int close()
Definition: bin_io.cpp:951
int copy_binlist(int src, int dest)
Definition: hdf_bin.h:415
uint32_t deflate
Definition: hdf_bin.h:129
virtual ~hdf4_bin()
Definition: bin_io.cpp:118
bool has_qual()
Definition: hdf_bin.h:341
virtual float get_weights(int kbin)=0
virtual int writeBinList(int32_t nbins_to_write)=0
float get_time_rec(int kbin)
Definition: hdf_bin.h:204
int create(const char *l3b_filename, int32_t nrows)
Definition: bin_io.cpp:2192