Quick question about blended chlor_a algorithm

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
blesht
Posts: 86
Joined: Mon Sep 19, 2005 3:06 pm America/New_York
Answers: 0

Quick question about blended chlor_a algorithm

by blesht » Fri Aug 02, 2019 12:00 pm America/New_York

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

Filters:

OB.DAACx - SeanBailey
Posts: 1519
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1
Been thanked: 9 times

Quick question about blended chlor_a algorithm

by OB.DAACx - SeanBailey » Fri Aug 02, 2019 1:34 pm America/New_York

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

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

blesht
Posts: 86
Joined: Mon Sep 19, 2005 3:06 pm America/New_York
Answers: 0

Quick question about blended chlor_a algorithm

by blesht » Fri Aug 02, 2019 1:50 pm America/New_York

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

Post Reply