Skip to content

Commit

Permalink
Fix attrs not being kept in spatial_avg()
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder committed Feb 7, 2024
1 parent ea71520 commit fec57c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion e3sm_diags/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def spatial_avg(
weights = _get_weights(ds, var_key, axis)
dims = _get_dims(dv, axis)

results = dv.weighted(weights).mean(dims)
results = dv.weighted(weights).mean(dims, keep_attrs=True)

if as_list:
return results.data.tolist()
Expand Down

0 comments on commit fec57c3

Please sign in to comment.