diff --git a/esmf_regrid/experimental/unstructured_scheme.py b/esmf_regrid/experimental/unstructured_scheme.py index 95a00b45..e6562ac0 100644 --- a/esmf_regrid/experimental/unstructured_scheme.py +++ b/esmf_regrid/experimental/unstructured_scheme.py @@ -390,10 +390,10 @@ def regrid_unstructured_to_unstructured( Parameters ---------- - src_cube : :class:`iris.cube.Cube` - A rectilinear instance of :class:`~iris.cube.Cube` that supplies the data, + src_mesh_cube : :class:`iris.cube.Cube` + A unstructured instance of :class:`~iris.cube.Cube` that supplies the data, metadata and coordinates. - mesh_cube : :class:`iris.cube.Cube` + tgt_mesh_cube : :class:`iris.cube.Cube` An unstructured instance of :class:`~iris.cube.Cube` that supplies the desired horizontal mesh definition. mdtol : float, default=0 @@ -410,9 +410,6 @@ def regrid_unstructured_to_unstructured( :attr:`~esmpy.api.constants.RegridMethod.CONSERVE` or :attr:`~esmpy.api.constants.RegridMethod.BILINEAR` or :attr:`~esmpy.api.constants.RegridMethod.NEAREST` used to calculate weights. - src_resolution : int, optional - If present, represents the amount of latitude slices per cell - given to ESMF for calculation. use_src_mask : :obj:`~numpy.typing.ArrayLike` or bool, default=False Either an array representing the cells in the source to ignore, or else a boolean value. If True, this array is taken from the mask on the data diff --git a/esmf_regrid/schemes.py b/esmf_regrid/schemes.py index a1cdc81b..59e723d2 100644 --- a/esmf_regrid/schemes.py +++ b/esmf_regrid/schemes.py @@ -516,6 +516,13 @@ def _regrid_rectilinear_to_rectilinear__prepare( src_mask=None, tgt_mask=None, ): + """ + First (setup) part of 'regrid_rectilinear_to_rectilinear'. + + Check inputs and calculate the sparse regrid matrix and related info. + The 'regrid info' returned can be re-used over many 2d slices. + + """ tgt_x = _get_coord(tgt_grid_cube, "x") tgt_y = _get_coord(tgt_grid_cube, "y") src_x = _get_coord(src_grid_cube, "x") @@ -544,6 +551,12 @@ def _regrid_rectilinear_to_rectilinear__prepare( def _regrid_rectilinear_to_rectilinear__perform(src_cube, regrid_info, mdtol): + """ + Second (regrid) part of 'regrid_rectilinear_to_rectilinear'. + + Perform the prepared regrid calculation on a single cube. + + """ grid_x_dim, grid_y_dim = regrid_info.dims grid_x, grid_y = regrid_info.target regridder = regrid_info.regridder @@ -778,6 +791,13 @@ def _regrid_unstructured_to_unstructured__prepare( src_location=None, tgt_location=None, ): + """ + First (setup) part of 'regrid_unstructured_to_unstructured'. + + Check inputs and calculate the sparse regrid matrix and related info. + The 'regrid info' returned can be re-used over many 2d slices. + + """ if isinstance(tgt_cube_or_mesh, Mesh): mesh = tgt_cube_or_mesh location = tgt_location @@ -811,6 +831,12 @@ def _regrid_unstructured_to_unstructured__prepare( def _regrid_unstructured_to_unstructured__perform(src_cube, regrid_info, mdtol): + """ + Second (regrid) part of 'regrid_unstructured_to_unstructured'. + + Perform the prepared regrid calculation on a single cube. + + """ (mesh_dim,) = regrid_info.dims mesh, location = regrid_info.target regridder = regrid_info.regridder