knitr::opts_chunk$set(echo = TRUE, message = FALSE)
knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
library(tidyverse)
library(readxl)
library(cvpiaHabitat)
library(scales)

Future Data Improvements

Instream Spawning and Rearing Habitat

Data Source: California Department of Water Resources 2004 and Thomas R. Payne & Associates 2002

Instream spawning and rearing habitat for Fall Run Chinook Salmon and Steelhead in the Feather River is based on data from California Department of Water Resources and Thomas R. Payne & Associates instream flow evaluations for the relicensing of Oroville facilities. These evaluations developed relationships between flow and suitable spawning and rearing habitat for 23.25 miles of the Feather River between the Fish Barrier Dam and Honcut Creek, consisting of two river segments. The DWR FERC instream spawning and rearing habitat data was provided by Mark Gard from the U.S. Fish and Wildlife Service in a spreadsheet (see '~/cvpiaHabitat/data-raw/mark_gard_data/IFIMWUA.xlsx').

Spawning WUA

The Fall Run Chinook Salmon and Steelhead spawning habitat data from Gard was cross-referenced with the original FERC data and amended to include all of the original data in the FERC reports by adding values digitized from the flow : area curves in the FERC evaluation reports (pages 35-36) using https://automeris.io/WebPlotDigitizer/. The FERC instream flow evaluation produced flow : area curves for "upper" and "lower" reaches. These values were combined into a single area weighted by study reach length for each flow value.

upper_fr <- read_csv('data-raw/instream/feather/alt_upper_feather_spawn_wua_rsi.csv') %>%
  mutate(location = 'upper')

lower_fr <- read_csv('data-raw/instream/feather/alt_lower_feather_spawn_wua_rsi.csv') %>%
  mutate(location = 'lower')

upper_st <- read_csv('data-raw/instream/feather/alt_upper_feather_spawn_wua_rsi_steelhead.csv') %>%
  mutate(location = 'upper')

lower_st <- read_csv('data-raw/instream/feather/alt_lower_feather_spawn_wua_rsi_steelhead.csv') %>%
  mutate(location = 'lower')


spawning <- tibble(
  flow_cfs = c(200, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500, 3000, 3500, 
               4000, 4500, 5000, 5500, 6000, 6500, 7000),
  upper_wua_fr = approx(upper_fr$flow, upper_fr$wua_rsi, xout = flow_cfs, rule = 2)$y,
  lower_wua_fr = approx(lower_fr$flow, lower_fr$wua_rsi, xout = flow_cfs, rule = 2)$y,
  upper_wua_st = approx(upper_st$flow, upper_st$wua_rsi, xout = flow_cfs, rule = 2)$y,
  lower_wua_st = approx(lower_st$flow, lower_st$wua_rsi, xout = flow_cfs, rule = 2)$y) %>% 
  mutate(FR_spawn_wua = upper_wua_fr * (9.75/18) + lower_wua_fr * (8.25/18),
         ST_spawn_wua = upper_wua_st * (9.75/18) + lower_wua_st * (8.25/18)) %>%
  select(flow_cfs, FR_spawn_wua, ST_spawn_wua)

Spawning WUA Plot

The following plot shows the weighted usable spawning area in square feet per thousand feet of river for Fall Run Chinook Salmon and Steelhead. These area per length rates are multiplied by the total spawning reach length mapped by the SIT and applied for the flow in each month in the DSM.

spawning %>%
  rename(`fall run` = FR_spawn_wua, steelhead = ST_spawn_wua) %>% 
  gather(species, wua, -flow_cfs) %>% 
  ggplot(aes(flow_cfs, wua, color = species)) +
  geom_line(color='light blue') +
  labs(x = 'flow (cfs)', y = 'spawning WUA (sqft/1000ft)') +
  scale_y_continuous(labels = comma) + 
theme_minimal()

Rearing WUA

The fry and juvenile instream rearing habitat weighted usable areas for Fall Run Chinook Salmon in the Feather River are provided by Mark Gard (see '~/cvpiaHabitat/data-raw/mark_gard_data/IFIMWUA.xlsx').

feather_raw <- read_excel('data-raw/mark_gard_data/IFIMWUA.xlsx', range = "A1:D8", sheet = 'Feather')
# feather_raw

Rearing WUA Plot

The following plot shows the weighted usable rearing area in square feet per thousand feet of river for Fall Run Chinook Salmon fry and juvenile. These rates are multiplied by the total rearing reach length mapped by the SIT.

feather_raw %>% 
  filter(!is.na(`Fry Rearing`)) %>%
  select(Flow, fry = `Fry Rearing`, juvenile = `Juv Rearing`) %>%
  gather(lifestage, wua, - Flow) %>%
  ggplot(aes(Flow, wua, color = lifestage)) +
  geom_line() +
  labs(x = 'flow (cfs)', y = 'rearing WUA (sqft/1000ft)') +
  scale_y_continuous(labels = comma)

Combine Spawning and Rearing Data

The instream spawning and rearing habitat data described above for Fall Run Chinook Salmon (FR) and Steelhead (ST) is combined for use in the DSM in the following format.

feather_river_instream <- feather_raw %>% 
  select(-Spawning) %>% 
  rename(flow_cfs = Flow, FR_fry_wua = `Fry Rearing`, FR_juv_wua = `Juv Rearing`) %>% 
  full_join(spawning) %>% 
  arrange(flow_cfs) %>% 
  mutate(watershed = 'Feather River') %>%
  select(flow_cfs,
         FR_spawn_wua,
         FR_fry_wua,
         FR_juv_wua,
         ST_spawn_wua,
         watershed)

feather_river_instream  
# devtools::use_data(feather_river_instream, overwrite = TRUE)


FlowWest/cvpiaHabitat documentation built on Oct. 27, 2020, 2:09 p.m.