Hi - Current implementation of the chlor_a algorithm blends the Hu CI and O'Reilly OCx algorithms. There are two threshold values that are used to switch between the two. The documentation states when chl < 0.15 mg/m^3 CI is used and when chl > 0.2 mg/m^3 OCx is used (weighted blend of CI and OCx used between the values). My question is: Where does the chl value used to decide which algorithm to use come from? Is it the result of some sort of iteration?
Thanks, Barry
Quick question about blended chlor_a algorithm
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Quick question about blended chlor_a algorithm
Barry,
The documentation also points to the source code, which give a clue :wink:
TL;DR summary:
The chl value used in the threshold test is the Hu chl value for the low end and OCx value for the high end
Sean
The documentation also points to the source code, which give a clue :wink:
TL;DR summary:
The chl value used in the threshold test is the Hu chl value for the low end and OCx value for the high end
float chl_oci(l2str *l2rec, float Rrs[]) {
static float t1 = 0.15;
static float t2 = 0.20;
float chl1 = chlbad;
float chl2 = chlbad;
float chl = chlbad;
chl1 = chl_hu(l2rec, Rrs);
if (chl1 <= t1)
chl = chl1;
else {
chl2 = get_chl_ocx(l2rec, Rrs);
if (chl2 > 0.0) {
if (chl1 >= t2)
chl = chl2;
else {
chl = chl1 * (t2 - chl1) / (t2 - t1)
+ chl2 * (chl1 - t1) / (t2 - t1);
}
}
}
return (chl);
}
Sean
Quick question about blended chlor_a algorithm
Hey Sean! Thank you. Being an old hand at this, I did look at the source code but I guess, also being an old man, I read right past (or just didn't see) the relevant part.
Best regards, Barry
Best regards, Barry