Go to the documentation of this file.
18 #define PARWN (PARW2-PARW1)+1
20 static float fqymin = 0.0;
21 static float fqymax = 0.3;
22 static float flhmin = 0.0;
36 static int32_t ib665, ib680, ib709;
37 static int firstCall = 1;
49 l1str *
l1rec = l2rec->l1rec;
59 printf(
"No fluorescence algorithm available for this sensor.\n");
64 printf(
"No fluorescence algorithm available for this sensor.\n");
72 printf(
"No fluorescence algorithm available for this sensor.\n");
78 for (ip = 0; ip <
l1rec->npix; ip++) {
86 nLw1 = l2rec->nLw[ipb + ib665];
87 nLw2 = l2rec->nLw[ipb + ib680];
88 nLw3 = l2rec->nLw[ipb + ib709];
90 Lf1 =
l1file->fwave[ib665];
91 Lf2 =
l1file->fwave[ib680];
92 Lf3 =
l1file->fwave[ib709];
98 if (
l1rec->mask[ip] || nLw1 < -0.01 || nLw2 < -0.01 || nLw3 < -0.01) {
107 base = nLw3 + (nLw1 - nLw3) * ((Lf3- Lf2) / (Lf3 - Lf1));
108 flh[ip] = nLw2 -
base;
132 static int32_t ib665, ib680, ib709;
133 static int firstCall = 1;
145 l1str *
l1rec = l2rec->l1rec;
155 printf(
"No fluorescence algorithm available for this sensor.\n");
160 printf(
"No fluorescence algorithm available for this sensor.\n");
168 printf(
"No fluorescence algorithm available for this sensor.\n");
175 for (ip = 0; ip <
l1rec->npix; ip++) {
179 ipb =
l1file->nbands * ip;
183 Lw1 = l2rec->Lw[ipb + ib665];
184 Lw2 = l2rec->Lw[ipb + ib680];
185 Lw3 = l2rec->Lw[ipb + ib709];
187 Lf1 =
l1file->fwave[ib665];
188 Lf2 =
l1file->fwave[ib680];
189 Lf3 =
l1file->fwave[ib709];
203 if (
l1rec->mask[ip] || Lw1 < -0.01 || Lw2 < -0.01 || Lw3 < -0.01) {
213 base = Lw3 + (Lw1 - Lw3) * ( (Lf3- Lf2) / (Lf3 - (Lf1)));
214 flh[ip] = Lw2 -
base;
221 if (flh[ip] < flhmin) {
241 static int firstCall = 1;
247 l1str *
l1rec = l2rec->l1rec;
253 if ((ipar = (
float *) calloc(
l1rec->npix, sizeof (
float))) ==
NULL) {
254 printf(
"-E- %s line %d: Unable to allocate space for ipar.\n",
258 if ((fsat = (
float *) calloc(
l1rec->npix, sizeof (
float))) ==
NULL) {
259 printf(
"-E- %s line %d: Unable to allocate space for fsat.\n",
272 for (ip = 0; ip <
l1rec->npix; ip++) {
276 if (!
l1rec->mask[ip] && l2rec->chl[ip] > 0.0 && fsat[ip] >= 0.0) {
279 fqy[ip] = 0.01 * fsat[ip] / (0.0302 * l2rec->chl[ip]) * ipar[ip]
282 if (!isfinite(fqy[ip])) {
285 }
else if (fqy[ip] < fqymin || fqy[ip] > fqymax) {
int32 l1file(int32 sdfid, int32 *nsamp, int32 *nscans, int16 *dtynum)
void get_fqy(l2str *l2rec, float fqy[])
void get_fsat(l2str *l2rec, float flh[])
void get_ipar(l2str *l2rec, float ipar[])
int windex(float wave, float twave[], int ntwave)
void get_flh(l2str *l2rec, float flh[])