Regrid

class ESMF.Regrid(*args, **kwargs)
__call__(srcfield, dstfield, zero_region=None)

Call a regridding operation from srcfield to dstfield.

Required Arguments:

srcfield: the Field of source data to regrid.

dstfield: the Field to hold the regridded data.

Optional Arguments:

zero_region: specify which region of the field indices will
be zeroed out before adding the values resulting from the interpolation.

Argument values are:

(default)TOTAL = the entire Field

SELECT = only the Field indices which participate
in regridding

EMPTY = none of the Field

Returns:

dstfield
__del__()

Release the memory associated with a Regrid operation.

Required Arguments:

None

Optional Arguments:

None

Returns:

None
__init__(*args, **kwargs)

Create a handle to a Regridding operation between two Fields.

Required Arguments:

srcfield: source Field associated with an underlying Grid
or Mesh.
dstfield: destination Field associated with an underlying
Grid or Mesh. The data in this Field may be overwritten by this call.

Optional Arguments:

src_mask_values: a numpy array (internally cast to
dtype=numpy.int32)of values that can be used to specify a masked value on the source Field.

type: numpy.array shape: (n, 1) where n is the number of values

dst_mask_values: a numpy array (internally cast to
dtype=numpy.int32)of values that can be used to specify a masked value on the destination Field.

type: numpy.array shape: (n, 1) where n is the number of values

regrid_method: specifies which regridding method to use.

Argument values are:

(default) RegridMethod.BILINEAR

RegridMethod.PATCH

RegridMethod.CONSERVE

pole_method: specifies which type of artificial pole
to construct on the source Grid for regridding.

Argument values are:

(default for regridmethod == RegridMethod.CONSERVE) PoleMethod.NONE

(default for regridmethod != RegridMethod.CONSERVE) PoleMethod.ALLAVG

PoleMethod.NPNTAVG

PoleMethod.TEETH

regrid_pole_npoints: specifies how many points to average over
if polemethod == PoleMethod.NPNTAVG
unmapped_action: specifies which action to take if a
destination point is found which does not map to any source point.

Argument values are :

(default) UnmappedAction.ERROR

UnmappedAction.IGNORE

src_frac_field: return a numpy array of values containing
weights corresponding to the amount of each Field value which contributes to the total mass of the Field.
dst_frac_field: return a numpy array of values containing
weights corresponding to the amount of each Field value which contributes to the total mass of the Field.

Returns:

Regrid

This Page