xarray 2024.5.0__tar.gz → 2024.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/ci-additional.yaml +7 -10
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/ci.yaml +4 -7
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/hypothesis.yaml +6 -3
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/upstream-dev-ci.yaml +4 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/.pre-commit-config.yaml +1 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/CITATION.cff +14 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/PKG-INFO +1 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/dataarray_missing.py +1 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/install-upstream-wheels.sh +16 -5
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/min_deps_check.py +5 -5
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/style.css +2 -5
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/conf.py +1 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/ecosystem.rst +1 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/multidimensional-coords.ipynb +0 -7
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/computation.rst +1 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/io.rst +6 -2
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/pandas.rst +20 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/whats-new.rst +51 -5
- {xarray-2024.5.0 → xarray-2024.6.0}/properties/test_pandas_roundtrip.py +27 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/api.py +9 -9
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/common.py +0 -30
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/h5netcdf_.py +51 -5
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/netCDF4_.py +50 -5
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/zarr.py +186 -90
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/coding/cftime_offsets.py +9 -1
- xarray-2024.6.0/xarray/core/array_api_compat.py +44 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/common.py +18 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/dataarray.py +6 -5
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/dataset.py +9 -6
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/datatree.py +47 -6
- xarray-2024.5.0/xarray/datatree_/datatree/io.py → xarray-2024.6.0/xarray/core/datatree_io.py +55 -18
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/dtypes.py +96 -25
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/duck_array_ops.py +75 -28
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/extension_array.py +0 -2
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/indexes.py +59 -7
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/indexing.py +13 -10
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/npcompat.py +30 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/resample.py +5 -4
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/types.py +1 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/_array_api.py +10 -19
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/core.py +19 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/__init__.py +3 -2
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_array_api.py +8 -17
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_backends.py +1 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_coding_times.py +6 -3
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_combine.py +6 -3
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_dataarray.py +4 -2
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_dataset.py +1 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_dtypes.py +80 -4
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_duck_array_ops.py +11 -6
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_groupby.py +16 -7
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_namedarray.py +19 -30
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_plot.py +4 -5
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_strategies.py +17 -8
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_units.py +5 -8
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_variable.py +4 -2
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray.egg-info/PKG-INFO +1 -1
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray.egg-info/SOURCES.txt +2 -2
- xarray-2024.5.0/xarray/datatree_/datatree/common.py +0 -104
- {xarray-2024.5.0 → xarray-2024.6.0}/.binder/environment.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.codecov.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.git-blame-ignore-revs +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.git_archival.txt +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.gitattributes +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/FUNDING.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/ISSUE_TEMPLATE/bugreport.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/ISSUE_TEMPLATE/misc.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/ISSUE_TEMPLATE/newfeature.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/config.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/dependabot.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/stale.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/benchmarks-last-release.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/benchmarks.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/configure-testpypi-version.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/nightly-wheels.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/publish-test-results.yaml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.github/workflows/pypi-release.yaml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.gitignore +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.pep8speaks.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/.readthedocs.yaml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/CODE_OF_CONDUCT.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/CONTRIBUTING.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/CORE_TEAM_GUIDE.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/HOW_TO_RELEASE.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/MANIFEST.in +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/README.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/asv.conf.json +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/README_CI.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/accessors.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/alignment.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/combine.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/dataset.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/dataset_io.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/groupby.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/import.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/indexing.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/interp.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/merge.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/pandas.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/polyfit.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/reindexing.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/renaming.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/repr.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/rolling.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/asv_bench/benchmarks/unstacking.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/requirements/all-but-dask.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/requirements/bare-minimum.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/requirements/doc.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/requirements/environment-3.13.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/requirements/environment-windows-3.13.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/requirements/environment-windows.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/requirements/environment.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/ci/requirements/min-all-deps.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/conftest.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/design_notes/flexible_indexes_notes.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/design_notes/grouper_objects.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/design_notes/named_array_design_doc.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/Makefile +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/README.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/.gitignore +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/advanced_selection_interpolation.svg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/ci.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/dask_array.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/dataset-diagram.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/index_api.svg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/index_contribute.svg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/index_getting_started.svg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/index_user_guide.svg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/logos/Xarray_Icon_Final.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/logos/Xarray_Icon_Final.svg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/logos/Xarray_Logo_FullColor_InverseRGB_Final.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/logos/Xarray_Logo_FullColor_InverseRGB_Final.svg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/logos/Xarray_Logo_RGB_Final.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/logos/Xarray_Logo_RGB_Final.svg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/numfocus_logo.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/opendap-prism-tmax.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/thumbnails/ERA5-GRIB-example.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/thumbnails/ROMS_ocean_model.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/thumbnails/area_weighted_temperature.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/thumbnails/monthly-means.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/thumbnails/multidimensional-coords.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/thumbnails/toy-weather-data.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/thumbnails/visualization_gallery.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_static/view-docs.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_templates/autosummary/accessor.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_templates/autosummary/accessor_attribute.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_templates/autosummary/accessor_callable.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/_templates/autosummary/accessor_method.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/api-hidden.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/api.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/contributing.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/developers-meeting.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/ERA5-GRIB-example.ipynb +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/ROMS_ocean_model.ipynb +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/_code/accessor_example.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/apply_ufunc_vectorize_1d.ipynb +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/area_weighted_temperature.ipynb +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/blank_template.ipynb +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/monthly-means.ipynb +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/monthly_means_output.png +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/visualization_gallery.ipynb +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/examples/weather-data.ipynb +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/gallery/README.txt +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/gallery/plot_cartopy_facetgrid.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/gallery/plot_colorbar_center.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/gallery/plot_control_colorbar.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/gallery/plot_lines_from_2d.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/gallery.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/gallery.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/getting-started-guide/faq.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/getting-started-guide/index.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/getting-started-guide/installing.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/getting-started-guide/quick-overview.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/getting-started-guide/why-xarray.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/howdoi.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/index.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/chunked-arrays.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/duck-arrays-integration.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/extending-xarray.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/how-to-add-new-backend.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/how-to-create-custom-index.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/index.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/internal-design.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/interoperability.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/internals/zarr-encoding-spec.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/roadmap.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/tutorials-and-videos.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/combining.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/dask.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/data-structures.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/duckarrays.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/groupby.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/index.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/indexing.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/interpolation.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/options.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/plotting.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/reshaping.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/terminology.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/testing.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/time-series.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/user-guide/weather-climate.rst +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/doc/videos.yml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/licenses/ANYTREE_LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/licenses/DASK_LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/licenses/ICOMOON_LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/licenses/NUMPY_LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/licenses/PANDAS_LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/licenses/PYTHON_LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/licenses/SCIKIT_LEARN_LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/licenses/SEABORN_LICENSE +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/properties/README.md +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/properties/conftest.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/properties/test_encode_decode.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/properties/test_index_manipulation.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/pyproject.toml +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/setup.cfg +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/setup.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/file_manager.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/locks.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/lru_cache.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/memory.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/netcdf3.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/plugins.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/pydap_.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/scipy_.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/backends/store.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/coding/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/coding/calendar_ops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/coding/cftimeindex.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/coding/frequencies.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/coding/strings.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/coding/times.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/coding/variables.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/conventions.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/convert.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/_aggregations.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/_typed_ops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/accessor_dt.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/accessor_str.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/alignment.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/arithmetic.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/combine.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/computation.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/concat.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/coordinates.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/dask_array_ops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/datatree_mapping.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/datatree_ops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/datatree_render.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/extensions.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/formatting.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/formatting_html.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/groupby.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/iterators.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/merge.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/missing.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/nanops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/nputils.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/ops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/options.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/parallel.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/pdcompat.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/resample_cftime.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/rolling.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/rolling_exp.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/treenode.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/utils.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/variable.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/core/weighted.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/datatree_/datatree/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/indexes/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/_aggregations.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/_typing.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/daskmanager.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/dtypes.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/parallelcompat.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/pycompat.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/namedarray/utils.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/plot/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/plot/accessor.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/plot/dataarray_plot.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/plot/dataset_plot.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/plot/facetgrid.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/plot/utils.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/py.typed +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/static/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/static/css/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/static/css/style.css +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/static/html/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/static/html/icons-svg-inline.html +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/testing/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/testing/assertions.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/testing/strategies.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/arrays.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/conftest.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/data/bears.nc +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/data/example.grib +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/data/example.ict +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/data/example.uamiv +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/data/example_1.nc +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/data/example_1.nc.gz +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_accessor_dt.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_accessor_str.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_assertions.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_backends_api.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_backends_common.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_backends_datatree.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_backends_file_manager.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_backends_locks.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_backends_lru_cache.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_calendar_ops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_cftime_offsets.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_cftimeindex.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_cftimeindex_resample.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_coarsen.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_coding.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_coding_strings.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_computation.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_concat.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_conventions.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_coordinates.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_cupy.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_dask.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_datatree.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_datatree_mapping.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_deprecation_helpers.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_distributed.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_error_messages.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_extensions.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_formatting.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_formatting_html.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_hashable.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_indexes.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_indexing.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_interp.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_merge.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_missing.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_nputils.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_options.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_parallelcompat.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_plugins.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_print_versions.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_rolling.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_sparse.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_treenode.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_tutorial.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_typed_ops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_ufuncs.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_utils.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tests/test_weighted.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/tutorial.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/util/__init__.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/util/deprecation_helpers.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/util/generate_aggregations.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/util/generate_ops.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray/util/print_versions.py +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray.egg-info/dependency_links.txt +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray.egg-info/entry_points.txt +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray.egg-info/requires.txt +0 -0
- {xarray-2024.5.0 → xarray-2024.6.0}/xarray.egg-info/top_level.txt +0 -0
|
@@ -6,18 +6,15 @@ on:
|
|
|
6
6
|
pull_request:
|
|
7
7
|
branches:
|
|
8
8
|
- "main"
|
|
9
|
-
paths:
|
|
10
|
-
- 'ci/**'
|
|
11
|
-
- '.github/**'
|
|
12
|
-
- '/*' # covers files such as `pyproject.toml`
|
|
13
|
-
- 'properties/**'
|
|
14
|
-
- 'xarray/**'
|
|
15
9
|
workflow_dispatch: # allows you to trigger manually
|
|
16
10
|
|
|
17
11
|
concurrency:
|
|
18
12
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
13
|
cancel-in-progress: true
|
|
20
14
|
|
|
15
|
+
env:
|
|
16
|
+
FORCE_COLOR: 3
|
|
17
|
+
|
|
21
18
|
jobs:
|
|
22
19
|
detect-ci-trigger:
|
|
23
20
|
name: detect ci trigger
|
|
@@ -133,7 +130,7 @@ jobs:
|
|
|
133
130
|
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
|
|
134
131
|
|
|
135
132
|
- name: Upload mypy coverage to Codecov
|
|
136
|
-
uses: codecov/codecov-action@v4.
|
|
133
|
+
uses: codecov/codecov-action@v4.4.1
|
|
137
134
|
with:
|
|
138
135
|
file: mypy_report/cobertura.xml
|
|
139
136
|
flags: mypy
|
|
@@ -187,7 +184,7 @@ jobs:
|
|
|
187
184
|
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
|
|
188
185
|
|
|
189
186
|
- name: Upload mypy coverage to Codecov
|
|
190
|
-
uses: codecov/codecov-action@v4.
|
|
187
|
+
uses: codecov/codecov-action@v4.4.1
|
|
191
188
|
with:
|
|
192
189
|
file: mypy_report/cobertura.xml
|
|
193
190
|
flags: mypy39
|
|
@@ -248,7 +245,7 @@ jobs:
|
|
|
248
245
|
python -m pyright xarray/
|
|
249
246
|
|
|
250
247
|
- name: Upload pyright coverage to Codecov
|
|
251
|
-
uses: codecov/codecov-action@v4.
|
|
248
|
+
uses: codecov/codecov-action@v4.4.1
|
|
252
249
|
with:
|
|
253
250
|
file: pyright_report/cobertura.xml
|
|
254
251
|
flags: pyright
|
|
@@ -307,7 +304,7 @@ jobs:
|
|
|
307
304
|
python -m pyright xarray/
|
|
308
305
|
|
|
309
306
|
- name: Upload pyright coverage to Codecov
|
|
310
|
-
uses: codecov/codecov-action@v4.
|
|
307
|
+
uses: codecov/codecov-action@v4.4.1
|
|
311
308
|
with:
|
|
312
309
|
file: pyright_report/cobertura.xml
|
|
313
310
|
flags: pyright39
|
|
@@ -6,18 +6,15 @@ on:
|
|
|
6
6
|
pull_request:
|
|
7
7
|
branches:
|
|
8
8
|
- "main"
|
|
9
|
-
paths:
|
|
10
|
-
- 'ci/**'
|
|
11
|
-
- '.github/**'
|
|
12
|
-
- '/*' # covers files such as `pyproject.toml`
|
|
13
|
-
- 'properties/**'
|
|
14
|
-
- 'xarray/**'
|
|
15
9
|
workflow_dispatch: # allows you to trigger manually
|
|
16
10
|
|
|
17
11
|
concurrency:
|
|
18
12
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
13
|
cancel-in-progress: true
|
|
20
14
|
|
|
15
|
+
env:
|
|
16
|
+
FORCE_COLOR: 3
|
|
17
|
+
|
|
21
18
|
jobs:
|
|
22
19
|
detect-ci-trigger:
|
|
23
20
|
name: detect ci trigger
|
|
@@ -162,7 +159,7 @@ jobs:
|
|
|
162
159
|
path: pytest.xml
|
|
163
160
|
|
|
164
161
|
- name: Upload code coverage to Codecov
|
|
165
|
-
uses: codecov/codecov-action@v4.
|
|
162
|
+
uses: codecov/codecov-action@v4.4.1
|
|
166
163
|
with:
|
|
167
164
|
file: ./coverage.xml
|
|
168
165
|
flags: unittests
|
|
@@ -11,6 +11,9 @@ on:
|
|
|
11
11
|
- cron: "0 0 * * *" # Daily “At 00:00” UTC
|
|
12
12
|
workflow_dispatch: # allows you to trigger manually
|
|
13
13
|
|
|
14
|
+
env:
|
|
15
|
+
FORCE_COLOR: 3
|
|
16
|
+
|
|
14
17
|
jobs:
|
|
15
18
|
detect-ci-trigger:
|
|
16
19
|
name: detect ci trigger
|
|
@@ -36,9 +39,9 @@ jobs:
|
|
|
36
39
|
if: |
|
|
37
40
|
always()
|
|
38
41
|
&& (
|
|
39
|
-
|
|
40
|
-
||
|
|
41
|
-
|
|
42
|
+
needs.detect-ci-trigger.outputs.triggered == 'false'
|
|
43
|
+
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
|
|
44
|
+
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
|
|
42
45
|
)
|
|
43
46
|
defaults:
|
|
44
47
|
run:
|
|
@@ -15,6 +15,9 @@ concurrency:
|
|
|
15
15
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
16
|
cancel-in-progress: true
|
|
17
17
|
|
|
18
|
+
env:
|
|
19
|
+
FORCE_COLOR: 3
|
|
20
|
+
|
|
18
21
|
jobs:
|
|
19
22
|
detect-ci-trigger:
|
|
20
23
|
name: detect upstream-dev ci trigger
|
|
@@ -143,7 +146,7 @@ jobs:
|
|
|
143
146
|
run: |
|
|
144
147
|
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
|
|
145
148
|
- name: Upload mypy coverage to Codecov
|
|
146
|
-
uses: codecov/codecov-action@v4.
|
|
149
|
+
uses: codecov/codecov-action@v4.4.1
|
|
147
150
|
with:
|
|
148
151
|
file: mypy_report/cobertura.xml
|
|
149
152
|
flags: mypy
|
|
@@ -11,6 +11,7 @@ authors:
|
|
|
11
11
|
orcid: "https://orcid.org/0000-0001-7479-8439"
|
|
12
12
|
- family-names: "Magin"
|
|
13
13
|
given-names: "Justus"
|
|
14
|
+
orcid: "https://orcid.org/0000-0002-4254-8002"
|
|
14
15
|
- family-names: "Cherian"
|
|
15
16
|
given-names: "Deepak"
|
|
16
17
|
orcid: "https://orcid.org/0000-0002-6861-8734"
|
|
@@ -75,6 +76,19 @@ authors:
|
|
|
75
76
|
- family-names: "Wolfram"
|
|
76
77
|
given-names: "Phillip J."
|
|
77
78
|
orcid: "https://orcid.org/0000-0001-5971-4241"
|
|
79
|
+
- family-names: "Henderson"
|
|
80
|
+
given-names: "Scott"
|
|
81
|
+
orcid: "https://orcid.org/0000-0003-0624-4965"
|
|
82
|
+
- family-names: "Awowale"
|
|
83
|
+
given-names: "Eniola Olufunke"
|
|
84
|
+
- family-names: "Scheick"
|
|
85
|
+
given-names: "Jessica"
|
|
86
|
+
orcid: "https://orcid.org/0000-0002-3421-4459"
|
|
87
|
+
- family-names: "Savoie"
|
|
88
|
+
given-names: "Matthew"
|
|
89
|
+
orcid: "https://orcid.org/0000-0002-8881-2550"
|
|
90
|
+
- family-names: "Littlejohns"
|
|
91
|
+
given-names: "Owen"
|
|
78
92
|
title: "xarray"
|
|
79
93
|
abstract: "N-D labeled arrays and datasets in Python."
|
|
80
94
|
license: Apache-2.0
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
|
+
if which micromamba >/dev/null; then
|
|
4
|
+
conda=micromamba
|
|
5
|
+
elif which mamba >/dev/null; then
|
|
6
|
+
conda=mamba
|
|
7
|
+
else
|
|
8
|
+
conda=conda
|
|
9
|
+
fi
|
|
10
|
+
|
|
3
11
|
# temporarily (?) remove numbagg and numba
|
|
4
|
-
|
|
12
|
+
$conda remove -y numba numbagg sparse
|
|
5
13
|
# temporarily remove numexpr
|
|
6
|
-
|
|
14
|
+
$conda remove -y numexpr
|
|
7
15
|
# temporarily remove backends
|
|
8
|
-
|
|
16
|
+
$conda remove -y cf_units hdf5 h5py netcdf4 pydap
|
|
9
17
|
# forcibly remove packages to avoid artifacts
|
|
10
|
-
|
|
18
|
+
$conda remove -y --force \
|
|
11
19
|
numpy \
|
|
12
20
|
scipy \
|
|
13
21
|
pandas \
|
|
@@ -19,6 +27,7 @@ micromamba remove -y --force \
|
|
|
19
27
|
bottleneck \
|
|
20
28
|
flox
|
|
21
29
|
# pint
|
|
30
|
+
|
|
22
31
|
# to limit the runtime of Upstream CI
|
|
23
32
|
python -m pip install \
|
|
24
33
|
-i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
|
|
@@ -39,13 +48,15 @@ python -m pip install \
|
|
|
39
48
|
--pre \
|
|
40
49
|
--upgrade \
|
|
41
50
|
pyarrow
|
|
51
|
+
# manually install `pint` to pull in new dependencies
|
|
52
|
+
python -m pip install --upgrade pint
|
|
42
53
|
python -m pip install \
|
|
43
54
|
--no-deps \
|
|
44
55
|
--upgrade \
|
|
45
56
|
git+https://github.com/dask/dask \
|
|
46
57
|
git+https://github.com/dask/dask-expr \
|
|
47
58
|
git+https://github.com/dask/distributed \
|
|
48
|
-
git+https://github.com/zarr-developers/zarr \
|
|
59
|
+
git+https://github.com/zarr-developers/zarr.git@main \
|
|
49
60
|
git+https://github.com/Unidata/cftime \
|
|
50
61
|
git+https://github.com/pypa/packaging \
|
|
51
62
|
git+https://github.com/hgrecco/pint \
|
|
@@ -23,12 +23,12 @@ IGNORE_DEPS = {
|
|
|
23
23
|
"isort",
|
|
24
24
|
"mypy",
|
|
25
25
|
"pip",
|
|
26
|
-
"setuptools",
|
|
27
26
|
"pytest",
|
|
28
27
|
"pytest-cov",
|
|
29
28
|
"pytest-env",
|
|
30
|
-
"pytest-xdist",
|
|
31
29
|
"pytest-timeout",
|
|
30
|
+
"pytest-xdist",
|
|
31
|
+
"setuptools",
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
POLICY_MONTHS = {"python": 30, "numpy": 18}
|
|
@@ -162,11 +162,11 @@ def process_pkg(
|
|
|
162
162
|
status = "<"
|
|
163
163
|
elif (req_major, req_minor) > (policy_major, policy_minor):
|
|
164
164
|
status = "> (!)"
|
|
165
|
-
delta = relativedelta(datetime.now(),
|
|
165
|
+
delta = relativedelta(datetime.now(), req_published).normalized()
|
|
166
166
|
n_months = delta.years * 12 + delta.months
|
|
167
167
|
warning(
|
|
168
|
-
f"Package is too new: {pkg}={
|
|
169
|
-
f"published on {
|
|
168
|
+
f"Package is too new: {pkg}={req_major}.{req_minor} was "
|
|
169
|
+
f"published on {req_published:%Y-%m-%d} "
|
|
170
170
|
f"which was {n_months} months ago (policy is {policy_months} months)"
|
|
171
171
|
)
|
|
172
172
|
else:
|
|
@@ -7,9 +7,8 @@ table.docutils td {
|
|
|
7
7
|
word-wrap: break-word;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
background-color:
|
|
12
|
-
color: #000;
|
|
10
|
+
.bd-header-announcement {
|
|
11
|
+
background-color: var(--pst-color-info-bg);
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
/* Reduce left and right margins */
|
|
@@ -222,8 +221,6 @@ main *:target::before {
|
|
|
222
221
|
}
|
|
223
222
|
|
|
224
223
|
body {
|
|
225
|
-
/* Add padding to body to avoid overlap with navbar. */
|
|
226
|
-
padding-top: var(--navbar-height);
|
|
227
224
|
width: 100%;
|
|
228
225
|
}
|
|
229
226
|
|
|
@@ -242,7 +242,7 @@ html_theme_options = dict(
|
|
|
242
242
|
Theme by the <a href="https://ebp.jupyterbook.org">Executable Book Project</a></p>""",
|
|
243
243
|
twitter_url="https://twitter.com/xarray_dev",
|
|
244
244
|
icon_links=[], # workaround for pydata/pydata-sphinx-theme#1220
|
|
245
|
-
announcement="
|
|
245
|
+
announcement="<a href='https://forms.gle/KEq7WviCdz9xTaJX6'>Xarray's 2024 User Survey is live now. Please take ~5 minutes to fill it out and help us improve Xarray.</a>",
|
|
246
246
|
)
|
|
247
247
|
|
|
248
248
|
|
|
@@ -74,6 +74,7 @@ Extend xarray capabilities
|
|
|
74
74
|
- `Collocate <https://github.com/cistools/collocate>`_: Collocate xarray trajectories in arbitrary physical dimensions
|
|
75
75
|
- `eofs <https://ajdawson.github.io/eofs/>`_: EOF analysis in Python.
|
|
76
76
|
- `hypothesis-gufunc <https://hypothesis-gufunc.readthedocs.io/en/latest/>`_: Extension to hypothesis. Makes it easy to write unit tests with xarray objects as input.
|
|
77
|
+
- `ntv-pandas <https://github.com/loco-philippe/ntv-pandas>`_ : A tabular analyzer and a semantic, compact and reversible converter for multidimensional and tabular data
|
|
77
78
|
- `nxarray <https://github.com/nxarray/nxarray>`_: NeXus input/output capability for xarray.
|
|
78
79
|
- `xarray-compare <https://github.com/astropenguin/xarray-compare>`_: xarray extension for data comparison.
|
|
79
80
|
- `xarray-dataclasses <https://github.com/astropenguin/xarray-dataclasses>`_: xarray extension for typed DataArray and Dataset creation.
|
|
@@ -190,13 +190,6 @@
|
|
|
190
190
|
"\n",
|
|
191
191
|
"**Note**: This group-by-latitude approach does not take into account the finite-size geometry of grid cells. It simply bins each value according to the coordinates at the cell center. Xarray has no understanding of grid cells and their geometry. More precise geographic regridding for xarray data is available via the [xesmf](https://xesmf.readthedocs.io) package."
|
|
192
192
|
]
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"cell_type": "code",
|
|
196
|
-
"execution_count": null,
|
|
197
|
-
"metadata": {},
|
|
198
|
-
"outputs": [],
|
|
199
|
-
"source": []
|
|
200
193
|
}
|
|
201
194
|
],
|
|
202
195
|
"metadata": {
|
|
@@ -416,7 +416,8 @@ read the data.
|
|
|
416
416
|
Scaling and type conversions
|
|
417
417
|
............................
|
|
418
418
|
|
|
419
|
-
These encoding options
|
|
419
|
+
These encoding options (based on `CF Conventions on packed data`_) work on any
|
|
420
|
+
version of the netCDF file format:
|
|
420
421
|
|
|
421
422
|
- ``dtype``: Any valid NumPy dtype or string convertible to a dtype, e.g., ``'int16'``
|
|
422
423
|
or ``'float32'``. This controls the type of the data written on disk.
|
|
@@ -427,7 +428,8 @@ These encoding options work on any version of the netCDF file format:
|
|
|
427
428
|
output file, unless explicitly disabled with an encoding ``{'_FillValue': None}``.
|
|
428
429
|
- ``scale_factor`` and ``add_offset``: Used to convert from encoded data on disk to
|
|
429
430
|
to the decoded data in memory, according to the formula
|
|
430
|
-
``decoded = scale_factor * encoded + add_offset``.
|
|
431
|
+
``decoded = scale_factor * encoded + add_offset``. Please note that ``scale_factor``
|
|
432
|
+
and ``add_offset`` must be of same type and determine the type of the decoded data.
|
|
431
433
|
|
|
432
434
|
These parameters can be fruitfully combined to compress discretized data on disk. For
|
|
433
435
|
example, to save the variable ``foo`` with a precision of 0.1 in 16-bit integers while
|
|
@@ -435,6 +437,8 @@ converting ``NaN`` to ``-9999``, we would use
|
|
|
435
437
|
``encoding={'foo': {'dtype': 'int16', 'scale_factor': 0.1, '_FillValue': -9999}}``.
|
|
436
438
|
Compression and decompression with such discretization is extremely fast.
|
|
437
439
|
|
|
440
|
+
.. _CF Conventions on packed data: https://cfconventions.org/cf-conventions/cf-conventions.html#packed-data
|
|
441
|
+
|
|
438
442
|
.. _io.string-encoding:
|
|
439
443
|
|
|
440
444
|
String encoding
|
|
@@ -110,6 +110,26 @@ work even if not the hierarchical index is not a full tensor product:
|
|
|
110
110
|
s[::2]
|
|
111
111
|
s[::2].to_xarray()
|
|
112
112
|
|
|
113
|
+
Lossless and reversible conversion
|
|
114
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
115
|
+
|
|
116
|
+
The previous ``Dataset`` example shows that the conversion is not reversible (lossy roundtrip) and
|
|
117
|
+
that the size of the ``Dataset`` increases.
|
|
118
|
+
|
|
119
|
+
Particularly after a roundtrip, the following deviations are noted:
|
|
120
|
+
|
|
121
|
+
- a non-dimension Dataset ``coordinate`` is converted into ``variable``
|
|
122
|
+
- a non-dimension DataArray ``coordinate`` is not converted
|
|
123
|
+
- ``dtype`` is not allways the same (e.g. "str" is converted to "object")
|
|
124
|
+
- ``attrs`` metadata is not conserved
|
|
125
|
+
|
|
126
|
+
To avoid these problems, the third-party `ntv-pandas <https://github.com/loco-philippe/ntv-pandas>`__ library offers lossless and reversible conversions between
|
|
127
|
+
``Dataset``/ ``DataArray`` and pandas ``DataFrame`` objects.
|
|
128
|
+
|
|
129
|
+
This solution is particularly interesting for converting any ``DataFrame`` into a ``Dataset`` (the converter find the multidimensional structure hidden by the tabular structure).
|
|
130
|
+
|
|
131
|
+
The `ntv-pandas examples <https://github.com/loco-philippe/ntv-pandas/tree/main/example>`__ show how to improve the conversion for the previous ``Dataset`` example and for more complex examples.
|
|
132
|
+
|
|
113
133
|
Multi-dimensional data
|
|
114
134
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
115
135
|
|
|
@@ -15,6 +15,52 @@ What's New
|
|
|
15
15
|
np.random.seed(123456)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
.. _whats-new.2024.06.0:
|
|
19
|
+
|
|
20
|
+
v2024.06.0 (Jun 13, 2024)
|
|
21
|
+
-------------------------
|
|
22
|
+
This release brings various performance optimizations and compatibility with the upcoming numpy 2.0 release.
|
|
23
|
+
|
|
24
|
+
Thanks to the 22 contributors to this release:
|
|
25
|
+
Alfonso Ladino, David Hoese, Deepak Cherian, Eni Awowale, Ilan Gold, Jessica Scheick, Joe Hamman, Justus Magin, Kai Mühlbauer, Mark Harfouche, Mathias Hauser, Matt Savoie, Maximilian Roos, Mike Thramann, Nicolas Karasiak, Owen Littlejohns, Paul Ockenfuß, Philippe THOMY, Scott Henderson, Spencer Clark, Stephan Hoyer and Tom Nicholas
|
|
26
|
+
|
|
27
|
+
Performance
|
|
28
|
+
~~~~~~~~~~~
|
|
29
|
+
|
|
30
|
+
- Small optimization to the netCDF4 and h5netcdf backends (:issue:`9058`, :pull:`9067`).
|
|
31
|
+
By `Deepak Cherian <https://github.com/dcherian>`_.
|
|
32
|
+
- Small optimizations to help reduce indexing speed of datasets (:pull:`9002`).
|
|
33
|
+
By `Mark Harfouche <https://github.com/hmaarrfk>`_.
|
|
34
|
+
- Performance improvement in `open_datatree` method for Zarr, netCDF4 and h5netcdf backends (:issue:`8994`, :pull:`9014`).
|
|
35
|
+
By `Alfonso Ladino <https://github.com/aladinor>`_.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Bug fixes
|
|
39
|
+
~~~~~~~~~
|
|
40
|
+
- Preserve conversion of timezone-aware pandas Datetime arrays to numpy object arrays
|
|
41
|
+
(:issue:`9026`, :pull:`9042`).
|
|
42
|
+
By `Ilan Gold <https://github.com/ilan-gold>`_.
|
|
43
|
+
- :py:meth:`DataArrayResample.interpolate` and :py:meth:`DatasetResample.interpolate` method now
|
|
44
|
+
support arbitrary kwargs such as ``order`` for polynomial interpolation (:issue:`8762`).
|
|
45
|
+
By `Nicolas Karasiak <https://github.com/nkarasiak>`_.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Documentation
|
|
49
|
+
~~~~~~~~~~~~~
|
|
50
|
+
- Add link to CF Conventions on packed data and sentence on type determination in the I/O user guide (:issue:`9041`, :pull:`9045`).
|
|
51
|
+
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Internal Changes
|
|
55
|
+
~~~~~~~~~~~~~~~~
|
|
56
|
+
- Migrates remainder of ``io.py`` to ``xarray/core/datatree_io.py`` and
|
|
57
|
+
``TreeAttrAccessMixin`` into ``xarray/core/common.py`` (:pull:`9011`).
|
|
58
|
+
By `Owen Littlejohns <https://github.com/owenlittlejohns>`_ and
|
|
59
|
+
`Tom Nicholas <https://github.com/TomNicholas>`_.
|
|
60
|
+
- Compatibility with numpy 2 (:issue:`8844`, :pull:`8854`, :pull:`8946`).
|
|
61
|
+
By `Justus Magin <https://github.com/keewis>`_ and `Stephan Hoyer <https://github.com/shoyer>`_.
|
|
62
|
+
|
|
63
|
+
|
|
18
64
|
.. _whats-new.2024.05.0:
|
|
19
65
|
|
|
20
66
|
v2024.05.0 (May 12, 2024)
|
|
@@ -71,8 +117,8 @@ Bug fixes
|
|
|
71
117
|
<https://github.com/pandas-dev/pandas/issues/56147>`_ to
|
|
72
118
|
:py:func:`pandas.date_range`, date ranges produced by
|
|
73
119
|
:py:func:`xarray.cftime_range` with negative frequencies will now fall fully
|
|
74
|
-
within the bounds of the provided start and end dates (:pull:`8999`).
|
|
75
|
-
`Spencer Clark <https://github.com/spencerkclark>`_.
|
|
120
|
+
within the bounds of the provided start and end dates (:pull:`8999`).
|
|
121
|
+
By `Spencer Clark <https://github.com/spencerkclark>`_.
|
|
76
122
|
|
|
77
123
|
Internal Changes
|
|
78
124
|
~~~~~~~~~~~~~~~~
|
|
@@ -95,8 +141,8 @@ Internal Changes
|
|
|
95
141
|
By `Owen Littlejohns <https://github.com/owenlittlejohns>`_, `Matt Savoie
|
|
96
142
|
<https://github.com/flamingbear>`_ and `Tom Nicholas <https://github.com/TomNicholas>`_.
|
|
97
143
|
- ``transpose``, ``set_dims``, ``stack`` & ``unstack`` now use a ``dim`` kwarg
|
|
98
|
-
rather than ``dims`` or ``dimensions``. This is the final change to
|
|
99
|
-
|
|
144
|
+
rather than ``dims`` or ``dimensions``. This is the final change to make xarray methods
|
|
145
|
+
consistent with their use of ``dim``. Using the existing kwarg will raise a
|
|
100
146
|
warning.
|
|
101
147
|
By `Maximilian Roos <https://github.com/max-sixty>`_
|
|
102
148
|
|
|
@@ -2862,7 +2908,7 @@ Bug fixes
|
|
|
2862
2908
|
process (:issue:`4045`, :pull:`4684`). It also enables encoding and decoding standard
|
|
2863
2909
|
calendar dates with time units of nanoseconds (:pull:`4400`).
|
|
2864
2910
|
By `Spencer Clark <https://github.com/spencerkclark>`_ and `Mark Harfouche
|
|
2865
|
-
<
|
|
2911
|
+
<https://github.com/hmaarrfk>`_.
|
|
2866
2912
|
- :py:meth:`DataArray.astype`, :py:meth:`Dataset.astype` and :py:meth:`Variable.astype` support
|
|
2867
2913
|
the ``order`` and ``subok`` parameters again. This fixes a regression introduced in version 0.16.1
|
|
2868
2914
|
(:issue:`4644`, :pull:`4683`).
|
|
@@ -9,6 +9,7 @@ import pandas as pd
|
|
|
9
9
|
import pytest
|
|
10
10
|
|
|
11
11
|
import xarray as xr
|
|
12
|
+
from xarray.tests import has_pandas_3
|
|
12
13
|
|
|
13
14
|
pytest.importorskip("hypothesis")
|
|
14
15
|
import hypothesis.extra.numpy as npst # isort:skip
|
|
@@ -30,6 +31,16 @@ an_array = npst.arrays(
|
|
|
30
31
|
)
|
|
31
32
|
|
|
32
33
|
|
|
34
|
+
datetime_with_tz_strategy = st.datetimes(timezones=st.timezones())
|
|
35
|
+
dataframe_strategy = pdst.data_frames(
|
|
36
|
+
[
|
|
37
|
+
pdst.column("datetime_col", elements=datetime_with_tz_strategy),
|
|
38
|
+
pdst.column("other_col", elements=st.integers()),
|
|
39
|
+
],
|
|
40
|
+
index=pdst.range_indexes(min_size=1, max_size=10),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
33
44
|
@st.composite
|
|
34
45
|
def datasets_1d_vars(draw) -> xr.Dataset:
|
|
35
46
|
"""Generate datasets with only 1D variables
|
|
@@ -98,3 +109,19 @@ def test_roundtrip_pandas_dataframe(df) -> None:
|
|
|
98
109
|
roundtripped = arr.to_pandas()
|
|
99
110
|
pd.testing.assert_frame_equal(df, roundtripped)
|
|
100
111
|
xr.testing.assert_identical(arr, roundtripped.to_xarray())
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@pytest.mark.skipif(
|
|
115
|
+
has_pandas_3,
|
|
116
|
+
reason="fails to roundtrip on pandas 3 (see https://github.com/pydata/xarray/issues/9098)",
|
|
117
|
+
)
|
|
118
|
+
@given(df=dataframe_strategy)
|
|
119
|
+
def test_roundtrip_pandas_dataframe_datetime(df) -> None:
|
|
120
|
+
# Need to name the indexes, otherwise Xarray names them 'dim_0', 'dim_1'.
|
|
121
|
+
df.index.name = "rows"
|
|
122
|
+
df.columns.name = "cols"
|
|
123
|
+
dataset = xr.Dataset.from_dataframe(df)
|
|
124
|
+
roundtripped = dataset.to_dataframe()
|
|
125
|
+
roundtripped.columns.name = "cols" # why?
|
|
126
|
+
pd.testing.assert_frame_equal(df, roundtripped)
|
|
127
|
+
xr.testing.assert_identical(dataset, roundtripped.to_xarray())
|
|
@@ -36,7 +36,7 @@ from xarray.core.combine import (
|
|
|
36
36
|
from xarray.core.dataarray import DataArray
|
|
37
37
|
from xarray.core.dataset import Dataset, _get_chunk, _maybe_chunk
|
|
38
38
|
from xarray.core.indexes import Index
|
|
39
|
-
from xarray.core.types import ZarrWriteModes
|
|
39
|
+
from xarray.core.types import NetcdfWriteModes, ZarrWriteModes
|
|
40
40
|
from xarray.core.utils import is_remote_uri
|
|
41
41
|
from xarray.namedarray.daskmanager import DaskManager
|
|
42
42
|
from xarray.namedarray.parallelcompat import guess_chunkmanager
|
|
@@ -1120,7 +1120,7 @@ WRITEABLE_STORES: dict[T_NetcdfEngine, Callable] = {
|
|
|
1120
1120
|
def to_netcdf(
|
|
1121
1121
|
dataset: Dataset,
|
|
1122
1122
|
path_or_file: str | os.PathLike | None = None,
|
|
1123
|
-
mode:
|
|
1123
|
+
mode: NetcdfWriteModes = "w",
|
|
1124
1124
|
format: T_NetcdfTypes | None = None,
|
|
1125
1125
|
group: str | None = None,
|
|
1126
1126
|
engine: T_NetcdfEngine | None = None,
|
|
@@ -1138,7 +1138,7 @@ def to_netcdf(
|
|
|
1138
1138
|
def to_netcdf(
|
|
1139
1139
|
dataset: Dataset,
|
|
1140
1140
|
path_or_file: None = None,
|
|
1141
|
-
mode:
|
|
1141
|
+
mode: NetcdfWriteModes = "w",
|
|
1142
1142
|
format: T_NetcdfTypes | None = None,
|
|
1143
1143
|
group: str | None = None,
|
|
1144
1144
|
engine: T_NetcdfEngine | None = None,
|
|
@@ -1155,7 +1155,7 @@ def to_netcdf(
|
|
|
1155
1155
|
def to_netcdf(
|
|
1156
1156
|
dataset: Dataset,
|
|
1157
1157
|
path_or_file: str | os.PathLike,
|
|
1158
|
-
mode:
|
|
1158
|
+
mode: NetcdfWriteModes = "w",
|
|
1159
1159
|
format: T_NetcdfTypes | None = None,
|
|
1160
1160
|
group: str | None = None,
|
|
1161
1161
|
engine: T_NetcdfEngine | None = None,
|
|
@@ -1173,7 +1173,7 @@ def to_netcdf(
|
|
|
1173
1173
|
def to_netcdf(
|
|
1174
1174
|
dataset: Dataset,
|
|
1175
1175
|
path_or_file: str | os.PathLike,
|
|
1176
|
-
mode:
|
|
1176
|
+
mode: NetcdfWriteModes = "w",
|
|
1177
1177
|
format: T_NetcdfTypes | None = None,
|
|
1178
1178
|
group: str | None = None,
|
|
1179
1179
|
engine: T_NetcdfEngine | None = None,
|
|
@@ -1191,7 +1191,7 @@ def to_netcdf(
|
|
|
1191
1191
|
def to_netcdf(
|
|
1192
1192
|
dataset: Dataset,
|
|
1193
1193
|
path_or_file: str | os.PathLike,
|
|
1194
|
-
mode:
|
|
1194
|
+
mode: NetcdfWriteModes = "w",
|
|
1195
1195
|
format: T_NetcdfTypes | None = None,
|
|
1196
1196
|
group: str | None = None,
|
|
1197
1197
|
engine: T_NetcdfEngine | None = None,
|
|
@@ -1209,7 +1209,7 @@ def to_netcdf(
|
|
|
1209
1209
|
def to_netcdf(
|
|
1210
1210
|
dataset: Dataset,
|
|
1211
1211
|
path_or_file: str | os.PathLike,
|
|
1212
|
-
mode:
|
|
1212
|
+
mode: NetcdfWriteModes = "w",
|
|
1213
1213
|
format: T_NetcdfTypes | None = None,
|
|
1214
1214
|
group: str | None = None,
|
|
1215
1215
|
engine: T_NetcdfEngine | None = None,
|
|
@@ -1226,7 +1226,7 @@ def to_netcdf(
|
|
|
1226
1226
|
def to_netcdf(
|
|
1227
1227
|
dataset: Dataset,
|
|
1228
1228
|
path_or_file: str | os.PathLike | None,
|
|
1229
|
-
mode:
|
|
1229
|
+
mode: NetcdfWriteModes = "w",
|
|
1230
1230
|
format: T_NetcdfTypes | None = None,
|
|
1231
1231
|
group: str | None = None,
|
|
1232
1232
|
engine: T_NetcdfEngine | None = None,
|
|
@@ -1241,7 +1241,7 @@ def to_netcdf(
|
|
|
1241
1241
|
def to_netcdf(
|
|
1242
1242
|
dataset: Dataset,
|
|
1243
1243
|
path_or_file: str | os.PathLike | None = None,
|
|
1244
|
-
mode:
|
|
1244
|
+
mode: NetcdfWriteModes = "w",
|
|
1245
1245
|
format: T_NetcdfTypes | None = None,
|
|
1246
1246
|
group: str | None = None,
|
|
1247
1247
|
engine: T_NetcdfEngine | None = None,
|
|
@@ -19,9 +19,6 @@ from xarray.namedarray.pycompat import is_chunked_array
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
20
|
from io import BufferedIOBase
|
|
21
21
|
|
|
22
|
-
from h5netcdf.legacyapi import Dataset as ncDatasetLegacyH5
|
|
23
|
-
from netCDF4 import Dataset as ncDataset
|
|
24
|
-
|
|
25
22
|
from xarray.core.dataset import Dataset
|
|
26
23
|
from xarray.core.datatree import DataTree
|
|
27
24
|
from xarray.core.types import NestedSequence
|
|
@@ -131,33 +128,6 @@ def _decode_variable_name(name):
|
|
|
131
128
|
return name
|
|
132
129
|
|
|
133
130
|
|
|
134
|
-
def _open_datatree_netcdf(
|
|
135
|
-
ncDataset: ncDataset | ncDatasetLegacyH5,
|
|
136
|
-
filename_or_obj: str | os.PathLike[Any] | BufferedIOBase | AbstractDataStore,
|
|
137
|
-
**kwargs,
|
|
138
|
-
) -> DataTree:
|
|
139
|
-
from xarray.backends.api import open_dataset
|
|
140
|
-
from xarray.core.datatree import DataTree
|
|
141
|
-
from xarray.core.treenode import NodePath
|
|
142
|
-
|
|
143
|
-
ds = open_dataset(filename_or_obj, **kwargs)
|
|
144
|
-
tree_root = DataTree.from_dict({"/": ds})
|
|
145
|
-
with ncDataset(filename_or_obj, mode="r") as ncds:
|
|
146
|
-
for path in _iter_nc_groups(ncds):
|
|
147
|
-
subgroup_ds = open_dataset(filename_or_obj, group=path, **kwargs)
|
|
148
|
-
|
|
149
|
-
# TODO refactor to use __setitem__ once creation of new nodes by assigning Dataset works again
|
|
150
|
-
node_name = NodePath(path).name
|
|
151
|
-
new_node: DataTree = DataTree(name=node_name, data=subgroup_ds)
|
|
152
|
-
tree_root._set_item(
|
|
153
|
-
path,
|
|
154
|
-
new_node,
|
|
155
|
-
allow_overwrite=False,
|
|
156
|
-
new_nodes_along_path=True,
|
|
157
|
-
)
|
|
158
|
-
return tree_root
|
|
159
|
-
|
|
160
|
-
|
|
161
131
|
def _iter_nc_groups(root, parent="/"):
|
|
162
132
|
from xarray.core.treenode import NodePath
|
|
163
133
|
|