CHM.xarray_accessor.GeoAccessor.regrid

CHM.xarray_accessor.GeoAccessor.regrid#

xarray_accessor.GeoAccessor.regrid(dxdy: float = 0.01, round_decimals: int = 6, duplicate_reducer: str = 'mean', extra_exclude: list[str] | None = None) Dataset#

Regrid face-centered variables to a structured grid via uxarray bilinear remap. Suitable for meshes that comfortably fit on a single compute node as the regridding uses Uxarray’s multi-threaded, non-Dask Cython regridder.

Parameters#

dxdyfloat, optional

Target grid spacing (decimal degrees) in both lat and lon directions.

round_decimalsint, optional

Number of decimal places to round resulting lat/lon coordinates.

duplicate_reducer{“mean”, “first”, “median”, “max”, “min”}, optional

Reduction applied when multiple faces collapse to the same grid cell. Default is mean.

extra_excludelist[str], optional

Additional fnmatch patterns to exclude from regridding.

Returns#

xr.Dataset

Structured grid dataset with latitude/longitude coordinates and selected variables.