You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [REFACTOR] Better readers to check existence of local file
* [REFACTOR] Streamlined readers with utilities.resolve_file_path()
* [REFACTOR] Add logging and fix tests, change local to data/
Copy file name to clipboardExpand all lines: README.md
+70-2Lines changed: 70 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,14 @@
1
1
# MOC transports
2
2
3
-
Amocarray is a python package for reading AMOC transport data from transport mooring arrays. It does not modify, fix or grid data. Functionality currently includes:
3
+
**Clean, modular loading of AMOC observing array datasets, with optional structured logging and metadata enrichment.**
4
4
5
-
- loading data from the RAPID 26°N array, OSNAP array, MOVE 16°N array and SAMBA 34.5°S array.
5
+
> AMOCarray provides a unified system to access and process data from major Atlantic Meridional Overturning Circulation (AMOC) observing arrays:
6
+
> - MOVE (16°N)
7
+
> - RAPID (26°N)
8
+
> - OSNAP (Subpolar North Atlantic)
9
+
> - SAMBA (34.5°S)
10
+
11
+
The project emphasizes clarity, reproducibility, and modular design, with per-dataset logging, metadata handling, and testable utilities.
6
12
7
13
This is a work in progress, all contributions welcome!
8
14
@@ -21,6 +27,56 @@ Check out the demo notebook `notebooks/demo.ipynb` for example functionality.
21
27
22
28
As input, amocarray downloads data from the observing arrays.
23
29
30
+
### Quickstart
31
+
32
+
#### Load a sample dataset
33
+
```python
34
+
from amocarray import readers
35
+
36
+
# Load RAPID sample dataset
37
+
ds = readers.load_sample_dataset("rapid")
38
+
print(ds)
39
+
```
40
+
41
+
#### Load a full dataset
42
+
43
+
```python
44
+
from amocarray import readers
45
+
46
+
datasets = readers.load_dataset("osnap")
47
+
for ds in datasets:
48
+
print(ds)
49
+
```
50
+
A `*.log` file will be written to `logs/` by default.
51
+
52
+
Data will be cached in `~/.amocarray_data/` unless you specify a custom location.
53
+
54
+
### Project structure
55
+
56
+
```
57
+
amocarray/
58
+
│
59
+
├── readers.py # Orchestrator for loading datasets
Try to ensure that all the lines of your contribution are covered in the tests.
46
102
103
+
47
104
### Initial plans
48
105
49
106
50
107
The **initial plan** for this repository is to simply load the volume transports as published by different AMOC observing arrays and replicate (update) the figure from Frajka-Williams et al. (2019) [10.3389/fmars.2019.00260](https://doi.org/10.3389/fmars.2019.00260).
"comment": "Dataset accessed and processed via http://github.com/AMOCcommunity/amocarray",
19
-
# Acknowledgement and DOI can be added here when available
22
+
# DOI can be added here when available
20
23
"acknowledgement": "The MOVE project is made possible with funding from the NOAA Climate Program Office. Initial funding came from the German Bundesministerium fuer Bildung und Forschung.",
21
24
}
22
25
@@ -34,8 +37,8 @@ def read_move(
34
37
source: str,
35
38
file_list: str|list[str],
36
39
transport_only: bool=True,
37
-
data_dir=None,
38
-
redownload=False,
40
+
data_dir: Union[str, Path, None] =None,
41
+
redownload: bool=False,
39
42
) ->list[xr.Dataset]:
40
43
"""
41
44
Load the MOVE transport dataset from a URL or local file path into xarray Datasets.
@@ -48,6 +51,12 @@ def read_move(
48
51
file_list : str or list of str, optional
49
52
Filename or list of filenames to process.
50
53
Defaults to MOVE_DEFAULT_FILES.
54
+
transport_only : bool, optional
55
+
If True, restrict to transport files only.
56
+
data_dir : str, Path or None, optional
57
+
Optional local data directory.
58
+
redownload : bool, optional
59
+
If True, force redownload of the data.
51
60
52
61
Returns
53
62
-------
@@ -61,45 +70,51 @@ def read_move(
61
70
FileNotFoundError
62
71
If the file cannot be downloaded or does not exist locally.
0 commit comments