R Package to manage code for manipulating the input and output data for CRSS.
The CRSSIO package includes functions for manipulating and creating
input data necessary to run CRSS and for processing CRSS output data. It
uses a “prefix_verb_noun” naming system for most functions. Functions
that create input for CRSS use the crssi_
prefix, while those that
process CRSS output use the crsso_
prefix. The nf_
, natsalt_
, and
ism_
prefixes are also used for multiple functions that deal with
natural flow names, natural salt names, and with ISM related functions.
Functions that use the create
verb will create files on the user’s
computer. Functions that use the change
verb will edit files that
already exist on the user’s computer. Functions that use the get
verb
will return data.
The final noun of the function describes what is created or retrieved.
Ex: crssi_create_dnf_files()
creates the DNF (direct natural flow)
files.
- Create CRSS input files with
crssi_create_dnf_files()
,crssi_create_cmip_nf_files()
, andcrssi_create_hist_nf_xlsx()
- These files can also be created with a GUI through an R Studio
Addin (see
?crss_input_addin
)
- These files can also be created with a GUI through an R Studio
Addin (see
- Modify existing CRSS natural flow input files with
crssi_change_nf_start_date()
,crssi_change_nf_file_names()
, andcrssi_change_evap_files()
trimCCNFFiles
trims the climate change hydrology input files to a specified time period
sys_cond_matrix()
andcrsso_get_sys_cond_table()
help create the standard System Conditions Table from CRSS output. Commonly referred to as the “5-year table” but it can go through as many years as simulation data exists. Ex:
library(CRSSIO)
library(RWDataPlyr) # install_github("BoulderCodeHub/RWDataPlyr")
# create the RiverWare data aggregator
rwa <- sys_cond_rwa()
# use example data in RWDataPlyr to create system condition table
# first get all of the data
scenFolder <- "ISM1988_2014,2007Dems,IG,Most"
scenName <- "scenA"
scenPath <- system.file('extdata','Scenario/',package = 'RWDataPlyr')
sysData <- RWDataPlyr::rdf_aggregate(
rwa,
rdf_dir = file.path(scenPath, scenFolder),
scenario = scenName
)
# then create the system condition table
sysCondTable <- crsso_get_sys_cond_table(sysData, 2018:2022)
# sysCondTable[['limitedTable']] to access results
- Vectors of the natural flow gage names (
nf_gage_names()
), along with corresponding CRSS natural inflow input slot names (nf_file_names()
), corresponding CRSS natural salt input slot names (natsalt_file_names()
), and corresponding abbreviated, i.e., variable, names (nf_gage_abbrv()
).
elevation_to_storage()
converts elevations to storage values for reservoirs modeled in CRSS.ism_get_site_matrix()
applies the index sequential method (ISM) to a single time series of data.
Only available from GitHub. Use the following to install:
install.packages('devtools')
library(devtools)
devtools::install_github('BoulderCodeHub/CRSSIO')
For details, see the News
- 2018-11-29: version 0.6.3 available
- 2018-03-23: version 0.6.2 available
- 2018-01-23: version 0.6.1 available
- 2018-01-17: version 0.6.0 available
- 2017-08-30: version 0.5.0 available
- 2017-05-10: version 0.4.1 available
- 2017-03-31: version 0.4.0 available
- 2016-10-04: version 0.3 available
- 2016-05-30: version 0.2.1 available
- 2016-05-05: version 0.2 available
- 2015-02-10: version 0.1 available