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

Ensure flux dims order #128

Merged
merged 5 commits into from
May 17, 2024
Merged

Ensure flux dims order #128

merged 5 commits into from
May 17, 2024

Conversation

brendan-m-murphy
Copy link
Contributor

@brendan-m-murphy brendan-m-murphy commented May 17, 2024

  • Summary of changes
  • in inferpymc_postprocessouts, the order of the flux dimensions is inferred by assuming that time is the smallest dimension, then the axes of the flux array are re-ordered so that time is the last axis. This is a hack to try to ensure that the flux dims are in the expected order, without using xarray
  • ultimately, we want to use xarray for postprocessing (issue Use xarray dimensions in postprocessing #126) but that change will take longer
  • a test was added to run a full inversion with a flux whose dimensions are ordered: time, lat, lon`. This test failed initially, reproducing the error @hdelongueville found. After the fix, the test now passes.
  • Please check if the PR fulfills these requirements

Moved `time` in front of `lat` and `lon`. This reproduces an error
reported by Helene.
The hack is assuming that time is the smallest coordinate, but
for annual or monthly fluxes, this should be true.
@brendan-m-murphy brendan-m-murphy marked this pull request as ready for review May 17, 2024 14:56
@brendan-m-murphy brendan-m-murphy merged commit 866fb29 into devel May 17, 2024
3 checks passed
@brendan-m-murphy brendan-m-murphy deleted the ensure-flux-dims-order branch May 17, 2024 16:31
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.

2 participants