pest_apply Subroutine

subroutine pest_apply(jj, ipest, pest_kg, pestop)

Uses

  • proc~~pest_apply~~UsesGraph proc~pest_apply pest_apply module~basin_module basin_module proc~pest_apply->module~basin_module module~constituent_mass_module constituent_mass_module proc~pest_apply->module~constituent_mass_module module~mgt_operations_module mgt_operations_module proc~pest_apply->module~mgt_operations_module module~output_ls_pesticide_module output_ls_pesticide_module proc~pest_apply->module~output_ls_pesticide_module module~plant_module plant_module proc~pest_apply->module~plant_module module~soil_module soil_module proc~pest_apply->module~soil_module module~carbon_module carbon_module module~soil_module->module~carbon_module

~ ~ ~ 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

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: jj
integer, intent(in) :: ipest
real, intent(in) :: pest_kg
integer, intent(in) :: pestop