I'm trying to figure out how to implement NASA's chlor_a algorithm in R for MODIS-Aqua, SeaWiFS, and VIIRS-SNPP. The OCx part of it has been no problem, but I'm having trouble finding which wavebands and coefficients to use for the Hu color index algorithm. I've been looking through the 3 sources below and gathering bits and pieces of information, but it would be nice to have a full table of sensor-specific wavebands and optimized coefficients.
NASA chlor_a algorithms
Hu et al. (2012)
Chlorophyll-a algorithms for oligotrophic oceans: A novel approach based on three?band reflectance difference
Hu et al. (2019)
Improving Satellite Global Chlorophyll-a Data Products Through Algorithm Refinement and Data Recovery
Can anyone point me in the right direction?
l2genis the OCSSW source (
$OCSSWROOT/ocssw_src/src/l2gen/get_chl.c). Many of the coefficients used by
l2gencome from sensor-specific parameter files so it is often easier if you can build
l2genfrom source locally and add some print statements. If you have access to macOS or linux you can install the current source from the SeaDAS 8 GUI. I think the instructions for installing the OCSSW software manually are outdated, but that may not matter for the Hu algorithm.
l2genshould be straightforward if you can arrange to use one of the OS versions used by NASA, e.g., in a VM. Newer linux versions have removed some functions from
glibcso the 3rd party sources won't build.
The Hu CI does not have sensor specific coefficients. The first reference you list identifies the current coefficients (and bands) to use for the OCx alogrithms.
Coincidentally, I was just fiddling around with an analysis and wanted to apply the OCx/Hu algorithms to some insitu data...I used Python, but should be easy enough to translate to R. Since you have OCx under control, here's what you can do for Hu and "OCI" (the blending we do operationally for our chlor_a product). (The functions below are based on the code George referenced.)
Hu from the 2019 paper (the coefficients differ from the 2012 paper, but otherwise it's the same):
w = np.array([443., 555., 670.])
a = np.array([-0.4287, 230.47])
#For the 2012 version use:
# a = np.array([-0.4909, 191.6590])
chl = np.NaN
ci = np.min([rrs555 - (rrs443 + (w - w) / (w - w)*(rrs670 - rrs443)), 0.0]);
if ci <= 0.0:
chl = np.power(10.0,(a + a * ci))
To blend the OCx and Hu. This uses the 2019 paper as well, but with a lower max threshold value because the Hu algorithm with the 2019 coefficients doesn't produce a value above about 0.37 mg/m3. To mimic what we do operationally (until we reprocess), set
t1 = 0.25
t2 = 0.35
chl = np.NaN
if (hu <= t1):
chl = hu
if (hu >= t2):
chl = ocx
chl = hu * (t2 - hu) / (t2 - t1) + ocx * (hu - t1) / (t2 - t1);
chl = ocx
The OCx coefficients for the reprocessing will also change to those from the O'Reilly and Werdell (2019) paper:
Hope this helps.
The chlor_a description page says the algorithm uses the instrument-specific wavebands closest to 443, 555, and 670... so for MODIS this should be 443, 555, 667, and for VIIRS 443, 551, 671.
... but I've read the algorithm uses MODIS 547 instead... is this true, and is it for consistency with the OCx algorithm?
Also I've seen mentions in those papers of the non-SeaWiFS green bands (MODIS 547 and VIIRS 551) being shifted to 555nm using results from regressions with NOMAD data, but the details don't appear to be in the paper, and I didn't see any mention of them doing the same with the red bands...
... Are the MODIS and VIIRS bands shifted to 555nm and 670nm, and if so, what factor is being used?
Since the impact of such a small shift in wavelength from 547 to 555nm can be rather large (8-10% in clear waters) ,there is a conversion factor applied to the Rrs from the non-555nm bands to approximate Rrs at 555nm. Yes, it was derived from the NOMAD dataset, but I don't think this method was ever published. We don't exactly hide it, though I'll admit it's not exactly obvious where to find it...the function to derive this conversion factor can be found here:
https://oceancolor.sci.gsfc.nasa.gov/do ... ource.html. It's simple enough that you should have no trouble converting it to R.
The difference in the Rrs for the red bands is *much* smaller and so a similar adjustment was not derived for the 670nm-ish bands.
Thanks for all your help!