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 set_nobs(int offset, int nobs) = 0;
99  virtual int inc_nscenes(int offset, int nscenes) = 0;
100  virtual int set_nscenes(int offset, int nscenes) = 0;
101  virtual int inc_weights(int offset, float weights) = 0;
102  virtual int set_weights(int offset, float weights) = 0;
103  virtual int inc_time_rec(int offset, float time_rec) = 0;
104  virtual bool has_qual() = 0;
105  virtual int setDataPtr(int nbins_to_read) = 0;
106  virtual int setDataPtrAbsolute(int32_t recordNum) = 0;
107  virtual int incNumRec(int n_write) = 0;
108  virtual int close() = 0;
109 
110  virtual int32_t nprod() {
111  return n_data_prod;
112  }
113 
114  virtual int32_t get_list_ptr() {
115  return binListPtr;
116  }
117 
118  virtual int copymeta(int32_t nfiles, Hdf::hdf_bin *input_binfile[]);
119 
120  int64_t totbins;
121  int32_t nrows;
122 
124  int32_t n_data_records;
125  int32_t n_active_prod;
126  bool isHDF5;
127  bool isCDF4;
128  bool hasQual;
129  bool hasNoext;
130 
131  uint32_t deflate;
132 
134 };
135 
136 class hdf4_bin : public hdf_bin {
137  int32_t file_id;
138  int32_t sd_id;
139  int32_t vg_id;
140  int32_t access_mode;
141 
142  int32_t vdata_id[MAXNVDATA];
143  int32_t seagrid_idx;
144  int32_t binindex_idx;
145  int32_t binlist_idx;
146  int32_t bin_ptr;
147  //int32_t list_reset_ptr;
148  int32_t bindata_idx;
149  int32_t binqual_idx;
150 
151  int32_t aid[MAXNPROD];
152 
153  binIndexStruct binIndex;
154  binListStruct *binList;
155 
156 public:
157  hdf4_bin();
158  virtual ~hdf4_bin();
159 
160  int64_t get_beg() {
161  return binIndex.beg;
162  }
163 
164  int get_ext() {
165  return binIndex.ext;
166  }
167 
168  int create(const char* l3b_filename, int32_t nrows);
169  int open(const char* l3b_filename);
170 
171  int readBinIndex(int row_num_to_read);
172 
173  using hdf_bin::read;
174  int read(float* data, binListStruct* binList);
175  int read(float* data, float* var, binListStruct* binList);
176  int read(float* data, binListStruct* binList, int nbins_to_read);
177  int read(float* data, float* var, binListStruct* binList,
178  int nbins_to_read);
179 
180  int readBinList(int nbins_to_read);
181  int readBinList();
182  int readBinList(int nbins_to_read, int32_t list_reset_ptr);
183  int readQual(uint8_t* qual, int32_t nbins_to_read);
184  int readQual(uint8_t* qual, int32_t nbins_to_read, int32_t row_num_to_read);
185 
186  int readSums(float* sums, int32_t nbins_to_read, int iprod);
187  int readSums(float* sums, int32_t* listOfBins, int32_t nbins_to_read,
188  int iprod);
189 
190  int64_t get_bin_num(int kbin) {
191  return binList[kbin].bin_num;
192  }
193 
194  int get_nobs(int kbin) {
195  return binList[kbin].nobs;
196  }
197 
198  int get_nscenes(int kbin) {
199  return binList[kbin].nscenes;
200  }
201 
202  float get_weights(int kbin) {
203  return binList[kbin].weights;
204  }
205 
206  float get_time_rec(int kbin) {
207  return binList[kbin].time_rec;
208  }
209 
210  int set_bin_num(int offset, int64_t bin_num) {
211  binList[offset].bin_num = bin_num;
212  return 0;
213  }
214 
215  int inc_nobs(int offset, int nobs) {
216  binList[offset].nobs += nobs;
217  return 0;
218  }
219 
220  int set_nobs(int offset, int nobs) {
221  binList[offset].nobs = nobs;
222  return 0;
223  }
224 
225  int inc_nscenes(int offset, int nscenes) {
226  binList[offset].nscenes += nscenes;
227  return 0;
228  }
229 
230  int set_nscenes(int offset, int nscenes) {
231  binList[offset].nscenes = nscenes;
232  return 0;
233  }
234 
235  int inc_weights(int offset, float weights) {
236  binList[offset].weights += weights;
237  return 0;
238  }
239 
240  int set_weights(int offset, float weights) {
241  binList[offset].weights = weights;
242  return 0;
243  }
244 
245  int inc_time_rec(int offset, float time_rec) {
246  binList[offset].time_rec += time_rec;
247  return 0;
248  }
249 
251  memset(binList, 0, 2 * nrows * sizeof (binListStruct));
252  return 0;
253  }
254 
255  int copy_binlist(int src, int dest) {
256  memcpy(&binList[dest], &binList[src], sizeof (binListStruct));
257  return 0;
258  }
259 
260  int write(char *product_list, int32_t nwrite, float *data,
261  binListStruct* binList);
262  int writeBinList(int32_t nbins_to_write);
263  int writeQual(uint8_t* qual, int32_t nbins_to_write);
264  int writeSums(float* sums, int32_t nbins_to_write, const char *prodname);
265 
266  int copy(char *product_list, int32_t nwrite, int32_t*binsToCopy,
267  Hdf::binListStruct *inBinList,
268  Hdf::hdf4_bin *input_binfile);
269 
270  int close();
271 
272  bool has_qual();
273 
274  int setDataPtr(int nbins_to_read) {
275  return 0;
276  }
277  int setDataPtrAbsolute(int32_t recordNum);
278 
279  int incNumRec(int n_write) {
280  return 0;
281  }
282 
283  hid_t get_index_table() {
284  return 0;
285  }
286 
287  hid_t get_list_table() {
288  return 0;
289  }
290 
291  hid_t get_data_table(int i) {
292  return 0;
293  }
294 
295  int32_t noext;
296 
297 };
298 
299 class hdf5_bin : public hdf_bin {
300  hid_t h5fid;
301  hid_t grp0, grp1;
302  hid_t access_mode;
303 
304  int32_t n_datasets;
305  hid_t h5table_id[3][MAXNPROD];
306 
307  int32_t bindata_idx;
308  int32_t binlist_idx;
309  int32_t binindex_idx;
310 
311  binIndexStruct binIndex;
312  binListStruct_hdf5 *binList;
313 
314 public:
315  hdf5_bin();
316  ~hdf5_bin();
317 
318  int64_t get_beg() {
319  return binIndex.beg;
320  }
321 
322  int get_ext() {
323  return binIndex.ext;
324  }
325 
326  int open(const char* l3b_filename);
327  int create(const char* l3b_filename, int32_t nrows);
328 
329  int readBinIndex(int row_num_to_read);
330  int readBinList(int nbins_to_read);
331  int readBinList(int nbins_to_read, int32_t list_reset_ptr);
332  int readBinList();
333 
334  int readQual(unsigned char* qual, int32_t nbins_to_read);
335  int readQual(unsigned char* qual, int32_t nbins_to_read,
336  int32_t row_num_to_read);
337  int readSums(float* sums, int32_t nbins_to_read, int iprod);
338  int readSums(float* sums, int32_t* listOfBins, int32_t nbins_to_read,
339  int iprod);
340 
341  int writeBinList(int32_t nbins_to_write);
342 
343  int writeSums(float* sums, int32_t nbins_to_write, const char *prodname);
344 
345  int writeQual(uint8_t* qual, int32_t nbins_to_write) {
346  return 0;
347  }
348 
349  int write(const char *product_list, hsize_t nwrite, float *data,
350  binListStruct_hdf5* binList);
351  int close();
352 
353  bool has_qual() {
354  return false;
355  }
356 
357  hid_t get_index_table() {
358  return h5table_id[0][binindex_idx];
359  }
360 
361  hid_t get_list_table() {
362  return h5table_id[0][binlist_idx];
363  }
364 
365  hid_t get_data_table(int i) {
366  return h5table_id[0][bindata_idx + i];
367  }
368 
369  hid_t get_grp0() {
370  return grp0;
371  }
372 
373  int64_t get_bin_num(int kbin) {
374  return binList[kbin].bin_num;
375  }
376 
377  int get_nobs(int kbin) {
378  return binList[kbin].nobs;
379  }
380 
381  int get_nscenes(int kbin) {
382  return binList[kbin].nscenes;
383  }
384 
385  float get_weights(int kbin) {
386  return binList[kbin].weights;
387  }
388 
389  float get_time_rec(int kbin) {
390  return 0.0;
391  }
392 
393  int set_bin_num(int offset, int64_t bin_num) {
394  binList[offset].bin_num = bin_num;
395  return 0;
396  }
397 
398  int inc_nobs(int offset, int nobs) {
399  binList[offset].nobs += nobs;
400  return 0;
401  }
402 
403  int set_nobs(int offset, int nobs) {
404  binList[offset].nobs = nobs;
405  return 0;
406  }
407 
408  int inc_nscenes(int offset, int nscenes) {
409  binList[offset].nscenes += nscenes;
410  return 0;
411  }
412 
413  int set_nscenes(int offset, int nscenes) {
414  binList[offset].nscenes = nscenes;
415  return 0;
416  }
417 
418  int inc_weights(int offset, float weights) {
419  binList[offset].weights += weights;
420  return 0;
421  }
422 
423  int set_weights(int offset, float weights) {
424  binList[offset].weights = weights;
425  return 0;
426  }
427 
428  int inc_time_rec(int offset, float time_rec) {
429  return 0;
430  }
431 
433  memset(binList, 0, 2 * nrows * sizeof (binListStruct_hdf5));
434  return 0;
435  }
436 
437  int copy_binlist(int src, int dest) {
438  memcpy(&binList[dest], &binList[src], sizeof (binListStruct_hdf5));
439  return 0;
440  }
441 
442  int setDataPtr(int nbins_to_read) {
443  binDataPtr += nbins_to_read;
444  return 0;
445  }
446 
447  int setDataPtrAbsolute(int32_t recordNum) {
448  binDataPtr = recordNum;
449  return 0;
450  }
451 
452  int incNumRec(int n_write) {
453  n_data_records += n_write;
454  return 0;
455  }
456 
457  hsize_t binDataPtr;
458 };
459 
460 class cdf4_bin : public hdf_bin {
461  bool is64bit;
462  int ncid;
463  int grp0, grp1;
464  int access_mode;
465 
466  int n_datasets;
467 
468  int bindata_idx;
469  int binqual_idx;
470  int binlist_idx;
471  int binindex_idx;
472 
473  size_t binDataPtr;
474  size_t binQualityPtr;
475 
476  binIndexStruct_cdf4 binIndex;
477  binListStruct_cdf4 *binList;
478 
479  binIndexStruct64_cdf4 binIndex64;
480  binListStruct64_cdf4 *binList64;
481 
482 public:
483  cdf4_bin();
484  ~cdf4_bin();
485 
486  int64_t get_beg() {
487  if(is64bit)
488  return binIndex64.beg;
489  else
490  return binIndex.beg;
491  }
492 
493  int get_ext() {
494  if(is64bit)
495  return binIndex64.ext;
496  else
497  return binIndex.ext;
498  }
499 
500  int open(const char* l3b_filename);
501  int create(const char* l3b_filename, int32_t nrows);
502 
503  int readBinIndex(int row_num_to_read);
504  int readBinList(int nbins_to_read);
505  int readBinList(int nbins_to_read, int32_t list_reset_ptr);
506  int readBinList();
507 
508  int readQual(unsigned char* qual, int32_t nbins_to_read);
509  int readQual(unsigned char* qual, int32_t nbins_to_read,
510  int32_t row_num_to_read);
511  int readSums(float* sums, int32_t nbins_to_read, int iprod);
512  int readSums(float* sums, int32_t* listOfBins, int32_t nbins_to_read,
513  int iprod);
514 
515  int writeBinList(int32_t nbins_to_write);
516 
517  int writeSums(float* sums, int32_t nbins_to_write, const char *prodname);
518  int writeQual(uint8_t* qual, int32_t nbins_to_write);
519 
520  int write(const char *product_list, hsize_t nwrite, float *data,
521  binListStruct_cdf4* binList);
522  int close();
523 
524  bool has_qual();
525 
526  hid_t get_grp0() {
527  return grp0;
528  }
529 
530  hid_t get_index_table() {
531  return 0;
532  }
533 
534  hid_t get_list_table() {
535  return 0;
536  }
537 
538  hid_t get_data_table(int i) {
539  return 0;
540  }
541 
542  int64_t get_bin_num(int kbin) {
543  if(is64bit)
544  return binList64[kbin].bin_num;
545  else
546  return binList[kbin].bin_num;
547  }
548 
549  int get_nobs(int kbin) {
550  if(is64bit)
551  return binList64[kbin].nobs;
552  else
553  return binList[kbin].nobs;
554  }
555 
556  int get_nscenes(int kbin) {
557  if(is64bit)
558  return binList64[kbin].nscenes;
559  else
560  return binList[kbin].nscenes;
561  }
562 
563  float get_weights(int kbin) {
564  if(is64bit)
565  return binList64[kbin].weights;
566  else
567  return binList[kbin].weights;
568  }
569 
570  float get_time_rec(int kbin) {
571  if(is64bit)
572  return binList64[kbin].time_rec;
573  else
574  return binList[kbin].time_rec;
575  }
576 
577  int set_bin_num(int offset, int64_t bin_num) {
578  if(is64bit)
579  binList64[offset].bin_num = bin_num;
580  else
581  binList[offset].bin_num = bin_num;
582  return 0;
583  }
584 
585  int inc_nobs(int offset, int nobs) {
586  if(is64bit)
587  binList64[offset].nobs += nobs;
588  else
589  binList[offset].nobs += nobs;
590  return 0;
591  }
592 
593  int set_nobs(int offset, int nobs) {
594  if(is64bit)
595  binList64[offset].nobs = nobs;
596  else
597  binList[offset].nobs = nobs;
598  return 0;
599  }
600 
601  int inc_nscenes(int offset, int nscenes) {
602  if(is64bit)
603  binList64[offset].nscenes += nscenes;
604  else
605  binList[offset].nscenes += nscenes;
606  return 0;
607  }
608 
609  int set_nscenes(int offset, int nscenes) {
610  if(is64bit)
611  binList64[offset].nscenes = nscenes;
612  else
613  binList[offset].nscenes = nscenes;
614  return 0;
615  }
616 
617  int inc_weights(int offset, float weights) {
618  if(is64bit)
619  binList64[offset].weights += weights;
620  else
621  binList[offset].weights += weights;
622  return 0;
623  }
624 
625  int set_weights(int offset, float weights) {
626  if(is64bit)
627  binList64[offset].weights = weights;
628  else
629  binList[offset].weights = weights;
630  return 0;
631  }
632 
633  int inc_time_rec(int offset, float time_rec) {
634  if(is64bit)
635  binList64[offset].time_rec += time_rec;
636  else
637  binList[offset].time_rec += time_rec;
638  return 0;
639  }
640 
642  if(is64bit)
643  memset(binList64, 0, 2 * nrows * sizeof (binListStruct64_cdf4));
644  else
645  memset(binList, 0, 2 * nrows * sizeof (binListStruct_cdf4));
646  return 0;
647  }
648 
649  int copy_binlist(int src, int dest) {
650  if(is64bit)
651  memcpy(&binList64[dest], &binList64[src], sizeof (binListStruct64_cdf4));
652  else
653  memcpy(&binList[dest], &binList[src], sizeof (binListStruct_cdf4));
654  return 0;
655  }
656 
657  int setDataPtr(int nbins_to_read) {
658  binDataPtr += nbins_to_read;
659  return 0;
660  }
661 
662  int setDataPtrAbsolute(int32_t recordNum) {
663  binDataPtr = recordNum;
664  return 0;
665  }
666 
667  int incNumRec(int n_write) {
668  n_data_records += n_write;
669  return 0;
670  }
671 
672 };
673 
674 }
675 
676 #endif
hid_t get_list_table()
Definition: hdf_bin.h:534
virtual int64_t get_bin_num(int kbin)=0
int set_bin_num(int offset, int64_t bin_num)
Definition: hdf_bin.h:210
int incNumRec(int n_write)
Definition: hdf_bin.h:279
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:235
virtual int32_t get_list_ptr()
Definition: hdf_bin.h:114
int writeQual(uint8_t *qual, int32_t nbins_to_write)
Definition: hdf_bin.h:345
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:625
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:255
int write(char *product_list, int32_t nwrite, float *data, binListStruct *binList)
Definition: bin_io.cpp:608
int set_nobs(int offset, int nobs)
Definition: hdf_bin.h:593
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:190
virtual void setProductList(int numProducts, char *prodNames[])
Definition: bin_io.cpp:2807
int setDataPtr(int nbins_to_read)
Definition: hdf_bin.h:657
float get_weights(int kbin)
Definition: hdf_bin.h:202
bool has_qual()
Definition: bin_io.cpp:2749
int64_t get_beg()
Definition: hdf_bin.h:160
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:649
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:641
int writeBinList(int32_t nbins_to_write)
Definition: bin_io.cpp:855
int16_t * qual
Definition: l2bin.cpp:80
virtual int inc_weights(int offset, float weights)=0
int inc_time_rec(int offset, float time_rec)
Definition: hdf_bin.h:633
hsize_t binDataPtr
Definition: hdf_bin.h:457
hdf_bin * openBinObject(const char *binFileName)
Definition: bin_io.cpp:32
int64_t get_bin_num(int kbin)
Definition: hdf_bin.h:373
int inc_nobs(int offset, int nobs)
Definition: hdf_bin.h:215
int64_t get_bin_num(int kbin)
Definition: hdf_bin.h:542
virtual int create(const char *l3b_filename, int32_t nrows)=0
int inc_weights(int offset, float weights)
Definition: hdf_bin.h:617
int writeBinList(int32_t nbins_to_write)
Definition: bin_io.cpp:2506
float get_weights(int kbin)
Definition: hdf_bin.h:385
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:123
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:393
hid_t get_grp0()
Definition: hdf_bin.h:526
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:322
hid_t get_list_table()
Definition: hdf_bin.h:287
int inc_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:601
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:577
int readBinIndex(int row_num_to_read)
Definition: bin_io.cpp:2344
hid_t get_data_table(int i)
Definition: hdf_bin.h:538
int writeQual(uint8_t *qual, int32_t nbins_to_write)
Definition: bin_io.cpp:2516
int setDataPtrAbsolute(int32_t recordNum)
Definition: hdf_bin.h:662
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:129
int inc_nobs(int offset, int nobs)
Definition: hdf_bin.h:585
int inc_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:225
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:291
int get_nobs(int kbin)
Definition: hdf_bin.h:194
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:361
int64_t get_beg()
Definition: hdf_bin.h:318
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:125
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:274
int32_t nrows
Definition: hdf_bin.h:121
int16_t nscenes
Definition: bin_util.h:57
hid_t get_index_table()
Definition: hdf_bin.h:357
float get_time_rec(int kbin)
Definition: hdf_bin.h:570
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:110
int incNumRec(int n_write)
Definition: hdf_bin.h:667
int inc_time_rec(int offset, float time_rec)
Definition: hdf_bin.h:245
int inc_nobs(int offset, int nobs)
Definition: hdf_bin.h:398
int get_nobs(int kbin)
Definition: hdf_bin.h:549
int set_weights(int offset, float weights)
Definition: hdf_bin.h:240
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:128
meta_l3bType meta_l3b
Definition: hdf_bin.h:133
int setDataPtr(int nbins_to_read)
Definition: hdf_bin.h:442
virtual void bin2latlon(int64_t bin, double &lat, double &lon)
Definition: L3Shape.cpp:99
int set_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:609
int get_nobs(int kbin)
Definition: hdf_bin.h:377
int set_nobs(int offset, int nobs)
Definition: hdf_bin.h:220
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:127
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:530
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:563
int get_ext()
Definition: hdf_bin.h:164
bool has_qual()
Definition: bin_io.cpp:1135
int get_nscenes(int kbin)
Definition: hdf_bin.h:381
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:389
int readBinList()
Definition: bin_io.cpp:568
int set_nobs(int offset, int nobs)
Definition: hdf_bin.h:403
int incNumRec(int n_write)
Definition: hdf_bin.h:452
int inc_weights(int offset, float weights)
Definition: hdf_bin.h:418
int open(const char *l3b_filename)
Definition: bin_io.cpp:233
int get_nscenes(int kbin)
Definition: hdf_bin.h:556
int get_ext()
Definition: hdf_bin.h:493
int inc_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:408
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:432
virtual int set_nscenes(int offset, int nscenes)=0
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:126
hid_t get_data_table(int i)
Definition: hdf_bin.h:365
int16_t * nscenes
Definition: l2bin.cpp:80
int64_t get_beg()
Definition: hdf_bin.h:486
int32_t noext
Definition: hdf_bin.h:295
#define MAXNVDATA
int clear_binlist()
Definition: hdf_bin.h:250
virtual int set_bin_num(int offset, int64_t bin_num)=0
virtual int clear_binlist()=0
int64_t totbins
Definition: hdf_bin.h:120
int set_weights(int offset, float weights)
Definition: hdf_bin.h:423
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:283
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:124
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:428
int set_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:413
int setDataPtrAbsolute(int32_t recordNum)
Definition: hdf_bin.h:447
int i
Definition: decode_rs.h:71
hid_t get_grp0()
Definition: hdf_bin.h:369
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:198
virtual int inc_nscenes(int offset, int nscenes)=0
int close()
Definition: bin_io.cpp:951
int set_nscenes(int offset, int nscenes)
Definition: hdf_bin.h:230
int copy_binlist(int src, int dest)
Definition: hdf_bin.h:437
uint32_t deflate
Definition: hdf_bin.h:131
virtual int set_nobs(int offset, int nobs)=0
virtual ~hdf4_bin()
Definition: bin_io.cpp:118
bool has_qual()
Definition: hdf_bin.h:353
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:206
int create(const char *l3b_filename, int32_t nrows)
Definition: bin_io.cpp:2192