-
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
Changes from 34 commits
fd2c217
b75d0b3
295cb7b
98855a5
bb967c6
4d59a44
1f8777c
96b3646
c56cf69
2cec8b4
64fd72c
b281743
96e24a7
2d83e26
4570368
9fa1963
bddcbdc
99cf82d
070bcf0
96b97d8
98bb9e7
42d7f53
fc37186
e582cff
2a064be
c3299ba
0f3a93a
9a25838
0c2cd03
0c2b6cf
c2eb313
b4da946
6fb1b7f
515b767
4365e7b
5c98107
1a06ac3
d46f4b1
b1d3bc5
0675afe
f992e3a
10f4c96
cbbc180
c116a3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Target location for the data to be downloaded to | ||
| PARCELS_BENCHMARKS_DATA_FOLDER='./data' |
| 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 | ||
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import os | ||
| from pathlib import Path | ||
|
|
||
| import intake | ||
|
|
||
| PARCELS_BENCHMARKS_DATA_FOLDER: str | ||
| PROJECT_ROOT = Path(__file__).parent.parent.resolve() | ||
|
|
||
| try: | ||
| PARCELS_BENCHMARKS_DATA_FOLDER = Path(os.environ["PARCELS_BENCHMARKS_DATA_FOLDER"]) | ||
| except KeyError as e: | ||
| raise RuntimeError( | ||
| "Set the PARCELS_BENCHMARKS_DATA_FOLDER environment variable to specify where the data is/should be downloaded." | ||
VeckoTheGecko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ) from e | ||
|
|
||
| if not PARCELS_BENCHMARKS_DATA_FOLDER.is_absolute(): | ||
| PARCELS_BENCHMARKS_DATA_FOLDER = PROJECT_ROOT / str(PARCELS_BENCHMARKS_DATA_FOLDER) | ||
|
|
||
| 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" | ||
| ) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # 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 | ||
VeckoTheGecko marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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" | ||
| 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.
Uh oh!
There was an error while loading. Please reload this page.