3 int cz_clean(gattr_struc *gattr, l1_data_struc *l1_data)
33 nlin = gattr->scan_lines;
34 npix = gattr->pix_per_scan;
35 nctl_pix = gattr->n_ctl_pt;
42 msec = *(l1_data->msec +
i);
47 if ((
msec < 0) || (
msec > 86399999)) {
54 for (
j = 0;
j < 6;
j++)
55 memcpy(l1_data->counts[
j] +
npix * linout,
57 *(l1_data->msec + linout) = *(l1_data->msec +
i);
58 memcpy(l1_data->ctl_pt_lat + nctl_pix * linout,
59 l1_data->ctl_pt_lat + nctl_pix *
i,
60 nctl_pix * sizeof (
float));
61 memcpy(l1_data->ctl_pt_lon + nctl_pix * linout,
62 l1_data->ctl_pt_lon + nctl_pix *
i,
63 nctl_pix * sizeof (
float));
65 *(l1_data->tilt + linout) = *(l1_data->tilt +
i);
66 *(l1_data->slat + linout) = *(l1_data->slat +
i);
67 *(l1_data->slon + linout) = *(l1_data->slon +
i);
68 *(l1_data->clat + linout) = *(l1_data->clat +
i);
69 *(l1_data->clon + linout) = *(l1_data->clon +
i);
70 *(l1_data->elat + linout) = *(l1_data->elat +
i);
71 *(l1_data->elon + linout) = *(l1_data->elon +
i);
72 memcpy(l1_data->cal_sum + 5 * linout,
73 l1_data->cal_sum + 5 *
i, 5 * sizeof (
unsigned char));
74 memcpy(l1_data->cal_scan + 6 * linout,
75 l1_data->cal_scan + 6 *
i, 6 * sizeof (
unsigned char));
76 memcpy(l1_data->orb_vec + 3 * linout,
77 l1_data->orb_vec + 3 *
i, 3 * sizeof (
float));
78 memcpy(l1_data->att_ang + 3 * linout,
79 l1_data->att_ang + 3 *
i, 3 * sizeof (
float));
80 *(l1_data->pos_err + linout) = *(l1_data->pos_err +
i);
81 memcpy(l1_data->slope + 6 * linout,
82 l1_data->slope + 6 *
i, 6 * sizeof (
float));
83 memcpy(l1_data->intercept + 6 * linout,
84 l1_data->intercept + 6 *
i, 6 * sizeof (
float));
85 *(l1_data->gain + linout) = *(l1_data->gain +
i);
87 memcpy(l1_data->sen_zen +
npix * linout,
88 l1_data->sen_zen +
npix *
i,
npix * sizeof (
float));
89 memcpy(l1_data->sen_az +
npix * linout,
90 l1_data->sen_az +
npix *
i,
npix * sizeof (
float));
91 memcpy(l1_data->sol_zen +
npix * linout,
92 l1_data->sol_zen +
npix *
i,
npix * sizeof (
float));
93 memcpy(l1_data->sol_az +
npix * linout,
94 l1_data->sol_az +
npix *
i,
npix * sizeof (
float));
95 memcpy(l1_data->all_lat +
npix * linout,
96 l1_data->all_lat +
npix *
i,
npix * sizeof (
float));
97 memcpy(l1_data->all_lon +
npix * linout,
98 l1_data->all_lon +
npix *
i,
npix * sizeof (
float));
99 memcpy(l1_data->Lt_443 +
npix * linout,
100 l1_data->Lt_443 +
npix *
i,
npix * sizeof (
float));
101 memcpy(l1_data->Lt_520 +
npix * linout,
102 l1_data->Lt_520 +
npix *
i,
npix * sizeof (
float));
103 memcpy(l1_data->Lt_550 +
npix * linout,
104 l1_data->Lt_550 +
npix *
i,
npix * sizeof (
float));
105 memcpy(l1_data->Lt_670 +
npix * linout,
106 l1_data->Lt_670 +
npix *
i,
npix * sizeof (
float));
107 memcpy(l1_data->Lt_750 +
npix * linout,
108 l1_data->Lt_750 +
npix *
i,
npix * sizeof (
float));
109 memcpy(l1_data->Lt_11500 +
npix * linout,
110 l1_data->Lt_11500 +
npix *
i,
npix * sizeof (
float));
119 gattr->scan_lines = linout;
120 gattr->n_ctl_lin = linout;
125 ncompr =
nlin - linout;
126 printf(
"cz_clean: %d bad lines (of %d) were compressed out of the L1 file\n",
130 printf(
"cz_clean: No good lines were found in the file\n");