-
Notifications
You must be signed in to change notification settings - Fork 0
Streamline parcels-benchmarks #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
fd2c217
Update README
VeckoTheGecko b75d0b3
Update gitignore
VeckoTheGecko 295cb7b
Add Parcels as submodule
VeckoTheGecko 98855a5
Add sandbox environment
VeckoTheGecko bb967c6
Rename benchmarks.json to datasets.json
VeckoTheGecko 4d59a44
typo
VeckoTheGecko 1f8777c
update function name
VeckoTheGecko 96b3646
No need to have this default here
VeckoTheGecko c56cf69
Add pydantic
VeckoTheGecko 2cec8b4
Migrate to pydantic
VeckoTheGecko 64fd72c
Assert no duplicate dataset names
VeckoTheGecko b281743
refactor
VeckoTheGecko 96e24a7
Rename function
VeckoTheGecko 2d83e26
Add download-catalogue option
VeckoTheGecko 4570368
Update catalogue
VeckoTheGecko 9fa1963
Move files and add tasks
VeckoTheGecko bddcbdc
Add catalogue
VeckoTheGecko 99cf82d
Move file
VeckoTheGecko 070bcf0
Update folder location
VeckoTheGecko 96b97d8
Add PARCELS_BENCHMARKS_DATA_FOLDER env var
VeckoTheGecko 98bb9e7
Use curl instead
VeckoTheGecko 42d7f53
Rename files (catalogue to catalog and yaml->yml)
VeckoTheGecko fc37186
Add task descriptions
VeckoTheGecko e582cff
Update readme
VeckoTheGecko 2a064be
Remove parcels_benchmarks internal package
VeckoTheGecko c3299ba
Update script to unpack zips correctly
VeckoTheGecko 0f3a93a
Update toml and lock
VeckoTheGecko 9a25838
Add comment
VeckoTheGecko 0c2cd03
Update catalogs regardless of folder existing
VeckoTheGecko 0c2b6cf
Fix catalogues
VeckoTheGecko c2eb313
Migrate fesom ingestion to intake
VeckoTheGecko b4da946
Update MOI
VeckoTheGecko 6fb1b7f
Update ASV conf
VeckoTheGecko 515b767
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 4365e7b
Default PARCELS_BENCHMARKS_DATA_FOLDER to ./data
VeckoTheGecko 5c98107
Clean out dependencies
VeckoTheGecko 1a06ac3
Fix ASV/py-rattler deps
VeckoTheGecko d46f4b1
run pre-commit
VeckoTheGecko b1d3bc5
Rename asv.conf.json to .jsonc (comment supported format)
VeckoTheGecko 0675afe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f992e3a
Review feedback
VeckoTheGecko 10f4c96
update readme
VeckoTheGecko cbbc180
Disable isort
VeckoTheGecko c116a3c
Update catalogs/parcels-benchmarks/catalog.yml
VeckoTheGecko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,9 @@ credentials.json | |
| *.egg-info | ||
| __pycache__ | ||
| build/ | ||
| parcels/ | ||
| .asv/ | ||
| html/ | ||
| .DS_Store | ||
|
|
||
| data | ||
| .env | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule "Parcels"] | ||
| path = Parcels | ||
| url = git@github.com:Parcels-code/Parcels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "version": 1, | ||
| "project": "parcels", | ||
| "project_url": "https://github.com/Parcels-Code/parcels", | ||
| "repo": "./Parcels", | ||
| "dvcs": "git", | ||
| "branches": ["main"], | ||
| "environment_type": "rattler", | ||
| "conda_channels": [ | ||
| "conda-forge", | ||
| "defaults", | ||
| "https://repo.prefix.dev/parcels", | ||
| ], | ||
| "default_benchmark_timeout": 1800, | ||
| "env_dir": ".asv/env", | ||
| "results_dir": "results", | ||
| "html_dir": "html", | ||
| "build_command": ["python -m build --wheel -o {build_cache_dir} {build_dir}"], | ||
| // "install_command": [ | ||
| // "in-dir={conf_dir} python -m pip install .", | ||
| // "in-dir={build_dir} python -m pip install ." | ||
| // ], | ||
| // "uninstall_command": [ | ||
| // "return-code=any python -m pip uninstall -y parcels parcels_benchmarks" | ||
| // ] | ||
| "matrix": { | ||
| "req": { | ||
| "intake-xarray": [], | ||
| }, | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import logging | ||
| import os | ||
| from pathlib import Path | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
| PIXI_PROJECT_ROOT = os.environ.get("PIXI_PROJECT_ROOT") | ||
| if PIXI_PROJECT_ROOT is not None: | ||
| PIXI_PROJECT_ROOT = Path(PIXI_PROJECT_ROOT) | ||
|
|
||
| PIXI_PROJECT_ROOT: Path | None | ||
|
|
||
| try: | ||
| PARCELS_BENCHMARKS_DATA_FOLDER = Path(os.environ["PARCELS_BENCHMARKS_DATA_FOLDER"]) | ||
| except KeyError: | ||
| # Default to `./data` | ||
| PARCELS_BENCHMARKS_DATA_FOLDER = Path("./data") | ||
| logger.info("PARCELS_BENCHMARKS_DATA_FOLDER was not set. Defaulting to `./data`") | ||
|
|
||
| if not PARCELS_BENCHMARKS_DATA_FOLDER.is_absolute(): | ||
| if PIXI_PROJECT_ROOT is None: | ||
| raise RuntimeError( | ||
| "PARCELS_BENCHMARKS_DATA_FOLDER is a relative path, but PIXI_PROJECT_ROOT env variable is not set. We don't know where to store the data." | ||
| ) | ||
| PARCELS_BENCHMARKS_DATA_FOLDER = PIXI_PROJECT_ROOT / str( | ||
| PARCELS_BENCHMARKS_DATA_FOLDER | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import intake | ||
|
|
||
| from . import PARCELS_BENCHMARKS_DATA_FOLDER | ||
|
|
||
|
|
||
| class Catalogs: | ||
| CAT_EXAMPLES = intake.open_catalog( | ||
| f"{PARCELS_BENCHMARKS_DATA_FOLDER}/surf-data/parcels-examples/catalog.yml" | ||
| ) | ||
| CAT_BENCHMARKS = intake.open_catalog( | ||
| f"{PARCELS_BENCHMARKS_DATA_FOLDER}/surf-data/parcels-benchmarks/catalog.yml" | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # zip_url: https://surfdrive.surf.nl/index.php/s/7xlfdOFaUGDEmpD/download?path=%2F&files= | ||
| # ^ Do not remove this line! Used by the download script to find the data source | ||
| plugins: | ||
| source: | ||
| - module: intake_xarray | ||
| sources: #!TODO Update | ||
| croco: | ||
| description: CROCO_idealized | ||
| driver: netcdf | ||
| #cache: | ||
| # - argkey: urlpath | ||
| # regex: '' | ||
| # type: file | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/CROCOidealized_data/CROCO_idealized.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
| GlobCurrent_example_data: | ||
| description: GlobCurrent_example_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/GlobCurrent_example_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
| MITgcm_example_data: | ||
| description: MITgcm_example_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/MITgcm_example_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
| MovingEddies_data: | ||
| description: MovingEddies_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/MovingEddies_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
|
|
||
| # NemoCurvilinear_data: | ||
| # NemoNorthSeaORCA025-N006_data: | ||
| # OFAM_example_data | ||
| # Peninsula_data | ||
| SWASH_data: | ||
| description: SWASH_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/SWASH_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
| WOA_data: | ||
| description: WOA_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/WOA_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # zip_url: https://surfdrive.surf.nl/index.php/s/cmdSy8wBtCLDaGJ/download?path=%2F&files= | ||
| # ^ Do not remove this line! Used by the download script to find the data source | ||
| plugins: | ||
| source: | ||
| - module: intake_xarray | ||
| sources: | ||
| croco: | ||
| description: CROCO_idealized | ||
| driver: netcdf | ||
| #cache: | ||
| # - argkey: urlpath | ||
| # regex: '' | ||
| # type: file | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/CROCOidealized_data/CROCO_idealized.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
| GlobCurrent_example_data: | ||
| description: GlobCurrent_example_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/GlobCurrent_example_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
| MITgcm_example_data: | ||
| description: MITgcm_example_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/MITgcm_example_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
| MovingEddies_data: | ||
| description: MovingEddies_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/MovingEddies_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
|
|
||
| # NemoCurvilinear_data: | ||
| # NemoNorthSeaORCA025-N006_data: | ||
| # OFAM_example_data | ||
| # Peninsula_data | ||
| # SWASH_data | ||
| SWASH_data: | ||
| description: SWASH_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/SWASH_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" | ||
| WOA_data: | ||
| description: WOA_data | ||
| driver: netcdf | ||
| args: | ||
| urlpath: "{{ CATALOG_DIR }}/data/WOA_data/*.nc" | ||
| chunks: {} | ||
| xarray_kwargs: | ||
| engine: "netcdf4" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between the catalogues in parcels-benchmarks and the parcels-examples? They seem to be the same now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, to be updated in a future PR (mainly focussing on the actual downloading of the datasets - will fix the catalogs and ingestion at the same time)