Skip to content

Commit

Permalink
add zonal average alais, update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 committed Jan 17, 2025
1 parent ea145ad commit f2d69c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions uxarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def integrate(

return uxda

def zonal_mean(self, lat=(-90, 90, 10), process_overlaps=False):
def zonal_mean(self, lat=(-90, 90, 10), **kwargs):
"""Compute averages along lines of constant latitude.
Parameters
Expand Down Expand Up @@ -490,7 +490,7 @@ def zonal_mean(self, lat=(-90, 90, 10), process_overlaps=False):
)

res = _compute_non_conservative_zonal_mean(
uxda=self, latitudes=latitudes, process_overlaps=process_overlaps
uxda=self, latitudes=latitudes, **kwargs
)

dims = list(self.dims[:-1]) + ["latitudes"]
Expand All @@ -506,6 +506,9 @@ def zonal_mean(self, lat=(-90, 90, 10), process_overlaps=False):

return uxda

# Alias for 'zonal_mean', since this name is also commonly used.
zonal_average = zonal_mean

def weighted_mean(self, weights=None):
"""Computes a weighted mean.
Expand Down

0 comments on commit f2d69c0

Please sign in to comment.