-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
string coordinate in DataArray versus Dataset #9583
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
Comments
Maybe its obvious now that I take a step back, but I'm going to guess that it's because "S12" is not in the dimensions of the variable and that somehow matters more to DataArray than Dataset. If that's the case, the question is "how to put string coordinates on DataArrays". I thought the answer was going to be the |
the first issue the same as for #9579: the data model of
|
OK, I "solved" this. All works if I use character arrays and not strings. I'm writing the input file using NetCDF4 and that's where my trouble began. The output type is I'm going to close this. If there's some issue around what xarray was doing when presented with a |
What is your issue?
This SEEMS like a bug. I think it would take me quite a bit of tedious research on my own to tell if that's true, so I'm asking if this is a bug.
I have a netcdf file where I intentionally set the coodinates on the single variable via the metadata per https://docs.xarray.dev/en/stable/user-guide/io.html#coordinates so that I could ensure the file opens as a DataArray.
While it opens fine as a DataArray, the
node_maker_name
is missing from the coordinates.But if I open as a Dataset, there's
node_maker_name
as a coordinate.This inconsistency seems unnecessary on the face of it. So I think it's a bug.
Thanks in advance!
The text was updated successfully, but these errors were encountered: