Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenworsley committed May 26, 2023
1 parent a084fa8 commit 1ec8a14
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added

- [PR#276](https://github.com/SciTools-incubator/iris-esmf-regrid/pull/276)
Allow regridding for grids defined on coordinates without bounds for
nearest neighbour and bilinear methods.
[@stephenworsley](https://github.com/stephenworsley)

## [0.7] - 2023-05-23

### Added
Expand Down
36 changes: 22 additions & 14 deletions esmf_regrid/schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,13 @@ def regridder(self, src_grid, tgt_grid, use_src_mask=None, use_tgt_mask=None):
Parameters
----------
src_grid : :class:`iris.cube.Cube`
The :class:`~iris.cube.Cube` defining the source grid.
The :class:`~iris.cube.Cube` defining the source grid or mesh.
If this cube has a grid defined by latitude/longitude coordinates, those
coordinates must have bounds.
tgt_grid : :class:`iris.cube.Cube`
The :class:`~iris.cube.Cube` defining the target grid.
The :class:`~iris.cube.Cube` defining the target grid or mesh.
If this cube has a grid defined by latitude/longitude coordinates, those
coordinates must have bounds.
use_src_mask : :obj:`~numpy.typing.ArrayLike` or bool, optional
Array describing which elements :mod:`esmpy` will ignore on the src_grid.
If True, the mask will be derived from src_grid.
Expand Down Expand Up @@ -962,9 +966,9 @@ def regridder(self, src_grid, tgt_grid, use_src_mask=None, use_tgt_mask=None):
Parameters
----------
src_grid : :class:`iris.cube.Cube`
The :class:`~iris.cube.Cube` defining the source grid.
The :class:`~iris.cube.Cube` defining the source grid or mesh.
tgt_grid : :class:`iris.cube.Cube`
The :class:`~iris.cube.Cube` defining the target grid.
The :class:`~iris.cube.Cube` defining the target grid or mesh.
use_src_mask : :obj:`~numpy.typing.ArrayLike` or bool, optional
Array describing which elements :mod:`esmpy` will ignore on the src_grid.
If True, the mask will be derived from src_grid.
Expand Down Expand Up @@ -1052,9 +1056,9 @@ def regridder(self, src_grid, tgt_grid, use_src_mask=None, use_tgt_mask=None):
Parameters
----------
src_grid : :class:`iris.cube.Cube`
The :class:`~iris.cube.Cube` defining the source grid.
The :class:`~iris.cube.Cube` defining the source grid or mesh.
tgt_grid : :class:`iris.cube.Cube`
The :class:`~iris.cube.Cube` defining the target grid.
The :class:`~iris.cube.Cube` defining the target grid or mesh.
use_src_mask : :obj:`~numpy.typing.ArrayLike` or bool, optional
Array describing which elements :mod:`esmpy` will ignore on the src_grid.
If True, the mask will be derived from src_grid.
Expand Down Expand Up @@ -1107,9 +1111,9 @@ def __init__(
Parameters
----------
src : :class:`iris.cube.Cube`
The rectilinear :class:`~iris.cube.Cube` providing the source grid.
The rectilinear :class:`~iris.cube.Cube` providing the source grid or mesh.
tgt : :class:`iris.cube.Cube`
The rectilinear :class:`~iris.cube.Cube` providing the target grid.
The rectilinear :class:`~iris.cube.Cube` providing the target grid or mesh.
method : str
Either "conservative", "bilinear" or "nearest". Corresponds to the :mod:`esmpy` methods
:attr:`~esmpy.api.constants.RegridMethod.CONSERVE`,
Expand Down Expand Up @@ -1284,9 +1288,13 @@ def __init__(
Parameters
----------
src : :class:`iris.cube.Cube`
The rectilinear :class:`~iris.cube.Cube` providing the source grid.
The rectilinear :class:`~iris.cube.Cube` providing the source grid or mesh.
If this cube has a grid defined by latitude/longitude coordinates, those
coordinates must have bounds.
tgt : :class:`iris.cube.Cube`
The rectilinear :class:`~iris.cube.Cube` providing the target grid.
The rectilinear :class:`~iris.cube.Cube` providing the target grid or mesh.
If this cube has a grid defined by latitude/longitude coordinates, those
coordinates must have bounds.
mdtol : float, default=0
Tolerance of missing data. The value returned in each element of
the returned array will be masked if the fraction of masked data
Expand Down Expand Up @@ -1349,9 +1357,9 @@ def __init__(
Parameters
----------
src : :class:`iris.cube.Cube`
The rectilinear :class:`~iris.cube.Cube` providing the source grid.
The rectilinear :class:`~iris.cube.Cube` providing the source grid or mesh.
tgt : :class:`iris.cube.Cube`
The rectilinear :class:`~iris.cube.Cube` providing the target grid.
The rectilinear :class:`~iris.cube.Cube` providing the target grid or mesh.
mdtol : float, default=0
Tolerance of missing data. The value returned in each element of
the returned array will be masked if the fraction of masked data
Expand Down Expand Up @@ -1402,9 +1410,9 @@ def __init__(
Parameters
----------
src : :class:`iris.cube.Cube`
The rectilinear :class:`~iris.cube.Cube` providing the source grid.
The rectilinear :class:`~iris.cube.Cube` providing the source grid or mesh.
tgt : :class:`iris.cube.Cube`
The rectilinear :class:`~iris.cube.Cube` providing the target grid.
The rectilinear :class:`~iris.cube.Cube` providing the target grid or mesh.
precomputed_weights : :class:`scipy.sparse.spmatrix`, optional
If ``None``, :mod:`esmpy` will be used to
calculate regridding weights. Otherwise, :mod:`esmpy` will be bypassed
Expand Down

0 comments on commit 1ec8a14

Please sign in to comment.