OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1c_str.h
Go to the documentation of this file.
1 //
2 // l1c_str.h
3 //
4 //
5 // Created by Martin Montes on 10/26/20.
6 //
7 
8 #ifndef L1C_STR_H
9 #define L1C_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 l1c_str{
25 protected:
26 
27 public:
28  //methods
29  l1c_str();
30  virtual ~l1c_str();
31 
32  // Open, read, close
33  virtual int32_t openl1b_ocis_l1c(l1c_str *l1cstr,l1c_filehandle *l1cfile,int16_t *file_id);
34  virtual int32_t readl1b_ocis_l1c(l1c_str *l1cstr,l1c_filehandle *l1cfile,int16_t *file_id, int32_t recnum);
35  virtual int32_t closel1b_ocis_l1c(l1c_str *l1cstr,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  float **Lt; //dim depends between sensors--OCI is bands x pixels --
50  float **Lt_blue; //[num_views][num_pol][num_blue_bands][num_pixels]
51  float **Lt_red;
52  float **Lt_SWIR;
53 
54  //sensor/sun geometry
55  float *senz;
56  float *sena;
57  float *solz;
58  float *sola;
59  float *delphi;
60  float *scattang;
61 
62  //navigation--
63  float att_ang[3];
64  float orb_pos[3];
65  float orb_vel[3];
66 
67  //geolocation--
68  float *senazpix;
69  float *latpix;
70  float *lonpix;
71  float *latpix2;//lat2/lon are the sline +1
72  float *lonpix2;
73 
74  float *latnad;//nadir latitude
75  float *lonnad;
76  float *lonershift;//earth rotation shift
77  float *terr_height;
78  float *cloud_height;
79 
80 
81  l1c_filehandle *l1cfile;//not sure why this thing is here?
82 
83 };
84 
85 
86 //prototypes------
87  // Open, read, close
88  int32_t openl1b_ocis_l1c(l1c_str *l1cstr,l1c_filehandle *l1cfile, int16_t *file_id);
89  int32_t readl1b_ocis_l1c(l1c_str *l1cstr,l1c_filehandle *l1cfile, int16_t *file_id,int32_t recnum);
90  int32_t closel1b_ocis_l1c(l1c_str *l1cstr,l1c_filehandle *l1cfile);
91 
92 } // namespace l1c
93 
94 #endif /* L1C_STR_H */
virtual int32_t readl1b_ocis_l1c(l1c_str *l1cstr, l1c_filehandle *l1cfile, int16_t *file_id, int32_t recnum)
Definition: l1c_str.cpp:413
float ** Lt_blue
Definition: l1c_str.h:50
float * cloud_height
Definition: l1c_str.h:78
l1c_filehandle * l1cfile
Definition: l1c_str.h:81
float ** Lt_SWIR
Definition: l1c_str.h:52
size_t epix
Definition: l1c_str.h:45
float orb_pos[3]
Definition: l1c_str.h:64
float * lonpix2
Definition: l1c_str.h:72
float * scattang
Definition: l1c_str.h:60
float * latpix
Definition: l1c_str.h:69
float * senazpix
Definition: l1c_str.h:68
float * latpix2
Definition: l1c_str.h:71
float * lonpix
Definition: l1c_str.h:70
int32_t closel1b_ocis_l1c(l1c_str *l1cstr, l1c_filehandle *l1cfile)
float ** Lt
Definition: l1c_str.h:49
virtual int32_t openl1b_ocis_l1c(l1c_str *l1cstr, l1c_filehandle *l1cfile, int16_t *file_id)
Definition: l1c_str.cpp:156
size_t iscan
Definition: l1c_str.h:39
read recnum
virtual ~l1c_str()
Definition: l1c_str.cpp:153
float att_ang[3]
Definition: l1c_str.h:63
float * senz
Definition: l1c_str.h:55
size_t dpix
Definition: l1c_str.h:46
size_t nscan
Definition: l1c_str.h:40
double * ev_mid_time
Definition: l1c_str.h:42
Definition: l1c.cpp:76
virtual int32_t closel1b_ocis_l1c(l1c_str *l1cstr, l1c_filehandle *l1cfile)
Definition: l1c_str.cpp:481
size_t spix
Definition: l1c_str.h:44
size_t * scan_quality_flag
Definition: l1c_str.h:43
float * lonershift
Definition: l1c_str.h:76
int32_t openl1b_ocis_l1c(l1c_str *l1cstr, l1c_filehandle *l1cfile, int16_t *file_id)
float * sola
Definition: l1c_str.h:58
float orb_vel[3]
Definition: l1c_str.h:65
float * terr_height
Definition: l1c_str.h:77
float * latnad
Definition: l1c_str.h:74
int32_t readl1b_ocis_l1c(l1c_str *l1cstr, l1c_filehandle *l1cfile, int16_t *file_id, int32_t recnum)
float * sena
Definition: l1c_str.h:56
float * delphi
Definition: l1c_str.h:59
float * lonnad
Definition: l1c_str.h:75
size_t npix
Definition: l1c_str.h:38
float * solz
Definition: l1c_str.h:57
float ** Lt_red
Definition: l1c_str.h:51