Skip to content
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

Missing linked coordinates of subgroup variable #6085

Closed
zxdawn opened this issue Dec 18, 2021 · 3 comments
Closed

Missing linked coordinates of subgroup variable #6085

zxdawn opened this issue Dec 18, 2021 · 3 comments

Comments

@zxdawn
Copy link

zxdawn commented Dec 18, 2021

What happened:

I have a NetCDF file that has groups like this:

--/PRODUCT/
--/PRODUCT/SUPPORT_DATA/DETAILED_RESULTS
.....

Screenshots

image

image

When I read the variable named air_mass_factor_clear inside /PRODUCT/SUPPORT_DATA/DETAILED_RESULTS, the coordinates are missing. But, it works for variable named nitrogendioxide_tropospheric_column in the /PRODUCT/ group.

What you expected to happen:

Coordinates of variables in subgroups are loaded.

Minimal Complete Verifiable Example:

xr.open_dataset('./201908/S5P_PAL__L2__NO2____20190811T022605_20190811T040734_09459_01_020301_20211110T023157.nc',
                group='PRODUCT/')['nitrogendioxide_tropospheric_column']

image

xr.open_dataset('./201908/S5P_PAL__L2__NO2____20190811T022605_20190811T040734_09459_01_020301_20211110T023157.nc',
                group='PRODUCT/SUPPORT_DATA/DETAILED_RESULTS/')['air_mass_factor_clear']

image

Environment:

Output of xr.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46)
[GCC 9.4.0]
python-bits: 64
OS: Linux
OS-release: 5.11.0-40-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.1
libnetcdf: 4.8.1

xarray: 0.20.1
pandas: 1.3.4
numpy: 1.20.3
scipy: 1.7.3
netCDF4: 1.5.8
pydap: None
h5netcdf: None
h5py: 3.6.0
Nio: None
zarr: 2.10.3
cftime: 1.5.1.1
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.2.10
cfgrib: None
iris: None
bottleneck: None
dask: 2021.11.2
distributed: 2021.11.2
matplotlib: 3.5.0
cartopy: 0.20.1
seaborn: None
numbagg: None
fsspec: 2021.11.1
cupy: None
pint: 0.18
sparse: None
setuptools: 59.4.0
pip: 21.3.1
conda: 4.11.0
pytest: None
IPython: 7.30.0
sphinx: None

@TomNicholas
Copy link
Member

Hi @zxdawn, thanks for the report. Would you say your issue is the same as the one in #1982 ?

@zxdawn
Copy link
Author

zxdawn commented Dec 27, 2021

Hi @TomNicholas, thanks and yes that's the same issue. Shall we close this duplicated one?

@TomNicholas
Copy link
Member

Yes I think we should close this as a duplicate. By the way, this isn't a quick fix in xarray.Dataset as it is (see #1982 (comment) as for why), so if we do ever support this behaviour it's likely to be via the DataTree route described in #4118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants