stilt.flux.sample_flux#
- stilt.flux.sample_flux(flux, x, y, times=None)[source]#
Return the flux at each point, or zero outside the field.
sample_field()with missing values, and points outside the field, counted as zero flux.- Parameters:
flux (
DataArray) – Flux on alat/lonory/xgrid, with an optionaltimedimension.x (
TypeAliasType) – Point coordinates, longitude and latitude for alat/lonfield.y (
TypeAliasType) – Point coordinates, longitude and latitude for alat/lonfield.times (
TypeAliasType|None) – Time of each point. Required when flux has atimedimension. Each point takes the nearest time step, so times outside the field’s span take the first or last one.
- Returns:
Flux at each point, in the flux’s units.
- Return type: