RegridMethod¶

class
ESMF.api.constants.
RegridMethod
¶ Specify which interpolation method to use during regridding.

BILINEAR
= <RegridMethod.BILINEAR: 0>¶ Bilinear interpolation. Destination value is a linear combination of the source values in the cell which contains the destination point. The weights for the linear combination are based on the distance of destination point from each source value.

PATCH
= <RegridMethod.PATCH: 1>¶ Higherorder patch recovery interpolation. Destination value is a weighted average of 2D polynomial patches constructed from cells surrounding the source cell which contains the destination point. This method typically results in better approximations to values and derivatives than bilinear. However, because of its larger stencil, it also results in a much larger interpolation matrix (and thus routeHandle) than the bilinear.

CONSERVE
= <RegridMethod.CONSERVE: 2>¶ Firstorder conservative interpolation. The main purpose of this method is to preserve the integral of the field between the source and destination. Will typically give a less accurate approximation to the individual field values than the bilinear or patch methods. The value of a destination cell is calculated as the weighted sum of the values of the source cells that it overlaps. The weights are determined by the amount the source cell overlaps the destination cell. Needs corner coordinate values to be provided in the
Grid
. Currently only works forFields
created on theGrid
center stagger or theMesh
element location.

NEAREST_STOD
= <RegridMethod.NEAREST_STOD: 3>¶ In this version of nearest neighbor interpolation each destination point is mapped to the closest source point. A given source point may go to multiple destination points, but no destination point will receive input from more than one source point.

NEAREST_DTOS
= <RegridMethod.NEAREST_DTOS: 4>¶ In this version of nearest neighbor interpolation each source point is mapped to the closest destination point. A given destination point may receive input from multiple source points, but no source point will go to more than one destination point.

CONSERVE_2ND
= <RegridMethod.CONSERVE_2ND: 5>¶ Secondorder conservative interpolation. As with firstorder, preserves the integral of the value between the source and destination. However, typically produces a smoother more accurate result than firstorder. Also like firstorder, the value of a destination cell is calculated as the weighted sum of the values of the source cells that it overlaps. However, secondorder also includes additional terms to take into account the gradient of the field across the source cell. Needs corner coordinate values to be provided in the
Grid
. Currently only works forFields
created on theGrid
center stagger or theMesh
element location.
