OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1cgen_input.cpp
Go to the documentation of this file.
1 #include "l1cgen.h"
2 
3 #include <l1.h>
4 
6 int l1cgen_init_options(clo_optionList_t* list, const char* softwareVersion) {
7 
8  clo_setVersion2("l1cgen", softwareVersion);
9 
10  clo_setHelpStr("Usage: l3mapgen argument-list"
11  "\n"
12  "\n This program reads an L1 file"
13  "\n"
14  "\n Return values"
15  "\n 0 = All Good"
16  "\n 1 = Error"
17  "\n"
18  "\n The argument list is a set of keyword=value pairs. Arguments can"
19  "\n be specified on the command line, or put into a parameter file, or the"
20  "\n two methods can be used together, with command line overriding."
21  "\n"
22  "\nThe list of valid keywords follows:"
23  "\n");
24 
25 
26  // files
27  clo_addOption(list, "ifile", CLO_TYPE_IFILE, NULL, "input L1 filename");
28 
29  clo_addOption(list, "ofile", CLO_TYPE_OFILE, "output", "output filename");
30  clo_addOption(list, "oformat", CLO_TYPE_STRING, "netcdf4",
31  "output file format"
32  "\n netcdf4: netCDF4 file, can contain more than one product"
33  "\n hdf4: HDF4 file (old SMI format)"
34  "\n png: PNG image file"
35  "\n ppm: PPM image file"
36  "\n tiff: TIFF file with georeference tags");
37 
38  clo_addOption(list, "spixl", CLO_TYPE_INT, "1", "start pixel number");
39  clo_addOption(list, "epixl", CLO_TYPE_INT, "-1", "end pixel number (-1=the last pixel)");
40  clo_addOption(list, "dpixl", CLO_TYPE_INT, "1", "pixel sub-sampling interval");
41  clo_addOption(list, "sline", CLO_TYPE_INT, "1", "start line number");
42  clo_addOption(list, "eline", CLO_TYPE_INT, "-1", "end line number (-1=the last line)");
43  clo_addOption(list, "dline", CLO_TYPE_INT, "1", "line sub-sampling interval");
44 
45  clo_addOption(list, "quiet", CLO_TYPE_BOOL, "false", "stop the status printing");
46 
48 
49 
50  return 0;
51 }
52 
53 /*
54  Read the command line option and all of the default parameter files.
55  */
56 int l1cgen_read_options(clo_optionList_t* list, int argc, char* argv[]) {
57 
58 
59  // read all arguments
60  clo_readArgs(list, argc, argv);
61 
62 
63  return 0;
64 }
clo_option_t * clo_addOption(clo_optionList_t *list, const char *key, enum clo_dataType_t dataType, const char *defaultVal, const char *desc)
Definition: clo.c:684
void clo_readArgs(clo_optionList_t *list, int argc, char *argv[])
Definition: clo.c:2103
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
#define NULL
Definition: decode_rs.h:63
@ CLO_TYPE_BOOL
Definition: clo.h:78
void clo_setVersion2(const char *programName, const char *versionStr)
Definition: clo.c:464
void clo_setHelpStr(const char *str)
Definition: clo.c:487
@ CLO_TYPE_INT
Definition: clo.h:79
void l1_add_options(clo_optionList_t *list)
Definition: l1_options.c:76
int l1cgen_init_options(clo_optionList_t *list, const char *softwareVersion)
Definition: l1cgen_input.cpp:6
@ CLO_TYPE_IFILE
Definition: clo.h:84
@ CLO_TYPE_OFILE
Definition: clo.h:85
@ CLO_TYPE_STRING
Definition: clo.h:83
int l1cgen_read_options(clo_optionList_t *list, int argc, char *argv[])