html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/1982#issuecomment-1001687725,https://api.github.com/repos/pydata/xarray/issues/1982,1001687725,IC_kwDOAMm_X847tIqt,226037,2021-12-27T18:18:44Z,2021-12-27T18:19:22Z,MEMBER,"Note that current `CF-1.9` now specifies how to read coordinates from any group in file (see [spec](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.9/cf-conventions.html#groups)). If it is not already one of the goals of the new DataTree structure #4665 it would probably best be added. cc @TomNicholas @aurghs ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,304314787 https://github.com/pydata/xarray/issues/1982#issuecomment-612140236,https://api.github.com/repos/pydata/xarray/issues/1982,612140236,MDEyOklzc3VlQ29tbWVudDYxMjE0MDIzNg==,1217238,2020-04-10T17:44:48Z,2020-04-10T17:44:48Z,MEMBER,"I think it would be totally reasonable and consistent with the netcdf data model to read dimension coordinates from parent groups when they are missing on the requested group. On Fri, Apr 10, 2020 at 10:39 AM Lucas Morton wrote: > I'm currently working around this by loading the root group & the branch > group with two separate calls and then merging the resulting datasets. It's > ugly b/c I have to manually associate the 'phony_dim_x' dimensions from one > group with the other. > > Maybe I can find the time during quarantine to make an attempt at > resolving #1092 , which I > think would facilitate resolving this issue as well. > > Another option would be to allow the group kwarg to be a tuple of group > names, and load_dataset could yield a (flat) Dataset including both the > root and the branch variables. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > , or > unsubscribe > > . > ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,304314787 https://github.com/pydata/xarray/issues/1982#issuecomment-437990188,https://api.github.com/repos/pydata/xarray/issues/1982,437990188,MDEyOklzc3VlQ29tbWVudDQzNzk5MDE4OA==,1217238,2018-11-12T18:52:13Z,2018-11-12T18:52:13Z,MEMBER,"I think it could logically make sense to recursively check parent groups for coordinates referenced by variables in the opened group. From an implementation perspective, this might be a little tricky. The current backend interface isn't really setup for this. Currently, we open all variables, and do all CF convention decoding afterwards. This would require going back to the dataset to open more variables.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,304314787 https://github.com/pydata/xarray/issues/1982#issuecomment-437972944,https://api.github.com/repos/pydata/xarray/issues/1982,437972944,MDEyOklzc3VlQ29tbWVudDQzNzk3Mjk0NA==,1217238,2018-11-12T17:55:28Z,2018-11-12T17:55:28Z,MEMBER,"> When reading a sub group from a netCDF file with dimensions defined in the root group, the dimensions are not read from the root group. This contradicts the netCDF documentation, which states that dimensions are scoped such that they can be seen by all sub groups. To be clear, xarray *does* properly read ""dimensions"" in parent groups. (This is actually ensured by libraries like netCDF4-Python.) What xarray doesn't do is read ""coordinates"" from parent groups. As far as I can tell, this isn't part of either the netCDF4 data model or CF conventions. This might be a usability improvement but the right way to do isn't dictated by the specs.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,304314787 https://github.com/pydata/xarray/issues/1982#issuecomment-372353979,https://api.github.com/repos/pydata/xarray/issues/1982,372353979,MDEyOklzc3VlQ29tbWVudDM3MjM1Mzk3OQ==,2443309,2018-03-12T15:37:48Z,2018-03-12T15:37:48Z,MEMBER,"> but it should respect the scope of netCDF dimensions Just so we're all using the same terminology, you are actually referring to ""coordinates"", not dimensions. In your example above, `tss` is getting the correct dimension (`time2`) but the corresponding coordinate (`time2`) is not loaded. In netCDF/xarray dimensions are just names for individual axes. The fundamental issue is that we don't have any machinery in xarray to look outside of a single netCDF group when opening a dataset. That is the common piece to #1092. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,304314787 https://github.com/pydata/xarray/issues/1982#issuecomment-372315058,https://api.github.com/repos/pydata/xarray/issues/1982,372315058,MDEyOklzc3VlQ29tbWVudDM3MjMxNTA1OA==,2443309,2018-03-12T13:47:59Z,2018-03-12T13:47:59Z,MEMBER,This seems to be a duplicate of #1092. The short answer is that we don't have a first class solution to working with groups in netCDF files. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,304314787