Procedure | Location | Procedure Type | Description |
---|---|---|---|
actions | actions.f90 | Subroutine | if unlimited source, set irrigation applied directly to hru set demand for irrigation from channel, reservoir or aquifer check number of applications per year check for generic plant-harv and set crops check to see if the crop is already growing don't plant if the crop is already growing check for generic plant-harv and set crops sum yield and num. of harvest to calc ave yields sum basin crop yields and area harvested sum regional crop yields for soft calibration check for generic plant-harv and set crops sum yield and number of harvests to calc ave yields sum basin crop yields and area harvested sum regional crop yields for soft calibration grazing operation set drain depth for drainage water management flow diversion demand to m3 minimum flow rate (m3/s) below min - all flow to downstream channel (first outflow hydrograph in connect file) above min flow all flow diverted minimum - constant fraction demand is to fill to principal spillway set flow fractions in con file |
activity_coefficient | salt_chem_hru.f90 | Subroutine | |
albedo | albedo.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates albedo in the HRU for the day |
allocate_parms | allocate_parms.f90 | Subroutine | added for jaehak vars
drains
arrays for plant communities
septic changes added 1/28/09 gsm
added per JGA for Srini by gsm 9/8/2011
arrays for mangement output (output.mgt) |
aqu2d_init | aqu2d_init.f90 | Subroutine | set channel drainage areas order channels by drainage area - set linked list set the sorted object- aq_ch save total channel length in aquifer compute length of channel left when current channel dries up |
aqu2d_read | aqu2d_read.f90 | Subroutine | read data for aquifer elements for 2-D groundwater model |
aqu_1d_control | aqu_1d_control.f90 | Subroutine | lag recharge from bottom of soil to water table ** disabled |
aqu_add | aquifer_module | Function | |
aqu_cs_output | aqu_cs_output.f90 | Subroutine | |
aqu_div | aquifer_module | Function | |
aqu_hyds | aqu_hyds.f90 | Subroutine | nothing from nothing leaves nothing |
aqu_initial | aqu_initial.f90 | Subroutine | allocate constituents initialize parameters convert ppm -> kg (m3=10mmha) kg=m3*ppm/1000 |
aqu_mult | aquifer_module | Function | |
aqu_pest_output_init | aqu_pest_output_init.f90 | Subroutine | zero initial basin pesticides (for printing) set inital aquifer pesticides (for printing) sum initial basin pesticides (for printing) |
aqu_pesticide_output | aqu_pesticide_output.f90 | Subroutine | print balance for each pesticide daily print pesticide balance check end of month monthly print reset pesticide at start of next time step check end of year yearly print reset pesticide at start of next time step average annual print |
aqu_read | aqu_read.f90 | Subroutine | read shallow aquifer property data from aquifer.aqu read from the aquifer database file named aquifer.aqu |
aqu_read_elements | aqu_read_elements.f90 | Subroutine | allocate aquifer outputs for writing all hrus are in region setting up regions for aquifer soft cal and/or output by type all hrus are in region if no regions are input, don"t need elements read data for each element in all landscape cataloging units |
aqu_read_init | aqu_read_init.f90 | Subroutine | initialize organics and constituents for each aquifer object initial organic mineral initializing organics in aqu_initial - do it here later |
aqu_read_init_cs | aqu_read_init_cs.f90 | Subroutine | initialize organics and constituents for each aquifer object initial pesticides initialize pesticides in aquifer water and benthic from input data kg/ha = mg/kg (ppm) * t/m3 * m * 10000.m2/ha * 1000kg/t * kg/1000000 mg assume bulk density of 2.0 t/m3 initial pathogens initialize pathogens in aquifer water and benthic from input data initial salts !rtb salt initial constituents !rtb cs |
aqu_salt_output | aqu_salt_output.f90 | Subroutine | |
aquifer_output | aquifer_output.f90 | Subroutine | sum monthly variables |
aqupest_add | aqu_pesticide_module | Function | |
aqupest_add_all | aqu_pesticide_module | Function | |
aqupest_ave | aqu_pesticide_module | Function | |
aqupest_div | aqu_pesticide_module | Function | |
ascrv | ascrv.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes shape parameters x5 and x6 for the S curve equation x = y/(y + exp(x5 + x6*y)) given 2 (x,y) points along the curve. x5 is determined by solving the equation with x and y values measured around the midpoint of the curve (approx. 50% of the maximum value for x) and x6 is determined by solving the equation with x and y values measured close to one of the endpoints of the curve (100% of the maximum value for x) This subroutine is called from readbsn.f and readcrop.f |
atri | atri.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ this function generates a random number from a triangular distribution given X axis points at start, end, and peak Y value |
aunif | aunif.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ This function generates random numbers ranging from 0.0 to 1.0. In the process of calculating the random number, the seed (x1) is set to a new value. This function implements the prime-modulus generator xi = 16807 xi Mod(2**(31) - 1) using code which ensures that no intermediate result uses more than 31 bits the theory behind the code is summarized in Bratley, P., B.L. Fox and L.E. Schrage. 1983. A Guide to Simulation. Springer-Verlag, New York. (pages 199-202) |
basin_aqu_pest_output | basin_aqu_pest_output.f90 | Subroutine | print balance for each pesticide reset pesticide at start of next time step daily print pesticide balance zero daily output |
basin_aquifer_output | basin_aquifer_output.f90 | Subroutine | daily print - AQUIFER
monthly print - AQUIFER
yearly print - AQUIFER
zero yearly variables |
basin_ch_pest_output | basin_ch_pest_output.f90 | Subroutine | print balance for each pesticide |
basin_chanbud_output | basin_chanbud_output.f90 | Subroutine | sum all channel output !!! daily print !!! monthly print !!! yearly print !!! average annual print |
basin_chanmorph_output | basin_chanmorph_output.f90 | Subroutine | sum all channel output !!! daily print !!! monthly print !!! yearly print !!! average annual print |
basin_channel_output | basin_channel_output.f90 | Subroutine | sum all channel output daily print monthly print yearly print average annual print |
basin_ls_pest_output | basin_ls_pest_output.f90 | Subroutine | print balance for each pesticide daily print pesticide balance zero daily output |
basin_output | basin_output.f90 | Subroutine | sum monthly variables !!! daily print - BASIN waterbal waterbal nutrient bal nutrient bal losses losses plant weather plant weather !!! monthly print - BASIN !!! yearly print - BASIN !!! zero yearly variables !!! average annual print - BASIN |
basin_print_codes_read | basin_print_codes_read.f90 | Subroutine | read time codes read database output read other output read objects output basin region lsu hru hru-lte channel channel-lte aquifer reservoir recall hydin and hydout routing units all pesticide outputs salt outputs !rtb salt constituent outputs !rtb cs |
basin_prm_default | basin_prm_default.f90 | Subroutine | leaf area index at which no evap occurs
intial soil water cont expressed as a fraction of fc
surface runoff lag time (days)
peak rate adjustment factor in the subbasin
peak rate adjustment factor for sediment routing in the channel
rate factor for mineralization on active org N
nitrogen uptake dist parm
phosphorus uptake dist parm
nitrate perc coeff (0-1)
0 = conc of nitrate in surface runoff is zero !! 1 = perc has same conc of nitrate as surf runoff
phos perc coeff (0-1)
0 = conc of sol P in surf runoff is zero !! 1 = percolate has some conc of sol P as surf runoff |
basin_read_cc | basin_read_cc.f90 | Subroutine | read basin |
basin_read_objs | basin_read_objs.f90 | Subroutine | read number of spatial objects from obj_connect.dat |
basin_read_prm | basin_read_prm.f90 | Subroutine | read basin parameters |
basin_recall_output | basin_recall_output.f90 | Subroutine | sum monthly variables
daily print - BASIN RECALL
monthly print - BASIN RECALL
yearly print - BASIN RECALL
zero yearly variables |
basin_res_pest_output | basin_res_pest_output.f90 | Subroutine | print balance for each pesticide daily print pesticide balance zero daily output |
basin_reservoir_output | basin_reservoir_output.f90 | Subroutine | sum all reservoirs to get basin totals
sum monthly variables
daily print - RESERVOIR
monthly print - RESERVOIR
yearly print - RESERVOIR
zero yearly variables |
basin_sdchannel_output | basin_sdchannel_output.f90 | Subroutine | sum all channel output daily print monthly print // only divides area (daily average values) |
basin_sw_init | basin_sw_init.f90 | Subroutine | |
CaCO3 | salt_chem_hru.f90 | Subroutine | |
cal_allo_init | cal_allo_init.f90 | Subroutine | initialize all hru parameters initialize hru_lte parameters initialize channel lte storage and dimensions initialize reservoir storage initialize aquifer storage |
cal_cond_read | cal_cond_read.f90 | Subroutine | read decision tables used for land use scenarios - xwalk with scen_lu.dtl crosswalk parameters with calibration parameter db |
cal_conditions | cal_conditions.f90 | Subroutine | check layers for soil variables check storage zones and flood season |
cal_parm_read | cal_parm_read.f90 | Subroutine | read parameter change values for calibration |
cal_parm_select | cal_parm_select.f90 | Subroutine | HRU |
cal_parmchg_read | cal_parmchg_read.f90 | Subroutine | read parameter change values for calibration crosswalk name with calibration parameter db allocate and read the conditions if no objects are specified - check all of them |
calhard_control | calhard_control.f90 | Subroutine | re-initialize all objects rerun model |
calsoft_ave_output | calsoft_ave_output.f90 | Subroutine | convert back to mm, t/ha, kg/ha convert back to mm, t/ha, kg/ha average output for soft data calibration calibrate plnt growth - yield and area summed when harvest (mgt_sched and actions) convert back to mm, t/ha, kg/ha zero all calibration parameters average channel output for soft data calibration soft data for w and d in m/year per m of channel w and d |
calsoft_control | calsoft_control.f90 | Subroutine | channel sediment parms
write output to hydrology-cal.hyd |
calsoft_hyd | calsoft_hyd.f90 | Subroutine | re-initialize all objects re-initialize all objects re-initialize all objects re-initialize all objects don't change for tile Mike re-initialize all objects don't change for tile ***Mike re-initialize all objects re-initialize all objects re-initialize all objects don't change for tile ***Mike re-initialize all objects don't change for tile ***Mike re-initialize all objects don't change for tile Mike re-initialize all objects don't change for tile ***Mike re-initialize all objects |
calsoft_hyd_bfr | calsoft_hyd_bfr.f90 | Subroutine | |
calsoft_hyd_bfr_et | calsoft_hyd_bfr_et.f90 | Subroutine | re-initialize all objects re-initialize all objects re-initialize all objects |
calsoft_hyd_bfr_latq | calsoft_hyd_bfr_latq.f90 | Subroutine | re-initialize all objects re-initialize all objects |
calsoft_hyd_bfr_perc | calsoft_hyd_bfr_perc.f90 | Subroutine | don't change for tile ***Mike re-initialize all objects don't change for tile ***Mike re-initialize all objects |
calsoft_hyd_bfr_pet | calsoft_hyd_bfr_pet.f90 | Subroutine | re-initialize all objects |
calsoft_hyd_bfr_surq | calsoft_hyd_bfr_surq.f90 | Subroutine | don't change for tile Mike re-initialize all objects don't change for tile ******Mike re-initialize all objects |
calsoft_plant | calsoft_plant.f90 | Subroutine | if yields are greater than 20% low use actual value for epco and not change in value like other parms assume starting at 1.0 - don't see large change until 0.25 so linear decrease from 0.25 set upper and lower limits for following iterations re-initialize all objects re-initialize all objects re-initialize all objects re-initialize all objects re-initialize all objects re-initialize all objects re-initialize all objects |
calsoft_plant_zero | calsoft_plant_zero.f90 | Subroutine | |
calsoft_read_codes | calsoft_read_codes.f90 | Subroutine | |
calsoft_sed | calsoft_sed.f90 | Subroutine | re-initialize all objects re-initialize all objects re-initialize all objects re-initialize all objects |
calsoft_sum_output | calsoft_sum_output.f90 | Subroutine | zero all calibration parameters convert back to mm, t/ha, kg/ha zero all calibration parameters convert back to mm, t/ha, kg/ha sum landscape output for plant soft data calibration |
caltsoft_hyd | caltsoft_hyd.f90 | Subroutine | calculate shape parameters calculate shape parameters calculate shape parameters calculate shape parameters |
caps | caps.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads the input and output names and converts all capital letters to lowercase letters. |
carbon_plant_gl__add | carbon_module | Function | |
carbon_plant_gl_div | carbon_module | Function | |
carbon_plant_gl_mult | carbon_module | Function | |
carbon_read | carbon_read.f90 | Subroutine | |
carbon_residue_gl__add | carbon_module | Function | |
carbon_residue_gl_div | carbon_module | Function | |
carbon_residue_gl_mult | carbon_module | Function | |
carbon_soil_flux__add | carbon_module | Function | |
carbon_soil_flux_div | carbon_module | Function | |
carbon_soil_flux_mult | carbon_module | Function | |
carbon_soil_gl__add | carbon_module | Function | |
carbon_soil_gl_div | carbon_module | Function | |
carbon_soil_gl_mult | carbon_module | Function | |
CaSO4 | salt_chem_hru.f90 | Subroutine | |
cationexchange | salt_chem_hru.f90 | Subroutine | |
cbn_zhang2 | cbn_zhang2.f90 | Subroutine | transput variables; std(:) : standing dead (kg ha-1) (not used) stdl(:) : mass of lignin in standing dead (kg ha-1) (not used) stdn(:) : mass of n in standing dead (dead plants + sorbed from soil; kg ha-1) (not used) stdnel(:) : standing dead n after enrichment with sorbed n in a soil layer (kg ha-1) |
ccu_output | ccu_output.f90 | Subroutine | |
ch_add | channel_module | Function | |
ch_cs_output | ch_cs_output.f90 | Subroutine | ! nbs |
ch_div | channel_module | Function | |
ch_initial | ch_initial.f90 | Subroutine | Units conversion Micrometer to Millimeters Channel sediment particle size distribution Clayey bank Silty bank Sandy bank Gravel bank Channel sediment particle size distribution Clayey bed Units conversion Micrometer to Millimeters Silty bed Sandy bed Gravel bed An estimate of Critical shear stress if it is not given (N/m^2) Critical shear stress based on silt and clay % Critical Shear Stress based on Julian and Torres (2005) Units of critical shear stress (N/m^2) |
ch_mult | channel_module | Function | |
ch_pathogen_output | ch_pathogen_output.f90 | Subroutine | print balance for each pathicide daily print (channel_path_day.txt/csv no opening for file) pathicide balance check end of month monthly print (channel_path_mon.txt/csv no opening for file) check end of year yearly print (channel_path_yr.txt/csv no opening for file) !!! average annual print (channel_path_aa.txt/csv no opening for file) ** tu Wunused-label: 101 format (4i6,2i8,2x,a,20f12.3) ** tu Wunused-label: 102 format (4i6,2i8,2x,a,20f12.3) ** tu Wunused-label: 103 format (2i6,i8,4x,a,5x,f12.3) ** tu Wunused-label: 104 format (4i6,2i8,2x,a,27f18.3) |
ch_rchinit | ch_rchinit.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine initializes variables for the daily simulation of the channel routing command loop |
ch_read | ch_read.f90 | Subroutine | |
ch_read_elements | ch_read_elements.f90 | Subroutine | allocate channel outputs for regions all hrus are in region setting up regions for channel soft cal and/or output by order all channels are in region if no regions are input, don"t need elements read data for each element in all landscape cataloging units |
ch_read_hyd | ch_read_hyd.f90 | Subroutine | |
ch_read_init | ch_read_init.f90 | Subroutine | |
ch_read_init_cs | ch_read_init_cs.f90 | Subroutine | |
ch_read_nut | ch_read_nut.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads data from the lake water quality input file (.lwq). This file contains data related to initial pesticide and nutrient levels in the lake/reservoir and transformation processes occuring within the lake/reservoir. Data in the lake water quality input file is assumed to apply to all reservoirs in the watershed. |
ch_read_orders_cal | ch_read_orders_cal.f90 | Subroutine | save the object number of each defining unit all channels are in region read channel soft calibration data for each land use sum total channel length for |
ch_read_parms_cal | ch_read_parms_cal.f90 | Subroutine | |
ch_read_sed | ch_read_sed.f90 | Subroutine | Critical shear stress (N.m^2) Critical shear stress (N.m^2) |
ch_read_temp | ch_read_temp.f90 | Subroutine | |
ch_rtday | ch_rtday.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine routes the daily flow through the reach using a variable storage coefficient |
ch_rthr | ch_rthr.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~
This subroutine routes flow at any required time step through the reach
using a constant storage coefficient |
ch_rtpath | ch_rtpath.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine routes bacteria through the stream network |
ch_rtpest | ch_rtpest.f90 | Subroutine | initialize depth of water for pesticide calculations volume of water entering reach and stored in reach pesticide transported into reach during day calculate mass of pesticide in reach calculate mass of pesticide in bed sediment in-stream processes calculate sediment concentration set kd calculate fraction of soluble and sorbed pesticide ASSUME DENSITY=2.6E6; KD2=KD1 calculate flow duration calculate amount of pesticide that undergoes chemical or biological degradation on day in reach add decay to daughter pesticides calculate amount of pesticide that volatilizes from reach calculate amount of pesticide removed from reach by settling calculate resuspension of pesticide in reach calculate diffusion of pesticide between reach and sediment calculate removal of pesticide from active sediment layer by burial verify that water concentration is at or below solubility insignificant flow benthic processes calculate loss of pesticide from bed sediments by reaction add decay to daughter pesticides set new pesticide mass of (in + store) after processes calculate outflow and storage in water column |
ch_salt_output | ch_salt_output.f90 | Subroutine | ! nbs |
ch_temp1 | ch_temp.f90 | Subroutine | It should be contratined to tdx < t_air These coefficients might vary. See Figure 2.4.1 in Edinger et al. 1974 Solar radiation (Short wave radiation). The shade-factor is included in the Solar radiation calculation Add code for shade factor jga Get the Solar radiation (Short wave radiation) |
ch_ttcoef | ch_ttcoef.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes travel time coefficients for routing along the main channel |
ch_watqual4 | ch_watqual4.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine performs in-stream nutrient transformations and water quality calculations |
cha_pesticide_output | cha_pesticide_output.f90 | Subroutine | ! nbs |
channel_allo | channel_allo.f90 | Subroutine | |
channel_control | channel_control.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine simulates channel routing |
channel_om_output | channel_om_output.f90 | Subroutine | !!! daily print (channel_om_day.txt/csv no opening for files) !!! monthly print (channel_om_mon.txt/csv no opening for file) !!! yearly print (channel_om_yr.txt/csv no opening for file) !!! average annual print (channel_om_aa.txt/csv no opening for file) |
channel_output | channel_output.f90 | Subroutine | !! subdaily print |
channel_surf_link | channel_surf_link.f90 | Subroutine | loop again to get fractions |
chg_par | chg_par.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ this function computes new paramter value based on user defined change |
chpath_add | ch_pathogen_module | Function | |
chpath_div | ch_pathogen_module | Function | |
chpath_mult | ch_pathogen_module | Function | |
chpest_add | ch_pesticide_module | Function | |
chpest_ave | ch_pesticide_module | Function | |
chpest_div | ch_pesticide_module | Function | |
chrc_interp | sd_channel_module | Subroutine | |
chrc_mult | sd_channel_module | Function | |
chsd_add | sd_channel_module | Function | |
chsd_ave | sd_channel_module | Function | |
chsd_div | sd_channel_module | Function | |
chsd_mult | sd_channel_module | Function | |
chsednut_add | sd_channel_module | Function | |
chsednut_div | sd_channel_module | Function | |
cli_atmodep_time_control | cli_atmodep_time_control.f90 | Subroutine | |
cli_bounds_check | cli_bounds_check.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine checks to see if climate data is in current simulation day |
cli_clgen | cli_clgen.f90 | Subroutine | Calculate Daylength calculate solar declination: equation 2.1.2 in SWAT manual 365/2pi = 58.09 |
cli_dstn1 | cli_dstn1.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ this function computes the distance from the mean of a normal distribution with mean = 0 and standard deviation = 1, given two random numbers |
cli_hmeas | cli_hmeas.f90 | Subroutine | read all measured daily relative humidity data !!!weather path code !!!weather path code |
cli_initwgn | cli_initwgn.f90 | Subroutine | convert degrees to radians (2pi/360=1/57.296) calculate minimum daylength -> daylength=2acos(-tan(sd)tan(lat))/omega where solar declination, sd, = -23.5 degrees for minimum daylength in northern hemisphere and -tan(sd) = .4348 absolute value is taken of tan(lat) to convert southern hemisphere values to northern hemisphere the angular velocity of the earth's rotation, omega, = 15 deg/hr or 0.2618 rad/hr and 2/0.2618 = 7.6394 calculate day length threshold for dormancy calculate smoothed maximum 0.5hr rainfall amounts calculate missing values and additional parameters calculate total potential heat units calculate values for pr_w if missing or bad if pr_w values good, use calculated pcpd based on these values using first order Markov chain calculate precipitation-related values compute potential et with Preistley-Taylor Method idewpt=0 if dew point or 1 if relative humidity initialize arrays for precip divided by pet moving sum initialize my next element array for the linked list use average monthly precip and pet from wgn calculate initial temperature of soil layers calculate precipitation correction factor for pcp generator calculate or estimate amp_r values determine precipitation category (ireg initialized to category 1) |
cli_lapse | cli_lapse.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adjusts precip and temperature for elevation |
cli_petmeas | cli_petmeas.f90 | Subroutine | read all measured daily pet data !!!weather path code !!!weather path code |
cli_pgen | cli_pgen.f90 | Subroutine | skewed rainfall distribution precip for the next day |
cli_pgenhr | cli_pgenhr.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine distributes daily rainfall exponentially within the day |
cli_pmeas | cli_pmeas.f90 | Subroutine | read all measured daily precipitation data check to see when next year |
cli_precip_control | cli_precip_control.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine controls weather inputs to SWAT. Precipitation and temperature data is read in and the weather generator is called to fill in radiation, wind speed and relative humidity as well as missing precipitation and temperatures. Adjustments for climate changes studies are also made in this subroutine. |
cli_read_atmodep | cli_read_atmodep.f90 | Subroutine | no filename |
cli_read_atmodep_cs | cli_read_atmodep_cs.f90 | Subroutine | |
cli_read_atmodep_salt | cli_read_atmodep_salt.f90 | Subroutine | |
cli_rhgen | cli_rhgen.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine generates weather relative humidity |
cli_slrgen | cli_slrgen.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine generates solar radiation |
cli_smeas | cli_smeas.f90 | Subroutine | read all measured daily solar radiation data !!!weather path code !!!weather path code |
cli_staread | cli_staread.f90 | Subroutine | read weather stations data from weather.wst - gages and meas/gen determine max number for array (imax) and total number in file |
cli_tgen | cli_tgen.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine generates temperature data when the user chooses to simulate or when data is missing for particular days in the weather file |
cli_tmeas | cli_tmeas.f90 | Subroutine | read all measured daily temperature data !!!weather path code !!!weather path code |
cli_weatgn | cli_weatgn.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine generates weather parameters used to simulate the impact of precipitation on the other climatic processes |
cli_wgnread | cli_wgnread.f90 | Subroutine | read weather generator data from weather_generator.dat - wgn parameters determine max number for array (imax) and total number in file allocate weather variables initialize weather generator parameters read wind direction generator data from wind_direction.dat !removed 1_22_2024 |
cli_wmeas | cli_wmeas.f90 | Subroutine | read all measured daily wind data !!!weather path code !!!weather path code |
cli_wndgen | cli_wndgen.f90 | Subroutine | Generate wind speed !! Generate wind direction !! ! set to zero, no longer attempt to read in |
climate_control | climate_control.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine controls weather inputs to SWAT. Precipitation and temperature data is read in and the weather generator is called to fill in radiation, wind speed and relative humidity as well as missing precipitation and temperatures. Adjustments for climate changes studies are also made in this subroutine. |
cn2_init | cn2_init.f90 | Subroutine | set initial curve number parameters |
cn2_init_all | cn2_init_all.f90 | Subroutine | |
cntbl_read | cntbl_read.f90 | Subroutine | read all curve number data from cn.tbl |
co2_read | co2_read.f90 | Subroutine | read CO2 yearly values |
command | command.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ for every day of simulation, this subroutine steps through the command lines in the watershed configuration (.fig) file. Depending on the command code on the .fig file line, a command loop is accessed ~ ~ ~ SUBROUTINES/FUNCTIONS CALLED ~ ~ ~ SWAT: subbasin, route, routres, transfer, recmon SWAT: recepic, save, recday, recyear |
cond_integer | cond_integer.f90 | Subroutine | |
cond_integer_c | cond_integer_c.f90 | Subroutine | |
cond_real | cond_real.f90 | Subroutine | |
cond_real_c | cond_real_c.f90 | Subroutine | |
conditions | conditions.f90 | Subroutine | find average water stress of all growing plants find average water stress of all growing plants find average water stress of all growing plants use labile P concentration of upper (10 mm) layer set application day if first day of application window update cumulative probability if new day reset if first day of window check if window is over - days_prob are the number of days left in window cumulative prob of uniform distribution on current day of the window |
cons_prac_read | cons_prac_read.f90 | Subroutine | read all curve number data from cn.tbl |
constit_db_read | constit_db_read.f90 | Subroutine | |
constit_hyd_mult | constit_hyd_mult.f90 | Subroutine | |
copy_file | copy_file.f90 | Subroutine | Open the source and destination files Copy the contents of the source file to the destination file |
cs_aqu_read | cs_aqu_read.f90 | Subroutine | |
cs_balance | cs_balance.f90 | Subroutine | ** tu Wunused-label: 7001 format(20e16.8) ** tu Wunused-label: 7002 format(i8,50f16.8) |
cs_cha_read | cs_cha_read.f90 | Subroutine | |
cs_divert | cs_divert.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds cs mass to the channel, and and removes cs mass from the source object |
cs_fert | cs_fert.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds constituent fertilizer to the soil profile |
cs_fert_read | cs_fert_read.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads constituent fertilizer loading (kg/ha) for various fertilizer types |
cs_fert_wet | cs_fert_wet.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds constituent fertilizer to a wetland |
cs_hru_init | cs_hru_init.f90 | Subroutine | |
cs_hru_read | cs_hru_read.f90 | Subroutine | |
cs_irr_read | cs_irr_read.f90 | Subroutine | |
cs_irrig | cs_irrig.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds constituent mass from irrigation water into the soil profile, and removes constituent mass from the source object |
cs_lch | cs_lch.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine simulates the loss of constituent mass via surface runoff, lateral flow, tile flow, and percolation out of the profile |
cs_plant_read | cs_plant_read.f90 | Subroutine | |
cs_rain | cs_rain.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds constituent mass from atmospheric deposition (rainfall, dry) to the soil profile |
cs_rctn_aqu | cs_rctn_aqu.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine updates constituent concentrations based on chemical reactions in groundwater |
cs_rctn_hru | cs_rctn_hru.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine updates constituent concentrations based on chemical reactions and sorption in the soil profile |
cs_reactions_read | cs_reactions_read.f90 | Subroutine | |
cs_sed | cs_sed.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the amount of selenium attached to sediment in surface runoff |
cs_sorb_aqu | cs_sorb_aqu.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine updates constituent concentrations based on sorption in the aquifer |
cs_sorb_hru | cs_sorb_hru.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine updates constituent concentrations based on sorption in the soil profile |
cs_str_output | cs_str_output.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine prints out daily constituent data for specified channels |
cs_uptake | cs_uptake.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine simulates constituent uptake in the root zone |
cs_uptake_read | cs_uptake_read.f90 | Subroutine | |
cs_urban_read | cs_urban_read.f90 | Subroutine | |
define_unit_elements | define_unit_elements.f90 | Subroutine | |
dr_db_read | dr_db_read.f90 | Subroutine | |
dr_path_read | dr_read_path.f90 | Subroutine | |
dr_read | dr_read.f90 | Subroutine | |
dr_read_hmet | dr_read_hmet.f90 | Subroutine | |
dr_read_om | dr_read_om.f90 | Subroutine | |
dr_read_pest | dr_read_pest.f90 | Subroutine | |
dr_read_salt | dr_read_salt.f90 | Subroutine | |
dr_ru | dr_ru.f90 | Subroutine | |
dtbl_flocon_read | dtbl_flocon_read.f90 | Subroutine | read all data from hydrol.dat if divert action, xwalk fp with flo_con decision table |
dtbl_lum_read | dtbl_lum_read.f90 | Subroutine | read all data from hydrol.dat |
dtbl_res_read | dtbl_res_read.f90 | Subroutine | read all data from hydrol.dat |
dtbl_scen_read | dtbl_scen_read.f90 | Subroutine | read all data from hydrol.dat |
ee | ee.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ This function calculates saturation vapor pressure at a given air temperature. ~ ~ ~ SUBROUTINES/FUNCTIONS CALLED ~ ~ ~ Intrinsic: Exp |
ero_add | erosion_module | Function | |
ero_divide | erosion_module | Function | |
ero_eiusle | ero_eiusle.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ This subroutine computes the USLE erosion index (EI) |
ero_ovrsed | ero_ovrsed.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes splash erosion by raindrop impact and flow erosion by overland flow |
ero_pkq | ero_pkq.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes the peak runoff rate for each HRU and the entire subbasin using a modification of the rational formula |
ero_ysed | ero_ysed.f90 | Subroutine | initialize variables compute sediment yield with musle - t this is the form of MUSLE in APEX documentation - same results as swat equation above ! t/ha |
erosion_output | erosion_output.f90 | Subroutine | divide by number of events to get event average print average per event |
est_orfdim | est_orfdim.f90 | Subroutine | This program estimates orifice dimensions based on design discharge at different stages |
est_weirdim | est_weirdim.f90 | Subroutine | This program estimates rectangular weir dimensions based on width-depth ratio of wier at different stages |
et_act | et_act.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates potential plant transpiration for Priestley- Taylor and Hargreaves ET methods, and potential and actual soil evaporation. NO3 movement into surface soil layer due to evaporation is also calculated. |
et_pot | et_pot.f90 | Subroutine | calculate mean barometric pressure calculate latent heat of vaporization calculate psychrometric constant calculate saturation vapor pressure, actual vapor pressure and vapor pressure deficit calculate the slope of the saturation vapor pressure curve DETERMINE POTENTIAL ET |
exco_db_read | exco_db_read.f90 | Subroutine | |
exco_read | exco_read.f90 | Subroutine | |
exco_read_hmet | exco_read_hmet.f90 | Subroutine | |
exco_read_om | exco_read_om.f90 | Subroutine | change to exco_om |
exco_read_path | exco_read_path.f90 | Subroutine | |
exco_read_pest | exco_read_pest.f90 | Subroutine | |
exco_read_salt | exco_read_salt.f90 | Subroutine | |
fcgd | fcgd.f90 | Function | |
fert_parm_read | fert_parm_read.f90 | Subroutine | |
field_read | field_read.f90 | Subroutine | read all data from topo.dat |
flow_dur_curve | flow_dur_curve.f90 | Subroutine | |
flow_hyd_ru_hru | flow_hyd_ru_hru.f90 | Subroutine | subsurface flow = lateral + tile --> assume uniform throughout the day sum flow in case hydrograph exceeds max days zero previous day flow hydrograph and total hydrographs use unit hydrograph to compute subdaily flow hydrographs only add subsurface flow today - already lagged and assumed uniform for the day set current and previous days |
gcycl | gcycl.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ This subroutine initializes the random number seeds. If the user desires a different set of random numbers for each simulation run, the random number generator is used to reset the values of the seeds. |
gwflow_canl | gwflow_canl.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the water exchange volume between irrigation canals and connected grid cells (exchange volumes are used in gwflow_simulate, in groundwater balance equations) |
gwflow_canl_out | gwflow_canl_out.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the water exchange volume between irrigation canals and connected grid cells for canals that originate outside of the model boundary (and hence do not remove water from channels within the model) |
gwflow_chan_read | gwflow_chan_read.f90 | Subroutine | |
gwflow_chem | gwflow_chem.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates chemical reactions in gwflow cells |
gwflow_fpln | gwflow_fpln.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the water exchange volume between the floodplain and the connected grid cells (exchange volumes are used in gwflow_simulate, in groundwater balance equations) |
gwflow_gwet | gwflow_gwet.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine determines the volume of groundwater that is removed from the aquifer via ET |
gwflow_gwsw | gwflow_gwsw.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the water exchange volume between the channel and the connected grid cells (exchange volumes are used in gwflow_simulate, in groundwater balance equations) |
gwflow_ppag | gwflow_ppag.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine determines the volume of groundwater that is extracted from gwflow grid cells (pumping volume are used in gwflow_simulate, in groundwater balance equations) |
gwflow_ppex | gwflow_ppex.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine determines the volume of groundwater that is extracted from gwflow grid cells, for groundwater that is lost to the system (pumping volume are used in gwflow_simulate, in groundwater balance equations) |
gwflow_read | gwflow_read.f90 | Subroutine | |
gwflow_rech | gwflow_rech.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine determines the volume of groundwater that is added to the aquifer via recharge (soil percolation) (recharge volumes are used in gwflow_simulate, in groundwater balance equations) |
gwflow_resv | gwflow_resv.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the water exchange volume between the reservoir and the connected grid cells (exchange volumes are used in gwflow_simulate, in groundwater balance equations) |
gwflow_satx | gwflow_satx.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the groundwater volume that enters the channel via saturation excess flow (exchange volumes are used in gwflow_simulate, in groundwater balance equations) |
gwflow_simulate | gwflow_simulate.f90 | Subroutine | ** tu Wunused-label: 103 format(i8,i8,i8,i8,i8,i8,i8,50(f15.3)) ** tu Wunused-label: 104 format(10000(f12.2)) ** tu Wunused-label: 106 format(i8,i8,i8,50(f12.3)) ** tu Wunused-label: 108 format(i8,2x,50(e12.4)) ** tu Wunused-label: 109 format(i8,i8,1000(e12.3)) |
gwflow_soil | gwflow_soil.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the water exchange volume between the aquifer and the soil profile (exchange volumes are used in gwflow_simulate, in groundwater balance equations) |
gwflow_tile | gwflow_tile.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the water exchange volume between irrigation canals and connected grid cells (exchange volumes are used in gwflow_simulate, in groundwater balance equations) |
gwflow_wetl | gwflow_wetl.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine determines the volume of groundwater exchanged with wetlands (exchange volumes are used in gwflow_simulate, in groundwater balance equations) |
hcsin_output | hcsin_output.f90 | Subroutine | daily print pests cvs pests pests |
hcsout_output | hcsout_output.f90 | Subroutine | daily print pests cvs pests pests |
header_aquifer | header_aquifer.f90 | Subroutine | ! AQUIFER aquifer aquifer csv aquifer aquifer csv aquifer aquifer csv aquifer aquifer csv |
header_channel | header_channel.f90 | Subroutine | ! CHANNEL |
header_const | header_const.f90 | Subroutine | |
header_cs | header_cs.f90 | Subroutine | end daily - HYDIN |
header_hyd | header_hyd.f90 | Subroutine | HYDCON (no headers) |
header_lu_change | header_lu_change.f90 | Subroutine | open lu_change output file |
header_mgt | header_mgt.f90 | Subroutine | open mgt.out file |
header_path | header_path.f90 | Subroutine | HRU_PATHOGEN - daily HRU_PATHOGEN - monthly HRU_PATHOGEN - yearly HRU_PATHOGEN - ave annual |
header_pest | header_pest.f90 | Subroutine | HRU_PESTICIDE - daily HRU_PESTICIDE - monthly HRU_PESTICIDE - yearly HRU_PESTICIDE - ave annual CHANNEL_PESTICIDE - daily CHANNEL_PESTICIDE - monthly CHANNEL_PESTICIDE - yearly CHANNEL_PESTICIDE - ave annual RESERVOIR_PESTICIDE - daily RESERVOIR_PESTICIDE - monthly RESERVOIR_PESTICIDE - yearly RESERVOIR_PESTICIDE - ave annual BASIN AQUIFER_PESTICIDE - daily BASIN AQUIFER_PESTICIDE - monthly BASIN AQUIFER_PESTICIDE - yearly BASIN AQUIFER_PESTICIDE - ave annual AQUIFER_PESTICIDE - daily AQUIFER_PESTICIDE - monthly AQUIFER_PESTICIDE - yearly AQUIFER_PESTICIDE - ave annual BASIN_CH_PESTICIDE - daily BASIN_CH_PESTICIDE - monthly BASIN_CH_PESTICIDE - yearly BASIN_CH_PESTICIDE - ave annual BASIN_RES_PESTICIDE - daily BASIN_RES_PESTICIDE - monthly BASIN_RES_PESTICIDE - yearly BASIN_RES_PESTICIDE - ave annual BASIN_LS_PESTICIDE - daily BASIN_LS_PESTICIDE - monthly BASIN_LS_PESTICIDE - yearly BASIN_LS_PESTICIDE - ave annual |
header_reservoir | header_reservoir.f90 | Subroutine | RESERVOIR |
header_salt | header_salt.f90 | Subroutine | |
header_sd_channel | header_sd_channel.f90 | Subroutine | ! SWAT-DEG CHANNEL - SUBDAILY OUTPUT !!!!!! SD_CHANNEL swat deg channel !!!!!! SD_CHANMORPH swat deg channel morph swat deg channel morph swat deg channel morph swat deg channel morph csv swat deg channel morph !!!!!! SD_CHANMORPH |
header_snutc | header_snutc.f90 | Subroutine | write all organic carbon for the soil profile write total carbon for the soil profile, plants, and residue |
header_water_allocation | header_water_allocation.f90 | Subroutine | ! SWAT-DEG CHANNEL |
header_wetland | header_wetland.f90 | Subroutine | RESERVOIR/WETLAND - DAILY RESERVOIR/WETLAND - MONTHLY RESERVOIR/WETLAND YEARLY RESERVOIR/WETLAND - AVERAGE ANNUAL |
header_write | header_write.f90 | Subroutine | hru-out.cal - hru soft calibration output including soft and predicted budgets and calibration parameter adjustments !!!! hru-new.cal - hru soft calibration output file. The same format as calibration.upd and !!!! can be used as input (calibration.upd) in subsequent simulations !!!! hru-lte-out.cal - hru lte soft calibration output including soft and predicted budgets and !!!! calibration parameter adjustments |
header_yield | header_yield.f90 | Subroutine | yield biomass file ! BASIN CROP YIELDS |
hmet_hru_aqu_read | hmet_hru_aqu_read.f90 | Subroutine | |
hru_allo | hru_allo.f90 | Subroutine | |
hru_carbon_output | hru_carbon_output.f90 | Subroutine | !!!! added for new output write |
hru_control | hru_control.f90 | Subroutine | adjust precip and temperature for elevation using lapse rates zero pesticide balance variables zero all variables except pest in soil and in/on plant ht1== deposition: write to deposition.out ht2== outflow from inflow: added to hru generated flows check auto operations check day of future fertilizer application if end of year, reset the one time operation per year increment days since last plant and harvest update base zero total heat units zero stresses calculate albedo for day calculate soil temperature for soil layers compute canopy interception compute snow melt route overland flow across hru - add tile flow if not subirrigation or saturated buffer route incoming surface runoff add surface runon to wetland route across hru - infiltrate and deposit sediment add lateral flow soil water Route incoming lateral soil flow add tile flow to tile (subirrigation and saturated buffer) |
hru_cs_output | hru_cs_output.f90 | Subroutine | |
hru_dtbl_actions_init | hru_dtbl_actions_init.f90 | Subroutine | add decision table for water allocation irrigation demand add decision table for manure allocation demand dtbl from water allocation for irrigation demand dtbl from water allocation for irrigation demand set variables for future fertilizer operations |
hru_erfc | erfc.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ erfc is the complementary error function; erf(B) is the error function for B ~ ~ ~ SUBROUTINES/FUNCTIONS CALLED ~ ~ ~ Intrinsic: Abs |
hru_fr_change | hru_fr_change.f90 | Subroutine | read data for each element in all routing units dr_om_num was previously xwalked with dr_db()%om_file read data for each element in all landscape cataloging units set new hru areas reset wetland parameters reset volumes and surface areas hamm10. => m**3 - assume entire hru is wet and don't use fractional inputs (for simplicity) compute weighted Mannings n for each subbasin |
hru_hyds | hru_hyds.f90 | Subroutine | assign reach loadings for subbasin zero out hydrograph storage locations surface runoff hydrograph (3) rtb gwflow - hydrograph separation (surface runoff) rtb gwflow - hydrograph separation (saturation excess runoff) wtmp qdr m3/d sedyld sedorgn sedorgp & sedminps surqno3 & latno3 & no3gw surqsolp & sedminpa chl_a NH3 NO2 cbodu doxq & soxy |
hru_lte_output | hru_lte_output.f90 | Subroutine | daily print waterbal waterbal losses losses plant weather plant weather check end of month monthly print check end of year yearly print !!! average annual print |
hru_lte_read | hru_lte_read.f90 | Subroutine | dimension swatdeg output variables xwalk with soil_lte calculate shape parameters min to seconds |
hru_lum_init | hru_lum_init.f90 | Subroutine | |
hru_lum_init_all | hru_lum_init_all.f90 | Subroutine | |
hru_output | hru_output.f90 | Subroutine | !!!! added for new output write
daily print
water bal day
changed write unit below (2004 to write file data)
nutrient bal day
losses day
plant weather day
check end of month
monthly print
water bal mon
nutrient bal mon
losses mon
plant weather mon
check end of year
yearly print
if > 10mm irrigation, flag as irrigated for soft cal
water balance yr
nutrient balance yr
losses yr
plant weather yr |
hru_output_allo | hru_output_allo.f90 | Subroutine | Section 3 this section sets parameters related to soil and other processes |
hru_pathogen_output | hru_pathogen_output.f90 | Subroutine | print balance for each pathogen daily print pathogen balance check end of month monthly print check end of year yearly print !!! average annual print ** tu Wunused-label: 101 format (4i6,2i8,2x,a,11e12.3) ** tu Wunused-label: 102 format (4i6,2i8,2x,a,11e12.3) ** tu Wunused-label: 103 format (2i6,i8,4x,a,5x,11e12.3) |
hru_pesticide_output | hru_pesticide_output.f90 | Subroutine | print balance for each pesticide daily print pesticide balance zero daily output |
hru_read | hru_read.f90 | Subroutine | |
hru_salt_output | hru_salt_output.f90 | Subroutine | |
hru_sweep | hru_sweep.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ the subroutine performs the street sweeping operation |
hru_urb_bmp | hru_urb_bmp.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ |
hru_urban | hru_urban.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes loadings from urban areas using the USGS regression equations or a build-up/wash-off algorithm |
hru_urbanhr | hru_urbanhr.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes loadings from urban areas using the a build-up/wash-off algorithm at subdaily time intervals |
hrudb_init | hrudb_init.f90 | Subroutine | |
hruout_losses_add | output_landscape_module | Function | |
hruout_losses_div | output_landscape_module | Function | |
hruout_losses_mult | output_landscape_module | Function | |
hruout_nut_cycling_add | output_landscape_module | Function | |
hruout_nut_cycling_div | output_landscape_module | Function | |
hruout_nut_cycling_mult | output_landscape_module | Function | |
hruout_nut_gain_loss_add | output_landscape_module | Function | |
hruout_nut_gain_loss_div | output_landscape_module | Function | |
hruout_nut_gain_loss_mult | output_landscape_module | Function | |
hruout_nutbal_add | output_landscape_module | Function | |
hruout_nutbal_div | output_landscape_module | Function | |
hruout_nutbal_mult | output_landscape_module | Function | |
hruout_pathbal_add | output_ls_pathogen_module | Function | |
hruout_pathbal_ave | output_ls_pathogen_module | Function | |
hruout_pathbal_div | output_ls_pathogen_module | Function | |
hruout_pestbal_add | output_ls_pesticide_module | Function | |
hruout_pestbal_ave | output_ls_pesticide_module | Function | |
hruout_pestbal_div | output_ls_pesticide_module | Function | |
hruout_pestbal_mult | output_ls_pesticide_module | Function | |
hruout_plantweather_add | output_landscape_module | Function | |
hruout_plantweather_ave | output_landscape_module | Function | |
hruout_plantweather_div | output_landscape_module | Function | |
hruout_plantweather_mult | output_landscape_module | Function | |
hruout_saltbal_add | output_ls_salt_module | Function | |
hruout_saltbal_ave | output_ls_salt_module | Function | |
hruout_saltbal_div | output_ls_salt_module | Function | |
hruout_waterbal_add | output_landscape_module | Function | |
hruout_waterbal_ave | output_landscape_module | Function | |
hruout_waterbal_div | output_landscape_module | Function | |
hruout_waterbal_mult | output_landscape_module | Function | |
hyd_connect | hyd_connect.f90 | Subroutine | set first object number of each type for each hru or defining unit, set all subbasins that contain it determine subbasin the hrus are in and add subbasin area to basin area only have hrus set up - need to add other objects determine number of recieving units and set object numbers for outflow hyds all channels receive flow from modflow allocate zero arrays for constituents allocate receiving arrays allocate unit hyd for all incoming hyd's loop through again and set receiving dependencies if modflow object and set for all channels set all incoming channel object data to modflow for subbasins, set receiving objects for each element (need for parallelization order) if routing over ru - the hru frac is included loop through again to set command (object) sequence calculate drainage area to compare to input area - need reservoir surface area add receiving object for single objects add subbasin elements modflow - for all inflow objects add recieving for all channels from modflow compute object order for parallelization (similar to stream order) compute object order of highest receiving object and add 1 subbasin has to be in parallel order after elements in the subbasin write calculated and input drainage areas for all objects except hru's |
hyd_connect_out | hyd_connect_out.f90 | Subroutine | 0 = average annual (always print) 1 = yearly 2 = monthly 3 = daily |
hyd_convert_conc_to_mass | hydrograph_module | Subroutine | |
hyd_convert_mass_to_conc | hydrograph_module | Subroutine | |
hyd_read_connect | hyd_read_connect.f90 | Subroutine | read hru spatial data intialize area to calcluate drainage areas in hyd_connect set outflow object type to 0 - needed in final hyd_read_connect loop |
hydcsout_add | constituent_mass_module | Function | |
hydcsout_mult_const | constituent_mass_module | Function | |
hyddep_output | hyddep_output.f90 | Subroutine | 0 = average annual (always print) 1 = yearly 2 = monthly 3 = daily |
hydin_output | hydin_output.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine outputs hyd variables on daily, monthly and annual time steps |
hydout_add | hydrograph_module | Function | |
hydout_add_const | hydrograph_module | Function | |
hydout_div_const | hydrograph_module | Function | |
hydout_div_conv | hydrograph_module | Function | |
hydout_mult | hydrograph_module | Function | |
hydout_mult_const | hydrograph_module | Function | |
hydout_output | hydout_output.f90 | Subroutine | !!! monthly print !!! yearly print !!! average annual print |
hydout_subtract | hydrograph_module | Function | |
hydro_init | hydro_init.f90 | Subroutine | should be beginning month of simulation and not 12 (December) |
hydrol_read | hydrol_read.f90 | Subroutine | read all data from hydrol.dat |
icl | icl.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine determines the month and day, given the julian date |
Ionic_Strength | salt_chem_hru.f90 | Subroutine | |
jdt | jdt.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes the julian date given the month and the day of the month |
landuse_read | landuse_read.f90 | Subroutine | read all landuse data from landuse.dat |
layersplit | layersplit.f90 | Subroutine | set a soil layer at dep_new and adjust all lower layer |
lcu_read_softcal | lcu_read_softcal.f90 | Subroutine | allocate regional output files allocate land use for each regional output read soft calibration data for each land use within the region when using wyr and bfr to calibrate convert baseflow ratio from frac of water yield to frac of precip if calibrating the entire region - later we can set up for lsu/regional calibrations |
ls_read_lsparms_cal | ls_read_parms_cal.f90 | Subroutine | |
lsreg_output | lsreg_output.f90 | Subroutine | const should be fraction of the element that was read in element.lcu for entire basin - should be the basin fraction !!! daily print waterbal waterbal nutrient bal nutrient bal losses losses plant weather plant weather check end of month monthly print check end of year yearly print !!! average annual print ** tu Wunused-label: 103 format (4i6,i8,4x,a,5x,f12.3) |
lsu_output | lsu_output.f90 | Subroutine | sum monthly variables daily print - LANDSCAPE UNIT waterbal waterbal nutrient bal nutrient bal losses losses plant weather plant weather check end of month check end of year zero yearly variables average annual print - LANDSCAPE UNIT ** tu Wunused-label: 104 format (4i6,i8,a,2x,a,6f12.3,29f17.3) |
lsu_read_elements | lsu_read_elements.f90 | Subroutine | read landscape cataloging unit definitions for output (old subbasin output file) all hrus are in region |
mallo_control | mallo_control.f90 | Subroutine | add manure produced on the first day of the month loop through each demand object for manure demand check decision table for manure application loop through each demand object again and subtract from source if available subtract manure from source set daily withdrawal and source |
mallo_div_const | manure_allocation_module | Function | |
mallout_add | manure_allocation_module | Function | |
manure_allocation_read | manure_allocation_read.f90 | Subroutine | read water allocation inputs |
manure_demand_output | manure_demand_output.f90 | Subroutine | sum output (demand, withdrawals, and unmet) for each source !!! daily print zero daily values !!! monthly print sum output (demand, withdrawals, and unmet) for each source !!! yearly print sum output (demand, withdrawals, and unmet) for each source !!! average annual print sum output (demand, withdrawals, and unmet) for each source |
manure_parm_read | manure_parm_read.f90 | Subroutine | |
manure_source_output | manure_source_output.f90 | Subroutine | sum output (stored, produced, and withdrawals for each source !!! daily print using region water balance print codes for now !!! monthly print sum output (stored, produced, and withdrawals for each source !!! yearly print sum output (stored, produced, and withdrawals for each source !!! average annual print sum output (stored, produced, and withdrawals for each source |
MgCO3 | salt_chem_hru.f90 | Subroutine | |
MgSO4 | salt_chem_hru.f90 | Subroutine | |
mgt_harvbiomass | mgt_harvbiomass.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine performs the harvest operation for above ground biomass (no kill) |
mgt_harvgrain | mgt_harvgrain.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine performs the harvest grain only operation |
mgt_harvresidue | mgt_harvresidue.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine performs the harvest residue operation |
mgt_harvtuber | mgt_harvtuber.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine performs the harvest grain only operation |
mgt_killop | mgt_killop.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine performs the kill operation |
mgt_newtillmix | mgt_newtillmix.f90 | Subroutine | biological mixing tillage operation by zhang DSSAT tillage ======================= by zhang DSSAT tillage ======================= |
mgt_newtillmix_wet | mgt_newtillmix_wet.f90 | Subroutine | tillage operation
msm = mass of soil mixed for the layer
msn = mass of soil not mixed for the layer |
mgt_operatn | mgt_operatn.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine performs all management operations |
mgt_plantop | mgt_plantop.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine performs the plant operation |
mgt_read_chemapp | mgt_read_chemapp.f90 | Subroutine | read grazing operations |
mgt_read_fireops | mgt_read_fireops.f90 | Subroutine | read contour operations |
mgt_read_grazeops | mgt_read_grazeops.f90 | Subroutine | read grazing operations |
mgt_read_harvops | mgt_read_harvops.f90 | Subroutine | read harvest only operations |
mgt_read_irrops | mgt_read_irrops.f90 | Subroutine | read irrigation operations |
mgt_read_mgtops | mgt_read_mgtops.f90 | Subroutine | read mgtops.dat file calculate number of records in management allocate and read the auto operations check to see if generic table - ie. plant-harv for single summer crop allocate and read the scheduled operations |
mgt_read_puddle | mgt_read_puddle.f90 | Subroutine | |
mgt_read_sweepops | mgt_read_sweepops.f90 | Subroutine | read street sweeping operations |
mgt_sched | mgt_sched.f90 | Subroutine | plant one plant or entire community check to see if the crop is already growing plant if the crop is not growing don't plant if the crop is already growing begin and end monsoon initiation period if precip/pet ratio was not triggered during monsoon season - reset phenology harvest only operation sum yield and number of harvest to calc ave yields sum basin crop yields and area harvested sum regional crop yields for soft calibration kill operation harvest and kill operation sum yield and num. of harvest to calc ave yields sum basin crop yields and area harvested sum regional crop yields for soft calibration tillage operation date scheduled irrigation operation fertilizer operation pesticide operation |
mgt_tillfactor | mgt_tillfactor.f90 | Subroutine | !!!!!!!!!!!!!!!!!!!!! |
mgt_transplant | mgt_transplant.f90 | Subroutine | check plant population to set max lai initialize plant mass |
NaCl | salt_chem_hru.f90 | Subroutine | |
nmin_add | organic_mineral_mass_module | Function | |
nmin_mult_const | organic_mineral_mass_module | Function | |
nut_denit | nut_denit.f90 | Subroutine | this subroutine computes denitrification |
nut_nitvol | nut_nitvol.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine estimates daily mineralization (NH3 to NO3) and volatilization of NH3 |
nut_nlch | nut_nlch.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine simulates the loss of nitrate via surface runoff, lateral flow, tile flow, and percolation out of the profile |
nut_nminrl | nut_nminrl.f90 | Subroutine | ! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
nut_np_flow | nut_np_flow.f90 | Subroutine | |
nut_nrain | nut_nrain.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds nitrate from rainfall to the soil profile ~ ~ ~ INCOMING VARIABLES ~ ~ ~ name |units |definition ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
nut_orgn | nut_orgn.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the amount of organic nitrogen removed in surface runoff |
nut_orgnc | nut_orgnc.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the amount of organic nitrogen removed in surface runoff |
nut_orgnc2 | nut_orgnc2.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the amount of organic nitrogen removed in surface runoff - when using CSWAT==2 it |
nut_pminrl | nut_pminrl.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~
this subroutine computes p flux between the labile, active mineral
and stable mineral p pools. |
nut_pminrl2 | nut_pminrl2.f90 | Subroutine | loop through soil layers in this HRU make sure that no zero or negative pool values come in Convert kg/ha to ppm so that it is more meaningful to compare between soil layers **Soluble - Active Transformations** |
nut_psed | nut_psed.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the amount of organic and mineral phosphorus attached to sediment in surface runoff |
nut_solp | nut_solp.f90 | Subroutine | compute soluble P lost in surface runoff units ==> surqsolp = [kg/ha * mm] / [t/m^3 * mm * m^3/t] = kg/ha compute soluble P leaching leach p from bottom layer perc p to next layer tile p |
nuts | nuts.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this function calculates the plant stress factor caused by limited supply of nitrogen or phosphorus ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ SUBROUTINES/FUNCTIONS CALLED ~ ~ ~ Intrinsic: Exp |
obj_output | obj_output.f90 | Subroutine | !! DUMMY OBJ FOR CARBON !! check for specfic days !! zero out microb accumalated for each hru !! zero out tot !! zero out totc !! Carbon !! tot accumulated microb for layer !! Carbon w microb accumulated |
object_read_output | object_read_output.f90 | Subroutine | read old saveconc properties open file and write header |
om_add1 | organic_mineral_mass_module | Function | |
om_divide | organic_mineral_mass_module | Function | |
om_mult_const | organic_mineral_mass_module | Function | |
om_subtract | organic_mineral_mass_module | Function | |
om_water_init | om_water_init.f90 | Subroutine | |
operator (*) | ch_pathogen_module | Interface | |
operator (*) | organic_mineral_mass_module | Interface | |
operator (*) | organic_mineral_mass_module | Interface | |
operator (*) | organic_mineral_mass_module | Interface | |
operator (*) | sd_channel_module | Interface | |
operator (*) | sd_channel_module | Interface | |
operator (*) | output_landscape_module | Interface | |
operator (*) | output_landscape_module | Interface | |
operator (*) | output_landscape_module | Interface | |
operator (*) | output_landscape_module | Interface | |
operator (*) | output_landscape_module | Interface | |
operator (*) | output_landscape_module | Interface | |
operator (*) | carbon_module | Interface | |
operator (*) | carbon_module | Interface | |
operator (*) | carbon_module | Interface | |
operator (*) | carbon_module | Interface | |
operator (*) | channel_module | Interface | |
operator (*) | constituent_mass_module | Interface | |
operator (*) | hydrograph_module | Interface | |
operator (*) | aquifer_module | Interface | |
operator (*) | output_ls_pesticide_module | Interface | |
operator (**) | hydrograph_module | Interface | |
operator (+) | output_ls_pathogen_module | Interface | |
operator (+) | ch_pesticide_module | Interface | |
operator (+) | ch_pathogen_module | Interface | |
operator (+) | organic_mineral_mass_module | Interface | |
operator (+) | organic_mineral_mass_module | Interface | |
operator (+) | organic_mineral_mass_module | Interface | |
operator (+) | organic_mineral_mass_module | Interface | |
operator (+) | sd_channel_module | Interface | |
operator (+) | sd_channel_module | Interface | |
operator (+) | water_allocation_module | Interface | |
operator (+) | output_landscape_module | Interface | |
operator (+) | output_landscape_module | Interface | |
operator (+) | output_landscape_module | Interface | |
operator (+) | output_landscape_module | Interface | |
operator (+) | output_landscape_module | Interface | |
operator (+) | output_landscape_module | Interface | |
operator (+) | carbon_module | Interface | |
operator (+) | carbon_module | Interface | |
operator (+) | carbon_module | Interface | |
operator (+) | carbon_module | Interface | |
operator (+) | channel_module | Interface | |
operator (+) | constituent_mass_module | Interface | |
operator (+) | output_ls_salt_module | Interface | |
operator (+) | res_pesticide_module | Interface | |
operator (+) | manure_allocation_module | Interface | |
operator (+) | hydrograph_module | Interface | |
operator (+) | aquifer_module | Interface | |
operator (+) | water_body_module | Interface | |
operator (+) | output_ls_pesticide_module | Interface | |
operator (+) | aqu_pesticide_module | Interface | |
operator (+) | erosion_module | Interface | |
operator (-) | organic_mineral_mass_module | Interface | |
operator (-) | hydrograph_module | Interface | |
operator (.add.) | hydrograph_module | Interface | |
operator (.sum.) | aqu_pesticide_module | Interface | |
operator (/) | output_ls_pathogen_module | Interface | |
operator (/) | ch_pesticide_module | Interface | |
operator (/) | ch_pathogen_module | Interface | |
operator (/) | organic_mineral_mass_module | Interface | |
operator (/) | sd_channel_module | Interface | |
operator (/) | sd_channel_module | Interface | |
operator (/) | water_allocation_module | Interface | |
operator (/) | output_landscape_module | Interface | |
operator (/) | output_landscape_module | Interface | |
operator (/) | output_landscape_module | Interface | |
operator (/) | output_landscape_module | Interface | |
operator (/) | output_landscape_module | Interface | |
operator (/) | output_landscape_module | Interface | |
operator (/) | carbon_module | Interface | |
operator (/) | carbon_module | Interface | |
operator (/) | carbon_module | Interface | |
operator (/) | carbon_module | Interface | |
operator (/) | channel_module | Interface | |
operator (/) | output_ls_salt_module | Interface | |
operator (/) | res_pesticide_module | Interface | |
operator (/) | manure_allocation_module | Interface | |
operator (/) | hydrograph_module | Interface | |
operator (/) | aquifer_module | Interface | |
operator (/) | water_body_module | Interface | |
operator (/) | output_ls_pesticide_module | Interface | |
operator (/) | aqu_pesticide_module | Interface | |
operator (/) | erosion_module | Interface | |
operator (//) | output_ls_pathogen_module | Interface | |
operator (//) | ch_pesticide_module | Interface | |
operator (//) | sd_channel_module | Interface | |
operator (//) | output_landscape_module | Interface | |
operator (//) | output_landscape_module | Interface | |
operator (//) | output_ls_salt_module | Interface | |
operator (//) | res_pesticide_module | Interface | |
operator (//) | hydrograph_module | Interface | |
operator (//) | water_body_module | Interface | |
operator (//) | output_ls_pesticide_module | Interface | |
operator (//) | aqu_pesticide_module | Interface | |
org_flux_add1 | organic_mineral_mass_module | Function | |
output_landscape_init | output_landscape_init.f90 | Subroutine | ! HRU - Water balance hru hru hru hru hru hru hru hru ! HRU - Nutrient balance ! HRU - NEW Nutrient cycling output ! HRU - NEW Nutrient cycling output |
overbank_read | overbank_read.f90 | Subroutine | read data for surface elements in the floodplain-for overbank flooding |
overland_n_read | overland_n_read.f90 | Subroutine | |
path_apply | path_apply.f90 | Subroutine | calculate ground cover graze only if adequate biomass in HRU |
path_cha_res_read | path_cha_res_read.f90 | Subroutine | |
path_hru_aqu_read | path_hru_aqu_read.f90 | Subroutine | |
path_ls_process | path_ls_process.f90 | Subroutine | compute pathogen wash off compute pathogen die-off and re-growth on foilage compute pathogen die-off and re-growth in surface soil layer net die_off - negative is regrowth |
path_ls_runoff | path_ls_runoff.f90 | Subroutine | compute soluble bacteria in the surface runoff compute bacteria transported with sediment |
path_ls_swrouting | path_ls_swrouting.f90 | Subroutine | compute pathogen incorporated into the soil |
path_parm_read | path_parm_read.f90 | Subroutine | read pathogen properties |
pathogen_init | pathogen_init.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calls subroutines which read input data for the databases and the HRUs |
pest_apply | pest_apply.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine applies pesticide |
pest_cha_res_read | pest_cha_res_read.f90 | Subroutine | |
pest_decay | pest_decay.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates degradation of pesticide in the soil and on the plants |
pest_enrsb | pest_enrsb.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the enrichment ratio for nutrient and pesticide transport with runoff |
pest_hru_aqu_read | pest_hru_aqu_read.f90 | Subroutine | |
pest_lch | pest_lch.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates pesticides leached through each layer, pesticide transported with lateral subsurface flow, and pesticide transported with surface runoff |
pest_metabolite_read | pest_metabolite_read.f90 | Subroutine | xwalk with pestdb xwalk with constituent data for basin |
pest_parm_read | pest_parm_read.f90 | Subroutine | calculations: the first-order rate law for the decay of pesticides is dP/dt = -kP where P is the amount of pesticide, t is the time and k is the rate constant for degradation. To calculate the amount of pesticide at any time after application the equation P(t) = P_o*Exp(-kt) is used where P_o is the original amount of pesticide. k can be calculate with the equation k = 0.693/hlife. decay_f or decay_s = Exp(-k) |
pest_pesty | pest_pesty.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates pesticide transported with suspended sediment |
pest_pl_up | pest_pl_up.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the amount of pesticide washed off the plant foliage and onto the soil |
pest_soil_tot | pest_soil_tot.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the total amount of pesticide in the soil |
pest_washp | pest_washp.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the amount of pesticide washed off the plant foliage and onto the soil |
pesticide_init | pesticide_init.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calls subroutines which read input data for the databases and the HRUs |
pl_biomass_gro | pl_biomass_gro.f90 | Subroutine | if plant hasn't reached maturity
calculate optimal biomass
adjust radiation-use efficiency for CO2
adjust radiation-use efficiency for vapor pressure deficit
assumes vapor pressure threshold of 1.0 kPa
adjust radiation-use efficiency for day length
compute temperature stress |
pl_burnop | pl_burnop.f90 | Subroutine | update curve number zero total community masses burn biomass and residue for each plant burn all above ground plant components carbon in co2 emitted during burning burn all surface (layer 1) residue and humus components const carbon (bsn_cc%cswat == 1) add plant p burn to stable humus pool for constant carbon dynamic carbon (bsn_cc%cswat == 2) add plant p burn to stable humus pool for constant carbon sum total community masses |
pl_community | pl_community.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine predicts daily potential growth of total plant biomass and roots and calculates leaf area index. Incorporates residue for tillage functions and decays residue on ground surface. Adjusts daily dry matter based on water stress. |
pl_dormant | pl_dormant.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine checks the dormant status of the different plant types |
pl_fert | pl_fert.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine applies N and P specified by date and amount in the management file (.mgt) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
pl_fert_wet | pl_fert_wet.f90 | Subroutine | summary calculations |
pl_graze | pl_graze.f90 | Subroutine | graze only if adequate biomass in HRU set initial biomass before eating and trampling remove biomass eaten - assume evenly divided by biomass of plant later we can add preferences - by animal type or simply by n and p content remove biomass and organics from plant pools update remaining plant organic pools remove biomass trampled - assume evenly divided by biomass of plant remove biomass and organics from plant pools update remaining plant organic pools reset leaf area index and fraction of growing season assume lai doesn't start decreasing until 2,500 kg/ha at 1.0 lai per 1000 kg/ha plant loop |
pl_grow | pl_grow.f90 | Subroutine | zero biomass increase and nutrient uptake check for start and end of dormancy of temp-based growth plant plant will not undergo stress if dormant |
pl_leaf_gro | pl_leaf_gro.f90 | Subroutine | calculate new leaf area index when phuacc < dlai
calculate new canopy height
calculate fraction of above ground tree biomass that is leaf
***needs to be a plants.plt parameter
only apply water stress to lai |
pl_leaf_senes | pl_leaf_senes.f90 | Subroutine | lai decline for annuals - if dlai < phuacc < 1 compute leaf biomass drop |
pl_manure | pl_manure.f90 | Subroutine | Allocate organic fertilizer to Slow (SWAT_active) N pool; remaining organic N is llocated to structural litter N pool By Zhang for C/N cycling =========================== |
pl_mortality | pl_mortality.f90 | Subroutine | partition all plant components by above ground ratio add dead material to residue add above ground biomass to surface residue pools add dead roots to soil residue pools |
pl_nfix | pl_nfix.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine estimates nitrogen fixation by legumes |
pl_nup | pl_nup.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ This subroutine calculates plant nitrogen uptake |
pl_nupd | pl_nupd.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ This subroutine calculates plant nitrogen demand |
pl_nut_demand | pl_nut_demand.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine predicts daily potential growth of total plant biomass and roots and calculates leaf area index. Incorporates residue for tillage functions and decays residue on ground surface. Adjusts daily dry matter based on water stress. |
pl_partition | pl_partition.f90 | Subroutine | update plant mass for daily biomass/c increase partition leaf and stem (stalk) and seed (grain) mass partition root and above ground biomass for tuber crops for tubers, the tuber (or seed) is not part of ab_gr --> tot = root + ab_gr + seed 1. = root + ab_gr + hi * ab_gr --> solve for ab_gr partition root and above ground biomass for all other annuals (above ground grain) check if initializing first maintain root fraction - root mass/total mass next maintain harvest index on yield (seed/fruit) component next maintain leaf component remainder goes to stem initialize at initial fractions partition carbon with constant fractions partition n and p partition leaves and seed (stem is woody biomass) if n is neg after seed is removed - assume 0 n in seed - plant database cnyld and fr_n_mat are off partition n_left between remaining masses - assume equal concentrations if n is neg after seed is removed - assume 0 n in seed - plant database cnyld and fr_n_mat are off partition p_left between remaining masses - assume equal concentrations annual or grass (stem is stalk) - partition seed (grain) assume same concentration in rest of plant assume same concentration in rest of plant |
pl_pup | pl_pup.f90 | Subroutine | find depth of soil layer the roots are into compute phosphorus stress |
pl_pupd | pl_pupd.f90 | Subroutine | set fraction to maturity for annuals and perennials luxury p uptake |
pl_read_parms_cal | pl_read_parms_cal.f90 | Subroutine | all hrus are in region read landscape soft calibration data for each land use and parameter set parms for each plant |
pl_read_regions_cal | pl_read_regions_cal.f90 | Subroutine | all hrus are in region read landscape soft calibration data for each land use |
pl_root_gro | pl_root_gro.f90 | Subroutine | calculate root depth calculate total root mass assume tree reaches final root:shoot ratio at 0.2 * years to maturity annuals calculate fraction of total biomass that is in the roots for annuals root mass |
pl_rootfr | pl_rootfr.f90 | Subroutine | This subroutine distributes dead root mass through the soil profile code developed by Armen R. Kemanian in 2008 March, 2009 further adjustments expected |
pl_tstr | pl_tstr.f90 | Subroutine | ~ ~ ~ INCOMING VARIABLES ~ ~ ~ name |units |definition ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ t_base(:) |deg C |minimum temperature for plant growth t_opt(:) |deg C |optimal temperature for plant growth tmp_an(:) |deg C |average annual air temperature ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
pl_waterup | pl_waterup.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine distributes potential plant evaporation through the root zone and calculates actual plant water use based on soil water availability. Also estimates water stress factor. |
pl_write_parms_cal | pl_write_parms_cal.f90 | Subroutine | read landscape soft calibration data for each land use and parameter write parameters to file |
plant_all_init | plant_all_init.f90 | Subroutine | assign land use pointers for the hru allocate and initialize land use and management ihru, ilu and isol are in modparm find all different plants in simulation for yield output zero basin crop yields and harvested areas |
plant_init | plant_init.f90 | Subroutine | allocate plants allocate water uptake by layer initialize static and century fresh organic carbon pools metabolic residue structural residue lignin residue total residue pools start accumulating hu at end of dormancy (daylength) calculate solar declination: equation 2.1.2 in SWAT manual 365/2pi = 58.09 calculate the relative distance of the earth from the sun the eccentricity of the orbit sdlat will be >= 1. if latitude exceeds +/- 66.5 deg in winter latitude exceeds +/- 66.5 deg in summer set fraction to maturity and initial canopy height for annuals and perennials set intial n and p contents in total plant initialize plant mass if plant growing get average residue cover factor for community set epco parameter for each crop set p factor and slope length (ls factor) xwalk urban land use type with urban name in urban.urb xwalk overland n with name in ovn_table.lum |
plant_parm_read | plant_parm_read.f90 | Subroutine | |
plant_transplant_read | plant_transplant_read.f90 | Subroutine | |
plantparm_init | plantparm_init.f90 | Subroutine | set default values check if tuber, root to total biomass ratio = 0.7 set seed harvest index for trees and grasses to 0.02 determine shape parameters for the plant population-lai equation determine shape parameters for the leaf area development equation The other point used to determine shape parameters for radiation use efficiency is the ambient CO2 level (330 ul/l) and the biomass-energy ratio (bio_e) given for the crop/land cover. ambient CO2 "ambient" bio-e ratio/100 "elevated" bio-e ratio/100 |
pmin_add | organic_mineral_mass_module | Function | |
pmin_mult_const | organic_mineral_mass_module | Function | |
proc_aqu | proc_aqu.f90 | Subroutine | |
proc_bsn | proc_bsn.f90 | Subroutine | ! open file to print all output files that are written ! open diagnostics.out file to print problems with various files ext to 8000 recl per email 8/2/21 - Kai-Uwe ! open drainage areas output file |
proc_cal | proc_cal.f90 | Subroutine | need to read plant parms before calibrating read soft calibration parameters |
proc_cha | proc_cha.f90 | Subroutine | intialize stream-aquifer interactions for geomorphic baseflow aquifer to channel flow initialize flow routing variables |
proc_cond | proc_cond.f90 | Subroutine | crosswalk with conditional.ctl |
proc_date_time | proc_date_time.f90 | Subroutine | |
proc_db | proc_db.f90 | Subroutine | databases used by all spatial modules
read the plant paramter database
initialize plant parameters
read plant transplant data
read the tillage database
read the pesticide database
read the fertilizer/nutrient database
read the manure database - includes pathogens/antibiotics
read the urban land types database
read the pathogen data parameters
read management scheduling and data files |
proc_hru | proc_hru.f90 | Subroutine | septic has to be set before soils are initialized (making a soil layer for the septic zone) allocate erosion output and open file !!! new checker.out file - always prints !!! new checker.out file - always prints |
proc_open | proc_open.f90 | Subroutine | write headers in output files |
proc_read | proc_read.f90 | Subroutine | read pesticide metabolites |
proc_res | proc_res.f90 | Subroutine | allocate and initialize reservoir variables Osvaldo |
qman | qman.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates flow rate or flow velocity using Manning"s equation. If x1 is set to 1, the velocity is calculated. If x1 is set to cross-sectional area of flow, the flow rate is calculated. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ SUBROUTINES/FUNCTIONS CALLED ~ ~ ~ Intrinsic: Sqrt |
ran | ran.f90 | Function | |
ran1 | ran1.f90 | Function | idum = 1 |
rcurv_interp_dep | rcurv_interp_dep.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine interpolates between points on a rating curve given flow rate |
rcurv_interp_flo | rcurv_interp_flo.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine interpolates between points on a rating curve given flow rate |
re_initialize | re_initialize.f90 | Subroutine | reset basin soil water for next simulation re-initialize all hru parameters re-initialize hru_lte parameters re-initialize channel lte storage and dimensions re-initialize reservoir storage re-initialize aquifer storage |
read_mgtops | read_mgtops.f90 | Subroutine | operation loop operation character operation type character plant character override |
readcio_read | readcio_read.f90 | Subroutine | read file.cio !!!weather path code !!!weather path code |
readpcom | readpcom.f90 | Subroutine | Open plant community data file |
rec_read_elements | rec_read_elements.f90 | Subroutine | allocate recall outputsby region all hrus are in region setting up regions for recall soft cal and/or output by type all hrus are in region if no regions are input, don"t need elements read data for each element in all landscape cataloging units |
recall_cs | recall_cs.f90 | Subroutine | |
recall_nut | recall_nut.f90 | Subroutine | ** tu Wunused-label: 100 format(i8,i8,100e16.8) |
recall_output | recall_output.f90 | Subroutine | !!!! added for new output write |
recall_read | recall_read.f90 | Subroutine | subdaily daily monthly annual save starting year of recall data set start year if recall starts before start of simulation seet star year if recall starts after start of simulation read and store data increment iyrs (sequential year of recall data) if next year read data for each time step subdaily |
recall_read_cs | recall_read_cs.f90 | Subroutine | daily monthly annual find data end time find data at start of simulation daily monthly annual daily monthly annual xwalk with exco file to get sequential number |
recall_read_salt | recall_read_salt.f90 | Subroutine | daily monthly annual find data end time find data at start of simulation daily monthly annual daily monthly annual xwalk with exco file to get sequential number |
recall_salt | recall_salt.f90 | Subroutine | |
reg_read_elements | reg_read_elements.f90 | Subroutine | setting up regions for landscape soft cal and/or output by landuse allocate regional output files if no regions are input, don"t need elements allocate land use within each region for soft cal and output all hrus are in region read data for each element in all landscape cataloging units |
regres | regres.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ this function calculates constituent loadings to the main channel using USGS regression equations |
res_allo | res_allo.f90 | Subroutine | |
res_control | res_control.f90 | Subroutine | added nbs |
res_convert_mass | hydrograph_module | Subroutine | |
res_cs | res_cs.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes the reservoir constituent mass balance |
res_cs_output | res_cs_output.f90 | Subroutine | |
res_hydro | res_hydro.f90 | Subroutine | release at constant rate release at percentage of principal volume JK: added functionality to use const2 to reduce/increase inflow variable - const is max release release at fraction of inflow release all volume above emergency release based on drawdown days release based on drawdown days + percentage of principal volume release inflow + all volume over target (pvol_m3), use condition associated with action release based on irrigation demand of hru or water rights object const allows a fraction (usually > 1.0) of the demand (m3) released release based on weir equation measured outflow or release |
res_initial | res_initial.f90 | Subroutine | set initial volumes for res and hru types and convert units
ha-m => m3
ha-m => m3
set initial weir height to principal depth - m
use br1 as lag - then compute actual br1 (no option to input actual br1)
calculate shape parameters for surface area equation
only initialize volume and constituents if operational at start of simulation
if not, assume zero volume when dam is built
initialize org-min in reservoir
set initial reservoir org-min to reset for soft calibration
initialize pesticides in reservoir water and benthic from input data
calculate mixing velocity using molecular weight and porosity
initialize pathogens in reservoir water and benthic from input data
calculate initial surface area |
res_nutrient | res_nutrient.f90 | Subroutine | if reservoir volume greater than 1 m^3, perform nutrient calculations n and p concentrations kg/m3 * kg/1000 t * 1000000 ppp = 1000 new inputs thetn, thetap, conc_pmin, conc_nmin Ikenberry wetland eqs modified - not function of area - fraction of difference in concentrations remove nutrients from reservoir by settling other part of equation 29.1.3 in SWAT manual calculate chlorophyll-a and water clarity equation 29.1.6 in SWAT manual check nutrient masses greater than zero calculate amount of nutrients leaving reservoir remove nutrients leaving reservoir |
res_objects | res_objects.f90 | Subroutine | |
res_pest | res_pest.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes the lake hydrologic pesticide balance. |
res_pesticide_output | res_pesticide_output.f90 | Subroutine | print balance for each pesticide daily print pesticide balance zero daily output |
res_read | res_read.f90 | Subroutine | initialize organics and minerals in water initial organic mineral initial pesticides initial pathogens initial heavy metals initial salts d50 - micro meters |
res_read_conds | res_read_conds.f90 | Subroutine | read data for each condition table loop through all conditions read total number of sub conditions read each module read all subconditions |
res_read_cs | res_read_cs.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads reservoir water quality parameters for constituents |
res_read_csdb | res_read_csdb.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads reservoir water quality parameters for constituents |
res_read_elements | res_read_elements.f90 | Subroutine | all hrus are in region setting up regions for reservoir soft cal and/or output by type all hrus are in region if no regions are input, don"t need elements read data for each element in all landscape cataloging units |
res_read_hyd | res_read_hyd.f90 | Subroutine | |
res_read_init | res_read_init.f90 | Subroutine | |
res_read_nut | res_read_nut.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads data from the lake water quality input file (.lwq). This file contains data related to initial pesticide and nutrient levels in the lake/reservoir and transformation processes occuring within the lake/reservoir. Data in the lake water quality input file is assumed to apply to all reservoirs in the watershed. |
res_read_salt | res_read_salt.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads reservoir water quality parameters for salt ions |
res_read_salt_cs | res_read_salt_cs.f90 | Subroutine | |
res_read_saltdb | res_read_saltdb.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads reservoir water quality parameters for salt ions |
res_read_sed | res_read_sed.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads data from the lake water quality input file (.lwq). This file contains data related to initial pesticide and nutrient levels in the lake/reservoir and transformation processes occuring within the lake/reservoir. Data in the lake water quality input file is assumed to apply to all reservoirs in the watershed. |
res_read_weir | res_read_weir.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads data from the lake water quality input file (.lwq). This file contains data related to initial pesticide and nutrient levels in the lake/reservoir and transformation processes occuring within the lake/reservoir. Data in the lake water quality input file is assumed to apply to all reservoirs in the watershed. |
res_rel_conds | res_rel_ctbl.f90 | Subroutine | check all conditions and find module if no conditions were met - set release to zero and return check module conditions if sub conditions never met set release to zero |
res_salt | res_salt.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes the reservoir salt ion balance |
res_salt_output | res_salt_output.f90 | Subroutine | |
res_sediment | res_sediment.f90 | Subroutine | compute concentrations compute change in sediment concentration due to settling update wetland sediment after settling calculate sediment in the outflow and subtract from wetland assume all sand aggregates and gravel settles compute sediment leaving reservoir - ppm -> t |
res_weir_release | res_weir_release.f90 | Subroutine | check if reservoir decision table has a weir discharge command |
reservoir_output | reservoir_output.f90 | Subroutine | !!! daily print !!! monthly print !!! yearly print !!! average annual print |
respest_add | res_pesticide_module | Function | |
respest_ave | res_pesticide_module | Function | |
respest_div | res_pesticide_module | Function | |
rls_routeaqu | rls_routeaqu.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ |
rls_routesoil | rls_routesoil.f90 | Subroutine | put in soil layers - weighted by depth of soil layer excess above ul is added to surface storage in saturation excess routine |
rls_routesurf | rls_routesurf.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ |
rls_routetile | rls_routetile.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ |
rsd_decomp | rsd_decomp.f90 | Subroutine | ! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
rte_read_nut | rte_read_nut.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads data from the lake water quality input file (.lwq). This file contains data related to initial pesticide and nutrient levels in the lake/reservoir and transformation processes occuring within the lake/reservoir. Data in the lake water quality input file is assumed to apply to all reservoirs in the watershed. |
ru_cs_output | ru_cs_output.f90 | Subroutine | |
ru_output | ru_output.f90 | Subroutine | sum monthly variables
daily print - ROUTING UNIT
monthly print - ROUTING UNIT
yearly print - ROUTING UNIT
zero yearly variables |
ru_read | ru_read.f90 | Subroutine | read subbasin parameters |
ru_read_elements | ru_read_elements.f90 | Subroutine | read data for each element in all subbasins dr_om_num was previously xwalked with dr_db()%om_file read subbasin definition data -ie. hru"s in the subbasin Linux initialization issue (Srin) |
ru_salt_output | ru_salt_output.f90 | Subroutine | |
salt_aqu_read | salt_aqu_read.f90 | Subroutine | |
salt_balance | salt_balance.f90 | Subroutine | ** tu Wunused-label: 7001 format(20e16.8) |
salt_cha_read | salt_cha_read.f90 | Subroutine | |
salt_chem_aqu | salt_chem_aqu.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates salt ion concentrations based on equilibrium chemical reactions, for an HRU (precipitation-dissolution, complexation, cation exchange) |
salt_chem_hru | salt_chem_hru.f90 | Subroutine | *** End Precipitation-Dissolution Package ***** |
salt_chem_soil_single | salt_chem_soil_single.f90 | Subroutine | *** End Precipitation-Dissolution Package ***** |
salt_fert | salt_fert.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds salt fertilizer to the soil profile |
salt_fert_read | salt_fert_read.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine reads salt ion fertilizer loading (kg/ha) for various fertilizer types |
salt_fert_wet | salt_fert_wet.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds salt fertilizer to a wetland |
salt_hru_aqu_read | salt_hru_aqu_read.f90 | Subroutine | |
salt_hru_init | salt_hru_init.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calls subroutines which read input data for the databases and the HRUs |
salt_hru_read | salt_hru_read.f90 | Subroutine | |
salt_irr_read | salt_irr_read.f90 | Subroutine | |
salt_irrig | salt_irrig.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds salt mass from irrigation water into the soil profile, and removes salt mass from the source object |
salt_lch | salt_lch.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine simulates the loss of salt via surface runoff, lateral flow, tile flow, and percolation out of the profile |
salt_plant_read | salt_plant_read.f90 | Subroutine | |
salt_rain | salt_rain.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds salt from atmospheric deposition (rainfall, dry) to the soil profile |
salt_roadsalt | salt_roadsalt.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine adds salt from applied road salt to the soil profile |
salt_roadsalt_read | salt_roadsalt_read.f90 | Subroutine | |
salt_uptake | salt_uptake.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine simulates salt ion uptake in the root zone |
salt_uptake_read | salt_uptake_read.f90 | Subroutine | |
salt_urban_read | salt_urban_read.f90 | Subroutine | |
scen_read_bmpuser | scen_read_bmpuser.f90 | Subroutine | read user defined upland CP removal operations |
scen_read_filtstrip | scen_read_filtstrip.f90 | Subroutine | read filter strip operations |
scen_read_grwway | scen_read_grwway.f90 | Subroutine | read grass waterways operations |
sd_chanbud_output | sd_chanbud_output.f90 | Subroutine | !!! daily print !!! monthly print !!! yearly print !!! average annual print |
sd_chanmorph_output | sd_chanmorph_output.f90 | Subroutine | !!! daily print !!! monthly print !!! yearly print !!! average annual print |
sd_channel_control2 | sd_channel_control2.f90 | Subroutine | set ht1 to incoming daily hydrograph if connected to aquifer - add flow set inflow hyds for printing zero outgoing flow and sediment - ht2 use modified qual-2e routines don't route constituents if flow is zero convert mass to concentration compute max flow depth and corresponding travel time during day convert concentration to mass route constituents call mike winchell's new routine for pesticide routing |
sd_channel_control3 | sd_channel_control3.f90 | Subroutine | ! nbs added 7-20-23 set ht1 to incoming daily hydrograph zero outgoing flow and sediment - ht2 zero daily in/out morphology and sediment budget output add water transfer adjust precip and temperature for elevation using lapse rates if connected to aquifer - add flow add aquifer flow to inflow set inflow hyds for printing zero outgoing flow and sediment - ht2 route constituents call mike winchell's new routine for pesticide routing |
sd_channel_nutrients | sd_channel_nutrients.f90 | Subroutine | loop for channel increment 2-stage ditch over-bank full flow under-bank full flow single stage ditch |
sd_channel_output | sd_channel_output.f90 | Subroutine | !!! daily print !!! monthly print // only divides area (daily average values) |
sd_channel_read | sd_channel_read.f90 | Subroutine | allocate sd channel variables initialize orgaincs and minerals in water initial organic mineral initial pesticides initial pathogens initial salts initial constituents !rtb cs set hydraulic and sediment input data set new nutrient and sediment input data |
sd_channel_sediment3 | sd_channel_sediment3.f90 | Subroutine | calculate channel sed and nutrient processes if inflow > 0 calculate peak daily flow interpolate rating curve using peak rate use peakrate as flow rate add precip to inflow - km * m * 1000 m/km * ha/10000 m2 = ha m3 = 10. * mm * ha compute flood plain deposition assume a triangular distribution flow is over within the day flow continues over the day - florate is the rate under the triangle trap efficiency from Dynamic SedNet Component Model Reference Guide: Update 2017 deposit Particulate P and N in the floodplain trap nitrate and sol P in flood plain - when not simulating flood plain interactions? if flood plain link - fill wetlands to emergency fill wetland storage to emergency volume calculate overbank volume left to fill wetland add sediment deposition to calculate mm of deposition over the flood plain later calc bank erosion calculate radius of curvature bank erosion m/yr write for Peter |
sd_channel_surf_link | sd_channel_surf_link.f90 | Subroutine | determine number of hru's calculate total flood plain area and set hru numbers |
sd_hydsed_read | sd_hydsed_read.f90 | Subroutine | |
sd_rating_curve | sd_rating_curve.f90 | Subroutine | check if bottom width (b) is < 0 compute rating curve at 0.1 and 1.0 times bankfull depth c^2=a^2+b^2 - a=dep; a/b=slope; b^2=a^2/slope^2 save bankfull depth and area for flood plain calculations compute rating curve at 1.2 and 2.0 times bankfull depth (flood plain) dep = depth above bankfull flood plain perimeter - p^2 = dep^2 + width^2 flood plain cross section area - dep*width = dep^2 / slope (slope = dep/width) |
sdr_read | sdr_read.f90 | Subroutine | read all subsurface drainage data from sdr.dat |
se_reactions_aquifer | cs_rctn_aqu.f90 | Subroutine | |
se_reactions_soil | cs_rctn_hru.f90 | Subroutine | |
search | search.f90 | Subroutine | |
sep_biozone | sep_biozone.f90 | Subroutine | J.Jeong 3/09/09 Failing system: STE saturates upper soil layers Active system |
sep_read | sep_read.f90 | Subroutine | |
septic_parm_read | septic_parm_read.f90 | Subroutine | |
sim_initday | sim_initday.f90 | Subroutine | initialize variables at beginning of day |
smp_bmpfixed | smp_bmpfixed.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine applies fixed removal eff. from the .ops to upland loads |
smp_buffer | smp_buffer.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the reduction of nitrates through a riparian buffer system - developed for Sushama at NC State |
smp_filter | smp_filter.f90 | Subroutine | Filter only if there is some surface runoff vfs comnposed of two sections one with more concentrated flow than the other |
smp_grass_wway | smp_grass_wway.f90 | Subroutine | grwat_l(:) |km |Length of Grass Waterway grwat_w(:) |none |Width of grass waterway grwat_s(:) |m/m |Slope of grass waterway grwat_spcon(:) |none |sediment transport coefficant defined by user tc_gwat(:) |none |Time of concentration for Grassed waterway and its drainage area surfq(:) |mm H2O |surface runoff generated on day in HRU ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ OUTGOING VARIABLES ~ ~ ~ name |units |definition ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ LOCAL DEFINITIONS ~ ~ ~ name |units |definition ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ qp_cms |m^3/s |peak runoff rate for the day rcharea |m^2 |cross-sectional area of flow ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ SUBROUTINES/FUNCTIONS CALLED ~ ~ ~ |
snowdb_read | snowdb_read.f90 | Subroutine | read snow database data from snow.sno |
soil_awc_init | soil_awc_init.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine initializes soil parameters based on awc |
soil_db_read | soil_db_read.f90 | Subroutine | determine max number for array (imax) and total number in file |
soil_lte_db_read | soil_lte_db_read.f90 | Subroutine | |
soil_nutcarb_init | soil_nutcarb_init.f90 | Subroutine | set soil nutrient initialization from nutrients.sol set soil carbon assume 0.001% carbon if zero calculate percent carbon for lower layers using exponential decrease |
soil_nutcarb_write | soil_nutcarb_write.f90 | Subroutine | sum the output for the entire soil profile !!!! added for new output write !!nbs hru loop |
soil_phys_init | soil_phys_init.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine initializes soil physical properties |
soil_plant_init | soil_plant_init.f90 | Subroutine | |
soil_plant_init_cs | soil_plant_init_cs.f90 | Subroutine | |
soil_text_init | soil_text_init.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine initializes soil parameters based on awc |
soils_init | soils_init.f90 | Subroutine | set first 10 mm layer set remaining layers 1st layer < 20 mm so dont add 10 mm layer initialize soil physical parameters Section 2 this section sets hru soils to appropriate soil database |
solt_db_read | solt_db_read.f90 | Subroutine | read all soil test operations data from soiltest.dat |
sq_canopyint | sq_canopyint.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes canopy interception of rainfall used for methods other than curve number |
sq_crackflow | sq_crackflow.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this surboutine modifies surface runoff to account for crack flow |
sq_crackvol | sq_crackvol.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this surboutine computes total crack volume for the soil profile and modifies surface runoff to account for crack flow ~ ~ ~ LOCAL DEFINITIONS ~ ~ ~ name |units |definition ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
sq_dailycn | sq_dailycn.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ Calculates curve number for the day in the HRU |
sq_daycn | sq_daycn.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ Predicts daily runoff given daily precipitation and snow melt using a modified SCS curve number approach |
sq_greenampt | sq_greenampt.f90 | Subroutine | reset values for day calculate effective hydraulic conductivity calculate total amount of rainfall during day for time step and rainfall intensity for time step urban 60./idt NK Feb 4,08 |
sq_snom | sq_snom.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine predicts daily snom melt when the average air temperature exceeds 0 degrees Celcius |
sq_surfst | sq_surfst.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine determines the net surface runoff reaching the main channel on a given day. The net amount of water reaching the main channel can include water in surface runoff from the previous day and will exclude surface runoff generated on the current day which takes longer than one day to reach the main channel |
sq_volq | sq_volq.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ Call subroutines to calculate the current day"s CN for the HRU and to calculate surface runoff |
stmp_solt | stmp_solt.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine estimates daily average temperature at the bottom of each soil layer |
stor_surfstor | stor_surfstor.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine stores and lags sediment and nutrients in surface runoff |
structure_init | structure_init.f90 | Subroutine | set parameters for structural land use/managment |
structure_set_parms | structure_set_parms.f90 | Subroutine | define soil layer the drainage tile is in setting tile lage time Set some defaults if needed minimum value for vfsratio is 0 max is 300 minimum value for vfscon is 0.1 default is 0.5 max is 0.95 minimum value for vfsch is 0 max is .95 Set defaults - Mannings via Fiener, 2006 length based on one side of a square HRU default to a workable depth based on with and 8:1 sideslopes Default to 3/4 HRU slope default sed coeff to 0.005 Calculate time of concentration for waterway similar to hydro_init.f Check the channel to make sure the enter width and depth will work with 8:1 trap channel, assume width is correct Depth and Width not possible with 8:1 sideslope and trapazoidal channel assume b =.25*width Sediment Particulate P Soluble P Particulate N Soluble N Bacteria |
surface | surface.f90 | Subroutine | calculate subdaily curve number value compute runoff - surfq in mm H2O adjust runoff for loss into crack volume add irrigation runoff and surface runon runoff calculate amount of surface runoff reaching main channel during day (qday) and store the remainder |
swift_output | swift_output.f90 | Subroutine | ** tu Wunused-label: 306 format (I8,4xA16, 10xA16,(F16.4)) ! format of chan_dr.swf check for file_cio.swf to determine if SWIFT folder exist write new file.cio write ave annual precip to SWIFT model write hru data to SWIFT model write hru export coefficients to SWIFT model Allocate wyld_rto array based on the number of hydrological components convert mass to concentrations output runoff/precip ratio - mm=m3/(10ha) write to SWIFT hru export coefficient file Deallocate the wyld_rto array write hru wetland inputs to SWIFT model write to SWIFT wetland input file wetland hru write channel data for SWIFT write channel delivery ratios for SWIFT write aquifer delivery ratios for SWIFT write reservoir delivery ratios for SWIFT write reservoir delivery ratios for SWIFT write recal_swift.rec --> change files to average annual and use the object name for the file name write to each recall file write object.prt file - using the same file for now |
swr_depstor | swr_depstor.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~
this subroutine computes maximum surface depressional storage depth based on |
swr_drains | swr_drains.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine finds the effective lateral hydraulic conductivity and computes drainage or subirrigation flux |
swr_latsed | swr_latsed.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine calculates the sediment load contributed in lateral flow |
swr_origtile | swr_origtile.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes tile drainage using basic tile equations |
swr_percmacro | swr_percmacro.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this surboutine computes percolation by crack flow |
swr_percmain | swr_percmain.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine is the master soil percolation component. |
swr_percmicro | swr_percmicro.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes percolation and lateral subsurface flow from a soil layer when field capacity is exceeded |
swr_satexcess | swr_satexcess.f90 | Subroutine | bottom layers - move water above upper limit to next layer up top layer if no depressional storage (wetland), add to surface runoff check if entire profile is saturated - could get excess in first layer if irrigating on frozen soil if still saturated if depressional storage, add to ponded water if no depressional storage, add to surface runoff rtb gwflow: add ul_excess to runoff storage !!!! Ryan please check; move water and nutrient upward and add to wetland storage Jaehak 2022 this is not actual upward movement of water and nutrient, but a process computationally rebalancing water and mass balance in the soil profile add ratio of nutrients to be reallocated to ponding water substract the fraction of nutrient in the top soil layer add to the wetland water nutrient storage |
swr_substor | swr_substor.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine stores and lags lateral soil flow and nitrate |
swr_subwq | swr_subwq.f90 | Subroutine | calculcate water temperature Stefan and Preudhomme. 1993. Stream temperature estimation from air temperature. Water Res. Bull. p. 27-45 SWAT manual 2.3.13 deg C to deg K |
theta | theta.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ this function corrects rate constants for temperature Equation is III-52 from QUAL2E |
till_parm_read | till_parm_read.f90 | Subroutine | |
time_conc_init | time_conc_init.f90 | Subroutine | compute time of concentration (sum of overland and channel times) assume length to width (l/w) ratio of 2 --> A=lw - A=ll/2 - l=sqrt(A/2) assume channel begins at 1/2 of distance compute fraction of surface runoff that is reaching the main channel urban modeling by J.Jeong |
time_read | time_read.f90 | Subroutine | read weather codes |
topo_read | topo_read.f90 | Subroutine | read all data from topo.dat |
topohyd_init | topohyd_init.f90 | Subroutine | set hru snow paramters shape parameters to describes area of snow cover as a function of amount of snow try setting for tile changing hrg_pet to pet_co - works for old harg_pet input and new pet_co |
treat_read_om | treat_read_om.f90 | Subroutine | |
ttcoef_wway | ttcoef_wway.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes travel time coefficients for routing along the main channel - grassed waterways |
unit_hyd | unit_hyd.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ This subroutine computes variables related to the watershed hydrology: the time of concentration for the subbasins, lagged surface runoff, the coefficient for the peak runoff rate equation, and lateral flow travel time. |
unit_hyd_ru_hru | unit_hyd_ru_hru.f90 | Subroutine | compute unit hydrographs for all hru and ru |
urban_parm_read | urban_parm_read.f90 | Subroutine | |
varinit | varinit.f90 | Subroutine | initialize hru variables - modular code initialize variables NUBS - all these need to be checked urban modeling by J.Jeong |
wallo_control | wallo_control.f90 | Subroutine | check if canal or inflow diversions and set available water from recall object set total volumes of canal diversions (source = "div") - rtb set total volumes of inflow diversions from recall file set total volumes of inflow diversions from monthly flow rate (m3/s) loop through each demand object zero demand, withdrawal, and unmet for each source set demand for each object if demand - check source availability check if water is available from each source - set withdrawal and unmet loop through sources again to check if compensation is allowed compute total withdrawal for demand object from all sources if irrigating set amount applied and runoff irrigation demand treatment of withdrawn water no treatment - treated = withdrawal compute treatment by inputting the mass or concentrations transfer (diversion) of withdrawn and possibly treated water sum demand, withdrawal, and unmet for entire allocation object |
wallo_demand | wallo_demand.f90 | Subroutine | compute total demand from each demand object minicipal demand use recall object for demand reservoir demand use average daily or a flow control decision table use decision table for flow control - water allocation diversion demand use average daily or a flow control decision table use decision table for flow control - water allocation irrigation demand if there is demand, use amount from water allocation file initialize unmet to total demand and subtract as water is withdrawn compute demand from each source object |
wallo_div_const | water_allocation_module | Function | |
wallo_transfer | wallo_transfer.f90 | Subroutine | divert flowing water from channel source reservor source aquifer source |
wallo_treatment | wallo_treatment.f90 | Subroutine | treated outflow is a fraction of withdrawal convert concentration to mass recall option for treated water |
wallo_withdraw | wallo_withdraw.f90 | Subroutine | check if water is available from each source - set withdrawal and unmet divert flowing water from channel source amount that can be diverted without falling below low flow limit reservoir source diversion inflow source aquifer source only have flow, no3, and minp(solp) for aquifer canal diversion source (water removed from channel using point source) unlimited source add source withdrawal hyd to get total withdrawal hyd for the demand object subtract withdrawal from unmet |
wallout_add | water_allocation_module | Function | |
watbod_add | water_body_module | Function | |
watbod_ave | water_body_module | Function | |
watbod_div | water_body_module | Function | |
water_allocation_output | water_allocation_output.f90 | Subroutine | sum output (demand, withdrawals, and unmet) for each source !!! daily print using region water balance print codes for now !!! monthly print sum output (demand, withdrawals, and unmet) for each source !!! yearly print sum output (demand, withdrawals, and unmet) for each source !!! average annual print sum output (demand, withdrawals, and unmet) for each source |
water_allocation_read | water_allocation_read.f90 | Subroutine | read water allocation inputs |
wet_all_initial | wet_all_initial.f90 | Subroutine | set initial volumes and convert units |
wet_cs | wet_cs.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes the wetland constituent mass balance |
wet_cs_output | wet_cs_output.f90 | Subroutine | |
wet_fp_init | wet_fp_init.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine routes computes the intial storage in flood plain wetlands |
wet_initial | wet_initial.f90 | Subroutine | hamm10. => m**3 - assume entire hru is wet and don't use fractional inputs (for simplicity) set initial weir height to principal depth - m set initial n and p concentrations --> (ppm) * (m^3) / 1000 = kg !! ppm = t/m^3 * 10^6 set initial salt ion concentrations and mass (rtb salt) set initial constituent concentrations and mass (rtb cs) update surface area wetland on hru - solve quadratic to find new depth |
wet_irrp | wet_irrp.f90 | Subroutine | this subroutine checks manual continuous irrigation (irrp) setting for wetland/paddy in the management.sch apply irrigation depth based on target ponding depth and the current depth |
wet_read | wet_read.f90 | Subroutine | initialize orgaincs and minerals in water initial organic mineral initial pesticides initial pathogens initial heavy metals initial salts xwalk hydrology inputs xwalk release decision table xwalk with sediment inputs d50 -micro meters xwalk with nutrient inputs |
wet_read_hyd | wet_read_hyd.f90 | Subroutine | |
wet_read_salt_cs | wet_read_salt_cs.f90 | Subroutine | |
wet_salt | wet_salt.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine computes the wetland salt ion mass balance |
wet_salt_output | wet_salt_output.f90 | Subroutine | |
wetland_control | wetland_control.f90 | Subroutine | zero outgoing flow set water body pointer to res initialize variables for wetland daily simulation add precipitation - mmha10.=m3 (used same area for infiltration and soil evap) add irrigation water to the paddy/wetland storage update wetland surface area - solve quadratic to find new depth infiltration of the standing water to the topsoil layer. Any excess infiltration volume estimated here is reverted (back to waterbody) in swr_satexcess. if not a floodplain wetland |
wetland_output | wetland_output.f90 | Subroutine | !!! daily print !!! monthly print !!! yearly print !!! average annual print |
wind_ero_bare | wind_ero_bare.f90 | Subroutine | |
wind_ero_control | wind_ero_control.f90 | Subroutine | |
wind_ero_erod | wind_ero_erod.f90 | Subroutine | |
wind_ero_rough | wind_ero_rough.f90 | Subroutine | |
wind_ero_unshelt | wind_ero_unshelt.f90 | Subroutine | |
wind_ero_veg | wind_ero_veg.f90 | Subroutine | |
wq_k2m | ch_watqual_semi_analitical_function.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ This function solves a semi-analytic solution for the QUAL2E equations (cfr Befekadu Woldegiorgis). |
wq_semianalyt | ch_watqual_semi_analitical_function.f90 | Function | ~ ~ ~ PURPOSE ~ ~ ~ This function solves a semi-analytic solution for the QUAL2E equations (cfr Befekadu Woldegiorgis). |
xmon | xmon.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine determines the month, given the julian date and leap year flag |
zero0 | zero0.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine initializes the values for some of the arrays |
zero1 | zero1.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine initializes the values for some of the arrays |
zero2 | zero2.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine zeros all array values |
zeroini | zeroini.f90 | Subroutine | ~ ~ ~ PURPOSE ~ ~ ~ this subroutine zeros values for single array variables |