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

NWCSAF reader does not support GOES or HIMAWARI #1110

Closed
gerritholl opened this issue Mar 11, 2020 · 2 comments
Closed

NWCSAF reader does not support GOES or HIMAWARI #1110

gerritholl opened this issue Mar 11, 2020 · 2 comments

Comments

@gerritholl
Copy link
Member

Feature Request

Is your feature request related to a problem? Please describe.

The NWCSAF GEO software (v2018.1) supports MSG-HRIT as well as GOES-13, GOES-14, GOES-15, GOES-16 (ABI), and HIMAWARI (see NWC/CDOP3/GEO/AEMET/SW/UM page 21). However, the satpy nwcsaf-geo reader supports only MSG1–4 (Meteosat 8–11):

import satpy
sc = satpy.Scene(sensor="abi",
                 filenames=["/media/x22264/nwcsaf/export/CMIC/S_NWC_CMIC_GOES16_NEW-ENGLAND-NR_20170314T200610Z.nc"],
                 reader=["nwcsaf-geo"])
sc.load(["cmic_cot"])
sc.show("cmic_cot")

gives

Traceback (most recent call last):
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/readers/nwcsaf_nc.py", line 84, in __init__
    self.platform_name = PLATFORM_NAMES[sat_id]
KeyError: 'GOES16'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/mwe25.py", line 2, in <module>
    sc = satpy.Scene(sensor="abi",
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/scene.py", line 155, in __init__
    self.readers = self.create_reader_instances(filenames=filenames,
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/scene.py", line 199, in create_reader_instances
    return load_readers(filenames=filenames,
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/readers/__init__.py", line 727, in load_readers
    reader_instance.create_filehandlers(loadables, fh_kwargs=reader_kwargs_without_filter)
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/readers/yaml_reader.py", line 533, in create_filehandlers
    filehandlers = self.new_filehandlers_for_filetype(filetype_info,
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/readers/yaml_reader.py", line 521, in new_filehandlers_for_filetype
    return list(filtered_iter)
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/readers/yaml_reader.py", line 492, in filter_fh_by_metadata
    for filehandler in filehandlers:
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/readers/yaml_reader.py", line 433, in new_filehandler_instances
    yield filetype_cls(filename, filename_info, filetype_info, *req_fh, **fh_kwargs)
  File "/opt/pytroll/pytroll_inst/miniconda3-exp/envs/py38/lib/python3.8/site-packages/satpy/readers/nwcsaf_nc.py", line 86, in __init__
    self.platform_name = PLATFORM_NAMES[sat_id.astype(str)]
AttributeError: 'str' object has no attribute 'astype'

Describe the solution you'd like

Personally, I only need GOES-16 ABI right now, so I will work on adding this. If this turns out to be as easy as adding a name to the PLATFORM_NAMES dictionary, I might as well add the others, but I will not test the others as this would require significant work to generate NWCSAF data. If it turns out to be a little bit more work to add GOES-16 ABI then I have no intention to add HIMAWARI or the older GOES imagers.

Describe any changes to existing user workflow

There should be no changes to any workflow.

Additional context

This is part of the project to run fogpy on ABI data. An alternative would be to use ABI L2 data but I have already managed to get NWCSAF to run, and getting satpy to read NWCSAF-GEO ABI data should be easy in comparison.

gerritholl added a commit to gerritholl/satpy that referenced this issue Mar 11, 2020
In the nwcsaf-geo reader, add GOES and HIMAWARI to the platform names.
At least for GOES-16, this appears to enable the reading of NWCSAF
generated GOES-16 data, thus closing pytroll#1110, but I have only tested this
for GOES-16.
gerritholl added a commit to gerritholl/satpy that referenced this issue Mar 12, 2020
In the nwcsaf-geo reader, add GOES and HIMAWARI to the platform names.
At least for GOES-16, this appears to enable the reading of NWCSAF
generated GOES-16 data, thus closing pytroll#1110, but I have only tested this
for GOES-16.
@gerritholl
Copy link
Member Author

This works with modern Satpy nowadays. Closing the issue.

@mraspaud
Copy link
Member

Thanks for checking it out!

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

Successfully merging a pull request may close this issue.

2 participants