Checking for non-preferred file/folder path names (may take a long time depending on the number of files/folders) ...

Data and code for: Modeling Seasonal Effects of River Flow on Water Temperatures in an Agriculturally Dominated California River


Authors:
Owners: This resource does not have an owner who is an active HydroShare user. Contact CUAHSI (help@cuahsi.org) for information on this resource.
Type: Resource
Storage: The size of this resource is 982.7 MB
Created: Mar 08, 2021 at 6:35 p.m.
Last updated: Feb 05, 2024 at 2:01 p.m.
DOI: 10.4211/hs.a6653e2919964f9b840ec0340d86e11c
Citation: See how to cite this resource
Sharing Status: Published
Views: 879
Downloads: 112
+1 Votes: Be the first one to 
 this.
Comments: No comments (yet)

Abstract

This resource contains the data and scripts used for: Asarian, J.E., Robinson, C., Genzoli, L. 2023. Modeling Seasonal Effects of River Flow on Water Temperatures in an Agriculturally Dominated California River. Water Resources Research, e2022WR032915. https://doi.org/10.1029/2022WR032915.

Abstract from the article:
Low streamflows can increase vulnerability to warming, impacting coldwater fish. Water managers need tools to quantify these impacts and predict future water temperatures. Contrary to most statistical models’ assumptions, many seasonally changing factors (e.g., water sources and solar radiation) cause relationships between flow and water temperature to vary throughout the year. Using 21 years of air temperature and flow data, we modeled daily water temperatures in California’s snowmelt-driven Scott River where agricultural diversions consume most summer surface flows. We used generalized additive models to test time-varying and nonlinear effects of flow on water temperatures. Models that represented seasonally varying flow effects with intermediate complexity outperformed simpler models assuming constant relationships between water temperature and flow. Cross-validation error of the selected model was ≤1.2 °C. Flow variation had stronger effects on water temperatures in April–July than in other months. We applied the model to predict effects of instream flow scenarios proposed by regulatory agencies. Relative to historic conditions, the higher instream flow scenario would reduce annual maximum temperature from 25.2 °C to 24.1 °C, reduce annual exceedances of 22 °C (a cumulative thermal stress metric) from 106 to 51 degree-days, and delay onset of water temperatures >22 °C during some drought years. Testing the same modeling approach at nine additional sites showed similar accuracy and flow effects. These methods can be applied to streams with long-term flow and water temperature records to fill data gaps, identify periods of flow influence, and predict temperatures under flow management scenarios.

The files are organized into 6 folders: R_Scripts, SourceDataFiles, CompiledData, WorkingFiles, Outputs, and OtherStudies. Details of file are provided in the README.txt file.

Subject Keywords

Coverage

Spatial

Coordinate System/Geographic Projection:
WGS 84 EPSG:4326
Coordinate Units:
Decimal degrees
Place/Area Name:
Klamath Basin, California, USA
North Latitude
41.8541°
East Longitude
-122.5939°
South Latitude
40.6565°
West Longitude
-123.9784°

Temporal

Start Date:
End Date:

Content

README.txt

INTRODUCTION
This resource contains the data and scripts used for: Asarian, J.E., Robinson, C., Genzoli, L. (in review, Water Resources Research). Modeling Seasonal Effects of River Flow on Water Temperatures in an Agriculturally Dominated California River. Final citation will be added to metadata once article is published.

For questions, contact: Eli Asarian (Riverbend Sciences, Eureka, CA, USA), eli@riverbendsci.com

Abstract from the article:
Low streamflows can increase vulnerability to warming, impacting coldwater fish. Water managers need tools to quantify these impacts and predict future water temperatures. Contrary to most statistical models assumptions, many seasonally changing factors (e.g., water sources and solar radiation) cause relationships between flow and water temperature to vary throughout the year. Using 21-years of air temperature and flow data, we modeled daily water temperatures in Californias snowmelt-driven Scott River where agricultural diversions consume most summer surface flows. We used generalized additive models to test time-varying and nonlinear effects of flow on water temperatures. Models that represented seasonally varying flow effects with intermediate complexity outperformed simpler models assuming constant relations between water temperature and flow. Cross-validation error of the selected model was =1.2 C. Flow variation had stronger effects on water temperatures in AprilJuly than in other months. We applied the model to predict effects of instream flow scenarios proposed by regulatory agencies. Relative to historic conditions, the higher instream flow scenario would reduce annual maximum temperature from 25.2 C to 24.1 C, reduce annual exceedances of 22 C (a cumulative thermal stress metric) from 106 to 51 degree-days, and delay onset of water temperatures >22 C during some drought years. Testing the same modeling approach at nine additional sites showed similar accuracy and flow effects. These methods can be widely applied to streams with long-term flow and water temperature records, with applications including scenario prediction and infilling data gaps.

INSTRUCTIONS FOR USE

INSTRUCTIONS FOR RUNNING THE SCRIPTS
1. Download the entire contents of this resource and place all 6 folders in a single folder (i.e., match the data folder structure of the resource)
2. Open the "r.Rproj" file in R Studio. This file will set R's working directory so that the codes work properly.
a) Open the R script "R_Scripts/MasterScript.R"
b) Review the list of packages at the top of "R_Scripts/MasterScript.R", and install any missing packages.
c) Run all lines in "MasterScript.R". This will call the 6 individual scripts ("R_Scripts/Script_A_compile.R", "R_Scripts/Script_B_analysis_allsites.R", and "R_Scripts/Script_C_analysis_Scott.R", "Script_D_figures_and_tables_part1.R", "Script_E_rho_rensitivity.R", "Script_F_figures_and_tables_part2.R") that compile and analyze data and prepare final figures and tables. MasterScript.R is provided for convenience, but for troubleshooting purposes it might be necessary to run each script individually. 
d) If the R console shows an "Output created:" message for each of the 6 scripts that signifies the scripts all successfully ran, and updated outputs should now appear in the "Outputs/FiguresManuscript", "Outputs/Tables/Manuscript", and "Outputs/R_Markdown" folders.


FILE CONTENTS
As detailed below, this resource is organized into 6 folders: R_Scripts, SourceDataFiles, CompiledData, WorkingFiles, and Outputs.

"R_Scripts" folder
This folder contains all of the scripts used to  compile and analyze data and prepare final figures and tables. Files are: MasterScript.R, 
Script_A_compile.R, Script_B_analysis_allsites.R, Script_C_analysis_Scott.R, Script_D_figures_and_tables_part1.R, Script_E_rho_rensitivity.R, and Script_F_figures_and_tables_part2.R.


"Outputs/R_Markdown" folder
This folder contains 24 HTML files that are reports showing code and resulting outputs from the running of the R scripts. These HTML files will be overwritten every time the scripts are re-run. There is 1 file for Script_A, 10 files for Script_B (one per site), 1 file for Script_C, 1 file for Script_D, 10 files for Script_E (one per site), and 1 file for Script_F. 


"Outputs/FiguresManuscript"
This folder contains all the figures from the manuscript main text and Supporting Information, as produced by the R scripts. The final manuscript figures included some manual refinements like added labels, etc. that are not included in these script-produced files. See article for captions.


"Outputs/TablesManuscript/Table_S2_ModelRanksRMSE.csv"
Table S2 from article's Supporting Information. See article for caption and key to columns


"Outputs/TablesOther/"
This folder contains 4 files (described here) and 10 folders (one per site, described below):

1. Site.list.formap.cv is a comma-delimited text file with coordinates for all the stream temperature modeling sites.  
site_no	= Site number of closest USGS flow gage
site_nm	= Site name of closest USGS flow gage
Latitude = Latitude of stream temperature monitoring site in decimal degree units and NAD83 datum
Longitude = Longitude of stream temperature monitoring site in decimal degree units and NAD83 datum

2. Scenario.Outputs.QuantileAir.csv is the outputs of the quantile air temperatures scenarios, for the Scott River site:
DayOfYear = Julian day 1 to 366
ScenarioAir = Air temperatures used in scenario (scenario is defined by the pairing of ScenarioAir and ScenarioQ)
ScenarioQ = Flow used in scenario (scenario is defined by the pairing of ScenarioAir and ScenarioQ)
Parameter = Daily maximum or Daily mean
value = modeled temperature in degrees C 

3. Scenario.Outputs.ObservedAir.csv is the outputs of the observed air temperature scenarios, for the Scott River site:
ScenarioAir = Air temperatures used in scenario (scenario is defined by the pairing of ScenarioAir and ScenarioQ)
ScenarioQ = Flow used in scenario (scenario is defined by the pairing of ScenarioAir and ScenarioQ)
Year = Calendar year
Date = Date in Month/Day/Year format
DayOfYear = Julian day 1 to 366
Parameter = Daily maximum only (Daily mean not run for Group 2 scenarios)
value = modeled temperature in degrees C 

4. Scenario.Inputs.csv is the time series of scenario inputs, which are a version of the data used to create Figure 3.
Date = Date in Month/Day/Year format
Year = Calendar year
DayOfYear = Julian day 1 to 366
USGS.FLOW.log10cms = measured flow in log10 transformed original units (cms)
ATemp.mean.2dweighted50 = air temp in original units (degrees C)
usgs.flow.log10cms = measured flow in standardized units
atemp.mean.2dweighted50 = air temp in standardized units
USGS.FLOW.log10cms.usfs = USFS flows in log10 transformed original units (cms)
USGS.FLOW.log10cms.cdfw = CDFW flows in log10 transformed original units (cms)
usgs.flow.log10cms.usfs = USFS flows in standardized units
usgs.flow.log10cms.cdfw = CDFW flows in standardized units
atemp.mean.2dweighted50.quant0.1 = air temp 0.1 quantile in standardized units
atemp.mean.2dweighted50.quant0.5 = air temp 0.5 quantile in standardized units
atemp.mean.2dweighted50.quant0.9 = air temp 0.9 quantile in standardized units
usgs.flow.log10cms.quant0.1 =  flow 0.1 quantile in standardized units
usgs.flow.log10cms.quant0.5 = flow 0.5 quantile in standardized units
usgs.flow.log10cms.quant0.9 = flow 0.9 quantile in standardized units

5. The 10 subfolders in "Outputs/TablesOther/" are named by USGS site code (i.e., 11519500 = Scott River), then contents within each folder are similarly named and structured (only the site differs).  Inside each folder are four files. Three of the files are named and structured identically to the Scott River files in "Outputs/TablesOther": Scenario.Outputs.QuantileAir.csv, Scenario.Outputs.ObservedAir.csv, and Scenario.Inputs.csv (except that sites besides Scott River do not have USFS and CDFW flows). The fourth file is ModelInfo.stats.all.csv, a summary of training and validation results for each model (formatted similarly to Table 1 from the article), and has the following columns:
Model.Num = model number
Model.withnum = combination of Model.Num and Model
Model = model name
Parameter = Daily maximum or Daily mean
Formula = short version of formula used in Table 1 in article 
Formula.long = full formula (excluding correlation structure)
BIC = Bayesian information criterion score
fREML = fast restricted maximum likelihood score
AR1 = autocorrelation coefficient
edf.fixed = effective degrees of freedom (edf) for fixed effects
edf.random = effective degrees of freedom (edf) edf for random effects
RMSE.train = root mean squared error for training dataset
R2.train = coefficient of determination for training dataset


"Outputs/FiguresOther/"
This folder contains 11 folders (one per site, plus an additional folder "best"). 10 of the folders in "Outputs/FiguresOther/" are named by USGS site code (i.e., 11519500 = Scott River), then contents within each folder are similarly named and structured (only the site differs). The files on the "best" folder are just renamed copies of 3 of the most interesting figures from the site-specific folders, to facilitate browsing. The 17 figures in each folder are the following:

1. Figure_3_AirTemp_and_Flow_scenario_inputs.svg
For each site, this is a variant of the Figure 3 from the manuscript. Caption
Time series of (a) daily mean air temperature, (b) daily mean flow, (c) daily maximum
stream temperature (Tmax), and (d) daily mean stream temperature (Tmean) from 19982020.

2. Figure_S6_timeseries_preds_max.svg
For each site, this is a variant of the Figure S6 from the manuscript. Caption:
Daily time series of measured (dots) and modeled (solid lines, from leave-one-year-out [LOYO] cross-validation) Tmax for the years 19982020 (no data 2001-2002). Horizontal dashed gray line at 22 C indicates a temperature threshold for juvenile salmonids. Curved black dashed line is GAM smoother of all measured Tmax for all years 1998-2020, indicating typical conditions for each day of year. 

3. Figure_S7_timeseries_preds_mean.svg
For each site, this is a variant of the Figure S6 from the manuscript. Caption:
Daily time series of measured (dots) and modeled (solid lines, from leave-one-year-out [LOYO] cross-validation) Tmean for the years 19982020 (no data 2001-2002). Horizontal dashed gray line at 22 C indicates a temperature threshold for juvenile salmonids. Curved black dashed line is GAM smoother of all measured Tmax for all years 1998-2020, indicating typical conditions for each day of year. 

4 and 5. MeasuredModelCompareQuantiles33.max.svg and MeasuredModelCompareQuantiles33.mean.svg 
For each site, this is a variant of the Figure S2 from the manuscript: 
Measured (a) Tmax and (d) Tmean for dates with combinations of cool, typical, or hot air temperatures (arranged in columns) and low, typical, or high flows (shown by color). (b,e) Modeled LOYO CV temperatures predicted by selected model GAM7 for the same dates, and (c,f) LOYO CV residuals, calculated as measured minus modeled. Lines are GAM smoothers fit to points, shown as visual aids.

6 and 7. MeasuredModelCompareQuantiles33.max.allmodelsresid.png and MeasuredModelCompareQuantiles33.mean.allmodelsresid.png
For each site, this is a variant of the Figure S2c and Figure s2f from the manuscript, except that instead of just showing the final model GAM7, it shows the results for all models.

8. MeasuredModelCompareQuantiles33.max.NRCV.svg
For each site, this is a variant of Figure S5 from the manuscript. Caption:
(a) Measured Tmax for dates with combinations of cool, moderate, or hot air temperatures (arranged in columns) and low, moderate, or high flows (shown by color). (b) Modeled extrapolation CV temperatures predicted by the selected model GAM7 for the same dates, and (c) extrapolation CV residuals, calculated as measured minus modeled. Lines are GAM smoothers fit to the points, shown as visual aids.

9. MeasuredModelCompareQuantiles33.mean.NRCV.svg
This is the same as #8 above except is daily mean instead of daily maximum

10. MeasuredModelCompareQuantiles33.max.allmodelsresid.NRCV.png 
For each site, this is a variant of the Figure S5c from the manuscript, except that instead of just showing the final model GAM7, it shows the results for all models.

11. MeasuredModelCompareQuantiles33.mean.allmodelsresid.NRCV.png 
For each site, this is a variant of the Figure S5c from the manuscript, except that instead of just showing the final model GAM7, it shows the results for all models, and it is daily mean instead of daily maximum 

12. Ptiles.a.k15.png 
For each site, shows air temperature quantiles by DayOfYear 

13. and Ptiles.Q.k15.png
For each site, shows flow quantiles by DayOfYear 

14. Scenario.Outputs.QuantileAir_max_mean.svg
For each site, this is a variant of the Figure 7 from the manuscript. Caption:
Modeled Tmax and Tmean under the 9 quantile air temperature scenarios representing combinations of three air temperature inputs (arranged in columns) and three quantile flow inputs (shown by color). Observed values for 19982020 are shown as gray lines. Selected data values are labeled on 15 June and the first day of MarchOctober. Horizontal dashed line is the salmonid temperature threshold.

15. validation_nrcv.k3.svg
For each site, results of cross-validation tests. In addition to the cross-validation tests shown in the manuscript, this shows two additional tests (extrapolation by water year type).

16 and 17. wtemp_max_GAM7_gamviz_with_AR1_REML_clean.svg and wtemp_mean_GAM7_gamviz_with_AR1_REML_clean.svg
For each site, this is a variant of the Figure S3 from the manuscript. Caption:
GAM smooths (i.e., covariate responses and interactions) from GAM7 for Tmax (top six panels) and Tmean (bottom six panels) showing partial effects of smooth functions of: (a,g) day of year D, (b,h) two-day air temperature A2w, (c,i) interaction of A2w and D (i.e, slope of A2w varying as non-linear function of D), (d,j) flow Q, and (e,k) interaction of Q and D. Dashed lines are 95% confidence intervals. (f,l) shows random effects for year


"Outputs/ModelDiagnostics" folder 
This folder contains model diagnostic figures and tables. There is a separate folder for each of 10 sites (e.g., Scott River 11519500). Within each folder, there are a series of files for each model and response variable. File names start with the response variables (e.g., "wtemp_max" or "wtemp_mean"), followed by model number (e.g., GAM1 ... GAM11, with key provided in Outputs/TablesManuscript/Table_1_ModelTrainingStatsScottRiv.csv or Outputs/TablesOther/[SiteNumber]/ModelInfo.stats.all.csv), followed by 1 of 5 suffixes:
1. _ACF_no_AR1.png is the autocorrelation function plot from itsadug::acf_resid function, for the with-AR1 version of the model
2. _ACF_with_AR1.png is the autocorrelation function plot from itsadug::acf_resid function, for the no-AR1 version of the model
3. _appraise_with_AR1.png is the output from the gratia::appraise function.
4. _concurvity.csv is the output from the mgcv::concurvity function.
5. _draw_with_AR1.png is gam smoothers from the gratia::draw function.
6. _effects_plot_q_air.png is an effects plot showing water temperatures as function of Q and A2w, with labeled contour lines spaced 2 C apart. Panels represent the first day of each month. Gray dots show position of calibration points within 7 days of first of each month
7. _gamviz_with_AR1.pdf is gam smoothers from the mgcViz::getViz function. Output is similar to gratia::draw function but some models will not draw() but will getViz().
8. _rho_sensitivity_ACF.svg are autocorrelation function plots from the itsadug::acf_resid function for 3 versions of each model:  no-AR1, with-AR1 based on inital rho value, and with-AR1 based on rho value with lowest fREML score.


"SourceDataFiles" folder
This folder contains all the source data used in the analysis:

1. Flow.usgs.daily.all.csv is a g-zip compressed comma-delimited text file with daily flow data from the U.S. Geological Survey's National Water Information System (NWIS) for 10 gages in the Klamath Basin. Units are cfs.

2. PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_40.6564_-122.9139.csv, PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_40.7250_-122.8340.csv, 
PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_40.7777_-123.1317.csv, PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_40.8894_-123.6022.csv, 
PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_41.3036_-123.5344.csv, PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_41.3770_-123.4774.csv, PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_41.5112_-123.9784.csv, PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_41.6400_-123.0138.csv, PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_41.8248_-122.5939.csv, PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_41.8353_-123.3829.csv, and PRISM_tmin_tmean_tmax_stable_4km_19900101_20201231_41.8541_-123.2315.csv are gridded air temperature from PRISM (Daly et al., 2008) downloaded from: https://prism.oregonstate.edu/explorer. The PRISM_filename column of sitecoordinates.csv denotes which PRISM data files were assigned to which stream temperature monitoring sites.

3. sitecoordinates.csv is a comma-delimited text file with site characteristics and data sources for stream temperature monitoring sites.  Key to columns:
Site.Code = stream temperature monitoring original site code assigned by Source.Entity.
Source.Entity = Data provider for stream temperature data: CDEC = California Data Exchange Center (data collected by USBR and USGS), QVIR = Quartz Valley Indian Reservation, USBR = U.S. Bureau of Reclamation, USFWS = U.S. Fish and Wildlife Service, USFS KNF = United States Forest Service Klamath National Forest, and USGS = U.S. Geological Survey
site_no	= Number of USGS gage closest to stream temperature monitoring site
site_nm	= Name of USGS gage closest to stream temperature monitoring site 
OrigLatNAD83 = Latitude of stream temperature monitoring site in decimal degree units and NAD83 datum
OrigLonNAD83 =  Longitude of stream temperature monitoring site in decimal degree units and NAD83 datum
SnapTotDASqKM = Drainage area from NHDPlus version 2.1 (Moore & Dewald, 2016) in square kilometer units
PRISM_filename = name of PRISM file from which air temperature data are assigned.

4. WTemp.daily.othersites.usfs.csv.gz is a g-zip compressed comma-delimited text with daily stream temperature data from USFS
Source.Entity = Data provider for stream temperature data: USFS_NRIS_AqS = data collected by U.S. Forest Service (data collected by U.S. Forest Service and retrieved from the Natural Resource Information System (NRIS) Aquatic Surveys (AqS) database 
Site.Code = stream temperature monitoring original site code assigned by Source.Entity.
Year = Year 
Date = Date in month/day/year format
Units = degrees C units
WTemp_min = Daily minimum stream temperature in degrees C units
WTemp_mean =  Daily mean stream temperature in degrees C units
WTemp_max =  Daily max stream temperature in degrees C units
WTemp_sd = Standard deviation of stream temperature in degrees C units
WTemp_count = Number of measurements upon which daily statistic is based
Source.Filename.n =  Number of original data files from which data were compiled
Source.Filename =  Name(s) of original data file from which data were compiled
WTemp_range = Daily range in stream temperature in degrees C units

5. WTemp.daily.othersites.usfws.cdec.csv.gz is a g-zip compressed comma-delimited text with daily stream temperature data from CDEC and USFWS 
Source.Entity = Data provider for stream temperature data: CDEC = California Data Exchange Center (data collected by USBR and USGS), USFWS = U.S. Fish and Wildlife Service
Site.Code = stream temperature monitoring original site code assigned by Source.Entity.
Year = Year 
Date = Date in month/day/year format
Units = degrees C units
WTemp_min = Daily minimum stream temperature in degrees C units
WTemp_mean =  Daily mean stream temperature in degrees C units
WTemp_max =  Daily max stream temperature in degrees C units
WTemp_sd = Standard deviation of stream temperature in degrees C units
WTemp_count = Number of measurements upon which daily statistic is based
Source.Filename.n =  Number of original data files from which data were compiled
Source.Filename =  Name(s) of original data file from which data were compiled
WTemp_range = Daily range in stream temperature in degrees C units

6. WTemp.daily.scott.csv is a comma-delimited text with daily stream temperature data from USFS and QVIR for the Scott River. The USFS data were extracted from the USFS National Resource Information System Aquatic Surveys (USFS_NRIS_AqS) by Callie McConnell (USFS Corvallis). The QVIR data were obtained by request from Crystal Robinson (Crystal.Robinson@qvir-nsn.gov) at QVIR. Data are from several functionally equivalent sites all located near the USGS gage 11519500 SCOTT R NR FORT JONES CA
Source.Entity = Data provider for stream temperature data: QVIR = Quartz Valley Indian Reservation, USFS_NRIS_AqS = data collected by U.S. Forest Service (data collected by U.S. Forest Service and retrieved from the Natural Resource Information System (NRIS) Aquatic Surveys (AqS) database 
Site.Code = stream temperature monitoring original site code assigned by Source.Entity
Year = Year 
Date = Date in month/day/year format
Units = degrees C units
WTemp_min = Daily minimum stream temperature in degrees C units
WTemp_mean =  Daily mean stream temperature in degrees C units
WTemp_max =  Daily max stream temperature in degrees C units
WTemp_sd = Standard deviation of stream temperature in degrees C units
WTemp_count = Number of measurements upon which daily statistic is based
Source.Filename.n =  Number of original data files from which data were compiled
Source.Filename =  Name(s) of original data file from which data were compiled
WTemp_range = Daily range in stream temperature in degrees C units

7. WTemp.hourly.F3410000.cdwr_Water_Temperature_Raw.csv.zip is a zip compressed comma-delimited text with hourly stream temperature data from CDWR for the Salmon River.
Date = Date Time in month/day/year hours:minutes format
Point = Water temperature in units of Degrees C
Qual = Data qualifier (key is provided inside the file)

8. WTemp.hourly.scott.csv.gz is a g-zip compressed comma-delimited text file 15 to 60 minute resolution stream temperature data from the Quartz Valley Indian Reservation (QVIR), U.S. Forest Service Klamath National Forest(USFS_KNF), and U.S. Bureau of Reclamation (USBR). The data cover different years than the daily data in WTemp.daily.batch1.csv. Units are Degrees C. The QVIR data were obtained by request from Crystal Robinson (Crystal.Robinson@qvir-nsn.gov) at QVIR. USFS data were obtained from Maija Meneks (Maija.Meneks@usda.gov), and apparently were not input into the USFS NRIS AqS database because they covered only part of the summer season. USBR stream temperature data were downloaded from the USGS Data Grapher: https://or.water.usgs.gov/cgi-bin/grapher/graph_setup.pl?basin_id=all&site_id=11519500.  


"CompiledData" folder
This folder contains two files:

1. allsites.daily.csv that has all the compiled stream temperature, air temperature, and flow data used in the analysis. Key to columns:
Date =  Date
Year = Date in Month/Day/Year format
site_no	= Number of USGS gage closest to stream temperature monitoring site
site_nm	= Name of USGS gage closest to stream temperature monitoring site 
USGS.FLOW.cfs =  Daily average flow in units of cfs
ATemp.mean = Daily average air temperature in units of degrees C. Data are primarily from GHCND site USR0000CQUA, with some infilling based on other - Source.Entity: Data provider for stream temperature data:  CDEC = California Data Exchange Center (data collected by USBR and USGS), QVIR = Quartz Valley Indian Reservation, USBR = U.S. Bureau of Reclamation, USFWS = U.S. Fish and Wildlife Service, USFS KNF = United States Forest Service Klamath National Forest, USGS = U.S. Geological Survey, NA = no stream temperature data available but placeholder row exists with flow and air temperature data
ATemp.max =  Daily maximum air temperature in units of degrees C. Data were assigned based on the closest PRISM pixel (see sitecoordinates.csv for key)
WTemp.min = daily minimum stream temperature in units of degrees C.
WTemp.mean =  daily mean stream temperature in units of degrees C.
WTemp.max =  daily maximum stream temperature in units of degrees C.
WTemp.n = number of stream temperature measurements from which daily stats are derived
WTemp.range =  WTemp.max - WTemp.min
Source.Filename.n = Name(s) of original data file from which data were compiled
Source.Filename.List =  Name(s) of original data file from which data were compiled

2. Table_S1_site_list.csv is a table showing site characteristics and data sources for all the stream temperature modeling sites.  This is same as Table S1 from the article's Supporting Information. Key to columns:
Site number and name of USGS flow gage = Site number and name of USGS flow gage
Drainage area (km2)  = Drainage area from NHDPlus version 2.1 (Moore & Dewald, 2016) in square kilometer units
Data source = Data provider for stream temperature data: CDEC = California Data Exchange Center (data collected by USBR and USGS), QVIR = Quartz Valley Indian Reservation, USBR = U.S. Bureau of Reclamation, USFWS = U.S. Fish and Wildlife Service, USFS KNF = United States Forest Service Klamath National Forest, USGS = U.S. Geological Survey, 
Site code = stream temperature monitoring original site code assigned by Source.Entity.
Number of days = number of days with stream temperature data
Number of years	=  number of years with stream temperature data
Date range =  first and last years with stream temperature data
Latitude = Latitude of stream temperature monitoring site in decimal degree units and NAD83 datum
Longitude = Longitude of stream temperature monitoring site in decimal degree units and NAD83 datum
Notes = Notes


"WorkingFiles/ModelDiagnostics" folder contains temporary files generated during the running of the R scripts. Users do not need to be aware of what they are, although the "R_Scripts/Script_C_analysis.R" shows how they are created and used.


"OtherStudies/" folder 
This folder contains the code, source data, and figures that were used to generated Figures S9 and S10 in the Supporting Information. These Figures show standardized coefficients for flow (Q) from monthly stream temperature models from Isaak et al. (2018) and FitzGerald et al. (2021). These data were not presented in the published materials from Isaak et al. (2018) and FitzGerald et al. (2021), so we contacted the authors to obtain the data and then created figures showing the data. Contents of this folder:

"OtherStudies/InputData" folder  contains the source data files:
1. IsaakEtAl2018_Coefficients.csv.gz is a g-zip archive containing .csv file with the flow coefficients from Isaak et al. (2018). Key to columns:
PERMA_FID = permanent identified for the stream temperature site
GageSite = code for the flow sites assigned to the stream temperature site
GNIS_NAME = Stream name from the Geographic Names Information System
Month = Month abbreviation
Q_ParaEst = Flow coefficient estimate (units: C/cms) from stream temperature multiple regression model
Q_SE = Standard error of flow coefficient (units: C/cms) from stream temperature multiple regression model
Q_p_value = P-values for flow coefficient (units: C/cms) from stream temperature multiple regression model
Reg = 1 denotes sites whose flow is regulated by dams, 0 denotes sites whose flow is not regulated by dams. Isaak et al. (2018) study included sites in both categories, but here we included only the unregulated sites

2. IsaakEtAl2018_FlowData.csv is a g-zip archive containing .csv file with the flow time series from Isaak et al. (2018). Key to columns:
Year = calendar year
Month = month
name = name of flow monitoring sites
Q = discharge in cms units

3. FitzGeraldEtAl2021_SSN_FlowCoefficients.csv is a .csv file with standardized coefficients for flow (Q) from monthly spatial stream network models of stream temperature in eight Western U.S. regions, from FitzGerald et al. (2021). Key to columns:
Covariate = flow
Region = model region (there are 8 regions)
Month = model month abbreviation
Estimate_Backtrans = flow coefficient estimate, back-transformed to original units
Std_Error_Backtrans = standard errors of flow coefficient estimate, back-transformed to original units
Estimate_Stand = flow coefficient estimate, in standardized units (models were fit using standardized units)
Std_Error_Stand = standard errors of flow coefficient estimate estimate, in standardized units (models were fit using standardized units)
t_value = t-value for flow coefficient estimate
prob_t = p-value for flow coefficient estimate

"OtherStudies/CodeAndOutputFigures" folder contains the R code that imports and plot the data from the Isaak et al. (2018) and FitzGerald et al. (2021):1
1. PlotFlowCoeffFromOtherStudies.R is the R code
2. Figure_S10_Q_ByMonth_Fitzgerald_etal2021.svg
3. Figure_S9_Q_ByMonth_Isaak_etal2018.svg






REFERENCES:

Daly, C., Halbleib, M., Smith, J. I., Gibson, W. P., Doggett, M. K., Taylor, G. H., Curtis, J., & Pasteris, P. P. (2008). Physiographically sensitive mapping of climatological temperature and precipitation across the conterminous United States. International Journal of Climatology, 28(15), 20312064. https://doi.org/10.1002/joc.1688 

FitzGerald, A. M., John, S. N., Apgar, T. M., Mantua, N. J., & Martin, B. T. (2021). Quantifying thermal exposure for migratory riverine species: Phenology of Chinook salmon populations predicts thermal stress. Global Change Biology, 27(3), 536549. https://doi.org/10.1111/gcb.15450 

Isaak, D. J., Luce, C. H., Horan, D. L., Chandler, G. L., Wollrab, S. P., & Nagel, D. E. (2018). Global Warming of Salmon and Trout Rivers in the Northwestern U.S.: Road to Ruin or Path Through Purgatory? Transactions of the American Fisheries Society, 147(3), 566587. https://doi.org/10.1002/tafs.10059 

Moore, R. B., & Dewald, T. G. (2016). The Road to NHDPlusAdvancements in Digital Stream Networks and Associated Catchments. Journal of the American Water Resources Association, 52(4), 890900. https://doi.org/10.1111/1752-1688.12389 

Related Geospatial Features

This HydroShare resource is linked to the following geospatial features

${ messageObj.message }
${value.text} ${value.text}

Click a point to search for features that overlap with that location.

Select a feature for more information.

Related Resources

This resource is referenced by Asarian, J.E., and Robinson, C., Genzoli, L. 2023. Modeling Seasonal Effects of River Flow on Water Temperatures in an Agriculturally Dominated California River. Water Resources Research, e2022WR032915. https://doi.org/10.1029/2022WR032915

Credits

Funding Agencies

This resource was created using funding from the following sources:
Agency Name Award Title Award Number
Klamath Tribal Water Quality Consortium
U.S. Environmental Protecion Agency, Region IX

How to Cite

Asarian, J. E., C. Robinson, L. Genzoli (2023). Data and code for: Modeling Seasonal Effects of River Flow on Water Temperatures in an Agriculturally Dominated California River, HydroShare, https://doi.org/10.4211/hs.a6653e2919964f9b840ec0340d86e11c

This resource is shared under the Creative Commons Attribution CC BY.

http://creativecommons.org/licenses/by/4.0/
CC-BY

Comments

There are currently no comments

New Comment

required