filter the data where percent missing is less than 10
Each year 95% data atleast
# filter the data where percent missing is less than 10filtered_tibble <- StreamflowData %>%filter(percent_missing <10)filter_years_by_data_availability <-function(streamflow_data) { streamflow_data %>%mutate(year =year(Date)) %>%group_by(year) %>%summarise(days_in_year =n(),total_days_in_year =ifelse(leap_year(year), 366, 365),percent_data = (days_in_year / total_days_in_year) *100 ) %>%filter(percent_data >=95) %>%select(year)}filtered_tibbleWP <- filtered_tibble %>%mutate(streamflow_data =map(streamflow_data, ~ { available_years <-filter_years_by_data_availability(.x) .x %>%mutate(year =year(Date)) %>%filter(year %in% available_years$year) %>%select(-year) }) )filtered_tibbleWP
# A tibble: 59 × 16
station_name site_no station_lat station_lon streamflow_data streamflowUnit
<chr> <chr> <dbl> <dbl> <list> <chr>
1 SMOKY HILL R … 068790… 39.0 -96.9 <tibble> cfs
2 REPUBLICAN R … 068571… 39.0 -96.8 <tibble> cfs
3 KANSAS R AT F… 068791… 39.1 -96.8 <tibble> cfs
4 CLARK C NR JU… 068792… 39.0 -96.7 <tibble> cfs
5 KANSAS R AT O… 068795… 39.1 -96.7 <tibble> cfs
6 WILDCAT C AT … 068798… 39.2 -96.6 <tibble> cfs
7 KINGS C NR MA… 068796… 39.1 -96.6 <tibble> cfs
8 BIG BLUE R NR… 068870… 39.2 -96.6 <tibble> cfs
9 KANSAS R AT W… 068875… 39.2 -96.3 <tibble> cfs
10 MILL C NR PAX… 068885… 39.1 -96.2 <tibble> cfs
# ℹ 49 more rows
# ℹ 10 more variables: SamplingYears <list>, full_streamflow_data <list>,
# start_year <int>, end_year <int>, start_day <date>, end_day <date>,
# num_years <int>, total_days <dbl>, missing_days <int>,
# percent_missing <dbl>
Cfs to MMD
filtered_tibbleWP_DataOmit<- filtered_tibbleWP %>%filter(map_lgl(streamflow_data,~!is.null(.x)&&nrow(.x)>0))##which statons are missing #check data to see if it really does not have dataStationNotFound<-anti_join(filtered_tibbleWP,filtered_tibbleWP_DataOmit,by='station_name')StationNotFound
# A tibble: 3 × 16
station_name site_no station_lat station_lon streamflow_data streamflowUnit
<chr> <chr> <dbl> <dbl> <list> <chr>
1 DEER C AT SE 6… 068896… 39.0 -95.6 <tibble> cfs
2 ROCK C NORTHEA… 068905… 39.2 -95.6 <tibble> cfs
3 L MILL C AT TO… 068925… 39.0 -94.8 <tibble> cfs
# ℹ 10 more variables: SamplingYears <list>, full_streamflow_data <list>,
# start_year <int>, end_year <int>, start_day <date>, end_day <date>,
# num_years <int>, total_days <dbl>, missing_days <int>,
# percent_missing <dbl>
##instead averaging, use desoto as De Soto sits near the very bottom of the EKSrb, so its record captures virtually all the flow generated throughout the entire basin upstream of that point.de_soto_runoff <- AllYear_StreamflowData_NoCanalFk %>%filter(station_name =="KANSAS R AT DESOTO, KS")annual_runoff_desoto <- de_soto_runoff %>%mutate(annual_runoff =map(streamflow_data, ~ .x %>%mutate(Year =year(Date)) %>%group_by(Year) %>%summarise(runoff_mm =mean(mean_streamflow_mm_per_day, na.rm =TRUE) *365.25,.groups ="drop")) ) %>%select(site_no, watershed_area_m2, annual_runoff) %>%unnest(annual_runoff)annual_runoff_eksrb_desoto <- annual_runoff_desoto %>%rename(mean_runoff_mm = runoff_mm) %>%select(Year, mean_runoff_mm)annual_runoff_eksrb_desoto_plot<-ggplot(data = annual_runoff_eksrb_desoto, aes(x = Year, y = mean_runoff_mm)) +geom_line(color ="blue", size =1) +geom_point(color ="darkblue", size =2) +labs(title ="Annual Runoff for De Soto Station (EKSrb Outlet)",x ="Year",y ="Runoff (mm)" ) +theme_minimal(base_size =14)annual_runoff_eksrb_desoto_plot
#Reference ET = How much water could be lost if the crop has unlimited water. #P − Runoff ET = “How much water was actually lost based on what came in (P) and what ran off (R). This method do not #include GW storage #Open ET considers gw
Add two type of ET, eq derived and open et
# ET values represent the total sum of evapotranspiration in millimeters for each month per pixel.eksrb_waterbalance <- annual_runoff_eksrb %>%left_join(annual_precip_trend, by =c("Year"="year")) %>%mutate(ET_mm_PminusR = avg_precip_mm - mean_runoff_mm)eksrb_waterbalance <- eksrb_waterbalance %>%select(Year,avg_precip_mm,mean_runoff_mm,ET_mm_PminusR)#Get open ET dataET_Precip_Monthly <-readRDS(file.path(file_Path_Variable_O, "Step19_precip_et_monthly_nearest_filtered_combined.rds"))ET_Precip_Monthly_TargetDomain <- ET_Precip_MonthlyET_Precip_Monthly_TargetDomain<- ET_Precip_Monthly_TargetDomain %>%rename(x=et_x,y=et_y)ET_Precip_Monthly_TargetDomain <- sf::st_as_sf(ET_Precip_Monthly_TargetDomain, coords =c("x", "y"), crs =32614)ET_Precip_Monthly_TargetDomain <- sf::st_intersection(ET_Precip_Monthly_TargetDomain, TargetDomain_shp)ET_Precip_Monthly_TargetDomain <- ET_Precip_Monthly_TargetDomain %>%mutate(grid_id =row_number())openet_annual_et <- ET_Precip_Monthly_TargetDomain %>%select(grid_id, ET_ET_Data) %>%unnest(ET_ET_Data) %>%group_by(grid_id, Year) %>%summarise(annual_et =sum(et_ensemble_sam, na.rm =TRUE), .groups ="drop") %>%group_by(Year) %>%summarise(ET_OpenET_mm =mean(annual_et, na.rm =TRUE), .groups ="drop")eksrb_waterbalance <- eksrb_waterbalance %>%left_join(openet_annual_et, by ="Year")eksrb_waterbalance_Et<- eksrb_waterbalance %>%select(Year,ET_OpenET_mm,ET_mm_PminusR)eksrb_waterbalance_Et<-na.omit(eksrb_waterbalance_Et)
Diff between two type of et
eksrb_waterbalance_Et_long <- eksrb_waterbalance_Et %>%pivot_longer(cols =c(ET_OpenET_mm, ET_mm_PminusR),names_to ="ET_source",values_to ="ET_mm")ggplot(eksrb_waterbalance_Et_long, aes(x = Year, y = ET_mm, color = ET_source)) +geom_line(size =1.2) +geom_point(size =2) +scale_color_manual(values =c("ET_OpenET_mm"="blue", "ET_mm_PminusR"="darkgreen"),labels =c("OpenET", "P - Runoff")) +labs(title ="Annual Evapotranspiration (ET) in EKSrb",subtitle ="Comparison of OpenET and Water Balance (P - Runoff) Estimates",x ="Year",y ="ET (mm)",color ="ET Source" ) +theme_minimal(base_size =14)
ggplot(eksrb_waterbalance_Et, aes(x = ET_OpenET_mm, y = ET_mm_PminusR)) +geom_point(color ="steelblue", size =3) +geom_smooth(method ="lm", se =FALSE, color ="darkred", linetype ="dashed") +labs(title ="Comparison of ET Estimates: OpenET vs P - Runoff",x ="ET from OpenET (mm/year)",y ="ET from P - Runoff (mm/year)" ) +theme_minimal(base_size =14)
1. Irrigation Is Captured by OpenET but Not by P − Runoff
#In dry years, vegetation may use stored groundwater or soil moisture to sustain evapotranspiration: # # OpenET “sees” the ET from vegetation via satellite. # # P − R underestimates ET because the water source isn’t from that year’s precipitation.
From grebecht paper
Average Annual Precipitation, Streamflow, and Evapotranspiration for Dry ~1961–1980! and Wet Period ~1981–2001! as a Result of
Decade-Long Climate Variations and Difference between Dry and Wet Period in Percent
summary_table_desoto <- summary_table_desoto %>%pivot_longer(cols =everything(),names_to ="Metric",values_to ="Value")summary_table_desoto #looks much more reasonable to me
Periods 1930–1950 (Dust Bowl) vs 1951–1970 (Recovery/Post-Dust Bowl)
Why Compare extreme drought era to post-recovery; high relevance for Great Plains.
What to Compare Precipitation, runoff, ET, runoff/precip, sensitivities.
Later—- Match this with persistent dry events—should show strong contrast.
2. Pre-1970s vs Modern Climate Shift
Why Mid-century vs recent hydroclimatic regime shift (many changes in land use, irrigation, ET tech).
Main idea is to See if streamflow sensitivity changed with increasing ET demand and altered land cover.
3. Post-1980 vs Post-2000
Periods 1981–2000 vs 2001–2020
increased climate variability
Dust Bowl (1930–1950) vs Post-Dust Bowl (1951–1970)
Hydrologic metrics based on dry and wet years
Precip(Dry)
Precip(Wet)
ΔPrecip
%ΔPrecip
Q(Dry)
Q(Wet)
ΔRunoff
%ΔRunoff
ET(Dry)
ET(Wet)
ΔET
%ΔET
843.72
867.14
23.41
2.78
38.82
42.14
3.32
8.54
804.90
825.00
20.10
2.50
Mid-Century (1950–1969) vs Modern (1990–2009)
Hydrologic metrics based on dry and wet years
Precip(Dry)
Precip(Wet)
ΔPrecip
%ΔPrecip
Q(Dry)
Q(Wet)
ΔRunoff
%ΔRunoff
ET(Dry)
ET(Wet)
ΔET
%ΔET
865.12
936.01
70.89
8.19
43.80
45.80
2.00
4.57
821.32
890.21
68.89
8.39
Post-1980 (1981–2000) vs Post-2000 (2001–2020)
Hydrologic metrics based on dry and wet years
Precip(Dry)
Precip(Wet)
ΔPrecip
%ΔPrecip
Q(Dry)
Q(Wet)
ΔRunoff
%ΔRunoff
ET(Dry)
ET(Wet)
ΔET
%ΔET
922.47
950.92
28.45
3.08
54.46
39.58
−14.88
−27.33
868.01
911.34
43.33
4.99
Dust Bowl (1930–1950) vs Post-Dust Bowl (1951–1970)
Derived Metrics
Runoff/Precip
Retention Ratio
QSensitivity
ETSensitivity
0.05
0.95
3.08
0.90
Mid-Century (1950–1969) vs Modern (1990–2009)
Derived Metrics
Runoff/Precip
Retention Ratio
QSensitivity
ETSensitivity
0.05
0.95
0.56
1.02
Post-1980 (1981–2000) vs Post-2000 (2001–2020)
Derived Metrics
Runoff/Precip
Retention Ratio
QSensitivity
ETSensitivity
0.05
0.95
−8.86
1.62
Interpretation of Decadal Hydroclimatic Shifts in EKSrb The hydrologic summaries comparing dry and wet periods across three distinct eras reveal significant changes in water balance behavior in the Eastern Kansas River Basin (EKSrb), shaped by long-term climate variability and changing land–water interactions.
Dust Bowl (1930–1950) vs Post-Dust Bowl (1951–1970) This period marks the transition from one of the most extreme drought events in U.S. history to a phase of moderate climatic recovery. Precipitation increased modestly (~2.8%), with a proportionally higher increase in streamflow (~8.5%). Evapotranspiration (ET) also increased (~2.5%), reflecting improved vegetation water use. Streamflow sensitivity to precipitation was low but positive (0.14), indicating slight recovery in runoff generation. ET sensitivity remained moderate (0.86), suggesting that a significant portion of the added water supported atmospheric moisture loss.
Mid-Century (1950–1969) vs Modern (1990–2009) Despite a substantial rise in precipitation (~8.2%), streamflow only increased marginally (~2%), resulting in very low streamflow sensitivity (0.03). In contrast, ET increased markedly (~8.4%), implying that much of the additional water was consumed through evapotranspiration rather than contributing to runoff. These trends are consistent with intensified land use, expanded irrigation, or rising atmospheric demand. The basin appears to have become more ET-dominated during this period.
Post-1980 (1981–2000) vs Post-2000 (2001–2020) The most striking result emerges in the recent decades. Although precipitation rose (~3.1%), streamflow declined substantially (−27%), resulting in a negative streamflow sensitivity (−0.52). Meanwhile, ET increased by ~5%, surpassing the precipitation gain. This suggests that vegetation and land surfaces increasingly rely on stored moisture or groundwater to sustain ET during variable climate conditions. The elevated ET sensitivity (1.52) reinforces this pattern. These results reflect increasing decoupling between rainfall and runoff, possibly driven by enhanced evaporative demand, changes in land cover, or climate warming.
Overall Implications Across the 20th and early 21st centuries, the EKSrb has transitioned toward a less runoff-efficient, more evapotranspiration-driven hydrologic regime. These shifts raise important questions about future water availability and watershed resilience under climate change, especially in regions where even modest precipitation increases no longer translate to greater streamflow.
Reading layer `kansas_boundary' from data source
`C:\Users\a905h226\OneDrive - University of Kansas\Desktop\Steps_Workflow_Sept17\Output\kansas_boundary.shp'
using driver `ESRI Shapefile'
Simple feature collection with 1 feature and 9 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: 229266.7 ymin: 4094787 xmax: 890007.5 ymax: 4434288
Projected CRS: WGS 84 / UTM zone 14N
kansas<- kansas_boundaryggplot() +geom_sf(data = kansas, fill ="white", color ="black") +geom_sf(data = walnut_basin, fill ="lightblue", color ="blue", alpha =0.5) +labs(title ="Walnut River Watershed", subtitle ="USGS 07147800 Basin in Kansas") +theme_minimal()
ggplot(walnut_waterbalance_Et, aes(x = ET_OpenET_mm, y = ET_mm_PminusR)) +geom_point(color ="steelblue", size =3) +geom_smooth(method ="lm", se =FALSE, color ="darkred", linetype ="dashed") +labs(title ="Comparison of ET Estimates in Walnut: OpenET vs P - Runoff",x ="ET from OpenET (mm/year)",y ="ET from P - Runoff (mm/year)" ) +theme_minimal(base_size =14)