res_control Subroutine

subroutine res_control(jres)

Uses

added nbs

set incoming flow zero outgoing flow, sediment and nutrients zero outgoing constituents

adjust precip and temperature for elevation using lapse rates set water body pointer to res add incoming flow to reservoir Store values in daily inflow array for the month and reset if month has ended Append inflow of current day Append irrigaton demand of current day Get mean and store in reservoir's memory if end of month perform reservoir water/sediment balance determine reservoir outflow Retrospective information -> Inflow and irrigation demand memory of the reservoir

new lag to smooth condition jumps (volume or month conditions) lag outflow when flows are receding Osvaldo calculate water balance for day add precip to reservoir storage subtract outflow from reservoir storage subtract evaporation from reservoir storage subtract seepage from reservoir storage update surface area subtract sediment leaving from reservoir

perform reservoir nutrient balance perform reservoir pesticide transformations perform reservoir salt process (rtb salt) perform reservoir constituent process (rtb cs) set values for outflow variables total incoming to output to SWIFT total outgoing to output to SWIFT set inflow and outflow variables for reservoir_output reservoir has not been constructed yet if called from water allocation, set flag to indicate reservoir has been processed for the day

Arguments

Type IntentOptional Attributes Name
integer :: jres

Calls

proc~~res_control~~CallsGraph proc~res_control res_control cli_lapse cli_lapse proc~res_control->cli_lapse conditions conditions proc~res_control->conditions gwflow_reservoir gwflow_reservoir proc~res_control->gwflow_reservoir res_cs res_cs proc~res_control->res_cs res_hydro res_hydro proc~res_control->res_hydro res_nutrient res_nutrient proc~res_control->res_nutrient res_pest res_pest proc~res_control->res_pest res_rel_conds res_rel_conds proc~res_control->res_rel_conds res_salt res_salt proc~res_control->res_salt res_sediment res_sediment proc~res_control->res_sediment