OB.DAAC Logo
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 
11 #include <stdio.h>
12 //#include "clo_l1c.h"
13 #include "clo.h"
14 #include "ncfileinfo.h"
15 #include "l1c_filehandle.h"
16 
17 #define DEF_FLAG "ATMFAIL,LAND,HILT,HISATZEN,STRAYLIGHT,CLDICE,COCCOLITH,LOWLW,CHLFAIL,CHLWARN,NAVWARN,ABSAER,MAXAERITER,ATMWARN,HISOLZEN,NAVFAIL,FILTER"
18 
19 //#define DEF_FLAG "ATMFAIL,LAND,HILT,HISATZEN,STRAYLIGHT,CLDICE,COCCOLITH,LOWLW,CHLFAIL,CHLWARN,NAVWARN,ABSAER,MAXAERITER,ATMWARN,HISOLZEN,NAVFAIL,FILTER"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 namespace l1c {
26 
27 class L1C_input{
28 
29 protected:
30 
31 public:
32  char infile [FILENAME_MAX];
33  char ofile [FILENAME_MAX];
34  char oformat[20]; // output file type
35  char oformat_depth[20]; // output file color depth l1brsgen only
36 
37  //char ifile [MAX_IFILES][FILENAME_MAX];
38  // char ofile [MAX_OFILES][FILENAME_MAX];
39  //char pfile [FILENAME_MAX];
40  //char fileuse [FILENAME_MAX];
41  //char flaguse[2048];
42  char l2prod[2048];
43  //char prodtype[32];
44  //char qual_prod[2048];
45  //char composite_prod[2048];
46  //char composite_scheme[2048];
47 // char pversion[16];//program version
48  char suite [32];
49 
50  //char parms [4096];
51 
52  int32_t sday;//time limits for half-orbit
53  int32_t eday;
54  char resolve[4];//spatial grid resolution
55  int32_t rowgroup;//number of scanlines
56 
57  //int32_t meminfo;
58  //int32_t dcinfo;
59  //int32_t night;
60  int32_t verbose;
61  //int32_t minobs;
62  //int32_t deflate;
63 
64  //float latsouth;#these limits must be determined
65  //float latnorth;
66  //float lonwest;
67  //float loneast;
68 
69  //uint8_t qual_max;
70  std::vector<std::string> files;//this is c++ object?
71  //int area_weighting;
72  //l1c additional input parameters--
73 
74 
75  float binlatmin;
76  float binlatmax;
77  float binlonmin;
78  float binlonmax;
79 
80 
81 //telemetry stauff----L1A--HKT
82  int32_t fileix;
83  int32_t gransize; //granule size in minutes
84 
85 
86 
87 // char all_l1cprod[MAXPRODl1c][50];//string length rather than number of strings
88  int16_t selgran[10];//selected granules id (not indexes) for L1C processing, up to 10 files
89  int32_t ix_l1cprod[3];//3x1 array with selected l1c products, 1: selected
90  int32_t l1c_pflag;//l1c processing flag, 0: no, 1: yes
91  int32_t nbinx;//#of across gridlines L1C grid, 514 OCI, 40 SPEX,600 HARP
92  float gres;//grid resolution in km
93  int32_t sensor;
94  int32_t selday;
95  int32_t selmon;
96  int32_t selyear;
97  int32_t swtnum;
98 
99  float lat0;//reference latitude pole rotation SOCEA
100  int32_t l1c_proj;
101  int32_t terrain_correct;//terrain distortion correction , 1: yes
102  int32_t cloud_correct;//cloud distortion correction , 1: yes
103  //multi attributes (view, pol, bands)
104  int32_t overlap_vflag;//tells if we want merged views
105  int32_t overlap_pflag;//tells if we want merged polarizations
106  int32_t overlap_bflag;//tells if we want merged spectral bands
107  //uncertainty params l1c merged products
108  int32_t unc_meth;//uncertainity calculation method
109  float unc_thres_v; //uncertainity threshold of angular merged products as %
110  float unc_thres_p;//same but for polarization
111  float unc_thres_b;//same but for multispectral products, same view and polarization
112 
113 //constr/destruc
114  L1C_input();
115  virtual ~L1C_input();
116 //methods
117  virtual int32_t l1c_inputmain(int argc, char **argv, L1C_input *l1cinput,l1c_filehandle *l1cfile,const char* prog, const char* version);
118  virtual int32_t l1c_init_options(clo_optionList_t* list, const char* prog, const char* version);
119  virtual int32_t l1c_load_input(clo_optionList_t* list,L1C_input *l1cinput);
120  virtual int32_t l1c_usage(const char *prog,const char *version);
121  virtual int32_t l1c_input_init(L1C_input *l1cinput);
122 //int input_init(instr *input_str);//no sense to init defaults
123 };
124 
125 
126 
127 //prototypes l1c input
128 int32_t l1c_inputmain(int argc, char **argv, L1C_input *l1cinput,l1c_filehandle *l1cfile,const char* prog, const char* version);
129 int32_t l1c_init_options(clo_optionList_t* list, const char* prog, const char* version);
130 int32_t l1c_load_input(clo_optionList_t* list,L1C_input *l1cinput);
131 int32_t l1c_usage(const char *prog,const char *version);
132 int32_t l1c_input_init(L1C_input *l1cinput);
133 //int input_init(instr *input_str);//no sense to init defaults
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 
140 }//end namespace
141 #endif /* l1c_input_h */
int32_t terrain_correct
Definition: l1c_input.h:101
char oformat_depth[20]
Definition: l1c_input.h:35
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:313
int32_t l1c_load_input(clo_optionList_t *list, L1C_input *l1cinput)
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
int32_t eday
Definition: l1c_input.h:53
char l2prod[2048]
Definition: l1c_input.h:42
char resolve[4]
Definition: l1c_input.h:54
int32_t sday
Definition: l1c_input.h:52
int16_t selgran[10]
Definition: l1c_input.h:88
float binlonmax
Definition: l1c_input.h:78
float unc_thres_p
Definition: l1c_input.h:110
float binlatmax
Definition: l1c_input.h:76
int32_t fileix
Definition: l1c_input.h:82
int32_t swtnum
Definition: l1c_input.h:97
int32_t selday
Definition: l1c_input.h:94
int32_t gransize
Definition: l1c_input.h:83
int32_t l1c_usage(const char *prog, const char *version)
int32_t overlap_pflag
Definition: l1c_input.h:105
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:701
int32_t l1c_proj
Definition: l1c_input.h:100
int32_t l1c_init_options(clo_optionList_t *list, const char *prog, const char *version)
int32_t ix_l1cprod[3]
Definition: l1c_input.h:89
float binlonmin
Definition: l1c_input.h:77
int32_t rowgroup
Definition: l1c_input.h:55
char infile[FILENAME_MAX]
Definition: l1c_input.h:32
virtual ~L1C_input()
Definition: l1c_input.cpp:94
int32_t sensor
Definition: l1c_input.h:93
int32_t overlap_vflag
Definition: l1c_input.h:104
Definition: l1c.cpp:76
int32_t nbinx
Definition: l1c_input.h:91
std::vector< std::string > files
Definition: l1c_input.h:70
char suite[32]
Definition: l1c_input.h:48
int32_t overlap_bflag
Definition: l1c_input.h:106
int32_t selmon
Definition: l1c_input.h:95
int32_t selyear
Definition: l1c_input.h:96
char ofile[FILENAME_MAX]
Definition: l1c_input.h:33
int32_t cloud_correct
Definition: l1c_input.h:102
float unc_thres_v
Definition: l1c_input.h:109
float unc_thres_b
Definition: l1c_input.h:111
virtual int32_t l1c_input_init(L1C_input *l1cinput)
Definition: l1c_input.cpp:594
int32_t l1c_pflag
Definition: l1c_input.h:90
int32_t unc_meth
Definition: l1c_input.h:108
char oformat[20]
Definition: l1c_input.h:34
virtual int32_t l1c_usage(const char *prog, const char *version)
Definition: l1c_input.cpp:98
int32_t verbose
Definition: l1c_input.h:60
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:109
version
Definition: setup.py:15
float binlatmin
Definition: l1c_input.h:75