Go to the documentation of this file.
8 free((
void *) l2rec->data);
23 int32_t len = 5 *
sizeof(int32_t)*
npix
24 + 5 *
sizeof(
float)*
npix
28 len = len / 4 * 4 + 4;
30 if ((
p = (
char *) malloc(len)) ==
NULL) {
32 "-E- %s line %d: Memory allocation failure.\n",
41 l2rec->num_iter = (int32_t *)
p;
42 p +=
sizeof(int32_t)*
npix;
43 l2rec->aermodmin = (int32_t *)
p;
44 p +=
sizeof(int32_t)*
npix;
45 l2rec->aermodmax = (int32_t *)
p;
46 p +=
sizeof(int32_t)*
npix;
47 l2rec->aermodmin2 = (int32_t *)
p;
48 p +=
sizeof(int32_t)*
npix;
49 l2rec->aermodmax2 = (int32_t *)
p;
50 p +=
sizeof(int32_t)*
npix;
52 l2rec->chl = (
float *)
p;
54 l2rec->eps = (
float *)
p;
56 l2rec->aerratio = (
float *)
p;
58 l2rec->aerratio2 = (
float *)
p;
60 l2rec->aerindex = (
float *)
p;
64 l2rec->taua = (
float *)
p;
66 l2rec->La = (
float *)
p;
68 l2rec->Lw = (
float *)
p;
70 l2rec->nLw = (
float *)
p;
72 l2rec->nLw_unc = (
float *)
p;
74 l2rec->brdf = (
float *)
p;
76 l2rec->Rrs = (
float *)
p;
78 l2rec->Rrs_unc = (
float *)
p;
80 l2rec->outband_correction = (
float *)
p;
82 l2rec->a = (
float *)
p;
84 l2rec->bb = (
float *)
p;
87 if ((len - (int32_t) (
p - l2rec->data)) < 0) {
88 printf(
"%s Line %d: bad allocation on L2 record\n", __FILE__, __LINE__);
95 l2rec->Rrs_raman =
NULL;
98 printf(
"Allocated %d bytes in L2 record.\n", (
int) (
p - l2rec->data));
void free_l2(l2str *l2rec)
int alloc_l2(l1str *l1rec, l2str *l2rec)