Skip to content

Commit 39a60c6

Browse files
authored
Reuse selector (#60)
* selector pickle files * stofs 2d 3d and colab links * selector pytest * selector import * grid methods * selector methods * grids * save_to_bytes & load_from_bytes * update examples
1 parent fe7ada1 commit 39a60c6

25 files changed

+12052
-9516
lines changed

docs/examples/example_data/image.png

897 KB
Loading
Binary file not shown.
Binary file not shown.

docs/examples/fvcom.ipynb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@
88
"# FVCOM"
99
]
1010
},
11+
{
12+
"cell_type": "markdown",
13+
"id": "1a3069ed",
14+
"metadata": {},
15+
"source": [
16+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/fvcom.ipynb)"
17+
]
18+
},
19+
{
20+
"cell_type": "code",
21+
"execution_count": null,
22+
"id": "1aec9d04",
23+
"metadata": {},
24+
"outputs": [],
25+
"source": [
26+
"# Install required libraries\n",
27+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
28+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
29+
]
30+
},
1131
{
1232
"cell_type": "code",
1333
"execution_count": 1,

docs/examples/fvcom_3d.ipynb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@
88
"# FVCOM 3D"
99
]
1010
},
11+
{
12+
"cell_type": "markdown",
13+
"id": "11f260c9",
14+
"metadata": {},
15+
"source": [
16+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/fvcom_3d.ipynb)"
17+
]
18+
},
19+
{
20+
"cell_type": "code",
21+
"execution_count": null,
22+
"id": "66ea390e",
23+
"metadata": {},
24+
"outputs": [],
25+
"source": [
26+
"# Install required libraries\n",
27+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
28+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
29+
]
30+
},
1131
{
1232
"cell_type": "code",
1333
"execution_count": 1,

docs/examples/gfs_opendap.ipynb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@
77
"# OPENDAP GFS"
88
]
99
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/gfs_opendap.ipynb)"
15+
]
16+
},
17+
{
18+
"cell_type": "code",
19+
"execution_count": null,
20+
"metadata": {},
21+
"outputs": [],
22+
"source": [
23+
"# Install required libraries\n",
24+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
25+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
26+
]
27+
},
1028
{
1129
"cell_type": "code",
1230
"execution_count": 1,

docs/examples/nam_opendap.ipynb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@
77
"# OPENDAP NAM"
88
]
99
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/nam_opendap.ipynb)"
15+
]
16+
},
17+
{
18+
"cell_type": "code",
19+
"execution_count": null,
20+
"metadata": {},
21+
"outputs": [],
22+
"source": [
23+
"# Install required libraries\n",
24+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
25+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
26+
]
27+
},
1028
{
1129
"cell_type": "code",
1230
"execution_count": 1,

docs/examples/regular_grid_2d.ipynb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@
77
"# SFBOFS (Regular Grid 2D)"
88
]
99
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/regular_grid_2d.ipynb)"
15+
]
16+
},
17+
{
18+
"cell_type": "code",
19+
"execution_count": null,
20+
"metadata": {},
21+
"outputs": [],
22+
"source": [
23+
"# Install required libraries\n",
24+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
25+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
26+
]
27+
},
1028
{
1129
"cell_type": "code",
1230
"execution_count": 1,

docs/examples/roms-compare.ipynb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88
"# Comparison of ROMS subsetting with CO-OPs Subsetting Tool"
99
]
1010
},
11+
{
12+
"cell_type": "markdown",
13+
"id": "caf5832b",
14+
"metadata": {},
15+
"source": [
16+
"\n",
17+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/roms-compare.ipynb)"
18+
]
19+
},
20+
{
21+
"cell_type": "code",
22+
"execution_count": null,
23+
"id": "791c6c0a",
24+
"metadata": {},
25+
"outputs": [],
26+
"source": [
27+
"# Install required libraries\n",
28+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
29+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
30+
]
31+
},
1132
{
1233
"cell_type": "code",
1334
"execution_count": 17,

docs/examples/roms.ipynb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88
"# ROMS"
99
]
1010
},
11+
{
12+
"cell_type": "markdown",
13+
"id": "efdaec36",
14+
"metadata": {},
15+
"source": [
16+
"\n",
17+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/roms.ipynb)"
18+
]
19+
},
20+
{
21+
"cell_type": "code",
22+
"execution_count": null,
23+
"id": "18cf7447",
24+
"metadata": {},
25+
"outputs": [],
26+
"source": [
27+
"# Install required libraries\n",
28+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
29+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
30+
]
31+
},
1132
{
1233
"cell_type": "code",
1334
"execution_count": 1,

docs/examples/roms_3d.ipynb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88
"# ROMS 3D"
99
]
1010
},
11+
{
12+
"cell_type": "markdown",
13+
"id": "37b41113",
14+
"metadata": {},
15+
"source": [
16+
"\n",
17+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/roms_3d.ipynb)"
18+
]
19+
},
20+
{
21+
"cell_type": "code",
22+
"execution_count": null,
23+
"id": "10ca5d49",
24+
"metadata": {},
25+
"outputs": [],
26+
"source": [
27+
"# Install required libraries\n",
28+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
29+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
30+
]
31+
},
1132
{
1233
"cell_type": "code",
1334
"execution_count": 1,

docs/examples/rtofs.ipynb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@
77
"# RTOFS"
88
]
99
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"\n",
15+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/rtofs.ipynb)"
16+
]
17+
},
18+
{
19+
"cell_type": "code",
20+
"execution_count": null,
21+
"metadata": {},
22+
"outputs": [],
23+
"source": [
24+
"# Install required libraries\n",
25+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
26+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
27+
]
28+
},
1029
{
1130
"cell_type": "code",
1231
"execution_count": 1,

docs/examples/selfe.ipynb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88
"# SELFE"
99
]
1010
},
11+
{
12+
"cell_type": "markdown",
13+
"id": "111536d8",
14+
"metadata": {},
15+
"source": [
16+
"\n",
17+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/selfe.ipynb)"
18+
]
19+
},
20+
{
21+
"cell_type": "code",
22+
"execution_count": null,
23+
"id": "f1e6b43b",
24+
"metadata": {},
25+
"outputs": [],
26+
"source": [
27+
"# Install required libraries\n",
28+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
29+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
30+
]
31+
},
1132
{
1233
"cell_type": "code",
1334
"execution_count": 1,

docs/examples/sscofs.ipynb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@
99
"This example assigns the missing CF Compliant topology information to allow for subsetting with the same workflow as the [fvcom](./fvcom.ipynb) example, but with a netcdf file that does not contain the necessary metadata."
1010
]
1111
},
12+
{
13+
"cell_type": "markdown",
14+
"metadata": {},
15+
"source": [
16+
"\n",
17+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/asascience-open/xarray-subset-grid/blob/main/docs/examples/sscofs.ipynb)"
18+
]
19+
},
20+
{
21+
"cell_type": "code",
22+
"execution_count": null,
23+
"metadata": {},
24+
"outputs": [],
25+
"source": [
26+
"# Install required libraries\n",
27+
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
28+
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
29+
]
30+
},
1231
{
1332
"cell_type": "code",
1433
"execution_count": 3,

0 commit comments

Comments
 (0)