In development
nfd()
constructors. This prevents the possibility for multiple prints being called when extracting data or converting between nfd
, crss_nf
and crssi
objects. (#125)sac_year_type_get(internal = TRUE)
) to go through 2022. (#123)version = 6
as valid value to nf_file_names()
and natsalt_file_names()
version
will be removed so that a user has to specify a version. In this release, this is noted as a message. crssi()
to work with Sacramento year type that is WY or CY based. Either way, the index is assumed to be for the year in the xts object, i.e., the month is effectively ignored. (#118)nf_to_annual.crss_nf()
. First, it can now correctly sum over a water year for a calendar year object. Second, it now drops monthly when keep_monthly = FALSE
. (#121)Released July 14, 2022
Released June 1, 2022
This release includes multiple new features and functions, but none should break any previous code.
sac_year_type_calc()
. This function calculates the Sacramento Water Year index based on either the Sacramento 4-river index water year volume or the Colorado River water year intervening natural flows. Both of these methods were reviewed with MWD and while not ideal, they allow us to create the index values any time we have Colorado River natural flows using the latter of the two data sets. The former is useful when we have Sacramento River volumes. sac_year_type_get()
gains a paleo
argument. When this is true, the index values are obtained from paleo data. The paleo data is stored as internal data and is from Meko et al. 2018's paleo reconstruction of the 4-river volume for use in this function. sac_year_type_get()
, the internal historical index data is updated through 2019. write_nfd()
is a new function that will create csv and Excel files from nfd
and crss_nf
objects.nfd
and crss_nf
objects from data frames and lists. as_nfd.data.frame()
, as_nfd.list()
, as_crss_nf.data.frame()
, and as_crss_nf.list()
were added. (#82)nfd
related constructors now print the type of nfd object as it is created. This helps users know if they provided annual data and it was interpreted as monthly or vice versa. (#109)plot.nfd()
so that it correctly errors, and posts a helpful error message, if "cloud"
or "spaghetti"
plots are specified for monthly nfd
data. (#110)nf_to_annual()
so that it handles differences between provided year
argument and the year attribute for nfd
like object. They can now differ if keep_monthly
is FALSE
, otherwise they have to match. (#113)Released March 24, 2021
reindex()
now fails if start year cannot be successfully converted to numeric. (#103)reindex()
, print.nfd()
, etc. work properly. (#107)n_sites
argument in nfd()
. It now defaults to NA
and is computed based on the shape of the data.as.data.frame.nfd()
to create data.frames from nfd
, crss_nf
, and crssi
objects. (#83)nfd_trim_ts()
.nf_to_annual()
to sum monthly data to annual data. (#83)Released March 19, 2021
crssi_create_dnf_files()
that was preventing file names from correctly being passed when specifiedcrssi_change_nf_file_names()
that was preventing folder names from being constructed correctly if input parameters did not have trailing slash. natsalt_file_names()
and nf_file_names()
for files that will work with CRSS v5.x.x. as_nfd.crss_nf()
to convert crss_nf
objects to nfd
objects, which are less restrictive.nf_to_total()
(#101) and nf_to_intervening()
(#105) to convert between intervening and total natural flows. Released June 12, 2020
v0.8.0 marks a major enhancement to CRSSIO. CRSSIO now defines three classes for storing multi-trace natural flow data: nfd
, crss_nf
, and crssi
. crss_nf
inherits from nfd
and crssi
inherits from both nfd
and crss_nf
. These classes intend to make working with CRSS input natural flow data easier and more uniform.
nfd
, crss_nf
(#86), crssi
(#85)nfd
stores multi-trace, multi-site data for annual and/or monthly time steps and for intervening and/or total natural flow (flow space). nfd()
creates the object from arrays, matrices, or xts objects. The object can contain any/all of the four combinations of time step and flow space.crss_nf
objects require that there are exactly 29 sites: the 29 sites required for input into CRSS, and that there are monthly intervening natural flows, which are also required input to CRSS. Other time step and flow space combinations are allowed, but there must be monthly intervening data. crssi
objects add additional required input into CRSS: the Sacramento year type index and a scenario number. nfd
type objects:nfd_extract()
- extract data from nfd
objects by time, trace, site, time step, and/or flow_space. This is a stand in for []
. nfd_trim_ts()
(#92) - trim nfd
objects to "exact" calendar/water years, i.e., start and end in January and December or October and September, respectively. has_overlapping_ts()
(#92) - determine if nfd
object has monthly and annual data that overlap exactly (default) or at all (exact = FALSE
)reindex()
(#91) - change the time component of the nfd
object.ism()
(#88) - apply Index Sequential Method to a single trace in the nfd
object.ism_get_site_matrix()
is deprecated and will be removed in a future release.plot()
(#95) - plot.nfd()
will plot the data in the nfd
object. Because there can be many traces of data, the data are typically summarized using boxplots; however, annual data can be shown as individual lines using which = "spaghetti"
. which = cloud
shows the same info as boxplots but as filled ribbons. nfd_get_time()
, nfd_get_site()
, and nfd_get_trace()
are used to get a single time step, site, or trace of data from nfd
objects. (#84)nfd_stats()
and nfd_pdf()
are used to compute basic statistics (mean, max, min, variance, lag-1 correlation, and skew) for each trace in an nfd
object and to compute PDFs for each trace. plot.nfd_stats()
and plot.nfd_pdf()
plot these statistics.sac_year_type_get()
. Previously, these data were stored internal to the package, thus requiring this package to be updated every time a new year of data is added to the record. This internal data can now be used by using internal = TRUE
, but the internal data will not be routinely updated. (#78)crssi_change_nf_file_names()
, crssi_change_nf_start_date()
and crssi_change_evap_files()
to use progress bar instead of printing new line for each trace.crssi_create_hist_nf_xlsx()
had a month
column that contained strings. This column is now formated as a Date
. (#81)add_secondary_y_conversoin()
and stat_boxplot_custom()
to work with ggplot2 v3.3.0.crssi_create_dnf_files()
to use the new classes and methods for storing natural flow data and applying ISM. (#90)Released January 24, 2020
Released July 25, 2019
crsso_get_sys_cond_table()
to include elevations for all Powell tiers, and for normal conditions in the Lower Basin. crsso_get_sys_cond_table()
to show Lower Basin from highest (surplus) to lowest (shortage) conditions.crsso_create_cmip_nf_files()
that didn't get inot the last bug fix. Released February 7, 2019
crsso_create_cmip_nf_files()
to work with new format of ncdf files. The ncdf files now use snake_case for all variable names, instead of camelCase.Released January 18, 2019
crsso_get_sys_cond_table()
. (#67)period
function in sys_cond_rwa()
to be "eocy"
, instead of "asis"
. This ensures that crsso_get_sys_cond_table()
will work, even if the SystemConditions.rdf file has monthly data, instead of the expected annual data. (#67)Released January 17, 2019
stat_boxplot_custom()
. This allows the user to specify the extents of the whiskers using percentiles (qs
) instead of the IQR. (#51)storage_to_elevation()
. This is the inverse of elevation_to_storage()
. (#40)add_secondary_y_conversion()
. This function takes a ggplot and adds in a secondary axis with different units. The units are converted from the current label positions of the primary axis. (#49)elevation2Volume()
. Since storage_to_elevation()
was added in this release, this was removed for consistency of names between these two functions. The other functions deprecated in v0.6.0 will be removed in v0.8.0. crsso_get_sys_cond_table()
. (#62)crssi_change_nf_start_date()
so that it only edits the year of the start date. This was required so that the MWD ICS files are correctly modified as they use a 12/31 year/month, while the other files use a 1/31 year/month. As part of this, the startDate
argument is deprecated and replaced by start_year
. The function now updates the README.txt file if it exists, or creates one if it doesn't exist. (#52)Released November 29, 2018
Released to work with CoRiverNF v0.5.0. It will work with older versions, but to get 2016 natural flow files this patch release is necesary.
sys_cond_rwa()
object for use with RWDataPlyr > v0.5.0Released March 22, 2018
createISMMatrix()
is now exported (it should be until next major release)Released January 23, 2018
createSysCondTable()
to state that crsso_get_sys_cond_table
should be used.storage_to_elevation()
Released January 17, 2018
crssi_
while those that process CRSS output use the crsso_
prefix. The nf_
and ism_
prefixes are also used for multiple functions that deal with natural flow (nf) names and with ISM related functions. This results in deprecating many functions in favor of their newer version. The new and their respective old functions are:crssi_create_dnf_files()
= createCRSSDNFInputFiles()
crsso_get_sys_cond_table()
= createSysCondTable()
sys_cond_matrix()
= sysCondSALMatrix()
crssi_change_nf_start_date()
= changeStartDate()
crssi_change_evap_files()
= changeStartDateForEvapAndAddZeros()
nf_file_names()
= CRSSNFInputNames()
natsalt_file_names()
= CRSSNatSaltInputNames()
nf_gage_names()
= nfGageNames()
nf_gage_abbrv()
= nfShortNames()
crssi_change_nf_file_names()
= copyAndChangeNFFileNames()
ism_get_site_matrix()
= createISMMatrix()
elevation_to_storage()
= elevation2Volume()
crssi_create_dnf_files()
, which replaces createCRSSDNFInputFiles()
, gains an overwriteFiles
argument that will ensure users do not accidently overwrite existing natural flow files. (#34) startDate
and simYrs
are replaced by startYear
and endYear
crssi_create_hist_nf_xlsx()
is a new function that will standardize the creation of the HistoricalNaturalFlows.xlsx file that CRSS relies on. (#29)crssi_create_cmip_nf_files()
is a new function that will create natural flow files from a netcdf file that contains cmip3/5 data. (#30)crssi_create_dnf_files()
. The ability to create the HistoricalNaturalFlows.xlsx file was also added. (#35)trimCCNFFiles()
now only trims natural flow and salt files, not all files in the directory. (#31)crssi_create_cmip_nf_files()
. (#32)force
argument that must be TRUE
to proceed. If it's FALSE
(default), it won't work, which will hopefully encourage the use of crssi_create_cmip_nf_files()
.crssio.sacYTSlot
option. The default is now "MWD_ICS.SacWYType". (#33)goodpractice::gp()
.Released August 30, 2017
createISMMatrix()
now works with annual data as well as monthly data. (#24)createCRSSDNFInputFiles()
now creates Sacramento year type index using ISM and saves it (#25)elevation2Volume()
that will convert reservoir elevation values to resevoir storage valuescreateSysCondTable()
now checks to see if yrs
exist in the data and reacts properly. (#26)Released May 10, 2017
changeStartDate()
so that it works for natural flow files created by CRSSIO
>= v0.4.0 (#20)Released March 31, 2017
createCRSSDNFInputFiles
), a README file is generated to provide information about who/when/how the natural input files were created. (#13)createCRSSDNFInputFiles
: MeadFloodControlData.hydrologyIncrement, HydrologyParameters.SupplyScenario, and HydrologyParameters.TraceNumber. These slots will be imported into CRSS in the next CRSS version, so they need to be created when creating the other natural inflow files. The slot names that are created are set by the crssio.hydroIncrement
, crssio.supplyScenarioSlot
, and crssio.traceNumberSlot
options. (#16 and #18)sysCondSALMatrix
. This function easily allows the user to create the matrix that is necessary for RWDataPlyr::createSlotAggList
, as part of the progression of creating the system condition table. The example in createSysCondTable
help file now provides an example of this progression. (#15)trimCCNFFiles
will now provide an error message if the user specified dates do not exist in the provided flow files. (#12)Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.