#Demonstrate the use of SWAT.py
#Observed streamflow should be in SWATtxtinout folder named as "ObsData.dat"
#"ObsData.dat" can be prepared by streamflow scripts from this website
#Author: Mehmet Ercan (mehmetbercan@gmail.com) at USC (Columbia,SC)
#Revised 04/09/2014

from SWAT import SWATplot
#-------- input -------------------------------------------------
d = r"C:\pathtoswattxtinout" #raw_input('Enter SWAT directory (eg. C:\SWATtxtinout): ')
bd = "1/1/2005" #raw_input('Enter SWAT directory (eg.12/14/2006): ')
ed = "12/30/2006" #raw_input('Enter SWAT directory (eg.1/3/2007): ')
outlet = 26
#----------------------------------------------------------------
sw = SWATplot(d)
sw.DefineTimePeriod(bd,ed)
sw.ReadDailySWATrchfile(outlet,2) #(OutletSubbasinNumber,columnNumber)


sw.E("daily")
sw.R2("daily")
sw.PB()

##sw.get_DailyStreamflow --> gets daily data from the output.rch file columnNumber
##sw.Plot("daily") -->Draw plot
##sw.E("daily")
##sw.E("monthly")
##sw.E("yearly")
