rfernand387 / LEAF-Toolbox

MIT License
41 stars 21 forks source link

Champagne: LAI values to LOW for S2 and too much invalid in comparison to SNAP processor #4

Closed rfernand387 closed 2 years ago

rfernand387 commented 2 years ago
Hi Richard, We’ve done a bit of exploring with the LEAF toolbox (I think using the previous version). A couple of questions. 1. There seems to missing data when you move from the L1C to the L2A products in GEE (for example, our study site in Manitoba in 2021 had 81 images at L1C but only 48 at L2A). Not sure if you know why that would be? I’m not embedded enough in the S2 archives to know why/if they only correct a subset of the data. 2. We are getting much lower numbers with LEAF than we got with SL2P- not sure if we did something wrong, but the chart is below and I’ve attached the spreadsheet with the numbers (this if 50 points pulled from a series of fields in Manitoba for 2020, each colour is a date). Also, many pixels returned a no-data with LEAF where we had a value in SNAP, but that might be an incorrect setting on our part. Anyways, if either of you have any suggestions, let us know. Calvin was able to implement a process to calculate the LAI from the S2A data sets pretty efficiently, but he may have further questions for you about the details.
rfernand387 commented 2 years ago

It was an error in the input bands for S2 MSI in our Javascript code base (our python code we use for production and validation was correct – relief to Lixin as we have made 1.5Tbytes of output!)

I have done three things:

  1. I fixed the dictionaries in LEAF-Toolbox-SL2P and LEAF-Toolbox-CCRS for both the GUI and stand alone JS code indicated in the wiki https://github.com/rfernand387/LEAF-Toolbox/wiki
  2. I have verified both the GUI and JS code gives the same answer as the python operational code.
  3. I compared LEAF toolbox before and after bug fix with SNAP ((https://code.earthengine.google.com/eb8eea88eeae5bdbfa739b86c27ffaec ). You will see the result before bux fix is like what AAFC found and after bug fix is very close to SNAP but not exact. The SNAP implementation has an error that Marie Weiss made when making the calibration database that results in too many ow LAI samples while LEAF-Toolbox-SL2P exactly implements Weiss and Baret 2016. (see https://github.com/rfernand387/LEAF-Toolbox/blob/master/Documents/System%20Design/LEAF%20Service%20System%20Design.docx). The corrected LEAF-Toolbox-SL2P also now has less invalid retrievals than SNAP due to this correction.

Sorry for this. The reason was the current use of in-line dictionaries in the JS code. I will be modifying the code to use a single master dictionary but I want to do this carefully so we don’t see any changes in output.
I suggest if you guys are not using the GUI interface that you use the JS code base directly since it is much more modular (https://github.com/rfernand387/LEAF-Toolbox/tree/master/Source-js).

Please do not hesitate to bring any issues up (best is raise them immedeatly on the githubhttps://github.com/rfernand387/LEAF-Toolbox/

Richard