pysteps.utils.dimension.aggregate_fields_space

pysteps.utils.dimension.aggregate_fields_space(R, metadata, space_window_m, ignore_nan=False)

Upscale fields in space.

Parameters:
R : array-like

Array of shape (m,n), (t,m,n) or (l,t,m,n) containing a single field or a time series of (ensemble) input fields.

metadata : dict

Metadata dictionary containing the xpixelsize, ypixelsize and unit attributes as described in the documentation of pysteps.io.importers.

space_window_m : float or None

The length in meters of the space window that is used to upscale the fields. The space spanned by the m and n dimensions of R must be a multiple of space_window_m. If set to None, it returns a copy of the original R and metadata.

ignore_nan : bool, optional

If True, ignore nan values.

Returns:
outputarray : array-like

The new array of aggregated fields of shape (k,j), (t,k,j) or (l,t,k,j), where k = m*delta/space_window_m and j = n*delta/space_window_m; delta is the grid size.

metadata : dict

The metadata with updated attributes.