Skip to content

Commit

Permalink
Add first user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
sandorkertesz committed Feb 8, 2024
1 parent d290c8c commit f382782
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -15,6 +16,12 @@ Welcome to earthkit-regrids's documentation

examples

.. toctree::
:maxdepth: 1
:caption: Documentation

interpolate

.. toctree::
:maxdepth: 1
:caption: Installation
Expand Down
21 changes: 21 additions & 0 deletions docs/interpolate.rst
Original file line number Diff line number Diff line change
@@ -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`
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# These are the requirements for readthedoc
ipykernel
docutils
Pygments>=2.6.1
Sphinx
Expand Down

0 comments on commit f382782

Please sign in to comment.