OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l2_str.h
Go to the documentation of this file.
1 //
2 // l2_str.h
3 //
4 //
5 // Created by Martin Montes on 10/26/20.
6 //
7 
8 #ifndef L2_STR_H
9 #define L2_STR_H
10 
11 
12 #include "l1c_filehandle.h"
13 #include <stdbool.h>
14 #include <stdint.h>
15 #include "l1c_input.h"
16 
17 
18 
19 
20 
21 
22 namespace l1c {
23 
24 class l2_str{
25 protected:
26 
27 public:
28  //methods
29  l2_str();
30  virtual ~l2_str();
31 
32  // Open, read, close
33  virtual int32_t openl2_ocis_l1c(L1C_input *l1cinput,l2_str *l2str,l1c_filehandle *l1cfile,int16_t *file_id);
34  virtual int32_t readl2_ocis_l1c(l2_str *l2str,l1c_filehandle *l1cfile,int16_t *file_id, int32_t recnum);
35  virtual int32_t closel2_ocis_l1c(l2_str *l2str,l1c_filehandle *l1cfile);
36 
37  //global attributes
38  size_t npix;
39  size_t iscan;
40  size_t nscan;
41  //scan line attributes--
42  double *ev_mid_time;
44  size_t spix;
45  size_t epix;
46  size_t dpix;
47 
48  // structure--pointers to data arrays
49  // structure--pointers to data arrays
50  float **Lt; //dim depends between sensors--OCI is bands x pixels --
51  float **Lt_blue; //[num_views][num_pol][num_blue_bands][num_pixels]
52  float **Lt_red;
53  float **Lt_SWIR;
54 
55  float **l2prod;//# l2 products x number of pixels
56  size_t nl2prod;
57  float *slopeprod;
58  float *offsetprod;
59  float *tilt;//sensor tilt
60 
61  //sensor/sun geometry
62  float *senz;
63  float *sena;
64  float *solz;
65  float *sola;
66  float *delphi;
67  float *scattang;
68 
69  //navigation--
70  float att_ang[3];
71  float orb_pos[3];
72  float orb_vel[3];
73 
74  //geolocation--
75  float *senazpix;
76  float *latpix;
77  float *lonpix;
78  float *latpix2;//lat2/lon are the sline +1
79  float *lonpix2;
80 
81 
82  l1c_filehandle *l1cfile;//not sure why this thing is here?
83 
84 };
85 
86 
87 //prototypes------
88  // Open, read, close
89  int32_t openl2_ocis_l1c(L1C_input *l1cinput,l2_str *l2str,l1c_filehandle *l1cfile,int16_t *file_id);
90  int32_t readl2_ocis_l1c(l2_str *l2str,l1c_filehandle *l1cfile,int16_t *file_id, int32_t recnum);
91  int32_t closel2_ocis_l1c(l2_str *l2str,l1c_filehandle *l1cfile);
92 
93 } // namespace l1c
94 
95 #endif /* L2_STR_H */
float * offsetprod
Definition: l2_str.h:58
double * ev_mid_time
Definition: l2_str.h:42
int32_t readl2_ocis_l1c(l2_str *l2str, l1c_filehandle *l1cfile, int16_t *file_id, int32_t recnum)
float ** l2prod
Definition: l2_str.h:55
float * latpix2
Definition: l2_str.h:78
size_t dpix
Definition: l2_str.h:46
size_t nl2prod
Definition: l2_str.h:56
float * senazpix
Definition: l2_str.h:75
size_t nscan
Definition: l2_str.h:40
float orb_vel[3]
Definition: l2_str.h:72
float * tilt
Definition: l2_str.h:59
float * slopeprod
Definition: l2_str.h:57
virtual int32_t closel2_ocis_l1c(l2_str *l2str, l1c_filehandle *l1cfile)
Definition: l2_str.cpp:371
float * sena
Definition: l2_str.h:63
int32_t closel2_ocis_l1c(l2_str *l2str, l1c_filehandle *l1cfile)
l1c_filehandle * l1cfile
Definition: l2_str.h:82
float * solz
Definition: l2_str.h:64
virtual ~l2_str()
Definition: l2_str.cpp:112
virtual int32_t openl2_ocis_l1c(L1C_input *l1cinput, l2_str *l2str, l1c_filehandle *l1cfile, int16_t *file_id)
Definition: l2_str.cpp:115
read recnum
float att_ang[3]
Definition: l2_str.h:70
size_t npix
Definition: l2_str.h:38
float * scattang
Definition: l2_str.h:67
virtual int32_t readl2_ocis_l1c(l2_str *l2str, l1c_filehandle *l1cfile, int16_t *file_id, int32_t recnum)
Definition: l2_str.cpp:333
float * lonpix
Definition: l2_str.h:77
float ** Lt
Definition: l2_str.h:50
float ** Lt_SWIR
Definition: l2_str.h:53
int32_t openl2_ocis_l1c(L1C_input *l1cinput, l2_str *l2str, l1c_filehandle *l1cfile, int16_t *file_id)
float * sola
Definition: l2_str.h:65
size_t * scan_quality_flag
Definition: l2_str.h:43
Definition: l1c.cpp:76
size_t epix
Definition: l2_str.h:45
size_t spix
Definition: l2_str.h:44
float * latpix
Definition: l2_str.h:76
size_t iscan
Definition: l2_str.h:39
float * lonpix2
Definition: l2_str.h:79
float * senz
Definition: l2_str.h:62
float ** Lt_blue
Definition: l2_str.h:51
float ** Lt_red
Definition: l2_str.h:52
float * delphi
Definition: l2_str.h:66
float orb_pos[3]
Definition: l2_str.h:71