diff --git a/docs/index.rst b/docs/index.rst index f056713..88b0a84 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,7 +6,8 @@ Welcome to earthkit-regrids's documentation This project is **BETA** and will be **Experimental** for the foreseeable future. Interfaces and functionality are likely to change, and the project itself may be scrapped. **DO NOT** use this software in any project/software that is operational. -**earthkit-regrid** is a Python package for regridding. +**earthkit-regrid** is a Python package for regridding. It features the :func:`interpolate` function to regrid values stored in an ndarray. At the moment, regridding is only available for a **pre-defined** set of source and target global grid combinations. + .. toctree:: :maxdepth: 1 @@ -15,6 +16,12 @@ Welcome to earthkit-regrids's documentation examples +.. toctree:: + :maxdepth: 1 + :caption: Documentation + + interpolate + .. toctree:: :maxdepth: 1 :caption: Installation diff --git a/docs/interpolate.rst b/docs/interpolate.rst new file mode 100644 index 0000000..c6f0973 --- /dev/null +++ b/docs/interpolate.rst @@ -0,0 +1,21 @@ +interpolate +============== + +.. py:function:: interpolate(values, source_gridspec, target_gridspec, matrix_version=None) + + Interpolate the ``values`` from the ``source_gridspec`` onto the ``target_gridspec``. + + :param values: the input values + :type values: ndarray + :param source_gridspec: the gridspec describing the grid that ``values`` are defined on + :type source_gridspec: dict + :param target_gridspec: the gridspec describing the target grid that ``values`` will be interpolated onto + :type target_gridspec: dict + :param matrix_version: the version of the pre-defined interpolation matrix to be used. None means the latest version will be used. + :type matrix_version: str + :rtype: ndarray + +Examples +-------- + + - :ref:`/examples/interpolation.ipynb` diff --git a/docs/requirements.txt b/docs/requirements.txt index 3525924..7a5b6c3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,5 @@ # These are the requirements for readthedoc +ipykernel docutils Pygments>=2.6.1 Sphinx