ImperialCollegeLondon / virtual_ecosystem

This repository is the home for the codebase for the Virtual Ecosystem project.
https://virtual-ecosystem.readthedocs.io
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

532 litter model should average abiotic quantities over relevant soil layers #534

Closed jacobcook1995 closed 1 month ago

jacobcook1995 commented 1 month ago

Description

This pull request makes use of the new and improved LayerStructure object to average temperature and matric potential over the microbially active depth, rather than just taking the value from the topsoil layer. This has been done for just the litter model as that's the one I'm currently working on (but soil should follow a similar process when I get round to it see #533).

This PR is generally pretty straightforward, the only slight weirdness being the testing. Basically the layer structure fixture has a really deep first soil layer, so it doesn't actually matter whether you average or just take the top layer as you get the exact same result. So I had to overwrite the fixture in some of the tests so that they actually test a case with averaging.

Fixes #532

Type of change

Key checklist

Further checks

codecov-commenter commented 1 month ago

Codecov Report

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

Project coverage is 94.96%. Comparing base (3fcb8a7) to head (7a17d21).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #534 +/- ## =========================================== + Coverage 94.93% 94.96% +0.02% =========================================== Files 73 73 Lines 4048 4071 +23 =========================================== + Hits 3843 3866 +23 Misses 205 205 ```

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