Skip to content

Commit 1dd2eef

Browse files
Adding ds_copernicusmarine to circulation_models dataset
Adding a circulation model dataset mimicking the layout of copernicusmarine
1 parent ce4024b commit 1dd2eef

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""Datasets mimicking the layout of real-world hydrodynamic models"""
2+
3+
import numpy as np
4+
import xarray as xr
5+
6+
from . import T, X, Y, Z
7+
8+
__all__ = ["T", "X", "Y", "Z", "datasets"]
9+
10+
TIME = xr.date_range("2000", "2001", T)
11+
12+
13+
datasets = {
14+
"ds_copernicusmarine": xr.Dataset(
15+
# Copernicus Marine Service dataset as retrieved by the `copernicusmarine` toolkit
16+
{
17+
"uo": (["depth", "latitude", "longitude", "time"], np.random.rand(Z, Y, X, T)),
18+
"vo": (["depth", "latitude", "longitude", "time"], np.random.rand(Z, Y, X, T)),
19+
},
20+
coords={
21+
"depth": (["depth"], np.linspace(0, 5000, Z), {"axis": "Z"}),
22+
"latitude": (["latitude"], np.linspace(-90, 90, Y), {"axis": "Y"}),
23+
"longitude": (["longitude"], np.linspace(-180, 180, X), {"axis": "X"}),
24+
"time": (["time"], TIME, {"axis": "T"}),
25+
},
26+
),
27+
}

0 commit comments

Comments
 (0)