Skip to content

Commit b0a1846

Browse files
committed
Added return_esmpy_regrid_operator to regrids and regridc per #766
1 parent a868143 commit b0a1846

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

cf/field.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13491,6 +13491,7 @@ def regrids(
1349113491
inplace=False,
1349213492
i=False,
1349313493
_compute_field_mass=None,
13494+
return_esmpy_regrid_operator=False,
1349413495
):
1349513496
"""Regrid the field to a new latitude and longitude grid.
1349613497

@@ -13727,6 +13728,10 @@ def regrids(
1372713728
.. versionadded:: 3.16.0
1372813729

1372913730
{{inplace: `bool`, optional}}
13731+
13732+
{{return_esmpy_regrid_operator: `bool`, optional}}
13733+
13734+
.. versionadded:: 3.16.2
1373013735

1373113736
axis_order: sequence, optional
1373213737
Deprecated at version 3.14.0.
@@ -13744,7 +13749,8 @@ def regrids(
1374413749
`Field` or `None` or `RegridOperator`
1374513750
The regridded field construct; or `None` if the
1374613751
operation was in-place; or the regridding operator if
13747-
*return_operator* is True.
13752+
*return_operator* is True; or the esmpy.Regrid operator
13753+
object if *return_esmpy_regrid_operator* is True.
1374813754

1374913755
**Examples**
1375013756

@@ -13819,6 +13825,7 @@ def regrids(
1381913825
dst_z=dst_z,
1382013826
z=z,
1382113827
ln_z=ln_z,
13828+
return_esmpy_regrid_operator=return_esmpy_regrid_operator,
1382213829
inplace=inplace,
1382313830
)
1382413831

@@ -13845,6 +13852,7 @@ def regridc(
1384513852
inplace=False,
1384613853
i=False,
1384713854
_compute_field_mass=None,
13855+
return_esmpy_regrid_operator=False,
1384813856
):
1384913857
"""Regrid the field to a new Cartesian grid.
1385013858

@@ -14016,6 +14024,10 @@ def regridc(
1401614024
.. versionadded:: 3.16.2
1401714025

1401814026
{{inplace: `bool`, optional}}
14027+
14028+
{{return_esmpy_regrid_operator: `bool`, optional}}
14029+
14030+
.. versionadded:: 3.16.2
1401914031

1402014032
axis_order: sequence, optional
1402114033
Deprecated at version 3.14.0.
@@ -14033,7 +14045,8 @@ def regridc(
1403314045
`Field` or `None` or `RegridOperator`
1403414046
The regridded field construct; or `None` if the
1403514047
operation was in-place; or the regridding operator if
14036-
*return_operator* is True.
14048+
*return_operator* is True; or the esmpy.Regrid operator
14049+
object if *return_esmpy_regrid_operator* is True.
1403714050

1403814051
**Examples**
1403914052

@@ -14107,6 +14120,7 @@ def regridc(
1410714120
dst_z=dst_z,
1410814121
z=z,
1410914122
ln_z=ln_z,
14123+
return_esmpy_regrid_operator=return_esmpy_regrid_operator,
1411014124
inplace=inplace,
1411114125
)
1411214126

0 commit comments

Comments
 (0)