uxarray.UxDataArray.zonal_mean#
- UxDataArray.zonal_mean(lat=(-90, 90, 10), **kwargs)#
Compute averages along lines of constant latitude.
- Parameters:
lat (tuple, float, or array-like, default=(-90, 90, 10)) – Latitude values in degrees. Can be specified as: - tuple (start, end, step): Computes means at intervals of step in range [start, end] - float: Computes mean for a single latitude - array-like: Computes means for each specified latitude
- Returns:
Contains zonal means with a new ‘latitudes’ dimension and corresponding coordinates. Name will be original_name + ‘_zonal_mean’ or ‘zonal_mean’ if unnamed.
- Return type:
Examples
# All latitudes from -90° to 90° at 10° intervals >>> uxds[“var”].zonal_mean()
# Single latitude at 30° >>> uxds[“var”].zonal_mean(lat=30.0)
# Range from -60° to 60° at 10° intervals >>> uxds[“var”].zonal_mean(lat=(-60, 60, 10))
Notes
Only supported for face-centered data variables. Candidate faces are determined using spherical bounding boxes - faces whose bounds contain the target latitude are included in calculations.