ssec / polar2grid

Tools for reading, remapping, and writing satellite instrument data.
http://www.ssec.wisc.edu/software/polar2grid/
GNU General Public License v3.0
71 stars 33 forks source link

Create new reader for CSPP VIIRS Vegetation Indices #617

Closed kathys closed 10 months ago

kathys commented 1 year ago

Request the addition of a reader fore the CSPP VIIRS Vegetation Index products which are parameters that are part of the CSPP Land Surface Reflectance NetCDF product files. There are two different arrays we would like to support:

NDVI (Normalized Difference Vegetation Index) EVI (Ehanced Vegetation Index)

Again, Nick did create readers for these two arrays as a plug-in for Polar2Grid Version 2.3. But it never really worked correctly.

There is a standard color table that is used for the Vegetation Index products, and I would like it to be applied by default. Nick and I worked hard on the reader because there are a bunch of Quality Flag bits that need to be used to screen out things like clouds, aerosols, snow/ice, etc. It is important for you to start with what Nick was working to save you from having to go through all of this again. It includes the application of the color table too.

Test product files for the Vegetation Index reader can be found here:

bumi:/data/users/kathys/test_data/viirs_edr/j01/lsr bumi:/data/users/kathys/test_data/viirs_edr/npp/lsr

djhoese commented 1 year ago

Where is Nick's existing code?

kathys commented 1 year ago

I found the most recent tarball that Nick provided to me in May 2022:

bumi:/data/users/kathys/test_data/viirs_edr/polar2grid_v_2_3-viirs-lsr-patch-v0.6.tar.gz

kathys commented 1 year ago

Nick pointed me here: https://gitlab.ssec.wisc.edu/cspp/cspp-viirs-lsr-polar2grid-extension

djhoese commented 1 year ago

As discussed in the meeting today, I'll make two readers in Satpy. One for the surface reflectances (see #616) that only has the surface refl bands and not the optional NDVI-based products (even though they might be in the files). The other reader will be for the vegetation indices and will have two file types, one for veg index files and one for surface reflectance files with priority going to veg index files. That way if someone passed both types of files to the veg index reader, only the veg index files would be used.

djhoese commented 11 months ago

An update on decisions:

There will be one reader called viirs_edr that will look for the surface reflectance files. These files will contain vegetation indexes iff they came from CSPP software. The NOAA processing only produces a gridded vegetation index product separately from the surface reflectance file. The initial version of this reader (as far as P2G funding goes) will not support these NOAA VI files. This means the reader will need to dynamically check if the VI variables are in the surface reflectance for them to be considered "available". That means one reader (viirs_edr), one file type for these variables, and 2 possibly unavailable VI products (NDVI, EVI).

djhoese commented 11 months ago

For my future reference, here is a copy of the standard NDVI table that should be used:

https://gitlab.ssec.wisc.edu/cspp/cspp-viirs-lsr-polar2grid-extension/-/blob/master/src/colormaps/viirs_l2_lsr_ndvi.cmap