stilt.footprint.FootprintAccessor#

class stilt.footprint.FootprintAccessor(foot: 'xr.DataArray') → 'None'[source]#

PYSTILT methods on a footprint, as foot.stilt.

A footprint is an xarray.DataArray, so sums, selections, and plots are plain xarray (foot.sum("time"), foot.sel(time=slice(a, b))). The accessor adds what needs the receptor or the footprint settings, which ride in the array’s attributes. Recent xarray keeps attributes through arithmetic. Older versions drop them (foot * 2), so with those, call these methods on the footprint as read, or use xr.set_options(keep_attrs=True).

Attributes#

config

The footprint settings (grid, smoothing, and particle transforms).

geometry_hash

Hash of the geometry the grid was derived for, or None when the footprint has no geometry.

grid

The grid the footprint is on.

name

The footprint's name, usually the variant name.

plot

Plotting methods, such as foot.stilt.plot.map().

receptor

The receptor the footprint belongs to.

Methods#

aggregate(target, time_bins)

Sum the footprint onto the cells of another grid or set of polygons, per time bin.

enhancement(flux)

Return the modeled enhancement at the receptor, footprint times flux summed over the grid.

to_netcdf(path)

Write the footprint to a CF-1.8 NetCDF file.