Skip to content

Commit

Permalink
Merge pull request #1329 from metno/tweak_cli_cams283
Browse files Browse the repository at this point in the history
add evaluation type for cams283, tweak rtol fairmode
  • Loading branch information
heikoklein authored Aug 30, 2024
2 parents b4704be + 6ddfcf8 commit 48a93f8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyaerocom/aeroval/fairmode_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
), "failed MQI check"

fairmode = dict(
Expand Down
5 changes: 3 additions & 2 deletions pyaerocom/scripts/cams2_83/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def freqs_config(self) -> dict:
main_freq="daily",
forecast_evaluation=True,
)

if self == "season":
return dict(
freqs=["hourly", "daily"],
Expand Down Expand Up @@ -71,7 +71,8 @@ def freqs_config(self) -> dict:

def periods(self, start_date: date, end_date: date) -> list[str]:
if self == "long":
return make_period_ys(start_date, end_date)
if (start_date.year != end_date.year):
return make_period_ys(start_date, end_date)
return make_period(start_date, end_date)


Expand Down
7 changes: 7 additions & 0 deletions tests/cams2_83/test_cams2_83_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
["2021-2024", "2021", "2022", "2023", "2024"],
id="long",
),
pytest.param(
"long",
datetime(2024, 3, 1),
datetime(2024, 8, 31),
["20240301-20240831"],
id="long",
),
pytest.param(
"week",
datetime(2023, 12, 28),
Expand Down

0 comments on commit 48a93f8

Please sign in to comment.