OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
DDOptions.h
Go to the documentation of this file.
1 
2 /**************************************************************************
3  *
4  * NAME: DDOptions.h
5  *
6  * DESCRIPTION: Header file for declaration of string names and
7  * command line options
8  *
9  * Created on: Aug 25, 2020
10  * Author: Sam Anderson
11  *
12  **************************************************************************/
13 
14 #ifndef _Options_h_
15 #define _Options_h_
16 
17 #include <string>
18 #include <clo.h>
19 
20 #define VIIRSSCANS 203
21 #define VDETECTORS 16
22 #define VLINES VIIRSSCANS*VDETECTORS
23 #define VELEMS 3200
24 #define VNUMSCAN_B VLINES/VGRIDY
25 #define VSWATH_B VELEMS
26 #define VNUMCELLS_B VELEMS/VGRIDX
27 
28 #define MODISSCANS 203
29 #define MDETECTORS 10
30 #define MLINES MODISSCANS*MDETECTORS
31 #define MELEMS 1354
32 #define MNUMSCAN_B MLINES/MGRIDY
33 #define MSWATH_B MELEMS
34 #define MNUMCELLS_B MELEMS/MGRIDX
35 
36 #define PACESCANS 1721
37 #define PDETECTORS 1
38 #define PLINES PACESCANS*PDETECTORS
39 #define PELEMS 1271
40 #define PNUMSCAN_B PLINES/PGRIDY
41 #define PSWATH_B PELEMS
42 #define PNUMCELLS_B PELEMS/PGRIDX
43 #define NUM_PACE_RSB 60
44 #define NUM_PACE_SWIR 9
45 
46 #define NUM_BANDS 13
47 #define NUM_DB_BANDS 12
48 #define DB_RFL_BANDS 9
49 #define DB_BT_BANDS 3
50 #define DB_NC_BANDS 3
51 
52 #define NUM_BT_BANDS 5
53 #define NUM_EM_BANDS 5
54 #define NUM_RF_BANDS 11
55 #define NUM_SW_BANDS 3
56 #define NUM_DT_QUALS 2
57 #define NUM_LAND_SOL3 3
58 #define NUM_LAND_SOL4 4
59 
60 static constexpr int DD_SUCCESS = 0;
61 static constexpr int DD_FAIL = 1;
62 
63 //
64 // Short name constants
65 //
66 extern const std::string INPUT_SPIX;
67 extern const std::string INPUT_EPIX;
68 extern const std::string INPUT_DPIX;
69 extern const std::string INPUT_SLINE;
70 extern const std::string INPUT_ELINE;
71 extern const std::string INPUT_DLINE;
73 extern const std::string INPUT_LINES_PER_RW;
74 
75 extern const std::string INPUT_PAR;
76 extern const std::string PRODUCT_XML;
77 extern const std::string INPUT_IFFSVM;
78 extern const std::string INPUT_L1B;
79 extern const std::string INPUT_GEO;
80 extern const std::string INPUT_GDAS1;
81 extern const std::string INPUT_GDAS2;
82 extern const std::string INPUT_GDAS;
83 extern const std::string INPUT_GRIB;
84 extern const std::string INPUT_OZONE;
85 extern const std::string INPUT_LANDMASK;
87 extern const std::string INPUT_SAT_ID;
88 extern const std::string INPUT_MISSION;
89 extern const std::string OUTPUT_NC4;
90 
91 extern const std::string INPUT_OCEAN_BIG1;
92 extern const std::string INPUT_OCEAN_BIG2;
93 extern const std::string INPUT_OCEAN_BIG3;
94 extern const std::string INPUT_OCEAN_BIG4;
95 extern const std::string INPUT_OCEAN_SMALL1;
96 extern const std::string INPUT_OCEAN_SMALL2;
97 extern const std::string INPUT_OCEAN_SMALL3;
98 extern const std::string INPUT_OCEAN_SMALL4;
99 extern const std::string INPUT_LAND_W0466;
100 extern const std::string INPUT_LAND_W0554;
101 extern const std::string INPUT_LAND_W0645;
102 extern const std::string INPUT_LAND_W2113;
103 extern const std::string INPUT_LAND_MAP;
104 
105 extern const std::string INPUT_TRANSM_H2O_1;
106 extern const std::string INPUT_TRANSM_H2O_2;
107 extern const std::string INPUT_TRANSM_H2O_3;
108 extern const std::string INPUT_TRANSM_H2O_4;
109 extern const std::string INPUT_TRANSM_H2O_5;
110 extern const std::string INPUT_TRANSM_H2O_6;
111 extern const std::string INPUT_WEIGHT_TABLE;
113 
114 extern const std::string INPUT_REFL_CH2;
116 extern const std::string INPUT_DBDT_REGIONS;
117 extern const std::string INPUT_GLOBAL_IGBP;
118 extern const std::string INPUT_NVALX_412;
119 extern const std::string INPUT_NVALX_470;
120 extern const std::string INPUT_NVALX_650;
121 extern const std::string INPUT_NVALX21;
122 extern const std::string INPUT_RAYL_412;
123 extern const std::string INPUT_RAYL_470;
124 extern const std::string INPUT_RAYL_650;
125 extern const std::string INPUT_MODIS_SWIR;
127 extern const std::string INPUT_MODIS_GEOZONE;
128 extern const std::string INPUT_MODIS_XCAL_412;
129 extern const std::string INPUT_MODIS_XCAL_470;
130 extern const std::string INPUT_GAIN_412;
131 extern const std::string INPUT_GAIN_470;
132 extern const std::string INPUT_CLDMASK;
133 
134 extern const std::string INPUT_AERO_LAND_FINE;
135 extern const std::string INPUT_AERO_LAND_DUST;
139 extern const std::string INPUT_AERO_OCEAN_MIX;
140 extern const std::string INPUT_BATHYMETRY;
141 extern const std::string INPUT_CHL;
142 extern const std::string INPUT_LER_TABLE;
143 extern const std::string INPUT_LANDCOVER;
144 extern const std::string INPUT_GEOZONE;
146 extern const std::string INPUT_BRDF;
148 extern const std::string INPUT_SURF_COEFF;
149 extern const std::string INPUT_SWIR;
150 extern const std::string INPUT_VEG_LANDCOVER;
151 extern const std::string INPUT_VEG_21SFC;
152 extern const std::string INPUT_VIIRS_XCAL_412;
153 extern const std::string INPUT_VIIRS_XCAL_488;
154 extern const std::string INPUT_VIIRS_XCAL_670;
155 
156 extern const std::string INPUT_NC4_LUT;
157 extern const std::string INPUT_DT_NC4_LUT;
158 extern const std::string INPUT_DB_NC4_LUT;
159 extern const std::string INPUT_SENSOR_INFO;
160 
161 extern const std::string LUT_GRIB ;
162 extern const std::string LUT_GAS_CORRECTION;
163 extern const std::string LUT_LAND_AEROSOL;
164 extern const std::string LUT_WATER_VAPOR;
165 extern const std::string LUT_LER_TABLES;
166 extern const std::string LUT_SURFACE_PRESSURE;
167 extern const std::string LUT_NVALX;
168 extern const std::string LUT_DESERTS;
169 extern const std::string LUT_RAYLEIGH;
170 extern const std::string LUT_LANDCOVER;
171 extern const std::string LUT_NVALX21;
178 extern const std::string LUT_BATHYMETRY;
179 extern const std::string LUT_CHL;
180 extern const std::string LUT_SWIR;
182 extern const std::string LUT_SURFACE_COEFF;
183 extern const std::string LUT_GEOZONE;
184 
185 extern const std::string LUT_OCEAN_AEROSOL;
187 extern const std::string LUT_MODIS_SWIR;
189 
190 extern const std::string NETCDF_LUT_PATH;
191 extern const std::string LEAP_SEC_PATH;
192 
193 extern const std::string BOOL_SENSOR;
194 extern const std::string BOOL_SCANS;
195 extern const std::string BOOL_NAVIGATION;
196 extern const std::string BOOL_PROCESS;
197 extern const std::string BOOL_ANCILLARY;
198 extern const std::string BOOL_GEOLOCATION;
199 extern const std::string BOOL_OBSERVATIONS;
200 extern const std::string BOOL_STATISTICS;
201 extern const std::string BOOL_WAVELENGTHS;
202 extern const std::string BOOL_DATA;
203 extern const std::string BOOL_FLAGS;
204 extern const std::string BOOL_ADD_LT_NOISE;
205 extern const std::string BOOL_GAS_CORRECTION;
206 extern const std::string BOOL_MASK_GLINT;
207 extern const std::string BOOL_MASK_CLOUD;
208 extern const std::string BOOL_SHORT_FORMAT;
209 
210 extern const std::string BOOL_L2_FLAGS;
211 extern const std::string BOOL_CLOUD_MASK;
212 extern const std::string BOOL_QUALITY_FLAG;
213 extern const std::string BOOL_AEROSOL_TYPE;
214 extern const std::string BOOL_SCATTER_ANGLE;
215 extern const std::string BOOL_CHLOROPHYLL;
216 extern const std::string BOOL_RESIDUAL_ERROR;
217 extern const std::string BOOL_FMF_550;
218 extern const std::string BOOL_NDVI;
219 extern const std::string BOOL_ANGSTROM;
220 extern const std::string BOOL_AOT_380;
221 extern const std::string BOOL_AOT_410;
222 extern const std::string BOOL_AOT_490;
223 extern const std::string BOOL_AOT_550;
224 extern const std::string BOOL_AOT_670;
225 extern const std::string BOOL_AOT_865;
226 extern const std::string BOOL_AOT_1240;
227 extern const std::string BOOL_AOT_1610;
228 extern const std::string BOOL_AOT_2250;
229 extern const std::string BOOL_SURF_410;
230 extern const std::string BOOL_SURF_490;
231 extern const std::string BOOL_SURF_670;
232 extern const std::string BOOL_SURF_2250;
233 
234 extern const std::string ALGORITHM;
235 
239 int get_option_int(const std::string& name);
240 float* get_option_floats(const std::string& name, int *count);
241 int get_bool(const std::string& name);
243 
245 void copy_options();
247 std::string get_history(int argc, char* argv[]);
248 
249 void init_options(clo_optionList_t* list, const char* softwareVersion);
250 void read_options(clo_optionList_t* list, int argc, char* argv[]);
251 
252 #endif
const std::string INPUT_GEO
Definition: DDOptions.cpp:41
const std::string INPUT_TRANSM_H2O_6
Definition: DDOptions.cpp:72
const std::string INPUT_LAND_W0645
Definition: DDOptions.cpp:63
const std::string INPUT_AERO_LAND_FINE
Definition: DDOptions.cpp:92
const std::string PRODUCT_XML
Definition: DDOptions.cpp:38
const std::string INPUT_BATHYMETRY
Definition: DDOptions.cpp:98
const std::string INPUT_AERO_LAND_DUST
Definition: DDOptions.cpp:93
const std::string LEAP_SEC_PATH
Definition: DDOptions.cpp:122
const std::string INPUT_NVALX_412
Definition: DDOptions.cpp:79
const std::string INPUT_LANDMASK
Definition: DDOptions.cpp:45
const std::string INPUT_RATIO_CH19_TO_CH2
Definition: DDOptions.cpp:75
const std::string LUT_GRIB
Definition: DDOptions.cpp:124
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
const std::string INPUT_OCEAN_SMALL4
Definition: DDOptions.cpp:60
void add_options(clo_optionList_t *list)
Definition: DDOptions.cpp:251
const std::string NETCDF_LUT_PATH
Definition: DDOptions.cpp:194
const std::string LUT_RAYLEIGH
Definition: DDOptions.cpp:134
const std::string INPUT_GDAS2
Definition: DDOptions.cpp:43
const std::string LUT_MODIS_SWIR
Definition: DDOptions.cpp:130
const std::string LUT_NVALX21
Definition: DDOptions.cpp:136
const std::string INPUT_AERO_OCEAN_MARI
Definition: DDOptions.cpp:96
const std::string BOOL_SURF_410
Definition: DDOptions.cpp:188
const std::string INPUT_TRANSM_H2O_5
Definition: DDOptions.cpp:71
int get_bool(const std::string &name)
const std::string INPUT_DPIX
Definition: DDOptions.cpp:30
const std::string INPUT_OCEAN_BIG3
Definition: DDOptions.cpp:55
const std::string BOOL_NDVI
Definition: DDOptions.cpp:177
const std::string BOOL_GEOLOCATION
Definition: DDOptions.cpp:160
const std::string BOOL_AOT_1240
Definition: DDOptions.cpp:185
const std::string INPUT_OCEAN_BIG4
Definition: DDOptions.cpp:56
const std::string INPUT_PAR
Definition: DDOptions.cpp:37
const std::string INPUT_IFFSVM
Definition: DDOptions.cpp:39
const std::string INPUT_SENSOR_INFO
Definition: DDOptions.cpp:121
const std::string INPUT_NC4_LUT
Definition: DDOptions.cpp:118
const std::string LUT_OCEAN_AEROSOL_MARI
Definition: DDOptions.cpp:145
const std::string INPUT_TRANSM_H2O_2
Definition: DDOptions.cpp:68
const std::string INPUT_GAS_CORRECTION
Definition: DDOptions.cpp:47
const std::string BOOL_STATISTICS
Definition: DDOptions.cpp:162
const std::string INPUT_MODIS_SURF_REFL
Definition: DDOptions.cpp:85
const std::string INPUT_SEASONAL_DESERTS
Definition: DDOptions.cpp:104
const std::string INPUT_DLINE
Definition: DDOptions.cpp:33
std::string get_group(const std::string &group)
const std::string BOOL_SURF_670
Definition: DDOptions.cpp:190
const std::string LUT_OCEAN_AEROSOL_FINE
Definition: DDOptions.cpp:143
const std::string BOOL_SCATTER_ANGLE
Definition: DDOptions.cpp:173
const std::string LUT_GAS_CORRECTION
Definition: DDOptions.cpp:125
int get_option_int(const std::string &name)
const std::string INPUT_LAND_W0466
Definition: DDOptions.cpp:61
const std::string INPUT_GDAS
Definition: DDOptions.cpp:44
const std::string BOOL_OBSERVATIONS
Definition: DDOptions.cpp:161
const std::string BOOL_PROCESS
Definition: DDOptions.cpp:155
const std::string INPUT_NVALX_470
Definition: DDOptions.cpp:80
const std::string BOOL_AEROSOL_TYPE
Definition: DDOptions.cpp:172
const std::string INPUT_EPIX
Definition: DDOptions.cpp:29
const std::string BOOL_ADD_LT_NOISE
Definition: DDOptions.cpp:163
@ string
const std::string BOOL_ANGSTROM
Definition: DDOptions.cpp:178
const std::string OUTPUT_NC4
Definition: DDOptions.cpp:49
const std::string LUT_GEOZONE
Definition: DDOptions.cpp:142
const std::string LUT_CHL
Definition: DDOptions.cpp:150
const std::string BOOL_AOT_1610
Definition: DDOptions.cpp:186
std::string get_history(int argc, char *argv[])
Definition: DDOptions.cpp:496
const std::string BOOL_AOT_865
Definition: DDOptions.cpp:184
const std::string BOOL_FLAGS
Definition: DDOptions.cpp:158
std::string get_option(const std::string &name)
const std::string INPUT_GRIB
Definition: DDOptions.cpp:50
const std::string INPUT_MODIS_XCAL_470
Definition: DDOptions.cpp:87
const std::string LUT_LAND_AEROSOL
Definition: DDOptions.cpp:126
const std::string INPUT_CLDMASK
Definition: DDOptions.cpp:46
const std::string BOOL_SURF_2250
Definition: DDOptions.cpp:191
const std::string ALGORITHM
Definition: DDOptions.cpp:193
const std::string INPUT_NVALX21
Definition: DDOptions.cpp:82
const std::string LUT_NVALX
Definition: DDOptions.cpp:133
const std::string INPUT_GDAS1
Definition: DDOptions.cpp:42
const std::string LUT_LAND_AEROSOL_DUST
Definition: DDOptions.cpp:148
const std::string BOOL_CHLOROPHYLL
Definition: DDOptions.cpp:174
const std::string LUT_SWIR
Definition: DDOptions.cpp:138
const std::string LUT_OCEAN_AEROSOL
Definition: DDOptions.cpp:127
const std::string INPUT_VIIRS_SURF_REFL
Definition: DDOptions.cpp:106
clo_optionList_t * get_optionList()
Definition: DDOptions.cpp:203
const std::string INPUT_LT_NOISE_SCALE
Definition: DDOptions.cpp:34
const std::string BOOL_L2_FLAGS
Definition: DDOptions.cpp:169
const std::string INPUT_VEG_LANDCOVER
Definition: DDOptions.cpp:109
const std::string INPUT_RAYL_470
Definition: DDOptions.cpp:112
const std::string BOOL_MASK_CLOUD
Definition: DDOptions.cpp:166
const std::string INPUT_DB_NC4_LUT
Definition: DDOptions.cpp:120
const std::string INPUT_OZONE
Definition: DDOptions.cpp:51
const std::string BOOL_ANCILLARY
Definition: DDOptions.cpp:159
void copy_options()
Definition: DDOptions.cpp:457
const std::string INPUT_NVALX_650
Definition: DDOptions.cpp:81
const std::string BOOL_GAS_CORRECTION
Definition: DDOptions.cpp:164
void init_options(clo_optionList_t *list, const char *softwareVersion)
Definition: DDOptions.cpp:535
const std::string BOOL_NAVIGATION
Definition: DDOptions.cpp:154
const std::string BOOL_SCANS
Definition: DDOptions.cpp:153
const std::string INPUT_OCEAN_SMALL1
Definition: DDOptions.cpp:57
float * get_option_floats(const std::string &name, int *count)
const std::string INPUT_VIIRS_XCAL_670
Definition: DDOptions.cpp:116
const std::string BOOL_CLOUD_MASK
Definition: DDOptions.cpp:170
const std::string BOOL_DATA
Definition: DDOptions.cpp:157
const std::string LUT_VIIRS_SURFACE_REFL
Definition: DDOptions.cpp:139
const std::string LUT_OCEAN_AEROSOL_DUST
Definition: DDOptions.cpp:144
const std::string INPUT_LAND_MAP
Definition: DDOptions.cpp:65
const std::string INPUT_CHL
Definition: DDOptions.cpp:99
const std::string INPUT_TRANSM_H2O_4
Definition: DDOptions.cpp:70
const std::string INPUT_TRANSM_H2O_3
Definition: DDOptions.cpp:69
const std::string LUT_OCEAN_AEROSOL_MIX
Definition: DDOptions.cpp:146
const std::string INPUT_SAT_ID
Definition: DDOptions.cpp:48
const std::string INPUT_SWIR
Definition: DDOptions.cpp:108
const std::string INPUT_VIIRS_XCAL_412
Definition: DDOptions.cpp:114
const std::string INPUT_GAIN_412
Definition: DDOptions.cpp:88
const std::string BOOL_SURF_490
Definition: DDOptions.cpp:189
const std::string INPUT_AERO_OCEAN_DUST
Definition: DDOptions.cpp:94
const std::string INPUT_LINES_PER_RW
Definition: DDOptions.cpp:35
void read_options(clo_optionList_t *list, int argc, char *argv[])
Definition: DDOptions.cpp:576
const std::string INPUT_SURF_COEFF
Definition: DDOptions.cpp:107
const std::string BOOL_AOT_2250
Definition: DDOptions.cpp:187
const std::string INPUT_RAYL_412
Definition: DDOptions.cpp:111
const std::string BOOL_RESIDUAL_ERROR
Definition: DDOptions.cpp:175
const std::string BOOL_SENSOR
Definition: DDOptions.cpp:152
const std::string BOOL_AOT_550
Definition: DDOptions.cpp:182
const std::string LUT_WATER_VAPOR
Definition: DDOptions.cpp:128
const std::string INPUT_MODIS_GEOZONE
const std::string BOOL_SHORT_FORMAT
Definition: DDOptions.cpp:167
const std::string BOOL_QUALITY_FLAG
Definition: DDOptions.cpp:171
const std::string INPUT_SPIX
Definition: DDOptions.cpp:28
const std::string INPUT_LAND_W0554
Definition: DDOptions.cpp:62
const std::string LUT_BATHYMETRY
Definition: DDOptions.cpp:149
const std::string INPUT_DT_NC4_LUT
Definition: DDOptions.cpp:119
const std::string INPUT_LER_TABLE
Definition: DDOptions.cpp:100
const std::string BOOL_AOT_410
Definition: DDOptions.cpp:180
const std::string LUT_LAND_AEROSOL_FINE
Definition: DDOptions.cpp:147
const std::string BOOL_AOT_670
Definition: DDOptions.cpp:183
std::string get_source()
Definition: DDOptions.cpp:462
const std::string INPUT_VIIRS_XCAL_488
Definition: DDOptions.cpp:115
const std::string INPUT_WEIGHT_TABLE
Definition: DDOptions.cpp:73
const std::string INPUT_GEOZONE
Definition: DDOptions.cpp:103
const std::string INPUT_RAYL_650
Definition: DDOptions.cpp:113
const std::string LUT_LER_TABLES
Definition: DDOptions.cpp:137
void set_optionList(clo_optionList_t *list)
Definition: DDOptions.cpp:199
const std::string BOOL_AOT_380
Definition: DDOptions.cpp:179
const std::string INPUT_LAND_W2113
Definition: DDOptions.cpp:64
const std::string INPUT_SURFACE_PRESSURE
Definition: DDOptions.cpp:102
const std::string INPUT_VEG_21SFC
Definition: DDOptions.cpp:110
const std::string INPUT_GAIN_470
Definition: DDOptions.cpp:89
const std::string INPUT_TRANSM_H2O_1
Definition: DDOptions.cpp:67
const std::string INPUT_AERO_OCEAN_MIX
Definition: DDOptions.cpp:97
const std::string INPUT_AERO_OCEAN_FINE
Definition: DDOptions.cpp:95
const std::string INPUT_MODIS_SWIR
Definition: DDOptions.cpp:84
const std::string LUT_SURFACE_COEFF
Definition: DDOptions.cpp:140
const std::string BOOL_MASK_GLINT
Definition: DDOptions.cpp:165
const std::string INPUT_OCEAN_SMALL2
Definition: DDOptions.cpp:58
const std::string BOOL_FMF_550
Definition: DDOptions.cpp:176
const std::string LUT_SURFACE_PRESSURE
Definition: DDOptions.cpp:129
const std::string INPUT_OCEAN_BIG1
Definition: DDOptions.cpp:53
const std::string INPUT_MISSION
const std::string INPUT_REFL_CH2
Definition: DDOptions.cpp:74
const std::string INPUT_DBDT_REGIONS
Definition: DDOptions.cpp:83
const std::string INPUT_L1B
Definition: DDOptions.cpp:40
const std::string LUT_LANDCOVER
Definition: DDOptions.cpp:141
const std::string INPUT_LANDCOVER
Definition: DDOptions.cpp:101
const std::string INPUT_OCEAN_SMALL3
Definition: DDOptions.cpp:59
const std::string INPUT_GLOBAL_IGBP
Definition: DDOptions.cpp:78
const std::string INPUT_ELINE
Definition: DDOptions.cpp:32
const std::string BOOL_AOT_490
Definition: DDOptions.cpp:181
const std::string BOOL_WAVELENGTHS
Definition: DDOptions.cpp:156
const std::string INPUT_BRDF
Definition: DDOptions.cpp:105
const std::string INPUT_MODIS_XCAL_412
Definition: DDOptions.cpp:86
const std::string LUT_MODIS_CORRECTIONS
Definition: DDOptions.cpp:132
const std::string INPUT_SLINE
Definition: DDOptions.cpp:31
const std::string INPUT_OCEAN_BIG2
Definition: DDOptions.cpp:54
const std::string LUT_DESERTS
int count
Definition: decode_rs.h:79
const std::string LUT_MODIS_SURFACE_REFL
Definition: DDOptions.cpp:131