Skip to content

Conversation

hdrake
Copy link
Owner

@hdrake hdrake commented Jul 20, 2023

No description provided.

hdrake added 2 commits July 17, 2023 14:10
Right now, this method only does a shallow search of the budget. We really want to be able to fill every missing term in the budget!
Major changes:
- The xarray dataset containing diagnostics is not passed to the xbudget
functions so that derived terms can be (lazily) added to the dataset. The names of derived
variables follow from the nested dictionary structure and are unambiguous.
- dictionary structure has been modified so that the names of the new derived variables are also
added to the dictionary. This facilitates evaluation of the reconstructed terms as it is now obvious
if there are existing diagnostics that they should be equivalent to.
- the collect_budgets function fills the budget with derived terms and the `aggregate` function
is used to collect just some high-level terms

To do:
- Functions for more flexible grouping/aggregating/decomposing of budget terms. For example, what if someone wants a
  high-level budget for most terms but wants to really break down the surface fluxes as much as possible? They currently
  can do this manually by following the budget structure, but it would be nice to have helper functions to make it easier.
- Support derived variables that are finite-differences of fluxes, to be compared against the flux-divergence diagnostics.
- Somehow protect against users combining inconsistent terms (e.g. on different grids).
@hdrake hdrake merged commit fa2f731 into main Jul 20, 2023
@hdrake hdrake deleted the fill-dataset-with-budget-terms branch July 20, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant