Open navidcy opened 4 years ago
Is this still relevant, or have we fixed this now?
I think the issue is relevant. We have an example that shows the right way to take a zonal mean but I don't think this is how it's been implemented in all other examples that use zonal means. We should modify the example to actually do a zonal mean when they claim to do a zonal mean.
xarray
's.mean(dim='dimension')
is simply an arithmetic mean over that dimension. It does not take into account that, e.g., dimensions's coordinates could be on a non-uniform grid.Remark(s) on the use of
.mean()
should be included in the notebooks.Probably I'm duplicating old news here? This #12, #40, and #85 are related.
[While this may seem like triviality or common knowledge to pythonistas, newbies in
xarray
(like myself) may miss on reading the fine print inxarray
's docs and work under the assumption that.mean()
takes car of non-uniform grids.]