Skip to content

Commit

Permalink
Reuse selector (#60)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
omkar-334 authored Aug 26, 2024
1 parent fe7ada1 commit 39a60c6
Show file tree
Hide file tree
Showing 25 changed files with 12,052 additions and 9,516 deletions.
Binary file added docs/examples/example_data/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions docs/examples/fvcom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
"# FVCOM"
]
},
{
"cell_type": "markdown",
"id": "1a3069ed",
"metadata": {},
"source": [
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1aec9d04",
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
20 changes: 20 additions & 0 deletions docs/examples/fvcom_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
"# FVCOM 3D"
]
},
{
"cell_type": "markdown",
"id": "11f260c9",
"metadata": {},
"source": [
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "66ea390e",
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
18 changes: 18 additions & 0 deletions docs/examples/gfs_opendap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@
"# OPENDAP GFS"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
18 changes: 18 additions & 0 deletions docs/examples/nam_opendap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@
"# OPENDAP NAM"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
18 changes: 18 additions & 0 deletions docs/examples/regular_grid_2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@
"# SFBOFS (Regular Grid 2D)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
21 changes: 21 additions & 0 deletions docs/examples/roms-compare.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
"# Comparison of ROMS subsetting with CO-OPs Subsetting Tool"
]
},
{
"cell_type": "markdown",
"id": "caf5832b",
"metadata": {},
"source": [
"\n",
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "791c6c0a",
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 17,
Expand Down
21 changes: 21 additions & 0 deletions docs/examples/roms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
"# ROMS"
]
},
{
"cell_type": "markdown",
"id": "efdaec36",
"metadata": {},
"source": [
"\n",
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "18cf7447",
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
21 changes: 21 additions & 0 deletions docs/examples/roms_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
"# ROMS 3D"
]
},
{
"cell_type": "markdown",
"id": "37b41113",
"metadata": {},
"source": [
"\n",
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "10ca5d49",
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions docs/examples/rtofs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@
"# RTOFS"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
21 changes: 21 additions & 0 deletions docs/examples/selfe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
"# SELFE"
]
},
{
"cell_type": "markdown",
"id": "111536d8",
"metadata": {},
"source": [
"\n",
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f1e6b43b",
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions docs/examples/sscofs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@
"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."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"[![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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install required libraries\n",
"# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git\n",
"# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf"
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down
Loading

0 comments on commit 39a60c6

Please sign in to comment.