nickbond / hydrostats

Calculate hydrologic indices from daily streamflow data
26 stars 5 forks source link

Gives different results than WHAT #2

Closed aditibhaskar closed 9 years ago

aditibhaskar commented 9 years ago

I have tried out the Web-based Hydrograph Analysis Tool (WHAT https://engineering.purdue.edu/~what/) and the digital filter separation in hydrostats, both using one-parameter (0.925), and they seem to give different results. I have uploaded a picture showing a comparison between the two outputs. Below is the code I used in hydrostats.

Trib104flowdata <- getDataUSGS("01644371",2004,2014)[[1]]
Trib104flowdata$Date <-Trib104flowdata$date
Trib104flowdata$Q <- Trib104flowdata$discharge
baseflows.output <- baseflows(Trib104flowdata, a= 0.925, ts="daily")
baseflows.output$date <- baseflows.output$Date

capture

nickbond commented 9 years ago

Hi Aditi, Thanks for your email. I think the difference int eh results may be to do with the number of times the digital filter is applied. It is common practice to apply the LH filter 3 times (forward, then backward then forward again), which is what the hydrostats tool does. I’ve read the paper associated with WHAT and it doesn’t seem it does the same thing. Perhaps you could try running the output backward then forward through the WHAT tool itteratively to see whether it brings the results into line. in my previous testing hydrostats produces the same results as other implementations that apply the 3-pass filtering. I hope that helps somewhat?

Regards

Nick

On 27 Jun 2015, at 00:18, Aditi Bhaskar notifications@github.com wrote:

I have tried out the Web-based Hydrograph Analysis Tool (WHAT https://engineering.purdue.edu/~what/ https://engineering.purdue.edu/%7Ewhat/) and the digital filter separation in hydrostats, both using one-parameter (0.925), and they seem to give different results. I have uploaded a picture showing a comparison between the two outputs. Below is the code I used in hydrostats.

require(hydrostats) Trib104flowdata <- getDataUSGS("01644371",2004,2014)[[1]] Trib104flowdata$Date <-Trib104flowdata$date Trib104flowdata$Q <- Trib104flowdata$discharge baseflows.output <- baseflows(Trib104flowdata, a= 0.925, ts="daily") baseflows.output$date <- baseflows.output$Date

https://cloud.githubusercontent.com/assets/12665136/8379245/a741844e-1bec-11e5-9ec2-7aa6d7d7b411.PNG — Reply to this email directly or view it on GitHub https://github.com/nickbond/hydrostats/issues/2.

aditibhaskar commented 9 years ago

Nick,

Thanks, that makes sense now because I only ran through the WHAT filter once.

Thanks, Aditi

On Wed, Jul 8, 2015 at 5:21 AM, Nick Bond notifications@github.com wrote:

Hi Aditi, Thanks for your email. I think the difference int eh results may be to do with the number of times the digital filter is applied. It is common practice to apply the LH filter 3 times (forward, then backward then forward again), which is what the hydrostats tool does. I’ve read the paper associated with WHAT and it doesn’t seem it does the same thing. Perhaps you could try running the output backward then forward through the WHAT tool itteratively to see whether it brings the results into line. in my previous testing hydrostats produces the same results as other implementations that apply the 3-pass filtering. I hope that helps somewhat?

Regards

Nick

On 27 Jun 2015, at 00:18, Aditi Bhaskar notifications@github.com wrote:

I have tried out the Web-based Hydrograph Analysis Tool (WHAT https://engineering.purdue.edu/~what/ < https://engineering.purdue.edu/%7Ewhat/>) and the digital filter separation in hydrostats, both using one-parameter (0.925), and they seem to give different results. I have uploaded a picture showing a comparison between the two outputs. Below is the code I used in hydrostats.

require(hydrostats) Trib104flowdata <- getDataUSGS("01644371",2004,2014)[[1]] Trib104flowdata$Date <-Trib104flowdata$date Trib104flowdata$Q <- Trib104flowdata$discharge baseflows.output <- baseflows(Trib104flowdata, a= 0.925, ts="daily") baseflows.output$date <- baseflows.output$Date

< https://cloud.githubusercontent.com/assets/12665136/8379245/a741844e-1bec-11e5-9ec2-7aa6d7d7b411.PNG

— Reply to this email directly or view it on GitHub < https://github.com/nickbond/hydrostats/issues/2>.

— Reply to this email directly or view it on GitHub https://github.com/nickbond/hydrostats/issues/2#issuecomment-119515823.

Aditi S. Bhaskar NSF Postdoctoral Research Fellow U.S. Geological Survey, Eastern Geographic Science Center 12201 Sunrise Valley Drive, MSN 521, Reston, VA 20192 Phone: (703) 648-5157 http://aditibhaskar.weebly.com/