RegriddedSource¶
Import path: earth2studio.data.RegriddedSource
Documentation¶
Data or forecast source whose fields are regridded onto a target grid.
Composes a source with a [Regridder][earth2studio.grids.Regridder] so the pair
stands in for the source wherever a DataSource or ForecastSource is
accepted, for example as a model's recommended source for a slot on another
grid. Requests pass through unchanged; only the spatial dimensions of the
result are mapped.
Parameters:
-
source(DataSource | ForecastSource) –Source to wrap, whose native grid is the regridder's
source_grid. -
regridder(Regridder) –Regridder applied to fetched fields, on whatever backing and device the source returns them.
fetch
async
¶
Asynchronously fetch from the wrapped source and regrid the result.
Parameters:
-
*args(Any, default:()) –Request arguments of the wrapped source.
-
**kwargs(Any, default:()) –Request arguments of the wrapped source.
Returns:
-
DataArray–Source field on the regridder's
target_grid.
Raises:
-
AttributeError–If the wrapped source does not support async fetch.