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

Format keyword "nc" for save_dataset issues an error #2685

Open
mraspaud opened this issue Dec 12, 2023 · 0 comments
Open

Format keyword "nc" for save_dataset issues an error #2685

mraspaud opened this issue Dec 12, 2023 · 0 comments
Assignees
Labels

Comments

@mraspaud
Copy link
Member

Describe the bug
When saving a dataarray as netcdf with the cf writer, providing the format="nc" keyword argument raises a ValueError: unrecognized format requested

This was reported first in pytroll/trollflow2#189

To Reproduce

    from satpy import Scene
    from glob import glob
    import os
    from satpy.utils import debug_on
    debug_on()
    datadir = "/home/a001673/data/satellite/Meteosat-11/seviri/lvl1.5/2018/02/28/HRIT"

    filenames = glob(os.path.join(datadir, "*2018*"))

    scn = Scene(filenames=filenames,
                reader='seviri_l1b_hrit',
                )


    composites = ["IR_087"]
    scn.load(composites)
    rscn = scn.resample("eurol")
    rscn.save_dataset(composites[0], "IR_087.nc", format="nc", writer="cf")

Expected behavior
I expect the file to we written without error. Removing format from the kwargs makes it work again.

Actual results
A ValueError is raised.

Environment Info:

  • OS: RHEL 9.3
  • Satpy Version: main from 2023-12-12
@mraspaud mraspaud added the bug label Dec 12, 2023
@mraspaud mraspaud self-assigned this Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant