Go to the documentation of this file.
21 static float radeg = 3.141592654 / 180.;
23 static int firstCall = 1;
32 l1str *
l1rec = l2rec->l1rec;
38 if ((Fo = (
float *) calloc(
nbands,
sizeof (
float))) ==
NULL) {
39 printf(
"-E- : Error allocating memory to Fo in get_depth\n");
43 for (ib = 0; ib <
nbands; ib++) {
44 iib = l2rec->bindx[ib];
46 Fo[iib] =
l1rec->l1file->Fonom[iib];
48 Fo[iib] =
l1rec->l1file->Fobar[iib];
52 for (ip = 0; ip <
l1rec->npix; ip++) {
63 mu = cos(
l1rec->senz[ip] * radeg);
64 diff = (l2rec->l1rec->Lt[ipb + 7] - 0.7 * l2rec->l1rec->Lt[ipb + 1]) / (1.0 +
mu0 /
mu);
74 if (l2rec->nLw[ipb + 2] <= 0.0 || l2rec->nLw[ipb + 4] <= 0.0) {
79 Rrs490 = l2rec->nLw[ipb + 2] / Fo[2];
80 Rrs555 = l2rec->nLw[ipb + 4] / Fo[4];
82 depth[ip] = 43.0 * (-0.95 + log(1000.0 * Rrs490) / log(1000.0 * Rrs555));
83 if (depth[ip] < 0.0) depth[ip] = 0.0;
void get_depth_classification(l2str *l2rec, float depth[])
subroutine diff(x, conec, n, dconecno, dn, dconecmk, units, u, inno, i, outno, o, input, deriv)