pytroll/pyspectral

Pyspectral is trying to read wrong RSR file for FY-3D/MERSI-2

pnuu opened this issue · 4 comments

pnuu commented

Problem description

The filename of FY-3D/MERSI-2 RSR data in Zenodo is rsr_mersi-2_FY-3D.h5, but the latest Pyspectral 0.12.0 is trying to read rsr_mersi2_FY-3D.h5.

Expected Output

The rsr_mersi-2_FY-3D.h5 should be read.

Actual Result, Traceback if applicable

[INFO: 2022-10-21 02:20:24 : satpy.modifiers.spectral] Getting reflective part of 20
[DEBUG: 2022-10-21 02:20:24 : pyspectral.rsr_reader] Filename: /home/users/satman/.local/share/pyspectral/rsr_mersi2_FY-3D.h5
[WARNING: 2022-10-21 02:20:24 : pyspectral.rsr_reader] No rsr file /home/users/satman/.local/share/pyspectral/rsr_mersi2_FY-3D.h5 on disk
[INFO: 2022-10-21 02:20:24 : pyspectral.rsr_reader] RSR data up to date, so seems there is no support for this platform and sensor

and another:

[DEBUG: 2022-10-21 03:53:49 : pyspectral.rsr_reader] Filename: /home/users/satman/.local/share/pyspectral/rsr_mersi2_FY-3D.h5
[WARNING: 2022-10-21 03:53:49 : pyspectral.rsr_reader] No rsr file /home/users/satman/.local/share/pyspectral/rsr_mersi2_FY-3D.h5 on disk
[INFO: 2022-10-21 03:53:49 : pyspectral.rsr_reader] RSR data up to date, so seems there is no support for this platform and sensor
[ERROR: 2022-10-21 03:53:49 : pyspectral.rayleigh] No spectral responses for this platform and sensor: FY-3D mersi-2

Versions of Python, package at hand and relevant dependencies

Python 3.10, Pyspectral 0.12.0.

pnuu commented

The incoming message has the correct sensor name mersi-2, and I can't find where the mersi2 is put to use in the code 🤔

pnuu commented

I added another log snippet, where the reported instrument name is mersi-2.

pnuu commented

Ok, the instrument name is adjusted here: https://github.com/pytroll/pyspectral/blob/main/pyspectral/utils.py#L540 , introduced in 290f5c2

Two things: