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 reader for CSPP VIIRS Surface Reflectance EDR #616

Closed kathys closed 10 months ago

kathys commented 1 year ago

Would like a reader for the CSPP VIIRS Land Surface Reflectance products. Nick had an initial version of this reader that was built as a plug-in for Polar2Grid Version 2.3. It never worked exactly the way we wanted it to, but there is a version that exists. I found this pull request: https://github.com/pytroll/satpy/pull/1483

I would like the reader to support all of the bands that are available, which are the 3 - 375m visible bands (I1, I2, I3) and the visible spectrum M-Band spatial resolution bands 1-11.

Along with that, I would like the software to support the creation of true and false color RGBs.

There are Fill Values and scale factors for each array (scale_factor 0.0001, _FillValue = -9999).

Contact nickb for more information. Test data files are available for SNPP and NOAA21 VIIRS:

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

djhoese commented 1 year ago

I made a couple comments on Nick's PR. One other question is what do you want these products named in Polar2Grid? Nick's PR has srf_i1, but do we maybe want them to just be i01 like the VIIRS SDR reader? For true and false color, should they be rayleigh corrected or is that a TOA-only thing?

kathys commented 1 year ago

I think it would be easier for users to just use the same variable names as the SDR reader.

True and false color do not need to be Rayleigh corrected. That correction is included as part of the creation of this product.

djhoese commented 1 year ago

Ok interesting. So these would also not need the / cos(SZA) then, right?

kathys commented 1 year ago

Right. They do not need to be divided by the cosine of the solar zenith angle.

djhoese commented 1 year ago

As discussed in the meeting, true and false color will be the only defaults. Kathy considered I01, but we're unsure what's best.

~Bands should be named with both v2.3 lowercase names and satpy uppercase names for compatibility.~

Bands should be named srf_i01 and srf_true_color. Kathy mentions that the filenames should include surface somewhere as to not be confused with SDR versions which are different (TOA versus surface).

djhoese commented 11 months ago

What, if any, are the differences between "JRR" files and "SurfRefl" files? Is the "SurfRefl" the CSPP LEO name?

kathys commented 11 months ago

The output files with the "JRR" and "SurfRefl" names are the standard names that NOAA uses. Those are the product file names that are output from the EDR software that we received from NOAA. The only difference between these products and the official versions is that we added Vegetation Indices to the output SurfRefl files.

So if you ordered data from CLASS, you would get the same files, although the versions may be different at any give time.

djhoese commented 11 months ago

Let me know if I'm missing something, but I'm looking at the composite configurations and I can create a true_color and the EUMETSAT natural_color recipe (I03, I02, I01), but the false_color we usually make (M11, M07, M05 with optional green sharpening with I02) uses the M11 band which is not available from the surface reflectance files.

kathys commented 11 months ago

I am looking at one of the files now, and I do see M11 reflectances available: ncdump -h SurfRefl_v1r2_npp_s202307221804107_e202307221805349_c202307221945170.nc

short \750m\ Surface\ Reflectance\ Band\ M11(Along_Track_750m, Along_Scan_750m) ; \750m\ Surface\ Reflectance\ Band\ M11:scale_factor = 0.0001f ; \750m\ Surface\ Reflectance\ Band\ M11:add_offset = 0.f ; \750m\ Surface\ Reflectance\ Band\ M11:coordinates = "Latitude_at_375m_resolution Longitude_at_375m_resolution" ; \750m\ Surface\ Reflectance\ Band\ M11:units = "unitless" ; \750m\ Surface\ Reflectance\ Band\ M11:platform = "NPP" ; \750m\ Surface\ Reflectance\ Band\ M11:instrument = "VIIRS" ; \750m\ Surface\ Reflectance\ Band\ M11:valid_min = -0.01f ; \750m\ Surface\ Reflectance\ Band\ M11:valid_max = 1.6f ; \750m\ Surface\ Reflectance\ Band\ M11:_FillValue = -9999s ;

djhoese commented 11 months ago

Yup you are absolutely right. That's the problem with alphabetical ordering that doesn't know about numbers in the name.