Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@
"sphinx_issues",
"sphinx_copybutton",
"xref",
"matplotlib.sphinxext.plot_directive",
]

# Plot directive configuration
plot_include_source = True
plot_html_show_source_link = False
plot_formats = [("png", 150)]
plot_html_show_formats = False

# autodoc configuration
autodoc_typehints = "none"

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/country_polygons.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.7"
}
},
"nbformat": 4,
Expand Down
241 changes: 241 additions & 0 deletions docs/examples/grids.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ Here is a list of example notebooks to illustrate how to use earthkit-geo.
.. toctree::
:maxdepth: 1

grids.ipynb
rotate.ipynb
country_polygons.ipynb
40 changes: 40 additions & 0 deletions docs/grids.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. _grids:

Grid Types
==========

This page provides an overview of all grid types supported by earthkit-geo.

The :class:`~earthkit.geo.grids.Grid` class provides factory methods that automatically return the appropriate grid subclass:

.. code-block:: python

from earthkit.geo import Grid

# Automatically returns HEALPix instance
grid = Grid.from_string("H32")

# Automatically returns Equirectangular instance
grid = Grid.from_dict({"grid": [1, 1]})

.. autoclass:: earthkit.geo.grids.Equirectangular

----

.. autoclass:: earthkit.geo.grids.HEALPix

----

.. autoclass:: earthkit.geo.grids.ReducedGaussian

----

.. autoclass:: earthkit.geo.grids.Octahedral

----

.. autoclass:: earthkit.geo.grids.ICON_CH1_EPS

----

.. autoclass:: earthkit.geo.grids.ICON_CH2_EPS
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Welcome to earthkit-geo's documentation
:maxdepth: 1
:caption: Documentation

grids
API Reference <autoapi/earthkit/geo/index.rst>
references.rst

Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ setuptools
sphinx-autoapi
sphinx-issues
sphinx-copybutton
earthkit-plots
matplotlib
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ dependencies = [
"requests",
"scipy",
]
optional-dependencies.all = [ "cartopy" ]
optional-dependencies.all = [ "cartopy", "earthkit-plots", "eckit" ]
optional-dependencies.cartography = [ "cartopy" ]
optional-dependencies.grids = [ "eckit" ]
optional-dependencies.plots = [ "earthkit-plots" ]
optional-dependencies.test = [
"pytest",
"pytest-cov",
Expand Down
2 changes: 2 additions & 0 deletions src/earthkit/geo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
__version__ = "999"


from earthkit.geo import grids
from earthkit.geo.distance import GeoKDTree
from earthkit.geo.distance import haversine_distance
from earthkit.geo.distance import nearest_point_haversine
Expand All @@ -30,5 +31,6 @@
"nearest_point_haversine",
"nearest_point_kdtree",
UNIT_SPHERE,
"grids",
"__version__",
]
Loading
Loading