Skip to content

Commit f5cb2ec

Browse files
JMEdwardsXtrjfrost-mo
authored andcommitted
Adding a doc-string.
1 parent 017e5e5 commit f5cb2ec

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

src/CSET/operators/regrid.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,30 @@ def transform_lat_long_points(lon, lat, cube):
365365

366366
return lon_rot, lat_rot
367367

368-
def interpolate_to_point_cube(fld: iris.cube.Cube | iris.cube.CubeList,
369-
point_cube: iris.cube.Cube,
370-
**kwargs) -> iris.cube.Cube | iris.cube.CubeList:
368+
369+
def interpolate_to_point_cube(
370+
fld: iris.cube.Cube | iris.cube.CubeList, point_cube: iris.cube.Cube, **kwargs
371+
) -> iris.cube.Cube | iris.cube.CubeList:
372+
"""Interpolate from a 2D field to a set of points.
373+
374+
Interpolate the 2D field in fld to the set of points
375+
specified in point_cube.
376+
377+
Parameters
378+
----------
379+
fld: Cube
380+
An iris cube containing a two-dimensional field.
381+
point_cube: Cube
382+
An iris cube specifying the point to which the data
383+
will be interpolated.
384+
385+
Returns
386+
-------
387+
fld_point_cube: Cube
388+
An iris cube containing interpolated values at the points
389+
specified by the point cube.
390+
391+
"""
371392
#
372393
# As a basis, create a copy of the point cube.
373394
fld_point_cube = point_cube.copy()

0 commit comments

Comments
 (0)