Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading the EUMETSAT compact viirs format returns wrong platform name (J01 instead of NOAA-20) #716

Closed
adybbroe opened this issue Apr 10, 2019 · 2 comments · Fixed by #717

Comments

@adybbroe
Copy link
Contributor

adybbroe commented Apr 10, 2019

Describe the bug

When reading the VIIRS compact format data the platform_name returned from the reader is J01 while it should be NOAA-20

To Reproduce

from satpy.scene import Scene
from satpy import find_files_and_readers
from datetime import datetime
from satpy.utils import debug_on
debug_on()

DATADIR = "/home/a000680/data/ears-viirs/noaa_new"

my_files = find_files_and_readers(base_dir=DATADIR,
                                  reader='viirs_compact',
                                  start_time=datetime(2019, 4, 9, 13, 1, 0),
                                  end_time=datetime(2019, 4, 9, 13, 18, 0))
scn = Scene(filenames=my_files)
scn.load(['true_color'])
scn.save_dataset('true_color', './true_color_NOAA20.png')

Expected behavior
No Warnings or errors from Pyspectral
and a nice image in the end

Actual results

Pyspectral looks for a file that doesn't exist, and then the true color either fails (pyspectral >=v0.8.5) or it just doesn't use the RSR data to derive the atm corrected VIIRS bands.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment Info:

  • OS: Linux
  • Satpy Version: [0.14.0]
  • Pyspectral Version: 0.8.4 and 0.8.7
  • Readers and writers dependencies (when relevant): [run from satpy.config import check_satpy; check_satpy()]

Additional context
Add any other context about the problem here.

@djhoese
Copy link
Member

djhoese commented Apr 10, 2019

On slack you mentioned https://github.com/pytroll/pyspectral/blob/4cd92661e6a5bfde3526a832e1b8eab9b741592d/pyspectral/rayleigh.py#L174

This was changed as part of pytroll/pyspectral#56 but I'm not really sure why. I don't remember at least. I don't/wouldn't mind if pyspectral went back to raising an exception but I think it should do it in a sane way. That is, get_effective_wavelength can raise an exception, but I think it should be caught (IOError, OSError) by the Rayleigh class which should then raise a KeyError or IOError. I say KeyError/IOError because that's what SatPy is currently trying to catch. If SatPy catches these then it will try using the wavelength instead of the platform/sensor/band.

Most importantly, the viirs_l1b reader also needs to be fixed to return NOAA-20 too.

@adybbroe
Copy link
Contributor Author

@djhoese I can only agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants