Go to the documentation of this file.
23 #include <sys/types.h>
37 #define BYTE unsigned char
44 int main(
int argc,
char *argv[]) {
59 int32_t ip, ib, ipb,
i;
67 for (
i = 0;
i < argc;
i++) {
68 if ((strcmp(argv[
i],
"-h") == 0) || (strcmp(argv[
i],
"-help") == 0)) {
80 printf(
"-E- %s: Error parsing input parameters.\n", argv[0]);
84 if (access(
input->ifile[0], F_OK) || access(
input->ifile[0], R_OK)) {
85 printf(
"-E- %s: Input file '%s' does not exist or cannot open.\n",
86 argv[0],
input->ifile[0]);
94 printf(
"-E- %s: Error opening %s for reading.\n", argv[0],
ifile.name);
102 printf(
"-E- %s: Unable to allocate L1 record.\n", argv[0]);
121 printf(
"-E- %s: scan and pixel limits make no sense.\n", argv[0]);
122 printf(
" start scan = %d\n", sscan + 1);
123 printf(
" end scan = %d\n", escan + 1);
124 printf(
" start pixel = %d\n",
spix + 1);
125 printf(
" end pixel = %d\n",
epix + 1);
139 if (strcmp(
input->oformat,
"netCDF4") == 0)
150 ofile.nscan = (escan - sscan) / dscan + 1;
156 printf(
"Opening L1B output file: %s\n",
ofile.name);
159 printf(
"-E- %s: Error opening %s for writing.\n", argv[0],
ofile.name);
168 if ((
iscan % 100) == 0) printf(
"Processing scan %d\n",
iscan);
173 for (ip = 0; ip <
npix; ip++) {
174 for (ib = 0; ib <
ifile.nbands; ib++) {
176 ipb = ip *
ifile.nbands +
i;
183 printf(
"-E- %s: error writing to %s.\n",
184 argv[0],
ofile.name);
200 printf(
"\nProcessing Completed\n");
int readl1(filehandle *l1file, int32_t recnum, l1str *l1rec)
int msl12_input(int argc, char *argv[], const char *progName, filehandle *l1file)
void filehandle_init(filehandle *file)
int writel1(filehandle *l1file, int32_t recnum, l1str *l1rec)
int l2gen_usage(const char *prog)
void closel1(filehandle *l1file)
int msl1bgen_usage(char *prog)
int main(int argc, char *argv[])
int32_t alloc_l1(filehandle *l1file, l1str *l1rec)
int openl1(filehandle *l1file)
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")