Skip to content

Commit

Permalink
Merge pull request #5 from kthyng/main
Browse files Browse the repository at this point in the history
docs running
  • Loading branch information
kthyng authored May 17, 2021
2 parents 354c1e5 + d71ed77 commit 70fa27c
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 145 deletions.
10 changes: 0 additions & 10 deletions docs/api.rst

This file was deleted.

12 changes: 11 additions & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ dependencies:
# If your docs code examples depend on other packages add them here
- numpy
- xarray
- cf-xarray
- matplotlib
- cmocean
# use mac dependencies
- esmf=8.1.1=mpi_openmpi_h047fafc_0
- esmpy=8.1.1=mpi_openmpi_py38hf504846_0
# These are needed for the docs themselves
- numpydoc
- sphinx
Expand All @@ -13,11 +19,15 @@ dependencies:
- nbformat
- ipykernel
- pandoc
- recommonmark
- pip
- pip:
- git+https://github.com/axiom-data-science/extract_model.git#egg=extract_model
- git+https://github.com/pangeo-data/xESMF.git#egg=xESMF
- xcmocean
- docrep<=0.2.7
- nbsphinx
- jupyter_client
- sphinx_pangeo_theme
- sphinx-copybutton
- sphinxcontrib-srclinks
- sphinxcontrib-srclinks
17 changes: 4 additions & 13 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to extract_model's documentation!
=======================================
`extract_model`
===============

This is an awesome description of extract_model, written in `reStructuredText`_.

You can contribute new sections by either adding a new file (see ``new_section.rst``) or just putting a jupyter notebook
in the ``docs`` folder (see ``new_section_notebook.ipynb``).

In either case, make sure to add an entry in the ``.. toctree::``. Check out ``index.rst`` how it was done for the above examples.
Use `extract_model` to read select output from model output files by time and/or space. Output will be selected using `xarray` by a combination of interpolation and index selection. Horizontal interpolation is accomplished using `xESMF` and time interpolation is done with `xarray`'s native 1D interpolation. Currently vertical interpolation is only possible using `xarray`'s 1D interpolation too and is not set up to interpolate in 4D as would be required for ROMS output if not simply selecting the surface layer.

.. toctree::
:maxdepth: 2

new_section
new_section_notebook
api
models



