Skip to content

Commit

Permalink
Rename var_weights to dv_weights
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder committed Jan 13, 2022
1 parent c190754 commit 27075ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xcdat/spatial_avg.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ def spatial_avg(
self._validate_region_bounds("lat", lat_bounds)
if lon_bounds is not None:
self._validate_region_bounds("lon", lon_bounds)
var_weights = self._get_weights(axis, lat_bounds, lon_bounds)
dv_weights = self._get_weights(axis, lat_bounds, lon_bounds)
elif isinstance(weights, xr.DataArray):
var_weights = weights
dv_weights = weights

self._validate_weights(dv, axis, var_weights)
dataset[dv.name] = self._averager(dv, axis, var_weights)
self._validate_weights(dv, axis, dv_weights)
dataset[dv.name] = self._averager(dv, axis, dv_weights)
return dataset

def _validate_axis(
Expand Down

0 comments on commit 27075ab

Please sign in to comment.