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

Improving how excrement and carcass decay is handled #562

Merged

Conversation

jacobcook1995
Copy link
Collaborator

Description

This PR does three things:

  1. stops excrement and carcass biomass from flowing into the litter model, as this meant that we were basically requiring it to decay twice (once in the animal model and once in the litter model) before it entered the soil.
  2. adds tracking of excrement and carcass nitrogen and phosphorus. These links are really placeholders at the moment, which should be filled out once animal model stoichiometry is implemented.
  3. adds a function to calculate the split between the "scavengable" and "decayed" pools. This was previously handled by a fixed constant split. The change I made basically does the same thing with an extra step, but (hopefully) makes the logic of what we are doing clearer

The excrement and carcass decay flows from the animal model don't actually link to anything at the moment, I'll make an issue to track this, and then fix this when I'm back working on the soil model.

Fixes #510

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works
  • Relevant documentation reviewed and updated

@jacobcook1995 jacobcook1995 linked an issue Sep 16, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.01%. Comparing base (1b9487d) to head (c8d3ecb).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #562      +/-   ##
===========================================
+ Coverage    94.95%   95.01%   +0.05%     
===========================================
  Files           74       74              
  Lines         4186     4235      +49     
===========================================
+ Hits          3975     4024      +49     
  Misses         211      211              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@TaranRallings TaranRallings 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 to me! (weeping softly at my desk)

@jacobcook1995 jacobcook1995 merged commit c711fe7 into develop Sep 17, 2024
12 checks passed
@jacobcook1995 jacobcook1995 deleted the 546-improve-how-excrement-and-carcass-decay-is-handled branch September 17, 2024 14:08
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.

Improve how excrement and carcass decay is handled Animal input into litter model should be improved
3 participants