Skip to content

serialization as netcdf throws an exception #42

Open
@pmav99

Description

@pmav99

I am not sure if xarray-selafin, wants to support exporting selafin files as netcdfs, but the way the xarray attributes are currently being utilized is not compatible with netcdf. For example:

ds = xr.open_dataset("tests/data/r2d_tidal_flats.slf")
ds.to_netcdf("/tmp/out.nc")

results in:

TypeError: Invalid value for attr 'variables': {'U': ('VELOCITY U', 'M/S'), 'V': ('VELOCITY V', 'M/S'), 'H': ('WATER DEPTH', 'M'), 'S': ('FREE SURFACE', 'M'), 'B': ('BOTTOM', 'M')}. For serialization to netCDF files, its value must be of one of the following types: str, Number, ndarray, number, list, tuple

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions