robintw / Py6S

A Python interface to the 6S Radiative Transfer Model
GNU Lesser General Public License v3.0
191 stars 105 forks source link

MODIS ocean bands #29

Closed jgomezdans closed 7 years ago

jgomezdans commented 7 years ago

The original version of 6S didn't have the MODIS ocean bands, and used the same bandpass functions for TERRA and AQUA. In this commit, I have added all the relevant MODIS bands (so the usual 7 at 250 and 500m, plus the 1 km bands for the ocean). I have also used different band pass characteristics for AQUA and TERRA, as they are slightly different (not that it matters much with the kind of 2.5 nm spectral sampling that goes on within 6S, but they're there). I have used this code to create the bandpass functions in a Py6S format from the original data files (TERRA and AQUA).

I've only done some very preliminary testing, but the results over the common bands which were already available are fairly small (<2%). Also, the chosen band names can probably be improved, as they're pretty cumbersome.

robintw commented 7 years ago

Thanks for this contribution.

It all seems fine apart from ACCURATE_MODIS_AQUA_8_RSR_412 which gives an error when used - it doesn't seem to have anywhere near the right number of entries in the filter function array. Any chance you could look into what went wrong for that one?

Also, I'm wondering whether we need the _RSR_123 bits at the end of the names? Is there a particular benefit to having them, do you think?

(Again, sorry for the delay in dealing with this)

jgomezdans commented 7 years ago

Mmmm... I guess the boundaries for that particular wavelength (Band 8/AQUA) are wrong, the upper limit ought to go up to 0.430 um. However, the reference RSR files aren't available to me right now (the website isn't responding), and I need to double check that.

Regarding the names, I was a bit unclear whether having the wavelength directly on the variable name would be useful, but I'm happy to drop that. I'll update the commit when the website is back up (there are other sources of RSR, but they are slightly different being given by detector etc.)

robintw commented 7 years ago

You mentioned something on Twitter about having updated the bands a bit - does anything else need committing here, or are you ok for this to be merged now?

jgomezdans commented 7 years ago

The only change that might be needed now is to simplify variable names. But other than that, it's complete (sorry for delay, been poorly)