[Crop and Soil][Manure] Set daily spread manure type from user input - #3207
Open
matthew7838 wants to merge 5 commits into
Open
[Crop and Soil][Manure] Set daily spread manure type from user input#3207matthew7838 wants to merge 5 commits into
matthew7838 wants to merge 5 commits into
Conversation
github-actions
Bot
force-pushed
the
input-dailyspread-type
branch
from
August 14, 2026 05:19
cfe10f6 to
c5d5883
Compare
github-actions
Bot
force-pushed
the
input-dailyspread-type
branch
from
August 14, 2026 05:19
c5d5883 to
40672d2
Compare
Contributor
|
Current Coverage: 99% Mypy errors on input-dailyspread-type branch: 1135 |
Contributor
|
@matthew7838 This looks good to me, but in testing this, I noticed that the manure type value for each manure request result is not actually outputted to output manager. It would be helpful for users to be able to see manure type directly in the outputs. I checked with Clay and Kristan on this, and we agreed that the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes daily spread manure applications use the
manure_typeset by the user in the manure schedule'sdaily_spreadblock, instead of always treating daily spread manure as solid.Context
Issue(s) closed by this pull request: closes #3204
What
DailySpreadfromSTORAGE_CLASS_TO_TYPEinmanure_manager.py, since daily spread manure has no manure type of its own.ManureManager._effective_storage_manure_type(), which returns the requested type forDailySpreadstorages and the class-mapped type for all others._aggregate_storage_nutrients()and_remove_nutrients_from_storage(), the two places that filter storages by manure type.Why
The user input existed and reached the nutrient request, but the manure manager compared it against a hard-coded solid type for
DailySpread. A"liquid"daily spread request matched no storage, so the request was fulfilled with nothing and the run finished normally with no manure applied. Manure type also changes crop and soil outcomes: only liquid manure adds manure water to the field.How
Manure type is now taken from the request, which carries the user input, rather than from the storage class. Solid behavior is unchanged.
Test plan
test_handle_nutrient_request_for_storages_pools_daily_spreadandtest_remove_nutrients_from_storage_daily_spreadover both manure types, and addedtest_effective_storage_manure_type. The new liquid cases fail ondevand pass here.dailyspreadprocessor and a 5 kg N/day daily spread target. Both finished with 0 errors and fulfilled 364 of 365 daily requests per field (1820 kg N, ~403 t manure). Before this change the liquid run applied nothing. The liquid run added ~3.3 mm of manure water per field over the year; the solid run added none, as expected.Input Changes
daily_spread.manure_typealready exists and already acceptsliquidorsolid; it is now actually used.Output Changes
Filter