Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xr_area_weight should maintain attributes, etc. #18

Closed
bradyrx opened this issue May 3, 2019 · 6 comments
Closed

xr_area_weight should maintain attributes, etc. #18

bradyrx opened this issue May 3, 2019 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@bradyrx
Copy link
Owner

bradyrx commented May 3, 2019

Currently, xr_area_weight returns an unnamed DataArray. I always find myself renaming the DataArray after so I can convert it back to a Dataset. I need to go back through this with a careful eye.

@bradyrx bradyrx added bug Something isn't working high priority labels May 3, 2019
@bradyrx bradyrx self-assigned this May 3, 2019
@aaronspring
Copy link
Collaborator

they will soon add something like this to xarray: pydata/xarray#2922

@bradyrx
Copy link
Owner Author

bradyrx commented May 3, 2019

That looks nice.

@bradyrx
Copy link
Owner Author

bradyrx commented Aug 1, 2019

Looks like you can pass keep_attrs=True to functions, e.g. .mean(keep_attrs=True) pydata/xarray#442

@aaronspring
Copy link
Collaborator

and this can be set globally for xr

@bradyrx
Copy link
Owner Author

bradyrx commented Aug 1, 2019

Yeah but I think the argument is that there are certain functions where you don't want attributes maintained. But I'm not sure what those would be. So maybe we set this in the __init__ function or something.

@bradyrx
Copy link
Owner Author

bradyrx commented Jul 8, 2020

area_weight should be deprecated anyways in favor of xarray's weighted objects.

@bradyrx bradyrx closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants