Skip to content

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

@hdrake

Description

@hdrake

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions