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

add evaluation type for cams283, tweak rtol fairmode #1329

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

charlienegri
Copy link
Collaborator

@charlienegri charlienegri commented Aug 29, 2024

Change Summary

if the type of evaluation is 'long' but it does not span across more than 1 year, avoid defining periods as years via make_period_ys

plus a tweak in rtol for fairmode because a test run with the previous vaule failed the check

Related issue number

this is part of tackling https://github.com/metno/AeroToolsIssues/issues/76
and is the code that makes possible https://aeroval-test.met.no/charlien/pages/evaluation/?project=cams2-83&experiment=test-mos-last-seasons-special

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

@charlienegri charlienegri added this to the m2024-09 milestone Aug 29, 2024
@charlienegri
Copy link
Collaborator Author

I'd like to discuss this in person at some point @heikoklein

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.97%. Comparing base (56401dd) to head (6ddfcf8).
Report is 8 commits behind head on main-dev.

Additional details and impacted files
@@            Coverage Diff            @@
##           main-dev    #1329   +/-   ##
=========================================
  Coverage     78.96%   78.97%           
=========================================
  Files           136      136           
  Lines         20813    20814    +1     
=========================================
+ Hits          16436    16437    +1     
  Misses         4377     4377           
Flag Coverage Δ
unittests 78.97% <100.00%> (+<0.01%) ⬆️

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.

@charlienegri charlienegri marked this pull request as ready for review August 29, 2024 07:41
@charlienegri charlienegri marked this pull request as draft August 29, 2024 14:35
@@ -77,7 +77,7 @@ def fairmode_stats(obs_var: str, stats: dict) -> dict:
assert np.isclose(
rmsu * beta_mqi,
np.sqrt((bias) ** 2 + (mod_std - obs_std) ** 2 + (2 * obs_std * mod_std * (1 - R))),
rtol=1e-3,
rtol=1e-2,
Copy link
Member

Choose a reason for hiding this comment

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

This is related to the rounding done for the statistical values.
dc40c69 reduced the accuracy from 1e-10 to 1e-6. Basically, the formula written there is not true for rounded values. I don't know why it is importand for fairmode.

I am not sure what the test here tries to achieve? It compares two different calculations for rms (beta_mqi = rms/rmsu), but the second one with rounded values?

…a type long evaluation that does not span across 2 different years
@charlienegri charlienegri marked this pull request as ready for review August 30, 2024 08:05
@charlienegri
Copy link
Collaborator Author

tested it with a "long" mos run

Copy link
Member

@heikoklein heikoklein left a comment

Choose a reason for hiding this comment

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

Looks good, just some cleanup.

@@ -19,6 +19,7 @@

class EvalType(str, Enum):
LONG = "long"
LONG2 = "long2"
Copy link
Member

Choose a reason for hiding this comment

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

remove LONG2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks I had forgotten this

@heikoklein heikoklein merged commit 48a93f8 into main-dev Aug 30, 2024
8 checks passed
@heikoklein heikoklein deleted the tweak_cli_cams283 branch August 30, 2024 12:50
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