Skip to content

ds.pr.to_netcdf can't handle partial processing info #285

@JGuetschow

Description

@JGuetschow

Describe the bug

When generating a dataset using the csg we can use different categories for different variables. This leads to None values in the processing info for category - variable combinations that are not used in the csg. ds.pr.to_netcdf can't handle this partial processing info as the ds.pr.to_netcdf routine expects that all objects have a serialize method. The code fails in
_data_format.py

Failing Test

I added a failing test in the processing_info branch. A real life example is the regression test for the csg where currently processing info has to be removed for the test to work (branch csg_regression_test).

Expected behavior
Saving netcdf files should also be possible with processing info that contains None values

Screenshots

If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: Linux
  • Python version 3.12

Additional context
Solve together with #280

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions