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

[Bug]: open_dataset() fails in "Gentle Introduction to xCDAT" notebook due to add_bounds incorrect arg (addressed by #650) #661

Closed
brian-rose opened this issue Jun 7, 2024 · 2 comments
Labels
type: bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@brian-rose
Copy link

What happened?

Following instructions for "Opening a dataset" in the Gentle Introduction to xCDAT. Attempting to open the example file with

ds = xc.open_dataset(filepath, add_bounds=True, decode_times=True, center_times=True)

gives

TypeError: 'bool' object is not iterable

What did you expect to happen? Are there are possible answers you came across?

Expected

the dataset handle should open, with bounds handling, as illustrated in the docs

Possible answers

The full traceback (see below) shows that the error is triggered from running

ds.bounds.add_missing_bounds()

If I remove add_bounds=True, the same code runs without error:

ds = xc.open_dataset(filepath, decode_times=True, center_times=True)

I found the same behavior when trying to use xc.open_dataset on some model output files that I have stored locally.

Is this related to #607?

Minimal Complete Verifiable Example (MVCE)

import xcdat as xc
filepath = "https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r10i1p1f1/Amon/tas/gn/v20200605/tas_Amon_ACCESS-ESM1-5_historical_r10i1p1f1_gn_185001-201412.nc"
ds = xc.open_dataset(filepath, add_bounds=True, decode_times=True, center_times=True)

Relevant log output

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 3
      1 import xcdat as xc
      2 filepath = "https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r10i1p1f1/Amon/tas/gn/v20200605/tas_Amon_ACCESS-ESM1-5_historical_r10i1p1f1_gn_185001-201412.nc"
----> 3 ds = xc.open_dataset(filepath, add_bounds=True, decode_times=True, center_times=True)

File ~/miniconda3/envs/test-xcdat/lib/python3.12/site-packages/xcdat/dataset.py:122, in open_dataset(path, data_var, add_bounds, decode_times, center_times, lon_orient, **kwargs)
    119     except KeyError as err:
    120         logger.warning(err)
--> 122 ds = _postprocess_dataset(ds, data_var, center_times, add_bounds, lon_orient)
    124 return ds

File ~/miniconda3/envs/test-xcdat/lib/python3.12/site-packages/xcdat/dataset.py:524, in _postprocess_dataset(dataset, data_var, center_times, add_bounds, lon_orient)
    521     ds = center_times_func(dataset)
    523 if add_bounds is not None:
--> 524     ds = ds.bounds.add_missing_bounds(axes=add_bounds)
    526 if lon_orient is not None:
    527     ds = swap_lon_axis(ds, to=lon_orient, sort_ascending=True)

File ~/miniconda3/envs/test-xcdat/lib/python3.12/site-packages/xcdat/bounds.py:166, in BoundsAccessor.add_missing_bounds(self, axes)
    129 """Adds missing coordinate bounds for supported axes in the Dataset.
    130 
    131 This function loops through the Dataset's axes and attempts to adds
   (...)
    162 xr.Dataset
    163 """
    164 ds = self._dataset.copy()
--> 166 for axis in axes:
    167     try:
    168         coords = get_dim_coords(ds, axis)

TypeError: 'bool' object is not iterable

Anything else we need to know?

This is related to my review of the JOSS paper openjournals/joss-reviews#6426

Environment

xCDAT version

0.7.0

Output from xr.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:35:20) [Clang 16.0.6 ]
python-bits: 64
OS: Darwin
OS-release: 23.5.0
machine: arm64
processor: arm
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.14.3
libnetcdf: 4.9.2

xarray: 2024.5.0
pandas: 2.2.2
numpy: 1.26.4
scipy: 1.13.1
netCDF4: 1.6.5
pydap: None
h5netcdf: None
h5py: None
zarr: None
cftime: 1.6.3
nc_time_axis: 1.4.1
iris: None
bottleneck: None
dask: 2024.5.2
distributed: 2024.5.2
matplotlib: 3.8.4
cartopy: 0.23.0
seaborn: None
numbagg: None
fsspec: 2024.6.0
cupy: None
pint: None
sparse: 0.15.4
flox: None
numpy_groupies: None
setuptools: 70.0.0
pip: 24.0
conda: None
pytest: None
mypy: None
IPython: 8.25.0
sphinx: None

Output of mamba env list


                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.15.3) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

# packages in environment at /Users/br546577/miniconda3/envs/test-xcdat:
#
# Name                    Version                   Build  Channel
anyio                     4.4.0              pyhd8ed1ab_0    conda-forge
appnope                   0.1.4              pyhd8ed1ab_0    conda-forge
argon2-cffi               23.1.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py312h02f2b3b_4    conda-forge
arrow                     1.3.0              pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
async-lru                 2.0.4              pyhd8ed1ab_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
aws-c-auth                0.7.22               h27bc0eb_5    conda-forge
aws-c-cal                 0.6.15               h5db4892_0    conda-forge
aws-c-common              0.9.19               h99b78c6_0    conda-forge
aws-c-compression         0.2.18               h5db4892_6    conda-forge
aws-c-event-stream        0.4.2               h4de9e5c_13    conda-forge
aws-c-http                0.8.2                h2c662d3_2    conda-forge
aws-c-io                  0.14.9               h8709d7d_2    conda-forge
aws-c-mqtt                0.10.4               h5fc5ab5_6    conda-forge
aws-c-s3                  0.5.10               h48f01f6_3    conda-forge
aws-c-sdkutils            0.1.16               h5db4892_2    conda-forge
aws-checksums             0.1.18               h5db4892_6    conda-forge
aws-crt-cpp               0.26.10              h9d69022_4    conda-forge
aws-sdk-cpp               1.11.329             hfa7c70e_4    conda-forge
babel                     2.14.0             pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.3             pyha770c72_0    conda-forge
bleach                    6.1.0              pyhd8ed1ab_0    conda-forge
blosc                     1.21.5               h9c252e8_1    conda-forge
bokeh                     3.4.1              pyhd8ed1ab_0    conda-forge
brotli                    1.1.0                hb547adb_1    conda-forge
brotli-bin                1.1.0                hb547adb_1    conda-forge
brotli-python             1.1.0           py312h9f69965_1    conda-forge
bzip2                     1.0.8                h93a5062_5    conda-forge
c-ares                    1.28.1               h93a5062_0    conda-forge
ca-certificates           2024.6.2             hf0a4a13_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cartopy                   0.23.0          py312h8ae5369_1    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
cf_xarray                 0.9.1              pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py312h8e38eb3_0    conda-forge
cftime                    1.6.3           py312hbebd99a_1    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
cloudpickle               3.0.0              pyhd8ed1ab_0    conda-forge
comm                      0.2.2              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.1           py312h0fef576_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
cytoolz                   0.12.3          py312he37b823_0    conda-forge
dask                      2024.5.2           pyhd8ed1ab_0    conda-forge
dask-core                 2024.5.2           pyhd8ed1ab_0    conda-forge
dask-expr                 1.1.2              pyhd8ed1ab_0    conda-forge
debugpy                   1.8.1           py312h20a0b95_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
distributed               2024.5.2           pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
esmf                      8.6.1           nompi_h6fb4350_0    conda-forge
esmpy                     8.6.1              pyhc1e730c_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
fonttools                 4.53.0          py312h7e5086c_0    conda-forge
fqdn                      1.5.1              pyhd8ed1ab_0    conda-forge
freetype                  2.12.1               hadb7bae_2    conda-forge
fsspec                    2024.6.0           pyhff2d567_0    conda-forge
future                    1.0.0              pyhd8ed1ab_0    conda-forge
geos                      3.12.1               h965bd2d_0    conda-forge
gflags                    2.2.2             hc88da5d_1004    conda-forge
glog                      0.7.0                hc6770e3_0    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
hdf4                      4.2.15               h2ee6834_7    conda-forge
hdf5                      1.14.3          nompi_hec07895_105    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
httpcore                  1.0.5              pyhd8ed1ab_0    conda-forge
httpx                     0.27.0             pyhd8ed1ab_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
icu                       73.2                 hc8870d7_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.1.0              pyha770c72_0    conda-forge
importlib_metadata        7.1.0                hd8ed1ab_0    conda-forge
importlib_resources       6.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.29.4             pyh57ce528_0    conda-forge
ipython                   8.25.0             pyh707e725_0    conda-forge
ipywidgets                8.1.3              pyhd8ed1ab_0    conda-forge
isoduration               20.11.0            pyhd8ed1ab_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
json5                     0.9.25             pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py312h81bd7bf_3    conda-forge
jsonschema                4.22.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
jsonschema-with-format-nongpl 4.22.0             pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0           py312h81bd7bf_9    conda-forge
jupyter-lsp               2.2.5              pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.2              pyhd8ed1ab_0    conda-forge
jupyter_console           6.6.3              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.2           py312h81bd7bf_0    conda-forge
jupyter_events            0.10.0             pyhd8ed1ab_0    conda-forge
jupyter_server            2.14.1             pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.5.3              pyhd8ed1ab_0    conda-forge
jupyterlab                4.2.1              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.3.0              pyhd8ed1ab_1    conda-forge
jupyterlab_server         2.27.2             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.11             pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.5           py312h389731b_1    conda-forge
krb5                      1.21.2               h92f50d5_0    conda-forge
lcms2                     2.16                 ha0e7c42_0    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libabseil                 20240116.2      cxx17_hebf3989_0    conda-forge
libaec                    1.1.3                hebf3989_0    conda-forge
libarrow                  16.1.0           h7ec700d_7_cpu    conda-forge
libarrow-acero            16.1.0           h00cdb27_7_cpu    conda-forge
libarrow-dataset          16.1.0           h00cdb27_7_cpu    conda-forge
libarrow-substrait        16.1.0           hc68f6b8_7_cpu    conda-forge
libblas                   3.9.0           22_osxarm64_openblas    conda-forge
libbrotlicommon           1.1.0                hb547adb_1    conda-forge
libbrotlidec              1.1.0                hb547adb_1    conda-forge
libbrotlienc              1.1.0                hb547adb_1    conda-forge
libcblas                  3.9.0           22_osxarm64_openblas    conda-forge
libcrc32c                 1.1.2                hbdafb3b_0    conda-forge
libcurl                   8.8.0                h7b6f9a7_0    conda-forge
libcxx                    17.0.6               h5f092b4_0    conda-forge
libdeflate                1.20                 h93a5062_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h93a5062_2    conda-forge
libevent                  2.1.12               h2757513_1    conda-forge
libexpat                  2.6.2                hebf3989_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           13_2_0_hd922786_3    conda-forge
libgfortran5              13.2.0               hf226fd6_3    conda-forge
libgoogle-cloud           2.24.0               hfe08963_0    conda-forge
libgoogle-cloud-storage   2.24.0               h3fa5b87_0    conda-forge
libgrpc                   1.62.2               h9c18a4f_0    conda-forge
libiconv                  1.17                 h0d3ecfb_2    conda-forge
libjpeg-turbo             3.0.0                hb547adb_1    conda-forge
liblapack                 3.9.0           22_osxarm64_openblas    conda-forge
libllvm14                 14.0.6               hd1a9a77_4    conda-forge
libnetcdf                 4.9.2           nompi_he469be0_114    conda-forge
libnghttp2                1.58.0               ha4dd798_1    conda-forge
libopenblas               0.3.27          openmp_h6c19121_0    conda-forge
libparquet                16.1.0           hcf52c46_7_cpu    conda-forge
libpng                    1.6.43               h091b4b1_0    conda-forge
libprotobuf               4.25.3               hbfab5d5_0    conda-forge
libre2-11                 2023.09.01           h7b2c953_2    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libsqlite                 3.45.3               h091b4b1_0    conda-forge
libssh2                   1.11.0               h7a5bd25_0    conda-forge
libthrift                 0.19.0               h026a170_1    conda-forge
libtiff                   4.6.0                h07db509_3    conda-forge
libutf8proc               2.8.0                h1a8c8d9_0    conda-forge
libwebp-base              1.4.0                h93a5062_0    conda-forge
libxcb                    1.15                 hf346824_0    conda-forge
libxml2                   2.12.7               ha661575_1    conda-forge
libzip                    1.10.1               ha0bc3c6_3    conda-forge
libzlib                   1.3.1                hfb2fe0b_1    conda-forge
llvm-openmp               18.1.6               hde57baf_0    conda-forge
llvmlite                  0.42.0          py312h17030e7_1    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
lz4                       4.3.3           py312haed5471_0    conda-forge
lz4-c                     1.9.4                hb7217d7_0    conda-forge
markupsafe                2.1.5           py312he37b823_0    conda-forge
matplotlib                3.8.4           py312h1f38498_2    conda-forge
matplotlib-base           3.8.4           py312h4479663_2    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_0    conda-forge
mistune                   3.0.2              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.8           py312h157fec4_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
nbclient                  0.10.0             pyhd8ed1ab_0    conda-forge
nbconvert                 7.16.4               hd8ed1ab_0    conda-forge
nbconvert-core            7.16.4             pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.16.4               hd8ed1ab_0    conda-forge
nbformat                  5.10.4             pyhd8ed1ab_0    conda-forge
nc-time-axis              1.4.1              pyhd8ed1ab_0    conda-forge
ncurses                   6.5                  hb89a1cb_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
netcdf-fortran            4.6.1           nompi_h8e61c75_104    conda-forge
netcdf4                   1.6.5           nompi_py312h30cf68c_102    conda-forge
notebook                  7.2.1              pyhd8ed1ab_0    conda-forge
notebook-shim             0.2.4              pyhd8ed1ab_0    conda-forge
numba                     0.59.1          py312hbaff935_0    conda-forge
numpy                     1.26.4          py312h8442bc7_0    conda-forge
openjpeg                  2.5.2                h9f1df11_0    conda-forge
openssl                   3.3.1                hfb2fe0b_0    conda-forge
orc                       2.0.1                h47ade37_1    conda-forge
overrides                 7.7.0              pyhd8ed1ab_0    conda-forge
packaging                 24.0               pyhd8ed1ab_0    conda-forge
pandas                    2.2.2           py312h8ae5369_1    conda-forge
pandoc                    3.2                  hce30654_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.4              pyhd8ed1ab_0    conda-forge
partd                     1.4.2              pyhd8ed1ab_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.3.0          py312h8a801b1_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
proj                      9.4.0                hfb94cee_2    conda-forge
prometheus_client         0.20.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.46             pyha770c72_0    conda-forge
prompt_toolkit            3.0.46               hd8ed1ab_0    conda-forge
psutil                    5.9.8           py312he37b823_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pyarrow                   16.1.0          py312h37858a2_1    conda-forge
pyarrow-core              16.1.0          py312h332af21_1_cpu    conda-forge
pyarrow-hotfix            0.6                pyhd8ed1ab_0    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyobjc-core               10.2            py312h9d22092_0    conda-forge
pyobjc-framework-cocoa    10.2            py312h9d22092_0    conda-forge
pyparsing                 3.1.2              pyhd8ed1ab_0    conda-forge
pyproj                    3.6.1           py312h71aa0db_6    conda-forge
pyshp                     2.3.1              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.12.3          h4a7b5fc_0_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.19.1             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py312h02f2b3b_1    conda-forge
pyzmq                     26.0.3          py312hfa13136_0    conda-forge
re2                       2023.09.01           h4cba328_2    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
referencing               0.35.1             pyhd8ed1ab_0    conda-forge
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rpds-py                   0.18.1          py312h552d48e_0    conda-forge
scipy                     1.13.1          py312h14ffa8f_0    conda-forge
send2trash                1.8.3              pyh31c8845_0    conda-forge
setuptools                70.0.0             pyhd8ed1ab_0    conda-forge
shapely                   2.0.4           py312hbea5422_1    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.2.0                hd04f947_1    conda-forge
sniffio                   1.3.1              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
sparse                    0.15.4             pyhd8ed1ab_0    conda-forge
sqlite                    3.45.3               hf2abe2d_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
tblib                     3.0.0              pyhd8ed1ab_0    conda-forge
terminado                 0.18.1             pyh31c8845_0    conda-forge
tinycss2                  1.3.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5083fa2_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
tornado                   6.4.1           py312h7e5086c_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.9.0.20240316     pyhd8ed1ab_0    conda-forge
typing-extensions         4.12.1               hd8ed1ab_0    conda-forge
typing_extensions         4.12.1             pyha770c72_0    conda-forge
typing_utils              0.1.0              pyhd8ed1ab_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
uri-template              1.3.0              pyhd8ed1ab_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
webcolors                 24.6.0             pyhd8ed1ab_0    conda-forge
webencodings              0.5.1              pyhd8ed1ab_2    conda-forge
websocket-client          1.8.0              pyhd8ed1ab_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
widgetsnbextension        4.0.11             pyhd8ed1ab_0    conda-forge
xarray                    2024.5.0           pyhd8ed1ab_0    conda-forge
xcdat                     0.7.0              pyhd8ed1ab_0    conda-forge
xesmf                     0.8.5              pyhd8ed1ab_0    conda-forge
xgcm                      0.8.1              pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hb547adb_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xyzservices               2024.6.0           pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zeromq                    4.3.5                hcc0f68c_4    conda-forge
zict                      3.0.0              pyhd8ed1ab_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zlib                      1.3.1                hfb2fe0b_1    conda-forge
zstd                      1.5.6                hb46c0d2_0    conda-forge
@brian-rose brian-rose added the type: bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jun 7, 2024
@pochedls
Copy link
Collaborator

pochedls commented Jun 7, 2024

@brian-rose – thanks for reporting this. We are currently going through all of our docs to catch issues like this; it looks like this was caught and the PR is being finalized.

We previously accepted add_bounds as a Boolean, which would add bounds to all axes. This was deprecated in favor of having the user specify the axes which bounds should be added to (if missing). We included deprecation warnings before the change, but obviously missed this in the documentation. We will fix this soon.

This line will be updated from add_bounds=True to:

ds = xc.open_dataset(filepath, add_bounds=["X", "Y"], decode_times=True, center_times=True)

(or ["X", "Y", "T"])

@tomvothecoder tomvothecoder changed the title [Bug]: [Bug]: open_dataset() fails in "Gentle Introduction to xCDAT" notebook due to add_bounds` incorrect arg (addressed by #650) Jun 7, 2024
@tomvothecoder
Copy link
Collaborator

@brian-rose Thanks for reporting this! I just merged PR #650 which addresses this issue. The "latest" version on Read The Docs will reflect this change soon: https://xcdat.readthedocs.io/en/latest/examples/introduction-to-xcdat.html.

@github-project-automation github-project-automation bot moved this from Todo to Done in xCDAT Development Jun 7, 2024
@tomvothecoder tomvothecoder changed the title [Bug]: open_dataset() fails in "Gentle Introduction to xCDAT" notebook due to add_bounds` incorrect arg (addressed by #650) [Bug]: open_dataset() fails in "Gentle Introduction to xCDAT" notebook due to add_bounds incorrect arg (addressed by #650) Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
Status: Done
Development

No branches or pull requests

3 participants