imod.mf6.GroundwaterTransportModel.regrid_like#
- GroundwaterTransportModel.regrid_like(target_grid: DataArray | UgridDataArray, regrid_cache: RegridderWeightsCache | None = None) Modflow6Model#
Creates a model by regridding the packages of this model to another discretization. It regrids all the arrays in the package using the default regridding methods. At the moment only regridding to a different planar grid is supported, meaning
target_gridhas different"x"and"y"or differentcell2dcoords.- Parameters:
target_grid (xr.DataArray or xu.UgridDataArray) – a grid defined using the same discretization as the one we want to regrid the package to.
regrid_cache (RegridderWeightsCache, optional) – stores regridder weights for different regridders. Can be used to speed up regridding, if the same regridders are used several times for regridding different arrays.
- Returns:
a model with similar packages to the input model, and with all the
data-arrays regridded to another discretization, similar to the one used
in input argument “target_grid”