Skip to content

Commit 78598d2

Browse files
committed
Add stubs for circulation models, and docstrings for hycom and nemo
1 parent 23df950 commit 78598d2

2 files changed

Lines changed: 35 additions & 4 deletions

File tree

parcels/_datasets/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
This subpackage uses xarray to generate *idealised* structured and unstructured hydrodynamical datasets that are compatible with Parcels. The goals are three-fold:
55
6-
1. To provide users with documentation for the types of datasets they can expect Parcels to work with.
6+
1. To provide users with documentation for the types of datasets they can expect Parcels to work with. When reporting bugs, users can use these datasets to reproduce the bug they're experiencing (allowing developers to quickly troubleshoot the problem).
77
2. To supply our tutorials with hydrodynamical datasets.
88
3. To offer developers datasets for use in test cases.
99
@@ -36,8 +36,10 @@
3636
3737
This subpackage is broken down into structured and unstructured parts. Each of these have common submodules:
3838
39-
* ``circulation_model`` -> hardcoded datasets with the intention of mimicking dataset structure from a certain (ocean) circulation model
39+
* ``circulation_model`` -> hardcoded datasets with the intention of mimicking dataset structure from a certain (ocean) circulation model. If you'd like to see Parcel support a new model, please open an issue in our issue tracker.
40+
* exposes a dict ``datasets`` mapping dataset names to xarray datasets
4041
* ``generic`` -> hardcoded datasets that are generic, and not tied to a certain (ocean) circulation model. Instead these focus on the fundamental properties of the dataset
42+
* exposes a dict ``datasets`` mapping dataset names to xarray datasets
4143
* ``generated`` -> functions to generate datasets with varying properties
4244
* ``utils`` -> any utility functions necessary related to either generating or validating datasets
4345
Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
11
import xarray as xr
22

3+
from . import T, X, Y, Z
4+
5+
__all__ = ["T", "X", "Y", "Z", "datasets"]
6+
37

48
def _nemo_data() -> xr.Dataset:
5-
"""Dataset matching NEMO model output.
9+
"""Dataset matching level 0 NEMO model output.
610
7-
Example dataset is based off of data from MOi GLO12.
11+
Example dataset is based off of data from the MOi GLO12 run.
812
913
https://www.mercator-ocean.eu/en/solutions-expertise/accessing-digital-data/product-details/?offer=4217979b-2662-329a-907c-602fdc69c3a3&system=d35404e4-40d3-59d6-3608-581c9495d86a
1014
"""
1115
...
16+
17+
18+
def _hycom_data() -> xr.Dataset:
19+
"""Dataset matching level 0 HYCOM model output.
20+
21+
Example dataset is based off of data from the GOFS 3.1: 41-layer HYCOM + NCODA Global 1/12° Analysis.
22+
23+
https://www.hycom.org/dataserver/gofs-3pt1/analysis
24+
"""
25+
...
26+
27+
28+
def _mitgcm_data() -> xr.Dataset: ...
29+
30+
31+
def _pop_data() -> xr.Dataset: ...
32+
33+
34+
def _echo_data() -> xr.Dataset: ...
35+
36+
37+
def _croco_data() -> xr.Dataset: ...
38+
39+
40+
datasets = {}

0 commit comments

Comments
 (0)