imod.util.RegridderWeightsCache.get_regridder#

RegridderWeightsCache.get_regridder(source_grid: DataArray | UgridDataArray, target_grid: DataArray | UgridDataArray, regridder_type: RegridderType | BaseRegridder, method: str | None = None) BaseRegridder[source]#

Returns a regridder of the specified type and with the specified method. The desired type can be passed through the argument “regridder_type” as an enumerator or as a class. The following two are equivalent:

>>> cache.get_regridder(RegridderType.OVERLAP, "mean")
>>> cache.get_regridder(xu.OverlapRegridder, "mean")
Parameters:
  • regridder_type (RegridderType or regridder class) – indicates the desired regridder type

  • method (str or None) – indicates the method the regridder should apply

Return type:

a regridder of the specified characteristics