Go to the documentation of this file.
6 static float minval = 0.0;
7 static float maxval = 10.0 * 1000;
10 static int firstCall = 1;
11 static float a = 203.2;
12 static float b = -1.034;
27 if (ib1 < 0 || ib2 < 0) {
28 printf(
"-E- %s line %d: required bands not available for Stramski POC\n",
37 if (Rrs1 >= 0.0 && Rrs2 > 0.0) {
39 poc =
a * pow(Rrs1 / Rrs2,
b);
52 l1str *
l1rec = l2rec->l1rec;
53 uncertainty_t *uncertainty=
l1rec->uncertainty;
54 float *wave = l2rec->l1rec->l1file->fwave;
56 static int firstCall = 1;
57 static float a = 203.2;
58 static float b = -1.034;
69 uRrs2_new = calloc(1,
sizeof(
float));
84 if (ib1 < 0 || ib2 < 0) {
85 printf(
"-E- %s line %d: required bands not available for Stramski POC\n",
92 Rrs1 = l2rec->Rrs[ipb + ib1];
93 Rrs2 = l2rec->Rrs[ipb + ib2];
94 uRrs1 = l2rec->Rrs_unc[ipb + ib1];
95 uRrs2 = l2rec->Rrs_unc[ipb + ib2];
99 if (Rrs1 >= 0.0 && Rrs2 > 0.0) {
102 dPocdRat =
a*
b*pow(rat,
b-1.);
104 dRatdRrs2 = -Rrs1/pow(Rrs2,2.);
105 dPocdRrs1 = dPocdRat * dRatdRrs1;
106 dPocdRrs2 = dPocdRat * dRatdRrs2;
108 upoc = sqrt ( pow(dPocdRrs1*uRrs1,2) + pow(dPocdRrs2*(*uRrs2_new),2));
119 static int firstCall = 1;
120 static float a = 308.3;
121 static float b = -1.639;
136 if (ib1 < 0 || ib2 < 0) {
137 printf(
"-E- %s line %d: required bands not available for Stramski POC\n",
146 if (Rrs1 >= 0.0 && Rrs2 > 0.0) {
148 poc =
a * pow(Rrs1 / Rrs2,
b);
161 l1str *
l1rec = l2rec->l1rec;
162 uncertainty_t *uncertainty=
l1rec->uncertainty;
163 float *wave = l2rec->l1rec->l1file->fwave;
165 static int firstCall = 1;
166 static float a = 308.3;
167 static float b = -1.639;
177 uRrs2_new = (
float*) calloc(1,
sizeof(
float));
193 if (ib1 < 0 || ib2 < 0) {
194 printf(
"-E- %s line %d: required bands not available for Stramski POC\n",
201 Rrs1 = l2rec->Rrs[ipb + ib1];
202 Rrs2 = l2rec->Rrs[ipb + ib2];
203 uRrs1 = l2rec->Rrs_unc[ipb + ib1];
204 uRrs2 = l2rec->Rrs_unc[ipb + ib2];
207 if (Rrs1 >= 0.0 && Rrs2 > 0.0) {
211 dPocdRat =
a*
b*pow(rat,
b-1.);
213 dRatdRrs2 = -Rrs1/pow(Rrs2,2.);
214 dPocdRrs1 = dPocdRat * dRatdRrs1;
215 dPocdRrs2 = dPocdRat * dRatdRrs2;
217 upoc = sqrt ( pow(dPocdRrs1*uRrs1,2) + pow(dPocdRrs2*(*uRrs2_new),2));
225 void get_poc(l2str *l2rec, l2prodstr *
p,
float prod[]) {
227 l1str *
l1rec = l2rec->l1rec;
230 for (ip = 0; ip <
l1rec->npix; ip++) {
254 if (prod[ip]<
p->min || prod[ip]>
p->max)
258 printf(
"Error: %s : Unknown product specifier: %d\n", __FILE__,
p->cat_ix);
263 if (prod[ip] == badval)
265 else if (prod[ip] < minval || prod[ip] > maxval)
#define CAT_poc_stramski_490
int bindex_get(int32_t wave)
#define CAT_poc_unc_stramski_443
float conv_rrs_to_555(float Rrs, float wave, float uRrs_in, float *uRrs_out)
void get_poc(l2str *l2rec, l2prodstr *p, float prod[])
#define CAT_poc_unc_stramski_490
float poc_stramski_443(float *Rrs, float *wave)
float poc_stramski_490(float *Rrs, float *wave)
#define CAT_poc_stramski_443
#define CAT_poc_stramski_hybrid
float unc_poc_stramski_443(l2str *l2rec, int ipb)
float unc_poc_stramski_490(l2str *l2rec, int ipb)
float poc_stramski_hybrid(float *Rrs, int32_t sensorID)
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a