NASA Logo
Ocean Color Science Software

ocssw V2022
l1c_input.h
Go to the documentation of this file.
1 //
2 // l1c_input.h
3 //
4 //
5 // Created by Martin Montes on 10/21/20.
6 //
7 
8 #ifndef L1C_INPUT_h
9 #define L1C_INPUT_h
10 #include <stdio.h>
11 #include "clo.h"
12 #include "l1c_filehandle.h"
13 
14 #define DEF_FLAG \
15  "ATMFAIL,LAND,HILT,HISATZEN,STRAYLIGHT,CLDICE,COCCOLITH,LOWLW,CHLFAIL,CHLWARN,NAVWARN,ABSAER," \
16  "MAXAERITER,ATMWARN,HISOLZEN,NAVFAIL,FILTER"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 namespace l1c {
23 
24 class L1C_input {
25  protected:
26  public:
27  char infile[FILENAME_MAX];
28  char ofile[FILENAME_MAX];
29  char outlist[FILENAME_MAX];
30  char l1c_grid[FILENAME_MAX];
31  char l1c_anc[FILENAME_MAX];
32  char start_time[50];
33  char end_time[50];
34  char demfile[100];
35  char history[200];
36  char pversion[256];
37  char doi[256];
38  char oformat[20]; // output file type
39  char oformat_depth[20]; // output file color depth l1brsgen only
40 
41  char l2prod[2048];
42  bool verbose;
43 
44  std::vector<std::string> files; // this is c++ object?
45  std::vector<std::string> files_l1c;
46 
47  float south;
48  float north;
49  float west;
50  float east;
51 
52  // telemetry stauff----L1A--HKT
53  int gransize; // granule size in minutes
54  int grantype; // granule size in minutes
55  int bintype; // binning type 0:discrete, 1:area-wighting
56  int32_t swath_num; // swath id in one orbit, 1 or 2, ascending or descending
58 
59  // char all_l1cprod[MAXPRODl1c][50];//string length rather than number of strings
60  int selgran[10]; // selected granules id (not indexes) for L1C processing, up to 10 files
61  int32_t ix_l1cprod[3]; // 3x1 array with selected l1c products, 1: selected
62  int32_t l1c_pflag; // l1c processing flag, 0: no, 1: yes
63  float grid_resolution; // grid resolution in km
64  int32_t sensor;
65  int32_t selday;
66  int32_t selmon;
67  int32_t selyear;
68 
69 
70  int32_t projection;
71  int32_t sort_method;
72  int32_t cloud_height; // 0 is ground or DEM, 1 is CTH cloud top height registration
73  bool terrain_correct; // terrain distortion correction , 1: yes
74  int cloud_correct; // cloud distortion correction , 1: yes
77  // multi attributes (view, pol, bands)
78  bool overlap_vflag; // tells if we want merged views
79  bool overlap_pflag; // tells if we want merged polarizations
80  bool overlap_bflag; // tells if we want merged spectral bands
81  // uncertainty params l1c merged products
82  int32_t unc_meth; // uncertainity calculation method
83  float unc_thres_v; // uncertainity threshold of angular merged products as %
84  float unc_thres_p; // same but for polarization
85  float unc_thres_b; // same but for multispectral products, same view and polarization
86 
87  // constr/destruc
88  L1C_input();
89  virtual ~L1C_input();
90  // methods
91  virtual int32_t l1c_inputmain(int argc, char **argv, L1C_input *l1cinput, l1c_filehandle *l1cfile,
92  const char *prog, const char *version);
93  virtual int32_t l1c_init_options(clo_optionList_t *list, const char *prog, const char *version);
94  virtual int32_t l1c_load_input(clo_optionList_t *list, L1C_input *l1cinput);
95  virtual int32_t l1c_usage(const char *prog, const char *version);
96  virtual int32_t l1c_input_init(L1C_input *l1cinput);
97 };
98 
99 // prototypes l1c input
100 int32_t l1c_inputmain(int argc, char **argv, L1C_input *l1cinput, l1c_filehandle *l1cfile, const char *prog,
101  const char *version);
102 int32_t l1c_init_options(clo_optionList_t *list, const char *prog, const char *version);
103 int32_t l1c_load_input(clo_optionList_t *list, L1C_input *l1cinput);
104 int32_t l1c_usage(const char *prog, const char *version);
105 int32_t l1c_input_init(L1C_input *l1cinput);
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 } // end namespace
112 #endif /* l1c_input_h */
bool overlap_bflag
Definition: l1c_input.h:80
char oformat_depth[20]
Definition: l1c_input.h:39
int32_t l1c_input_init(L1C_input *l1cinput)
virtual int32_t l1c_load_input(clo_optionList_t *list, L1C_input *l1cinput)
Definition: l1c_input.cpp:285
int32_t l1c_load_input(clo_optionList_t *list, L1C_input *l1cinput)
char l2prod[2048]
Definition: l1c_input.h:41
bool overlap_vflag
Definition: l1c_input.h:78
float unc_thres_p
Definition: l1c_input.h:84
int32_t selday
Definition: l1c_input.h:65
int32_t l1c_usage(const char *prog, const char *version)
virtual int32_t l1c_inputmain(int argc, char **argv, L1C_input *l1cinput, l1c_filehandle *l1cfile, const char *prog, const char *version)
Definition: l1c_input.cpp:579
int32_t cloud_height
Definition: l1c_input.h:72
int32_t l1c_init_options(clo_optionList_t *list, const char *prog, const char *version)
int32_t ix_l1cprod[3]
Definition: l1c_input.h:61
char l1c_grid[FILENAME_MAX]
Definition: l1c_input.h:30
int demcloud_flag
Definition: l1c_input.h:76
bool terrain_correct
Definition: l1c_input.h:73
char demfile[100]
Definition: l1c_input.h:34
char infile[FILENAME_MAX]
Definition: l1c_input.h:27
virtual ~L1C_input()
Definition: l1c_input.cpp:69
int32_t swath_num
Definition: l1c_input.h:56
char pversion[256]
Definition: l1c_input.h:36
list(APPEND LIBS ${NETCDF_LIBRARIES}) find_package(GSL REQUIRED) include_directories($
Definition: CMakeLists.txt:8
int32_t sensor
Definition: l1c_input.h:64
char l1c_anc[FILENAME_MAX]
Definition: l1c_input.h:31
Definition: l1c.cpp:71
int start_timeflag
Definition: l1c_input.h:57
char doi[256]
Definition: l1c_input.h:37
std::vector< std::string > files_l1c
Definition: l1c_input.h:45
std::vector< std::string > files
Definition: l1c_input.h:44
float grid_resolution
Definition: l1c_input.h:63
int32_t sort_method
Definition: l1c_input.h:71
int32_t selmon
Definition: l1c_input.h:66
int32_t selyear
Definition: l1c_input.h:67
char ofile[FILENAME_MAX]
Definition: l1c_input.h:28
float unc_thres_v
Definition: l1c_input.h:83
char history[200]
Definition: l1c_input.h:35
float unc_thres_b
Definition: l1c_input.h:85
bool overlap_pflag
Definition: l1c_input.h:79
int cloud_correct
Definition: l1c_input.h:74
virtual int32_t l1c_input_init(L1C_input *l1cinput)
Definition: l1c_input.cpp:502
int32_t l1c_pflag
Definition: l1c_input.h:62
char start_time[50]
Definition: l1c_input.h:32
int32_t unc_meth
Definition: l1c_input.h:82
char outlist[FILENAME_MAX]
Definition: l1c_input.h:29
char oformat[20]
Definition: l1c_input.h:38
int32_t projection
Definition: l1c_input.h:70
virtual int32_t l1c_usage(const char *prog, const char *version)
Definition: l1c_input.cpp:71
int selgran[10]
Definition: l1c_input.h:60
char end_time[50]
Definition: l1c_input.h:33
int32_t l1c_inputmain(int argc, char **argv, L1C_input *l1cinput, l1c_filehandle *l1cfile, const char *prog, const char *version)
virtual int32_t l1c_init_options(clo_optionList_t *list, const char *prog, const char *version)
Definition: l1c_input.cpp:81
version
Definition: setup.py:15