xugrid.CentroidLocatorRegridder#

class xugrid.CentroidLocatorRegridder(source: Ugrid2d, target: Ugrid2d)[source]#

The CentroidLocatorRegridded regrids by searching the source grid for the centroids of the target grid.

If a centroid is exactly located on an edge between two faces, the value of either face may be used.

Parameters:
__init__(source: Ugrid2d, target: Ugrid2d)#

Methods

__init__(source, target)

from_dataset(dataset)

Reconstruct the regridder from a dataset with source, target indices and weights.

from_weights(weights, target)

regrid(object)

Regrid the data from a DataArray from its old grid topology to the new target topology.

regrid_dataarray(source, source_dims)

to_dataset()

Store the computed weights and target in a dataset for re-use.

Attributes

weights