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

Unable to read radiance with AVHRR EPS #2654

Closed
fwfichtner opened this issue Nov 30, 2023 · 3 comments · Fixed by #2655
Closed

Unable to read radiance with AVHRR EPS #2654

fwfichtner opened this issue Nov 30, 2023 · 3 comments · Fixed by #2655
Assignees
Labels

Comments

@fwfichtner
Copy link
Contributor

Describe the bug
It is not possible to read radiance with "avhrr_l1b_eps"-reader anymore

To Reproduce

scene = satpy.Scene(reader="avhrr_l1b_eps", filenames=[dataset_path])
scene.load(["1"], calibration="radiance")

Expected behavior
Judging by the reader I would expect that we can read it: https://github.com/pytroll/satpy/blob/e338294dd2b4924c11c7b08b22b28bc150ecd6f5/satpy/etc/readers/avhrr_l1b_eps.yaml#L20C20-L20C20

It used to be possible before a45f1a0

Actual results

Failed to load DataID(name='1', wavelength=WavelengthRange(min=0.58, central=0.63, max=0.68, unit='µm'), resolution=1050, calibration=<3>, modifiers=()) from <EPSAVHRRFile: '/Users/Username/Downloads/AVHR_xxx_1B_M03_20210421161603Z_20210421161903Z_N_O_20210421165617Z'>
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/envs/stac/lib/python3.11/site-packages/satpy/readers/yaml_reader.py", line 699, in _load_dataset
    projectable = fh.get_dataset(dsid, ds_info)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/stac/lib/python3.11/site-packages/satpy/readers/eps_l1b.py", line 299, in get_dataset
    dataset.attrs["units"] = self.units[key["calibration"]]
                             ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: <3>
Could not load dataset 'DataID(name='1', wavelength=WavelengthRange(min=0.58, central=0.63, max=0.68, unit='µm'), resolution=1050, calibration=<3>, modifiers=())': "Could not load DataID(name='1', wavelength=WavelengthRange(min=0.58, central=0.63, max=0.68, unit='µm'), resolution=1050, calibration=<3>, modifiers=()) from any provided files"

Environment Info:

  • OS: OSX, Windows
  • Satpy Version: 0.45.0
@mraspaud
Copy link
Member

Thanks for reporting this issue! I can reproduce it and will fix it soon.

@mraspaud
Copy link
Member

@fwfichtner Should be fixed in #2655 , feel free to give it a try and report back.

@fwfichtner
Copy link
Contributor Author

That was quick, thanks!

And it also works 🥇

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

Successfully merging a pull request may close this issue.

2 participants