CompositeAboutPoints#
- class rojak.atmosphere.compositing.CompositeAboutPoints(grid, centre_dim_name, block_sizes, block_chunk, centre_array, centre_coords, km_coords, interpolation, lat_lon_buffer)[source]#
Composite fields on a common grid about the centres stored in a
dask.dataframe.DataFrame.Build it once with
from_centres(), which locates, counts and shuffles the centres, then call it on each field to composite. Only the interpolation is built for each field. As every composite shares the same (lazy) centre arrays, computing the composites together evaluates the shuffle once. Seecomposite_about_points()for how the compositing works.It is callable, so it can be applied to every data variable of a
xarray.Datasetwithxarray.Dataset.map().Example
>>> composite = CompositeAboutPoints.from_centres( ... ds, centres, vert_dim_name="pressure_level", vert_column="level" ... ) >>> composites = ds[["temperature", "u_wind"]].map(composite) >>> geopotential_composite = composite(ds["geopotential"])
- Parameters:
- __init__(grid, centre_dim_name, block_sizes, block_chunk, centre_array, centre_coords, km_coords, interpolation, lat_lon_buffer)[source]#
Methods
__init__(grid, centre_dim_name, block_sizes, ...)from_centres(template, centres, *[, ...])Locate and group the centres on the grid of
template.Attributes
gridcentre_dim_nameblock_sizesblock_chunkcentre_arraycentre_coordskm_coordsinterpolationlat_lon_buffer