Skip to content

Clean-up ad-hoc xgcm.Grid.cumsum(..., reverse=True) operations #9

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

Open
hdrake opened this issue Sep 29, 2023 · 0 comments
Open

Clean-up ad-hoc xgcm.Grid.cumsum(..., reverse=True) operations #9

hdrake opened this issue Sep 29, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@hdrake
Copy link
Owner

hdrake commented Sep 29, 2023

Most of the lines of code in /xwmb/budget.py are currently dedicated to performing reversed cumulative sums. We can already probably clean this up quite a bit by making a utility function to perform this operation, rather than duplicating the code several times throughout the WaterMassBudget methods.

If xgcm.Grid axes become directionally-aware (see xgcm/xgcm#337), then it should be straight-forward to allow reversing the direction of xgcm.Grid.cumsum or xgcm.Grid.cumint (see xgcm/xgcm#609).

@hdrake hdrake added the enhancement New feature or request label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant