calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
277 stars 89 forks source link

Test different time resolutions #544

Closed brynpickering closed 5 months ago

brynpickering commented 5 months ago

Fixes #354

Or, rather, it confirms my expectation that #354 is now fixed.

The model is agnostic of the timestep resolutions of the input data. It will just have NaNs where timesteps don't match. Resampling then squashes all those NaNs out, so long as the resampling frequency is <= any of the input resolutions.

Reviewer checklist:

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e2bfb1a) 95.66% compared to head (519658a) 95.70%. Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #544 +/- ## ========================================== + Coverage 95.66% 95.70% +0.04% ========================================== Files 24 24 Lines 3526 3562 +36 Branches 765 710 -55 ========================================== + Hits 3373 3409 +36 Misses 87 87 Partials 66 66 ``` | [Files](https://app.codecov.io/gh/calliope-project/calliope/pull/544?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project) | Coverage Δ | | |---|---|---| | [src/calliope/backend/backend\_model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/544?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2JhY2tlbmQvYmFja2VuZF9tb2RlbC5weQ==) | `97.84% <100.00%> (+0.10%)` | :arrow_up: | | [src/calliope/backend/pyomo\_backend\_model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/544?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2JhY2tlbmQvcHlvbW9fYmFja2VuZF9tb2RlbC5weQ==) | `94.94% <100.00%> (+0.35%)` | :arrow_up: | | [src/calliope/cli.py](https://app.codecov.io/gh/calliope-project/calliope/pull/544?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2NsaS5weQ==) | `81.67% <100.00%> (ø)` | | | [src/calliope/examples.py](https://app.codecov.io/gh/calliope-project/calliope/pull/544?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2V4YW1wbGVzLnB5) | `100.00% <100.00%> (ø)` | | | [src/calliope/model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/544?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL21vZGVsLnB5) | `93.65% <ø> (ø)` | | | [src/calliope/preprocess/model\_data.py](https://app.codecov.io/gh/calliope-project/calliope/pull/544?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL3ByZXByb2Nlc3MvbW9kZWxfZGF0YS5weQ==) | `100.00% <ø> (ø)` | | | [src/calliope/util/logging.py](https://app.codecov.io/gh/calliope-project/calliope/pull/544?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL3V0aWwvbG9nZ2luZy5weQ==) | `93.87% <ø> (ø)` | |