Go to the documentation of this file.
29 #include <sys/utsname.h>
37 #define PROGRAM "l1czcs"
45 int main(
int argc,
char *argv[]) {
54 l1_data_struc l1_data;
56 char seadas_vs[64], prog_version[64];
67 printf(
"%s %s (%s %s)\n",
68 fbase,
VERSION, __DATE__, __TIME__);
69 printf(
"Usage: %s ifile opath\n\n", fbase);
70 printf(
"Return 0 if OK, 1 if file cannot be created, 2 if no navigation\n");
74 if (access(
ifile, F_OK) || access(
ifile, R_OK)) {
75 printf(
"%s - Input file '%s' does not exist or cannot read\n",
84 printf(
"%s - Error in reading or processing the data\n", argv[0]);
90 if (
cz_clean(&gattr, &l1_data) != 0) {
91 printf(
"%s - Dataset contains no good data lines\n", argv[0]);
104 struct utsname osname;
106 sprintf(gattr.soft_id,
"%s, %s, %s %s", seadas_vs, prog_version, osname.sysname,
109 strcpy(gattr.datatype,
"LAC");
110 gattr.lac_pixl_start_no = 1;
111 gattr.lac_pixl_subsample = 1;
113 get_time((
char*) &gattr.process_time);
115 strcpy(gattr.proc_ctl, argv[0]);
116 for (
i = 1;
i < argc;
i++) {
117 strcat(gattr.proc_ctl,
" ");
118 strcat(gattr.proc_ctl, argv[
i]);
123 ilen = strlen(opath);
124 if (opath[ ilen - 1 ] ==
'/')
125 sprintf(
ofile,
"%sC%13.13s.L1A_LAC", opath, gattr.start_time);
127 sprintf(
ofile,
"%s/C%13.13s.L1A_LAC", opath, gattr.start_time);
129 if (!access(
ofile, F_OK)) {
130 printf(
"%s - Output file '%s' already existed\n", argv[0],
ofile);
134 printf(
"\n Writing data to output file...\n");
137 printf(
" output file created\n");
139 printf(
" output file not created\n");
147 if ((gattr.ilt_flags) == 0 || (gattr.limits[0] == gattr.limits[1])
148 || (gattr.limits[2] == gattr.limits[3])) {
149 printf(
"%s - Navigation is unavailable for this granule\n", argv[0]);
int GetStationInfo(char *stationInfoFile, StationInfo *stationInfo)
int czcs_l1_write(char *ofile, l1_data_struc l1_data, gattr_struc gattr)
int cz_clean(gattr_struc *gattr, l1_data_struc *l1_data)
int main(int argc, char *argv[])
void get_time(char *pr_time)
int read_crtt(char *, gattr_struc *, l1_data_struc *)
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")