Replies: 1 comment
-
this is normal, you need to call |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having trouble figuring out what steps I'm missing to implement a custom backend to return a dataset which displays all non-indexed variables as expected.
I already have methods to collect and transform the data into a xarray
Dataset
object, and subclassedBackendEntrypoint
and implementedopen_dataset
to use those methods to return a dataset. I'm currently not decoding variables -- didn't think my use case required it -- or making use of a data store like some of the other modules in (https://github.com/pydata/xarray/tree/main/xarray/backends). The docs also read as though variable decoding is optional.The challenge is I can't figure out what steps I'm missing which result in
xr.open_dataset
returning a dataset which displays variables differently from what I'd expect. The resulting dataset is functional, but text and HTML display for non-indexed variables differ slightly.The examples below show differences between a dataset manually created, and the same dataset returned by a custom backend. The dataset includes:
a
, with coordinatesb
, with coordinatesx
andy
, aligned with dimensiona
Example 1: Simple dataset
Output in JupyterLab
If the same dataset is returned via
open_dataset
though, the results are slightly different.Example2: "Opening" dataset using custom backend.
This is similar to the backend I've currently implemented if you were to replace the fixed dataset with logic that collects the data from the file, constructs the dataset, and returns it. Like I mentioned, no decoding or use of data stores is happening within
open_dataset
.Output in JupyterLab
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions