time_control Subroutine

subroutine time_control()

Uses

~ ~ ~ PURPOSE ~ ~ ~
this subroutine contains the loops governing the modeling of processes
in the watershed

~ ~ ~ INCOMING VARIABLES ~ ~ ~
name        |units         |definition
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
biomix(:)   |none          |biological mixing efficiency.
                           |Mixing of soil due to activity of earthworms
                           |and other soil biota. Mixing is performed at
                           |the end of every calendar year.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

~ ~ ~ OUTGOING VARIABLES ~ ~ ~
name        |units         |definition
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

~ ~ ~ LOCAL DEFINITIONS ~ ~ ~
name        |units         |definition
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
ic          |none          |counter
iix         |none          |sequence number of current year in rotation
iiz         |none          |sequence number of current crop grown
                           |within the current year
xx          |none          |current year in simulation sequence
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

~ ~ ~ SUBROUTINES/FUNCTIONS CALLED ~ ~ ~
Intrinsic: Mod, Real
SWAT: std3, xmon, sim_initday, clicon, command
SWAT: writed, writem, tillmix

~ ~ ~ ~ ~ ~ END SPECIFICATIONS ~ ~ ~ ~ ~ ~

generate precip for the first day - %precip_next !!! uncomment next three lines for RELEASE version only (Srin/Karim)

determine beginning and ending dates of simulation in current year set beginning day of simulation for year set ending day of simulation for year sum years of printing for average annual writes tell user they are skipping more years than simulating set initial soil water for hru, basin and lsu - for checking water balance won't reset again begin daily loop determine month and day of month - time%mo and time%day_mo Uncomment next three lines for DEBUG version only

check for end of month, year and simulation check time interval for daily printing initialize variables at beginning of day for hru's read in/generate weather

set array counter for atmospheric deposition

conditional reset of land use and management all hru fractions are set at once have to check every hru for land use change allocate water for water rights objects if a channel is not an object, call at beginning of day allocate manure to appropriate demand objects command loop

end daily loop

perform end-of-year processes

write annual basin crop yields and harvested areas zero yearly balances after using them in soft data calibration (was in hru_lte_output) zero yearly balances after using them in soft data calibration (was in sd_channel_output) zero yearly balances after using them in soft data calibration (was in hru_output) zero yearly pesticide balances after using them in soft data calibration (was in hru_output) compute biological mixing at the end of every year update sequence number for year in rotation to that of the next year and reset sequence numbers for operations update simulation year end annual loop

write channel morphology - downcutting and widening ave annual calibration output and reset time for next simulation

Arguments

None

Calls

proc~~time_control~~CallsGraph proc~time_control time_control actions actions proc~time_control->actions amin0 amin0 proc~time_control->amin0 aqu_pest_output_init aqu_pest_output_init proc~time_control->aqu_pest_output_init basin_sw_init basin_sw_init proc~time_control->basin_sw_init calsoft_ave_output calsoft_ave_output proc~time_control->calsoft_ave_output calsoft_sum_output calsoft_sum_output proc~time_control->calsoft_sum_output cli_atmodep_time_control cli_atmodep_time_control proc~time_control->cli_atmodep_time_control cli_precip_control cli_precip_control proc~time_control->cli_precip_control climate_control climate_control proc~time_control->climate_control command command proc~time_control->command conditions conditions proc~time_control->conditions float float proc~time_control->float mallo_control mallo_control proc~time_control->mallo_control mgt_newtillmix mgt_newtillmix proc~time_control->mgt_newtillmix sim_initday sim_initday proc~time_control->sim_initday wallo_control wallo_control proc~time_control->wallo_control xmon xmon proc~time_control->xmon