~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the root uptake of pesticide from the soil into the plant, following the transpiration stream.
~ ~ ~ FLAGS ~ ~ ~ pest_uptake_lamshoeft (module param) : .true. = use exact Lamshoeft PUF log-ratio formulation .false. = use original linear TSCF * C * V (default) pest_uptake_skip_ly1 (module param) : .true. = skip the 10mm surface layer in root uptake .false. = include all layers including layer 1 (default) pestdb()%harvest_sink (per-pesticide) : 1 = plant is a 100% sink; uptaken pesticide is permanently lost from the system (SWAT-equiv, default) 0 = pesticide in plant is returned to soil on harvest/kill pestdb()%resistance_n (per-pesticide) : 0.0 = use actual soil water for concentration (default) 1.0 = use field capacity for concentration 0-1 = linear blend: st_eff = st + n * max(0, fc - st)
skip the 10mm surface layer if flag is set (layer 1 is dominated by evaporation, not transpiration, and has artificially high concentrations) guard: only compute uptake if there is pesticide and water in the layer compute sorption capacity of the layer (kd * bd * thick) kd = Koc * foc; units: (mL/g)*(g/g) = mL/g = L/kg = m3/Mg sorb_cap = kd [m3/Mg] * bd [Mg/m3] * thick [mm] = [mm] resistance blending: st_eff = st + n * max(0, fc - st) n=0 -> actual st (default); n=1 -> field capacity
Lamshoeft exact PUF formulation (log-ratio) m_end = m_start * ((st_after + S) / (st_before + S))^TSCF pest_up = m_start * [1 - ((st_after+S)/(st_before+S))^TSCF]
Note: pl_waterup has already reduced st, so current st = st_after. st_before = st + uptake(ly)
Original linear formulation with sorption correction C_dissolved = pest_mass / (st_before + sorb_cap) pest_up = TSCF * uptake * C_dissolved
st_before = current st_eff + uptake (add back the extracted water) cap: cannot remove more than available remove from soil, add to plant internal pool and daily accumulator pest enters the plant pool and will be returned to soil on harvest/kill sink behavior by design: do not store in pl_in; treat uptake as terminal at uptake step and track it through pl_uptake output. always track the daily uptake for output purposes