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

MDA8 #1224

Merged
merged 22 commits into from
Jul 2, 2024
Merged

MDA8 #1224

merged 22 commits into from
Jul 2, 2024

Conversation

thorbjoernl
Copy link
Collaborator

@thorbjoernl thorbjoernl commented Jun 24, 2024

Change Summary

Implements the possibility to calculate mda8 values for specific variables. This is done by creating an additional ColocatedData object after colocation.

Related issue number

closes #863

Checklist

  • Start with a draft-PR
  • The PR title is a good summary of the changes
  • PR is set to AeroTools and a tentative milestone
  • Documentation reflects the changes where applicable
  • Tests for the changes exist where applicable
  • Tests pass locally
  • Tests pass on CI
  • At least 1 reviewer is selected
  • Make PR ready to review

@thorbjoernl thorbjoernl mentioned this pull request Jun 24, 2024
9 tasks
@thorbjoernl
Copy link
Collaborator Author

Notes from old PR: #1165

Idea: O3 and CO both need MDA8. Therefore maybe making an operator which takes a ColocatedData object and applies for example a daily maximum of the 8 hourly mean (MDA8) could be useful. Would need to be specified in a config, and then dealt with here (similar to how we use use_fairmode):

use_fairmode = self.cfg.statistics_opts.use_fairmode

Want a way to keep both the original timeseries and the MDA8. Expand ColocatedDataList?

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 92.68293% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.33%. Comparing base (48e28ea) to head (ace42f6).
Report is 474 commits behind head on main-dev.

Files with missing lines Patch % Lines
pyaerocom/stats/mda8/mda8.py 89.28% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1224      +/-   ##
============================================
+ Coverage     79.31%   79.33%   +0.02%     
============================================
  Files           131      133       +2     
  Lines         20248    20284      +36     
============================================
+ Hits          16059    16092      +33     
- Misses         4189     4192       +3     
Flag Coverage Δ
unittests 79.33% <92.68%> (+0.02%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thorbjoernl thorbjoernl added this to the m2024-07 milestone Jul 1, 2024
@thorbjoernl thorbjoernl marked this pull request as ready for review July 1, 2024 10:30
pyaerocom/mda8/mda8.py Outdated Show resolved Hide resolved
pyaerocom/colocation/colocator.py Outdated Show resolved Hide resolved
pyaerocom/mda8/mda8.py Outdated Show resolved Hide resolved
pyaerocom/mda8/mda8.py Outdated Show resolved Hide resolved
tests/mda8/test_mda8.py Outdated Show resolved Hide resolved
pyaerocom/mda8/mda8.py Outdated Show resolved Hide resolved
tests/mda8/test_mda8.py Outdated Show resolved Hide resolved
tests/mda8/test_mda8.py Outdated Show resolved Hide resolved
Copy link
Member

@lewisblake lewisblake left a comment

Choose a reason for hiding this comment

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

Small changes. Otherwise looks good

pyaerocom/colocation/colocator.py Outdated Show resolved Hide resolved
Copy link
Member

@lewisblake lewisblake left a comment

Choose a reason for hiding this comment

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

😺

@lewisblake lewisblake merged commit f179213 into main-dev Jul 2, 2024
8 checks passed
@lewisblake lewisblake deleted the mda8 branch July 2, 2024 12:13
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.

MDA8
2 participants