Go to the documentation of this file.
7 free((
void *)
l1rec->data);
31 + 1 *
sizeof (
float)*
nbands
32 + 4 *
sizeof (int32_t) *
npix
33 + 2 *
sizeof (
short)*
npix
34 + 15 *
sizeof (char)*
npix;
37 len = (len / 4 + 1)*4;
39 if ((
p = (
char *) malloc(len)) ==
NULL) {
41 "-E- %s line %d: Memory allocation failure.\n",
66 l1rec->delphi = (
float *)
p;
68 l1rec->csolz = (
float *)
p;
70 l1rec->csenz = (
float *)
p;
72 l1rec->alpha = (
float *)
p;
74 l1rec->scattang = (
float *)
p;
94 l1rec->sfcrh = (
float *)
p;
98 l1rec->icefr = (
float *)
p;
100 l1rec->no2_tropo = (
float *)
p;
102 l1rec->no2_strat = (
float *)
p;
104 l1rec->no2_frac = (
float *)
p;
106 l1rec->ws_unc = (
float *)
p;
108 l1rec->wd_unc = (
float *)
p;
110 l1rec->mw_unc = (
float *)
p;
112 l1rec->zw_unc = (
float *)
p;
114 l1rec->pr_unc = (
float *)
p;
116 l1rec->oz_unc = (
float *)
p;
118 l1rec->wv_unc = (
float *)
p;
120 l1rec->rh_unc = (
float *)
p;
122 l1rec->no2_tropo_unc = (
float *)
p;
124 l1rec->no2_strat_unc = (
float *)
p;
126 l1rec->height = (
float *)
p;
130 l1rec->glint_coef = (
float *)
p;
132 l1rec->cloud_albedo = (
float *)
p;
134 l1rec->aerindex = (
float *)
p;
136 l1rec->sstref = (
float *)
p;
138 l1rec->sssref = (
float *)
p;
140 l1rec->rho_cirrus = (
float *)
p;
146 l1rec->Lt_unc = (
float *)
p;
148 l1rec->t_h2o = (
float *)
p;
150 l1rec->t_o2 = (
float *)
p;
152 l1rec->tg_sol = (
float *)
p;
154 l1rec->tg_sen = (
float *)
p;
156 l1rec->t_sol = (
float *)
p;
158 l1rec->t_sen = (
float *)
p;
160 l1rec->rhof = (
float *)
p;
170 l1rec->polcor = (
float *)
p;
172 l1rec->dpol = (
float *)
p;
176 l1rec->rhos = (
float *)
p;
178 l1rec->sw_n = (
float *)
p;
180 l1rec->sw_a = (
float *)
p;
182 l1rec->sw_bb = (
float *)
p;
184 l1rec->sw_a_avg = (
float *)
p;
186 l1rec->sw_bb_avg = (
float *)
p;
188 l1rec->radcor = (
float *)
p;
192 l1rec->Ltir = (
float *)
p;
202 l1rec->nobs = (int32_t*)
p;
203 p +=
sizeof (int32_t) *
npix;
204 l1rec->pixnum = (int32_t*)
p;
205 p +=
sizeof (int32_t) *
npix;
206 l1rec->flags = (int32_t*)
p;
207 p +=
sizeof (int32_t) *
npix;
208 l1rec->pixdet = (int32_t*)
p;
209 p +=
sizeof (int32_t) *
npix;
212 l1rec->ancqc = (
short *)
p;
213 p +=
sizeof (short)*
npix;
214 l1rec->ssttype = (
short *)
p;
215 p +=
sizeof (short)*
npix;
219 p +=
sizeof (char)*
npix;
221 p +=
sizeof (char)*
npix;
222 l1rec->cloud = (
char *)
p;
223 p +=
sizeof (char)*
npix;
224 l1rec->glint = (
char *)
p;
225 p +=
sizeof (char)*
npix;
227 p +=
sizeof (char)*
npix;
228 l1rec->swater = (
char *)
p;
229 p +=
sizeof (char)*
npix;
231 p +=
sizeof (char)*
npix;
232 l1rec->solzmax = (
char *)
p;
233 p +=
sizeof (char)*
npix;
234 l1rec->senzmax = (
char *)
p;
235 p +=
sizeof (char)*
npix;
236 l1rec->stlight = (
char *)
p;
237 p +=
sizeof (char)*
npix;
238 l1rec->absaer = (
char *)
p;
239 p +=
sizeof (char)*
npix;
240 l1rec->navfail = (
char *)
p;
241 p +=
sizeof (char)*
npix;
242 l1rec->navwarn = (
char *)
p;
243 p +=
sizeof (char)*
npix;
244 l1rec->filter = (
char *)
p;
245 p +=
sizeof (char)*
npix;
247 p +=
sizeof (char)*
npix;
249 if ((len - (int32_t) (
p -
l1rec->data)) < 0) {
250 printf(
"%s Line %d: bad allocation on L1 record\n", __FILE__, __LINE__);
261 printf(
"Allocated %d bytes in L1 record.\n", (int32_t) (
p -
l1rec->data));
int32 l1file(int32 sdfid, int32 *nsamp, int32 *nscans, int16 *dtynum)
void free_l1(l1str *l1rec)
int32_t alloc_l1(filehandle *l1file, l1str *l1rec)