Expand All @@ -28,5 +21,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
64 changes: 27 additions & 37 deletions docs/models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"import cf_xarray\n",
"import numpy as np\n",
"import xarray as xr\n",
"import xgcm\n",
"import xesmf as xe\n",
"import matplotlib.pyplot as plt\n",
"import xcmocean\n",
"import cmocean.cm as cmo\n",
Expand All @@ -26,20 +24,12 @@
"# Generically access model output"
]
},
{
"cell_type": "markdown",
"id": "231623aa-e963-4f16-86b7-0ffdfa104f0e",
"metadata": {},
"source": [
"## Test"
]
},
{
"cell_type": "markdown",
"id": "1ed06a35-45ab-4ee7-8039-ff11f164caed",
"metadata": {},
"source": [
"### MOM6"
"## MOM6"
]
},
{
Expand Down Expand Up @@ -70,15 +60,15 @@
"id": "579965a6-086c-4a52-8e40-a1ed321b2198",
"metadata": {},
"source": [
"#### grid point"
"### grid point"
]
},
{
"cell_type": "markdown",
"id": "3a1eea02-288d-40b4-bed5-9b60051f27ed",
"metadata": {},
"source": [
"##### horizontal interp, vertical and time isel"
"#### horizontal interp, vertical and time isel"
]
},
{
Expand Down Expand Up @@ -129,7 +119,7 @@
"id": "e833f054-c0ac-4866-81b8-36ac2db7d822",
"metadata": {},
"source": [
"##### horizontal and vertical interp, time isel"
"#### horizontal and vertical interp, time isel"
]
},
{
Expand Down Expand Up @@ -178,15 +168,15 @@
"id": "a139e03b-3219-4283-9863-745b59890ff1",
"metadata": {},
"source": [
"#### not grid point"
"### not grid point"
]
},
{
"cell_type": "markdown",
"id": "292eab46-3d23-4c85-8d45-f8cd22c72675",
"metadata": {},
"source": [
"##### inside domain"
"#### inside domain"
]
},
{
Expand Down Expand Up @@ -260,7 +250,7 @@
"id": "513df367-84bd-450b-b7d3-fa258b2bc75f",
"metadata": {},
"source": [
"##### outside domain"
"#### outside domain"
]
},
{
Expand Down Expand Up @@ -380,7 +370,7 @@
"id": "4531d5bd-7746-4ade-843e-bc0be3a52433",
"metadata": {},
"source": [
"#### points (locstream)\n",
"### points (locstream)\n",
"\n",
"Unstructured pairs of lon/lat locations instead of grids of lon/lat locations, using `locstream`."
]
Expand Down Expand Up @@ -438,7 +428,7 @@
"id": "e0940537-0911-4f77-92d5-5bf3b81ea055",
"metadata": {},
"source": [
"#### grid of known locations"
"### grid of known locations"
]
},
{
Expand Down Expand Up @@ -487,7 +477,7 @@
"id": "9158bffd-4a87-4db4-927e-0a5d8dc7370c",
"metadata": {},
"source": [
"#### grid of new locations"
"### grid of new locations"
]
},
{
Expand Down Expand Up @@ -561,7 +551,7 @@
"id": "01ed35fe-cd31-44b0-90d2-423dc14f3393",
"metadata": {},
"source": [
"### HYCOM"
"## HYCOM"
]
},
{
Expand Down Expand Up @@ -589,7 +579,7 @@
"id": "c79341d1-492e-4896-8c49-aa8db06a7aba",
"metadata": {},
"source": [
"#### grid point"
"### grid point"
]
},
{
Expand Down Expand Up @@ -629,15 +619,15 @@
"id": "40f3ca75-f2af-43bf-9f8c-0818b7072d2a",
"metadata": {},
"source": [
"#### not grid point"
"### not grid point"
]
},
{
"cell_type": "markdown",
"id": "caf72205-aec3-42dc-b77f-b12a931be41c",
"metadata": {},
"source": [
"##### inside domain"
"#### inside domain"
]
},
{
Expand Down Expand Up @@ -678,7 +668,7 @@
"id": "c2abd653-de42-44f9-8350-6827657dae47",
"metadata": {},
"source": [
"##### outside domain"
"#### outside domain"
]
},
{
Expand Down Expand Up @@ -819,7 +809,7 @@
"id": "86bce0f5-0be3-4f9d-a097-c7f39e7f8788",
"metadata": {},
"source": [
"#### points (locstream)\n",
"### points (locstream)\n",
"\n",
"Unstructured pairs of lon/lat locations instead of grids of lon/lat locations, using `locstream`."
]
Expand Down Expand Up @@ -878,7 +868,7 @@
"id": "5aee17b6-55f7-43bf-b1ce-0040fe6506a0",
"metadata": {},
"source": [
"#### grid of known locations"
"### grid of known locations"
]
},
{
Expand Down Expand Up @@ -931,7 +921,7 @@
"id": "dc123ada-7da4-4a43-8da0-5b905dd61e19",
"metadata": {},
"source": [
"#### grid of new locations"
"### grid of new locations"
]
},
{
Expand Down Expand Up @@ -1015,7 +1005,7 @@
"id": "d12ac238-33ac-42ed-bcdc-9c7e18322e69",
"metadata": {},
"source": [
"### ROMS"
"## ROMS"
]
},
{
Expand Down Expand Up @@ -1782,7 +1772,7 @@
"id": "99752714-ac31-423f-812c-fd403cfd944f",
"metadata": {},
"source": [
"#### grid point"
"### grid point"
]
},
{
Expand Down Expand Up @@ -1833,15 +1823,15 @@
"id": "e52cbf63-f0cb-4674-b799-f9922cf2ede3",
"metadata": {},
"source": [
"#### not grid point"
"### not grid point"
]
},
{
"cell_type": "markdown",
"id": "9c872e5d-8096-4967-83ec-d39740cedda5",
"metadata": {},
"source": [
"##### inside domain"
"#### inside domain"
]
},
{
Expand Down Expand Up @@ -1914,7 +1904,7 @@
"id": "0157430c-f673-4166-b982-87ef9e886fa3",
"metadata": {},
"source": [
"##### outside domain"
"#### outside domain"
]
},
{
Expand Down Expand Up @@ -2044,7 +2034,7 @@
"id": "0b61c634-853c-4d74-9ae8-52525c978d3a",
"metadata": {},
"source": [
"#### points (locstream)\n",
"### points (locstream)\n",
"\n",
"Unstructured pairs of lon/lat locations instead of grids of lon/lat locations, using `locstream`."
]
Expand Down Expand Up @@ -2106,7 +2096,7 @@
"id": "2a12dafa-7997-4a16-9bab-4afab1c4d869",
"metadata": {},
"source": [
"#### grid of known locations"
"### grid of known locations"
]
},
{
Expand Down Expand Up @@ -2155,7 +2145,7 @@
"id": "c1ad2d87-2f7a-4b7b-8654-207803f5e935",
"metadata": {},
"source": [
"#### grid of new locations"
"### grid of new locations"
]
},
{
Expand Down Expand Up @@ -2241,7 +2231,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.8.10"
}
},
"nbformat": 4,
Expand Down
2 changes: 0 additions & 2 deletions docs/new_section.rst

This file was deleted.

Loading

0 comments on commit 70fa27c

Please sign in to comment.