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

PANGEO coord bounds fix - do we need it? #33

Closed
agstephens opened this issue Oct 15, 2020 · 1 comment
Closed

PANGEO coord bounds fix - do we need it? #33

agstephens opened this issue Oct 15, 2020 · 1 comment
Assignees

Comments

@agstephens
Copy link
Member

agstephens commented Oct 15, 2020

From my testing withour Zarr output, we retain the bounds in the standard Xarray Dataset structure:

"http://cmip6-zarr-o.s3.jc.rl.ac.uk/CMIP6.AerChemMIP.NIMS-KMA.UKESM1-0-LL/"
"hist-piNTCF.r3i1p1f2.Amon.evspsbl.gn.v20200224.zarr"

>>> ds.data_vars
Data variables:
    evspsbl    (time, lat, lon) float32 dask.array<chunksize=(1980, 144, 192), meta=np.ndarray>
    lat_bnds   (time, lat, bnds) float64 dask.array<chunksize=(1980, 144, 2), meta=np.ndarray>
    lon_bnds   (time, lon, bnds) float64 dask.array<chunksize=(1980, 192, 2), meta=np.ndarray>
    time_bnds  (time, bnds) object dask.array<chunksize=(1980, 2), meta=np.ndarray>
>>> ds.time.bounds
'time_bnds'
>>> ds.time.bounds[:]
'time_bnds'
>>> type(ds.time.bounds)
<class 'str'>

Which matches:

>>> ds3 = xr.open_mfdataset('/badc/cmip6/data/CMIP6/AerChemMIP/NIMS-KMA/UKESM1-0-LL/hist-piNTCF/r3i1p1f2/Amon/evspsbl/gn/v20200224/*.nc', use_cftime=True, combine="by_coords")
>>> ds3.data_varsData variables:
    time_bnds  (time, bnds) object dask.array<chunksize=(1200, 2), meta=np.ndarray>
    lat_bnds   (time, lat, bnds) float64 dask.array<chunksize=(1200, 144, 2), meta=np.ndarray>
    lon_bnds   (time, lon, bnds) float64 dask.array<chunksize=(1200, 192, 2), meta=np.ndarray>
    evspsbl    (time, lat, lon) float32 dask.array<chunksize=(1200, 144, 192), meta=np.ndarray>
>>> ds3.time.bounds'time_bnds'
>>> type(ds3.time.bounds)<class 'str'>

Note that this relates to:

pydata/xarray#3689

naomi-henderson/cmip6collect#1

@agstephens agstephens self-assigned this Oct 15, 2020
@agstephens
Copy link
Member Author

I think this is a historical requirement and we don't need it, so closing.

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

1 participant