Skip to content

Shouldn't zonal_mean return xarray.DataArray instead of UxDataArray? #1370

@erogluorhan

Description

@erogluorhan

Similar to the comment here and the following conversation and corresponding implementation, zonal_mean also needs some re-design regarding the returned data type:

Currently it returns uxarray.UxDataArray, but it should only be a list of average values, without any Grid topology attempted to be preserved/created I believe.

How it is currently showcased in our user guides seems to kind of support this as well because all the resulting zonal means needed to be used with line or scatter plots and no use of grid topology at all.

All that said, I think a return type of xarray.DataArray would be better here.

@philipc2, feel free to chime in since you were there in the original convo above.

@rajeeja , if we agree with this way forward, would you mind looking into this since you're already working on zonal_mean for conservative averaging?

Metadata

Metadata

Assignees

Labels

improvementImprovements on existing features or infrastructureredesignContent relating to the ongoing redesign

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions