Is your feature request related to a problem? Please describe.
The daily_spread manure configuration added in #2623 can be set up in ways that pass
input validation but silently apply no manure, which is hard to diagnose. The schema
validates each field in isolation and can't catch cross-file or conditional
inconsistencies. Misconfigurations seen during review:
- A field has
daily_spread.is_daily_spreading: true, but the manure processor
configuration contains no DailySpread storage, so daily-spread requests pull from a
non-existent pool and nothing is ever applied.
spread_all_available_manure: true while is_daily_spreading: false — is_daily_spreading
is the master switch, so daily spreading is silently off and spread_all has no effect,
despite the user clearly intending to daily spread.
is_daily_spreading: true with spread_all_available_manure: false but both
nitrogen_spread_amount and phosphorus_spread_amount are 0 — the daily-spread event is
created and then immediately discarded, so daily spreading is effectively off despite
being "on."
Describe the solution you'd like
Add cross-validation rule(s) under input/metadata/cross_validation/ for daily spread:
- (Cross-file) If any manure schedule has
daily_spread.is_daily_spreading: true, the manure
processor config (manure_management.storage) must contain at least one entry with
processor_type: "DailySpread".
spread_all_available_manure: true requires is_daily_spreading: true (equivalently, if
is_daily_spreading is false then spread_all_available_manure must be false).
- If
is_daily_spreading: true and spread_all_available_manure: false, then at least one of
nitrogen_spread_amount / phosphorus_spread_amount must be > 0.
daily_spread.manure_type must be "solid" (or must match the type of an available
DailySpread storage).
Is your feature request related to a problem? Please describe.
The
daily_spreadmanure configuration added in #2623 can be set up in ways that passinput validation but silently apply no manure, which is hard to diagnose. The schema
validates each field in isolation and can't catch cross-file or conditional
inconsistencies. Misconfigurations seen during review:
daily_spread.is_daily_spreading: true, but the manure processorconfiguration contains no DailySpread storage, so daily-spread requests pull from a
non-existent pool and nothing is ever applied.
spread_all_available_manure: truewhileis_daily_spreading: false—is_daily_spreadingis the master switch, so daily spreading is silently off and
spread_allhas no effect,despite the user clearly intending to daily spread.
is_daily_spreading: truewithspread_all_available_manure: falsebut bothnitrogen_spread_amountandphosphorus_spread_amountare 0 — the daily-spread event iscreated and then immediately discarded, so daily spreading is effectively off despite
being "on."
Describe the solution you'd like
Add cross-validation rule(s) under
input/metadata/cross_validation/for daily spread:daily_spread.is_daily_spreading: true, the manureprocessor config (
manure_management.storage) must contain at least one entry withprocessor_type: "DailySpread".spread_all_available_manure: truerequiresis_daily_spreading: true(equivalently, ifis_daily_spreadingis false thenspread_all_available_manuremust be false).is_daily_spreading: trueandspread_all_available_manure: false, then at least one ofnitrogen_spread_amount/phosphorus_spread_amountmust be > 0.daily_spread.manure_typemust be"solid"(or must match the type of an availableDailySpread storage).