You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the mesh component of HydroMT I was writing some tests involving writing and reading UgridDatasets. HydroMT converts UgridDatasets to xarray.Datasets before writing in order to preserve crs. I wanted to check if XUgrid preserves crs when writing to file. This resulted in an unexpected error. I expected the crs to be None but got an UgridDataset with 0 grids.
Reproducible example:
import xugrid as xu
data = xu.data.elevation_nl().to_dataset()
data.grid.set_crs(28992)
data.to_netcdf("test.nc")
data2 = xu.open_dataset("test.nc")
data2.grid.crs == data.grid.crs
This will give a TypeError because grids is 0.
The text was updated successfully, but these errors were encountered:
For the mesh component of HydroMT I was writing some tests involving writing and reading UgridDatasets. HydroMT converts UgridDatasets to xarray.Datasets before writing in order to preserve crs. I wanted to check if XUgrid preserves crs when writing to file. This resulted in an unexpected error. I expected the crs to be None but got an UgridDataset with 0 grids.
Reproducible example:
This will give a TypeError because grids is 0.
The text was updated successfully, but these errors were encountered: