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

R script to obtain daily averages of ancillary water data (turbidity, specific conductivity, etc.)


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 6.5 MB
Created: Jun 03, 2016 at 9:31 p.m.
Last updated: Jun 11, 2016 at 2:04 p.m.
Citation: See how to cite this resource
Sharing Status: Public
Views: 2105
Downloads: 126
+1 Votes: Be the first one to 
 this.
Comments: No comments (yet)

Abstract

We present the procedure to obtain daily averages of ancillary water data (e.g., turbidity and chlorophyll) that may be used to support the interpretation of the daily metabolic rate estimates. The Ancillary_DarilyAvg.R script needs to be executed as many times as the number of available ancillary water parameters (twice for our case). For the case of the SJR restoration reach, the data can be accessed by doing a query on the CDEC website indicating the sensor number (28 for chlorophyll, 27 for turbidity), the interval of the data (event or hourly), and the starting and ending dates of the period of interest. A comma separated value file is produced after the request, and each of these files will be the input to this R script.
Section 1 of the script sets up the working directory; the ancillary water data input file is read in section 2 and particular configuration parameters are specified in section 3. According to these parameters, a new table (‘table1’) with only the columns of interest is created in section 4; section 5 converts into NA’s all the cell values that report missing data (“m”) or errors (“-9998” or “-9997”). The actual daily averages are calculated in section 6 and stored in the variable ‘table4’. Section 7 deals with the transformation of the date column to an actual date format in order to identify whether or not there are missing days within the time series. The output of this section (dates and intervals between dates) as well as the daily averages contained in ‘table4’, are merged into a new variable ‘table5’. Finally, section 8 prints the output of this script as a tab separated text file.
DOI: 10.6084/m9.figshare.3413023

Subject Keywords

Content

Related Resources

How to Cite

Villamizar, S. (2016). R script to obtain daily averages of ancillary water data (turbidity, specific conductivity, etc.), HydroShare, http://www.hydroshare.org/resource/5c2c3dbf13174147a5109b84c62a142b

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