Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HARP 2024/2025 Week 2: June 10th-June 14th #1271

Open
4 tasks done
mwdunlap2004 opened this issue Jun 6, 2024 · 2 comments
Open
4 tasks done

HARP 2024/2025 Week 2: June 10th-June 14th #1271

mwdunlap2004 opened this issue Jun 6, 2024 · 2 comments
Assignees

Comments

@mwdunlap2004
Copy link
Collaborator

mwdunlap2004 commented Jun 6, 2024

Here's our plan for the following week after our discussion on Thursday afternoon.

  • Review of Thursday Meeting Information
  • Box diagram of hydrologic processes
    • Look at Winter compared to summer scenarios
      - Basic processes
      - incorporate magnitude of arrow(s) for different seasons
  • Fundamental: Conceptual foundation for precipitation fidelity analyses #1279
  • Rain Event Storm peak identification
    • when storm flow starts
    • separate base flow; initial look at EcoHydrology and it appears that the package is no longer supported.
      • identify/test other R-based potential packages that include base flow separation
      • identify/test peak identification
@durelles
Copy link

durelles commented Jun 6, 2024

@mwdunlap2004 @ilonah22

Here's a great place to get started: https://cran.r-project.org/web/views/Hydrology.html

Here's some more ideas to jump off from:::

Prompt:
I am a hydrologist that uses the R programming language to analyse long-term daily streamflow records. I would like to use a R-package that includes an approach for baseflow separation. List some R-packages that I can explore to perform this task.

Copilot
Certainly! Here are some R packages that you can explore for baseflow separation in hydrology:

hydroTSM: This package is excellent for working with timeseries data. While it doesn’t specifically focus on baseflow separation, it provides useful tools for hydrological analysis1.
lfstat: If you’re interested in calculating various low-flow statistics, lfstat is a good choice2.
EcoHydRology: This package contains an automated digital filter for baseflow separation from streamflow data2.
baseflow: The baseflow package computes hydrograph separation using the conceptual automated process from Pelletier and Andreassian (2020). It includes scalar and vectorized functions to compute correlation criteria for calibrating the baseflow separation model3.
baseflow_sep: Another package that performs baseflow separation. It uses a parameter c (varying between 0 and 1) to separate baseflow from runoff. The method “constant_slope” draws a line with a constant slope from the hydrograph minima to the next intersection with it4.

@durelles
Copy link

Team - I tried grwat package this morning that has a base flow separation function. See below.
Screenshot 2024-06-10 at 9 34 02 AM

library(grwat)
library(ggplot2)
library(dplyr)
library(tidyr)
library(lubridate)

Obtain Streamflow

Initially tried 15-minute data and separation fails.
Daily data appears to work.
There are multiple approaches to apply; I used the default. Examples are provided in the function help menu.


site_id <- "01634000"
parameterCd <- "00060"
startDate <- "2022-10-01"
endDate <- "2023-10-01"
  
rawdata <- dataRetrieval::readNWISdv(site_id, parameterCd, startDate, endDate)
rawdata <- rawdata %>% 
  rename(Q = X_00060_00003, dateTime = Date)

Baseflow in grwat

Daily data appears to work.
There are multiple approaches to apply; I used the default. Examples are provided in the function help menu.


hdata = rawdata %>% 
  mutate(Qbase = gr_baseflow(Q, method = 'lynehollick', 
                                   a = 0.925, passes = 3))

gp <- ggplot(hdata) +
  geom_area(aes(dateTime, Q), fill = 'steelblue', color = 'black') +
  geom_area(aes(dateTime, Qbase), fill = 'orangered', color = 'black')
gp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants