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

xarray_utils: calculate global mean #220

Merged
merged 8 commits into from
Nov 14, 2022

Conversation

mathause
Copy link
Member

@mathause mathause commented Nov 10, 2022

  • Closes #xxx
  • Tests added
  • Passes isort . && black . && flake8
  • Fully documented, including CHANGELOG.rst

Next data handling PR: calculating weighted global means.

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2022

Codecov Report

Base: 85.03% // Head: 85.13% // Increases project coverage by +0.10% 🎉

Coverage data is based on head (0e84caf) compared to base (e8430f4).
Patch coverage: 92.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   85.03%   85.13%   +0.10%     
==========================================
  Files          35       36       +1     
  Lines        1483     1507      +24     
==========================================
+ Hits         1261     1283      +22     
- Misses        222      224       +2     
Flag Coverage Δ
unittests 85.13% <92.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mesmer/xarray_utils/global_mean.py 91.66% <91.66%> (ø)
mesmer/xarray_utils/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mathause mathause marked this pull request as ready for review November 10, 2022 15:27
@mathause
Copy link
Member Author

@znicholls: as always a quick look and your opinion on naming is appreciated.

Copy link
Collaborator

@znicholls znicholls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, minor comments.

Should be easy enough to extend to using model reported grid cell areas, should we ever go down that path...

.. autosummary::
:toctree: generated/

~xarray_utils.globmean.lat_weights
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
~xarray_utils.globmean.lat_weights
~xarray_utils.global_mean.lat_weights

I'd be tempted to just write it out, but doesn't really matter

mathause and others added 4 commits November 11, 2022 10:35
@mathause mathause merged commit 8b8ae76 into MESMER-group:main Nov 14, 2022
@mathause mathause deleted the calc_globmean branch November 14, 2022 16:59
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.

3 participants