MESMER-group / mesmer

spatially-resolved ESM-specific multi-scenario initial-condition ensemble emulator
https://mesmer-emulator.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 15 forks source link

Add tests for harmonic model #431

Closed veni-vidi-vici-dormivi closed 1 month ago

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 83.65%. Comparing base (9b0b76b) to head (c1feab9). Report is 37 commits behind head on main.

:exclamation: Current head c1feab9 differs from pull request most recent head 1387d5d. Consider uploading reports for the commit 1387d5d to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #431 +/- ## ========================================== - Coverage 87.90% 83.65% -4.26% ========================================== Files 40 44 +4 Lines 1745 1939 +194 ========================================== + Hits 1534 1622 +88 - Misses 211 317 +106 ``` | [Flag](https://app.codecov.io/gh/MESMER-group/mesmer/pull/431/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MESMER-group) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/MESMER-group/mesmer/pull/431/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MESMER-group) | `83.65% <ø> (-4.26%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MESMER-group#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

veni-vidi-vici-dormivi commented 2 months ago

Need to merge #433, #434 and #435 before this can work.

veni-vidi-vici-dormivi commented 1 month ago

Okay this looks good, now for the last hurdle: how do we want to test numerical stability? I can just hard code some expected output into it or we can save output data somewhere. The thing is that for hard coding output it is rather nasty because it is notoriously hard (impossible?) to get pretty numbers, but for saving it it is rather little data to check... To see what I mean I push an example hard coded test below.

veni-vidi-vici-dormivi commented 1 month ago

Dosen't the problem only exists for constant ?

Ah of course! We only need at least two different temperature values so that the system of equations is well defined. So I guess the easiest option would be to switch to that.

mathause commented 1 month ago

Thanks @veni-vidi-vici-dormivi!