uxarray.UxDataset.remap.apply_weights#
- UxDataset.remap.apply_weights(destination_grid, weights, remap_to='faces', source_dim=None)#
Apply a sparse remap operator loaded from disk.
- Parameters:
destination_grid (Grid) – Grid representing the destination topology and coordinates.
weights (str, PathLike, xr.Dataset, or RemapWeights) – Weight file or reusable loaded weights. Standard SCRIP/ESMF sparse map files are expected to provide
row,col,S, and dimensionsn_a/n_b.remap_to ({'nodes', 'edges', 'faces'}, default='faces') – Which destination grid element receives the remapped values.
source_dim ({'n_node', 'n_edge', 'n_face'}, optional) – Explicit source spatial dimension to remap along. If omitted, UXarray infers it from variables whose trailing spatial dimension matches the loaded weight source size.
- Returns:
A new object with data mapped onto
destination_grid.- Return type:
Notes
Dask-backed inputs are materialized in memory before the sparse operator is applied. For lazy/chunked execution, prefer
nearest_neighbororinverse_distance_weighted.