~ ~ ~ PURPOSE ~ ~ ~ this subroutine applies pesticide
BUG FIX: Recompute lai_sum from current per-plant LAI values. pcom%lai_sum is set by pl_community (hru_control line 376), which runs AFTER pest_apply (called via actions/mgt_operatn at lines 160/275). Management operations (plant, grow_init, kill, harvest) in the same daily loop can change individual plg%lai without updating lai_sum, making sum(plg%lai / lai_sum) != 1. This caused foliage to receive different mass than apply_f records. calculate ground cover using fresh lai_sum update pesticide levels on ground and foliage BUG FIX: use += instead of = to correctly accumulate when multiple application events (DTL + scheduled) target the same pesticide on the same HRU on the same day
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | jj | |||
| integer, | intent(in) | :: | ipest | |||
| real, | intent(in) | :: | pest_kg | |||
| integer, | intent(in) | :: | pestop |