anemoi-datasets 0.4.3__tar.gz → 0.4.4__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.
- anemoi_datasets-0.4.4/.github/ci-config.yml +9 -0
- anemoi_datasets-0.4.4/.github/workflows/changelog-pr-update.yml +15 -0
- anemoi_datasets-0.4.4/.github/workflows/ci.yml +40 -0
- anemoi_datasets-0.4.4/.github/workflows/label-public-pr.yml +10 -0
- anemoi_datasets-0.4.4/.github/workflows/readthedocs-pr-update.yml +22 -0
- anemoi_datasets-0.4.4/CHANGELOG.md +60 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/PKG-INFO +1 -1
- anemoi_datasets-0.4.4/docs/building/sources/xarray-kerchunk.py +30 -0
- anemoi_datasets-0.4.4/docs/building/sources/xarray-kerchunk.rst +17 -0
- anemoi_datasets-0.4.4/docs/building/sources/xarray-kerchunk.yaml +10 -0
- anemoi_datasets-0.4.4/docs/building/sources/xarray-zarr.rst +6 -0
- anemoi_datasets-0.4.3/docs/building/sources/xarray.yaml → anemoi_datasets-0.4.4/docs/building/sources/xarray-zarr.yaml +1 -1
- anemoi_datasets-0.4.4/docs/building/sources/zenodo.rst +8 -0
- anemoi_datasets-0.4.4/docs/building/sources/zenodo.yaml +9 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources.rst +7 -4
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/_version.py +2 -2
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/compute/recentre.py +1 -1
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/accumulations.py +6 -22
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/hindcasts.py +27 -12
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/tendencies.py +1 -1
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/input.py +39 -3
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/loaders.py +17 -5
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/dates/__init__.py +67 -1
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/dates/groups.py +2 -2
- anemoi_datasets-0.4.4/src/anemoi/datasets/utils/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi_datasets.egg-info/PKG-INFO +1 -1
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi_datasets.egg-info/SOURCES.txt +14 -3
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create/test_create.py +3 -0
- anemoi_datasets-0.4.3/docs/building/sources/xarray.rst +0 -6
- anemoi_datasets-0.4.3/docs/test.ipynb +0 -186
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/.github/workflows/python-publish.yml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/.gitignore +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/.pre-commit-config.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/.readthedocs.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/.vscode/spellright.dict +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/LICENSE +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/README.md +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/Makefile +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/_static/logo.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/_static/style.css +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/_templates/.gitkeep +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/apply-fmt.sh +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/advanced-options.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/filters/empty.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/filters/noop.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/filters/rename.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/filters/rotate_winds.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/filters/select.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/filters/unrotate_winds.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/filters.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/handling-missing-dates.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/handling-missing-values.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/introduction.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/naming-variables.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/operations.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/accumulations.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/accumulations1.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/accumulations2.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/forcings.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/forcings.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/grib.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/hindcasts.rst +0 -0
- /anemoi_datasets-0.4.3/src/anemoi/datasets/compute/__init__.py → /anemoi_datasets-0.4.4/docs/building/sources/hindcasts.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/mars.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/mars1.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/mars2.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/netcdf.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/netcdf.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/opendap.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/opendap.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/recentre.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/yaml/grib1.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/yaml/grib2.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/yaml/grib3.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/yaml/grib4.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/yaml/hindcasts.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/sources/yaml/recentre.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/statistics.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/syntax.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/syntax.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/Makefile +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/building1.txt +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/building1.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/building2.txt +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/building2.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/building3.txt +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/building3.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/concat.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/hindcasts.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/input.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/missing_dates.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/nan.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/building/yaml/pipe.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/check-index.sh +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/cli/compare.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/cli/copy.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/cli/create.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/cli/inspect.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/cli/introduction.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/cli/scan.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/conf.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/images.pptx +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/index.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/installing.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/overview.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/overview_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/schemas/matrix.excalidraw +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/schemas/matrix.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/schemas/overview.excalidraw +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/schemas/overview.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/schemas/recipe.excalidraw +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/schemas/recipe.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/area1_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/area2_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/chain_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/combine_example.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/concat1.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/cutout_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/drop_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/end_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/ensembles1_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/frequency_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/grids1_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/join1.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/matching0_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/matching1_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/matching2_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/matching3_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/matching4_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/misc1.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/misc2.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/missing_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_cloud.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_combine1_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_combine2_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_complex.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_dict_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_first_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_list_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_name.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_other.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_path.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/open_yaml_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/rename_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/reorder1_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/reorder2_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/select1_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/select2_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/shuffle_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/some_attributes_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/start_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/statistics_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/subset_example.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/thinning_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/zip1_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/code/zip2_.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/combining.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/configuration.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/configuration.toml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/grids.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/area-1.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/concat.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/cutout-1.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/cutout-2.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/cutout-3.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/cutout-4.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/join.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/overlay.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/thinning-after.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/images/thinning-before.png +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/introduction.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/matching.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/methods.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/miscellaneous.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/opening.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/other.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/selecting.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/statistics.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/docs/using/subsetting.rst +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/pyproject.toml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/setup.cfg +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/__main__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/commands/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/commands/compare.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/commands/copy.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/commands/create.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/commands/inspect.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/commands/scan.py +0 -0
- {anemoi_datasets-0.4.3/src/anemoi/datasets/utils → anemoi_datasets-0.4.4/src/anemoi/datasets/compute}/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/check.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/chunks.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/config.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/filters/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/filters/empty.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/filters/noop.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/filters/rename.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/filters/rotate_winds.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/filters/unrotate_winds.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/constants.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/empty.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/forcings.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/grib.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/mars.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/netcdf.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/opendap.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/recentre.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/source.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/coordinates.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/field.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/fieldlist.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/flavour.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/grid.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/metadata.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/time.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray/variable.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray_kerchunk.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/xarray_zarr.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/functions/sources/zenodo.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/patch.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/persistent.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/size.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/statistics/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/statistics/summary.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/template.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/trace.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/utils.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/writer.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/create/zarr.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/__init__.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/concat.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/dataset.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/debug.css +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/debug.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/ensemble.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/forwards.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/grids.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/indexing.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/join.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/masked.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/misc.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/select.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/statistics.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/stores.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/subset.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/data/unchecked.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi/datasets/grids.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi_datasets.egg-info/dependency_links.txt +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi_datasets.egg-info/entry_points.txt +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi_datasets.egg-info/requires.txt +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/src/anemoi_datasets.egg-info/top_level.txt +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create/concat.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create/data_sources.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create/join.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create/missing.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create/nan.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create/pipe.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create/recentre.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create-perturbations-full.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/create-shift.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/test_chunks.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/test_data.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/test_dates.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/test_indexing.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/xarray/test_kerchunk.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/xarray/test_netcdf.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/xarray/test_opendap.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tests/xarray/test_zarr.py +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tools/.gitignore +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tools/examples/Makefile +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tools/examples/an-oper-2023-2023-2p5-6h-v1.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tools/grids/Makefile +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tools/grids/grids.ipynb +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tools/grids/grids1.yaml +0 -0
- {anemoi_datasets-0.4.3 → anemoi_datasets-0.4.4}/tools/grids/grids2.yaml +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: Check Changelog Update on PR
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- develop
|
|
8
|
+
jobs:
|
|
9
|
+
Check-Changelog:
|
|
10
|
+
name: Check Changelog Action
|
|
11
|
+
runs-on: ubuntu-20.04
|
|
12
|
+
steps:
|
|
13
|
+
- uses: tarides/changelog-check-action@v2
|
|
14
|
+
with:
|
|
15
|
+
changelog: CHANGELOG.md
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Trigger the workflow on push to master or develop, except tag creation
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- 'main'
|
|
8
|
+
- 'develop'
|
|
9
|
+
tags-ignore:
|
|
10
|
+
- '**'
|
|
11
|
+
|
|
12
|
+
# Trigger the workflow on pull request
|
|
13
|
+
pull_request: ~
|
|
14
|
+
|
|
15
|
+
# Trigger the workflow manually
|
|
16
|
+
workflow_dispatch: ~
|
|
17
|
+
|
|
18
|
+
# Trigger after public PR approved for CI
|
|
19
|
+
pull_request_target:
|
|
20
|
+
types: [labeled]
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
# Run CI including downstream packages on self-hosted runners
|
|
24
|
+
downstream-ci:
|
|
25
|
+
name: downstream-ci
|
|
26
|
+
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
|
27
|
+
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
|
|
28
|
+
with:
|
|
29
|
+
anemoi-datasets: ecmwf/anemoi-datasets@${{ github.event.pull_request.head.sha || github.sha }}
|
|
30
|
+
codecov_upload: true
|
|
31
|
+
secrets: inherit
|
|
32
|
+
|
|
33
|
+
# Build downstream packages on HPC
|
|
34
|
+
downstream-ci-hpc:
|
|
35
|
+
name: downstream-ci-hpc
|
|
36
|
+
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
|
|
37
|
+
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
|
|
38
|
+
with:
|
|
39
|
+
anemoi-datasets: ecmwf/anemoi-datasets@${{ github.event.pull_request.head.sha || github.sha }}
|
|
40
|
+
secrets: inherit
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Read the Docs PR Preview
|
|
2
|
+
on:
|
|
3
|
+
pull_request_target:
|
|
4
|
+
types:
|
|
5
|
+
- opened
|
|
6
|
+
- synchronize
|
|
7
|
+
- reopened
|
|
8
|
+
# Execute this action only on PRs that touch
|
|
9
|
+
# documentation files.
|
|
10
|
+
paths:
|
|
11
|
+
- "docs/**"
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
pull-requests: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
documentation-links:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: readthedocs/actions/preview@v1
|
|
21
|
+
with:
|
|
22
|
+
project-slug: "anemoi-datasets"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
Please add your functional changes to the appropriate section in the PR.
|
|
9
|
+
Keep it human-readable, your future self will thank you!
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
|
|
19
|
+
## [0.4.4] Bug fixes
|
|
20
|
+
|
|
21
|
+
- Bug fix in accumulations() that did not work with webmars
|
|
22
|
+
- Bug fix when using hindcasts input (missing dates on leap years)
|
|
23
|
+
|
|
24
|
+
## [0.4.0] Minor Release
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- earthkit-data replaces climetlab
|
|
28
|
+
|
|
29
|
+
### Removed
|
|
30
|
+
- climetlab
|
|
31
|
+
|
|
32
|
+
## [0.3.0] Minor Release
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
- hindcast source
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- updated documentation
|
|
39
|
+
|
|
40
|
+
## [0.2.0] Minor Release
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
- statistics tendencies
|
|
44
|
+
|
|
45
|
+
### Removed
|
|
46
|
+
- CubesFilter
|
|
47
|
+
|
|
48
|
+
## [0.1.0] Initial Release
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
- Documentation
|
|
52
|
+
- Initial code release for anemoi-datasets: create datasets for data-driven weather-models
|
|
53
|
+
- open datasets
|
|
54
|
+
- combine datasets
|
|
55
|
+
|
|
56
|
+
## Git Diffs:
|
|
57
|
+
[0.4.0]: https://github.com/ecmwf/anemoi-datasets/compare/0.3.0...0.4.0
|
|
58
|
+
[0.3.0]: https://github.com/ecmwf/anemoi-datasets/compare/0.2.0...0.3.0
|
|
59
|
+
[0.2.0]: https://github.com/ecmwf/anemoi-datasets/compare/0.1.0...0.2.0
|
|
60
|
+
[0.1.0]: https://github.com/ecmwf/anemoi-models/releases/tag/0.1.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: anemoi-datasets
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: A package to hold various functions to support training of ML models on ECMWF data.
|
|
5
5
|
Author-email: "European Centre for Medium-Range Weather Forecasts (ECMWF)" <software.support@ecmwf.int>
|
|
6
6
|
License: Apache License
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
import fsspec
|
|
4
|
+
import tqdm
|
|
5
|
+
from kerchunk.combine import MultiZarrToZarr
|
|
6
|
+
from kerchunk.hdf import SingleHdf5ToZarr
|
|
7
|
+
|
|
8
|
+
fs = fsspec.filesystem("s3", anon=True)
|
|
9
|
+
|
|
10
|
+
pattern = "s3://nsf-ncar-era5/e5.oper.an.pl/202403/e5.oper.an.pl.*.ll025sc.2024????00_2024????23.nc"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
jsons = []
|
|
14
|
+
|
|
15
|
+
for file in tqdm.tqdm(fs.glob(pattern)):
|
|
16
|
+
with fs.open(file, "rb", anon=True) as f:
|
|
17
|
+
h5chunks = SingleHdf5ToZarr(f, file)
|
|
18
|
+
jsons.append(h5chunks.translate())
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
mzz = MultiZarrToZarr(
|
|
22
|
+
jsons,
|
|
23
|
+
remote_protocol="s3",
|
|
24
|
+
remote_options={"anon": True},
|
|
25
|
+
concat_dims=["time"],
|
|
26
|
+
identical_dims=["latitude", "longitude"],
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
with open("combined.json", "w") as f:
|
|
30
|
+
json.dump(mzz.translate(), f)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#################
|
|
2
|
+
xarray-kerchunk
|
|
3
|
+
#################
|
|
4
|
+
|
|
5
|
+
.. literalinclude:: xarray-kerchunk.yaml
|
|
6
|
+
:language: yaml
|
|
7
|
+
|
|
8
|
+
The code below is inspired by the `kerchunk tutorial`_, and makes use of
|
|
9
|
+
a subset of the `ERA5 dataset available on AWS`_. You may need to
|
|
10
|
+
install the relevant packages before running the code below.
|
|
11
|
+
|
|
12
|
+
.. literalinclude:: xarray-kerchunk.py
|
|
13
|
+
:language: python
|
|
14
|
+
|
|
15
|
+
.. _era5 dataset available on aws: https://registry.opendata.aws/ecmwf-era5/
|
|
16
|
+
|
|
17
|
+
.. _kerchunk tutorial: https://fsspec.github.io/kerchunk/tutorial.html
|
|
@@ -20,11 +20,14 @@ The following `sources` are currently available:
|
|
|
20
20
|
.. toctree::
|
|
21
21
|
:maxdepth: 1
|
|
22
22
|
|
|
23
|
-
sources/
|
|
23
|
+
sources/accumulations
|
|
24
|
+
sources/forcings
|
|
24
25
|
sources/grib
|
|
26
|
+
sources/hindcasts
|
|
27
|
+
sources/mars
|
|
25
28
|
sources/netcdf
|
|
26
|
-
sources/xarray
|
|
27
29
|
sources/opendap
|
|
28
|
-
sources/forcings
|
|
29
|
-
sources/accumulations
|
|
30
30
|
sources/recentre
|
|
31
|
+
sources/xarray-kerchunk
|
|
32
|
+
sources/xarray-zarr
|
|
33
|
+
sources/zenodo
|
|
@@ -64,7 +64,7 @@ def recentre(
|
|
|
64
64
|
|
|
65
65
|
keys = ["param", "level", "valid_datetime", "date", "time", "step", "number"]
|
|
66
66
|
|
|
67
|
-
number_list = members.unique_values("number")["number"]
|
|
67
|
+
number_list = members.unique_values("number", progress_bar=False)["number"]
|
|
68
68
|
n_numbers = len(number_list)
|
|
69
69
|
|
|
70
70
|
assert None not in number_list
|
|
@@ -15,11 +15,10 @@ import earthkit.data as ekd
|
|
|
15
15
|
import numpy as np
|
|
16
16
|
from earthkit.data.core.temporary import temp_file
|
|
17
17
|
from earthkit.data.readers.grib.output import new_grib_output
|
|
18
|
-
from earthkit.data.utils.availability import Availability
|
|
19
18
|
|
|
20
19
|
from anemoi.datasets.create.utils import to_datetime_list
|
|
21
20
|
|
|
22
|
-
from .mars import
|
|
21
|
+
from .mars import mars
|
|
23
22
|
|
|
24
23
|
LOG = logging.getLogger(__name__)
|
|
25
24
|
|
|
@@ -307,26 +306,11 @@ def _compute_accumulations(
|
|
|
307
306
|
for date, time, steps in mars_date_time_steps:
|
|
308
307
|
for p in param:
|
|
309
308
|
for n in number:
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
"time": time,
|
|
316
|
-
"step": sorted(steps),
|
|
317
|
-
"number": n,
|
|
318
|
-
}
|
|
319
|
-
)
|
|
320
|
-
)
|
|
321
|
-
|
|
322
|
-
compressed = Availability(requests)
|
|
323
|
-
ds = ekd.from_source("empty")
|
|
324
|
-
for r in compressed.iterate():
|
|
325
|
-
request.update(r)
|
|
326
|
-
if context.use_grib_paramid and "param" in request:
|
|
327
|
-
request = use_grib_paramid(request)
|
|
328
|
-
print("🌧️", request)
|
|
329
|
-
ds = ds + ekd.from_source("mars", **request)
|
|
309
|
+
r = dict(request, param=p, date=date, time=time, step=sorted(steps), number=n)
|
|
310
|
+
|
|
311
|
+
requests.append(patch(r))
|
|
312
|
+
|
|
313
|
+
ds = mars(context, dates, *requests, request_already_using_valid_datetime=True)
|
|
330
314
|
|
|
331
315
|
accumulations = {}
|
|
332
316
|
for a in [AccumulationClass(out, frequency=frequency, **r) for r in requests]:
|
|
@@ -7,20 +7,16 @@
|
|
|
7
7
|
# nor does it submit to any jurisdiction.
|
|
8
8
|
#
|
|
9
9
|
import datetime
|
|
10
|
+
import logging
|
|
11
|
+
|
|
12
|
+
from earthkit.data.core.fieldlist import MultiFieldList
|
|
10
13
|
|
|
11
14
|
from anemoi.datasets.create.functions.sources.mars import mars
|
|
12
15
|
|
|
16
|
+
LOGGER = logging.getLogger(__name__)
|
|
13
17
|
DEBUG = True
|
|
14
18
|
|
|
15
19
|
|
|
16
|
-
def _member(field):
|
|
17
|
-
# Bug in eccodes has number=0 randomly
|
|
18
|
-
number = field.metadata("number")
|
|
19
|
-
if number is None:
|
|
20
|
-
number = 0
|
|
21
|
-
return number
|
|
22
|
-
|
|
23
|
-
|
|
24
20
|
def _to_list(x):
|
|
25
21
|
if isinstance(x, (list, tuple)):
|
|
26
22
|
return x
|
|
@@ -63,9 +59,19 @@ class HindcastCompute:
|
|
|
63
59
|
def use_reference_year(reference_year, request):
|
|
64
60
|
request = request.copy()
|
|
65
61
|
hdate = request.pop("date")
|
|
66
|
-
|
|
62
|
+
|
|
63
|
+
if hdate.year >= reference_year:
|
|
64
|
+
return None, False
|
|
65
|
+
|
|
66
|
+
try:
|
|
67
|
+
date = datetime.datetime(reference_year, hdate.month, hdate.day)
|
|
68
|
+
except ValueError:
|
|
69
|
+
if hdate.month == 2 and hdate.day == 29:
|
|
70
|
+
return None, False
|
|
71
|
+
raise
|
|
72
|
+
|
|
67
73
|
request.update(date=date.strftime("%Y-%m-%d"), hdate=hdate.strftime("%Y-%m-%d"))
|
|
68
|
-
return request
|
|
74
|
+
return request, True
|
|
69
75
|
|
|
70
76
|
|
|
71
77
|
def hindcasts(context, dates, **request):
|
|
@@ -89,9 +95,18 @@ def hindcasts(context, dates, **request):
|
|
|
89
95
|
requests = []
|
|
90
96
|
for d in dates:
|
|
91
97
|
req = c.compute_hindcast(d)
|
|
92
|
-
req = use_reference_year(reference_year, req)
|
|
98
|
+
req, ok = use_reference_year(reference_year, req)
|
|
99
|
+
if ok:
|
|
100
|
+
requests.append(req)
|
|
101
|
+
|
|
102
|
+
# print("HINDCASTS requests", reference_year, base_times, available_steps)
|
|
103
|
+
# print("HINDCASTS dates", compress_dates(dates))
|
|
104
|
+
|
|
105
|
+
if len(requests) == 0:
|
|
106
|
+
# print("HINDCASTS no requests")
|
|
107
|
+
return MultiFieldList([])
|
|
93
108
|
|
|
94
|
-
|
|
109
|
+
# print("HINDCASTS requests", requests)
|
|
95
110
|
|
|
96
111
|
return mars(
|
|
97
112
|
context,
|
|
@@ -56,7 +56,7 @@ def tendencies(dates, time_increment, **kwargs):
|
|
|
56
56
|
|
|
57
57
|
ds = mars(dates=all_dates, **kwargs)
|
|
58
58
|
|
|
59
|
-
dates_in_data = ds.unique_values("valid_datetime")["valid_datetime"]
|
|
59
|
+
dates_in_data = ds.unique_values("valid_datetime", progress_bar=False)["valid_datetime"]
|
|
60
60
|
for d in all_dates:
|
|
61
61
|
assert d.isoformat() in dates_in_data, d
|
|
62
62
|
|
|
@@ -277,6 +277,9 @@ class Result:
|
|
|
277
277
|
if len(args) == 1 and isinstance(args[0], (list, tuple)):
|
|
278
278
|
args = args[0]
|
|
279
279
|
|
|
280
|
+
# print("Executing", self.action_path)
|
|
281
|
+
# print("Dates:", compress_dates(self.dates))
|
|
282
|
+
|
|
280
283
|
names = []
|
|
281
284
|
for a in args:
|
|
282
285
|
if isinstance(a, str):
|
|
@@ -287,12 +290,12 @@ class Result:
|
|
|
287
290
|
print(f"Building a {len(names)}D hypercube using", names)
|
|
288
291
|
|
|
289
292
|
ds = ds.order_by(*args, remapping=remapping, patches=patches)
|
|
290
|
-
user_coords = ds.unique_values(*names, remapping=remapping, patches=patches)
|
|
293
|
+
user_coords = ds.unique_values(*names, remapping=remapping, patches=patches, progress_bar=False)
|
|
291
294
|
|
|
292
295
|
print()
|
|
293
296
|
print("Number of unique values found for each coordinate:")
|
|
294
297
|
for k, v in user_coords.items():
|
|
295
|
-
print(f" {k:20}:", len(v))
|
|
298
|
+
print(f" {k:20}:", len(v), shorten_list(v, max_length=10))
|
|
296
299
|
print()
|
|
297
300
|
user_shape = tuple(len(v) for k, v in user_coords.items())
|
|
298
301
|
print("Shape of the hypercube :", user_shape)
|
|
@@ -305,13 +308,18 @@ class Result:
|
|
|
305
308
|
|
|
306
309
|
remapping = build_remapping(remapping, patches)
|
|
307
310
|
expected = set(itertools.product(*user_coords.values()))
|
|
311
|
+
extra = set()
|
|
308
312
|
|
|
309
313
|
if math.prod(user_shape) > len(ds):
|
|
310
314
|
print(f"This means that all the fields in the datasets do not exists for all combinations of {names}.")
|
|
311
315
|
|
|
312
316
|
for f in ds:
|
|
313
317
|
metadata = remapping(f.metadata)
|
|
314
|
-
|
|
318
|
+
key = tuple(metadata(n, default=None) for n in names)
|
|
319
|
+
if key in expected:
|
|
320
|
+
expected.remove(key)
|
|
321
|
+
else:
|
|
322
|
+
extra.add(key)
|
|
315
323
|
|
|
316
324
|
print("Missing fields:")
|
|
317
325
|
print()
|
|
@@ -321,7 +329,35 @@ class Result:
|
|
|
321
329
|
print("...", len(expected) - i - 1, "more")
|
|
322
330
|
break
|
|
323
331
|
|
|
332
|
+
print("Extra fields:")
|
|
333
|
+
print()
|
|
334
|
+
for i, f in enumerate(sorted(extra)):
|
|
335
|
+
print(" ", f)
|
|
336
|
+
if i >= 9 and len(extra) > 10:
|
|
337
|
+
print("...", len(extra) - i - 1, "more")
|
|
338
|
+
break
|
|
339
|
+
|
|
324
340
|
print()
|
|
341
|
+
print("Missing values:")
|
|
342
|
+
per_name = defaultdict(set)
|
|
343
|
+
for e in expected:
|
|
344
|
+
for n, v in zip(names, e):
|
|
345
|
+
per_name[n].add(v)
|
|
346
|
+
|
|
347
|
+
for n, v in per_name.items():
|
|
348
|
+
print(" ", n, len(v), shorten_list(sorted(v), max_length=10))
|
|
349
|
+
print()
|
|
350
|
+
|
|
351
|
+
print("Extra values:")
|
|
352
|
+
per_name = defaultdict(set)
|
|
353
|
+
for e in extra:
|
|
354
|
+
for n, v in zip(names, e):
|
|
355
|
+
per_name[n].add(v)
|
|
356
|
+
|
|
357
|
+
for n, v in per_name.items():
|
|
358
|
+
print(" ", n, len(v), shorten_list(sorted(v), max_length=10))
|
|
359
|
+
print()
|
|
360
|
+
|
|
325
361
|
print("To solve this issue, you can:")
|
|
326
362
|
print(
|
|
327
363
|
" - Provide a better selection, like 'step: 0' or 'level: 1000' to "
|
|
@@ -17,6 +17,7 @@ import numpy as np
|
|
|
17
17
|
import tqdm
|
|
18
18
|
import zarr
|
|
19
19
|
from anemoi.utils.config import DotDict
|
|
20
|
+
from anemoi.utils.dates import as_datetime
|
|
20
21
|
from anemoi.utils.humanize import seconds_to_human
|
|
21
22
|
|
|
22
23
|
from anemoi.datasets import MissingDateError
|
|
@@ -24,6 +25,7 @@ from anemoi.datasets import open_dataset
|
|
|
24
25
|
from anemoi.datasets.create.persistent import build_storage
|
|
25
26
|
from anemoi.datasets.data.misc import as_first_date
|
|
26
27
|
from anemoi.datasets.data.misc import as_last_date
|
|
28
|
+
from anemoi.datasets.dates import compress_dates
|
|
27
29
|
from anemoi.datasets.dates.groups import Groups
|
|
28
30
|
|
|
29
31
|
from .check import DatasetName
|
|
@@ -442,14 +444,24 @@ class ContentLoader(Loader):
|
|
|
442
444
|
dates = result.dates
|
|
443
445
|
|
|
444
446
|
cube = result.get_cube()
|
|
445
|
-
assert cube.extended_user_shape[0] == len(dates), (
|
|
446
|
-
cube.extended_user_shape[0],
|
|
447
|
-
len(dates),
|
|
448
|
-
)
|
|
449
|
-
|
|
450
447
|
shape = cube.extended_user_shape
|
|
451
448
|
dates_in_data = cube.user_coords["valid_datetime"]
|
|
452
449
|
|
|
450
|
+
if cube.extended_user_shape[0] != len(dates):
|
|
451
|
+
print(f"Cube shape does not match the number of dates {cube.extended_user_shape[0]}, {len(dates)}")
|
|
452
|
+
print("Requested dates", compress_dates(dates))
|
|
453
|
+
print("Cube dates", compress_dates(dates_in_data))
|
|
454
|
+
|
|
455
|
+
a = set(as_datetime(_) for _ in dates)
|
|
456
|
+
b = set(as_datetime(_) for _ in dates_in_data)
|
|
457
|
+
|
|
458
|
+
print("Missing dates", compress_dates(a - b))
|
|
459
|
+
print("Extra dates", compress_dates(b - a))
|
|
460
|
+
|
|
461
|
+
raise ValueError(
|
|
462
|
+
f"Cube shape does not match the number of dates {cube.extended_user_shape[0]}, {len(dates)}"
|
|
463
|
+
)
|
|
464
|
+
|
|
453
465
|
LOG.debug(f"Loading {shape=} in {self.data_array.shape=}")
|
|
454
466
|
|
|
455
467
|
def check_dates_in_data(lst, lst2):
|
|
@@ -9,6 +9,45 @@
|
|
|
9
9
|
import datetime
|
|
10
10
|
import warnings
|
|
11
11
|
|
|
12
|
+
from anemoi.utils.dates import as_datetime
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _compress_dates(dates):
|
|
16
|
+
dates = sorted(dates)
|
|
17
|
+
if len(dates) < 3:
|
|
18
|
+
yield dates
|
|
19
|
+
return
|
|
20
|
+
|
|
21
|
+
prev = first = dates.pop(0)
|
|
22
|
+
curr = dates.pop(0)
|
|
23
|
+
delta = curr - prev
|
|
24
|
+
while curr - prev == delta:
|
|
25
|
+
prev = curr
|
|
26
|
+
if not dates:
|
|
27
|
+
break
|
|
28
|
+
curr = dates.pop(0)
|
|
29
|
+
|
|
30
|
+
yield (first, prev, delta)
|
|
31
|
+
if dates:
|
|
32
|
+
yield from _compress_dates([curr] + dates)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def compress_dates(dates):
|
|
36
|
+
dates = [as_datetime(_) for _ in dates]
|
|
37
|
+
result = []
|
|
38
|
+
|
|
39
|
+
for n in _compress_dates(dates):
|
|
40
|
+
if isinstance(n, list):
|
|
41
|
+
result.extend([str(_) for _ in n])
|
|
42
|
+
else:
|
|
43
|
+
result.append(" ".join([str(n[0]), "to", str(n[1]), "by", str(n[2])]))
|
|
44
|
+
|
|
45
|
+
return result
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def print_dates(dates):
|
|
49
|
+
print(compress_dates(dates))
|
|
50
|
+
|
|
12
51
|
|
|
13
52
|
def no_time_zone(date):
|
|
14
53
|
return date.replace(tzinfo=None)
|
|
@@ -30,6 +69,27 @@ def normalize_date(x):
|
|
|
30
69
|
return x
|
|
31
70
|
|
|
32
71
|
|
|
72
|
+
def extend(x):
|
|
73
|
+
|
|
74
|
+
if isinstance(x, (list, tuple)):
|
|
75
|
+
for y in x:
|
|
76
|
+
yield from extend(y)
|
|
77
|
+
return
|
|
78
|
+
|
|
79
|
+
if isinstance(x, str):
|
|
80
|
+
if "/" in x:
|
|
81
|
+
start, end, step = x.split("/")
|
|
82
|
+
start = normalize_date(start)
|
|
83
|
+
end = normalize_date(end)
|
|
84
|
+
step = frequency_to_hours(step)
|
|
85
|
+
while start <= end:
|
|
86
|
+
yield start
|
|
87
|
+
start += datetime.timedelta(hours=step)
|
|
88
|
+
return
|
|
89
|
+
|
|
90
|
+
yield normalize_date(x)
|
|
91
|
+
|
|
92
|
+
|
|
33
93
|
class Dates:
|
|
34
94
|
"""Base class for date generation.
|
|
35
95
|
|
|
@@ -59,7 +119,7 @@ class Dates:
|
|
|
59
119
|
def __init__(self, missing=None):
|
|
60
120
|
if not missing:
|
|
61
121
|
missing = []
|
|
62
|
-
self.missing =
|
|
122
|
+
self.missing = list(extend(missing))
|
|
63
123
|
if set(self.missing) - set(self.values):
|
|
64
124
|
warnings.warn(f"Missing dates {self.missing} not in list.")
|
|
65
125
|
|
|
@@ -145,3 +205,9 @@ class StartEndDates(Dates):
|
|
|
145
205
|
"end": self.end.isoformat(),
|
|
146
206
|
"frequency": f"{self.frequency}h",
|
|
147
207
|
}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
if __name__ == "__main__":
|
|
211
|
+
print_dates([datetime.datetime(2023, 1, 1, 0, 0)])
|
|
212
|
+
s = StartEndDates(start="2023-01-01 00:00", end="2023-01-02 00:00", frequency=1)
|
|
213
|
+
print_dates(list(s))
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import itertools
|
|
10
10
|
|
|
11
11
|
from anemoi.datasets.dates import Dates
|
|
12
|
-
from anemoi.datasets.dates import
|
|
12
|
+
from anemoi.datasets.dates import normalize_date
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class Groups:
|
|
@@ -67,7 +67,7 @@ class Groups:
|
|
|
67
67
|
|
|
68
68
|
class Filter:
|
|
69
69
|
def __init__(self, missing):
|
|
70
|
-
self.missing = [
|
|
70
|
+
self.missing = [normalize_date(m) for m in missing]
|
|
71
71
|
|
|
72
72
|
def __call__(self, dates):
|
|
73
73
|
return [d for d in dates if d not in self.missing]
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: anemoi-datasets
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: A package to hold various functions to support training of ML models on ECMWF data.
|
|
5
5
|
Author-email: "European Centre for Medium-Range Weather Forecasts (ECMWF)" <software.support@ecmwf.int>
|
|
6
6
|
License: Apache License
|