Go to the documentation of this file.
12 (
l1rec->filter[ip]) ||
18 static float radeg =
RADEG;
19 static int firstCall = 1;
27 int32_t evalmask =
l1_input->evalmask;
32 int32_t nwave =
l1file->nbands;
42 printf(
"\nUsing %6.1f nm channel for cloud flagging over water.\n",
l1file->fwave[ibcloud]);
43 printf(
"Using %6.1f nm channel for cloud flagging over land.\n\n",
l1file->fwave[ib412]);
50 for (ip = 0; ip <
l1rec->npix; ip++) {
74 if (!
l1rec->land[ip]) {
75 l1rec->cloud_albedo[ip] =
l1rec->rhos[ip * nwave + ibcloud]
79 l1rec->cloud_albedo[ip] =
l1rec->rhos[ip * nwave + ib412];
91 if (
l1rec->cloud_albedo[ip] > albedo)
95 if ((
l1_input->cloud_eps > 0.0) != 0) {
96 float min_cld_rhos = 1.0;
97 float max_cld_rhos = 1.0;
98 float cld_rhos_ratio = 0.0;
99 if (
l1rec->cloud[ip] ==
ON && !
l1rec->land[ip] &&
l1rec->cloud_albedo[ip] < albedo * 10) {
101 l1rec->rhos[ip * nwave + ib865],
102 l1rec->rhos[ip * nwave + ib670]),
103 l1rec->rhos[ip * nwave + ib555]),
104 l1rec->rhos[ip * nwave + ib412]);
106 l1rec->rhos[ip * nwave + ib865],
107 l1rec->rhos[ip * nwave + ib670]),
108 l1rec->rhos[ip * nwave + ib555]),
109 l1rec->rhos[ip * nwave + ib412]);
110 if (min_cld_rhos > 0.0) {
111 cld_rhos_ratio = max_cld_rhos / min_cld_rhos;
135 printf(
"-E- %s line %d: attempt to set flags from NULL L1 record.\n",
141 nwave =
l1rec->l1file->nbands;
161 else if (
level == 1) {
173 for (iw = 0; iw < nwave; iw++) {
183 printf(
"-E- %s line %d: attempt to set l1 flags at bogus level %d.\n",
184 __FILE__, __LINE__,
level);
int32 l1file(int32 sdfid, int32 *nsamp, int32 *nscans, int16 *dtynum)
char get_cldmask(l1str *l1rec, int32_t ip)
void l1_mask_set(l1str *l1rec, int32_t ip)
int setflags(l1str *l1rec)
int get_sdps_cld_mask(l1str *l1rec, int32_t ip, char *cld_category)
int windex(float wave, float twave[], int ntwave)
void setflagbits_l1(int level, l1str *l1rec, int32_t ipix)