crssi | R Documentation |
crssi()
constructs a crssi
object that holds all of the necessary
trace-based input data for CRSS. Namely, this includes the intervening,
monthly natural flow for all 29 sites, the Sacremento Year Type index,
and a scenario number.
crssi(flow, sac_year_type, scen_number, scen_name = NULL, drop_flow = TRUE)
is_crssi(x)
flow |
A |
sac_year_type |
An annual xts object with all time steps having a
September or December-some year time step. The number of columns in this
object must match the number of traces in |
scen_number |
The scenario number. See Scenario Numbering Convention section. |
scen_name |
Optional. This is only used when printing in R to help the
user quickly know what is stored in the |
drop_flow |
Boolean. If |
x |
An object. |
crssi()
inherits from crss_nf, maintaining the same required structure
for the intervening natural flows. The object also contains the Sacramento
Year Type index, and a scenario number. Given this, all functions that work
on crss_nf and nfd objects work on crssi
objects.
Sacramento Year Type index: Beginning in CRSS v2.6, input data for the
Sacramento year type index are necessary. For historical values see
sac_year_type_get()
.
Overlapping years: crssi()
checks to make sure that there at least some
overlappying yeras of data between flow
and sac_year_type
. It then trims
the data to be January, year1 - December, year2 for the overlapping period
between flow
and sac_year_type
. For example, if flow
contains data
for March 2020 - December 2024 while sac_year_type
contains data for
December 2020 - December 2025, the returned object will contain monthly
intervening flow for January 2021 - December 2024, and Sacremento year type
index values for December 2021 - December 2024.
crssi()
returns an object of class crssi
.
is_crssi()
returns TRUE
if class inherits from crssi
.
Scenario numbering can change faster than this package. For the latest numbering convention, check the package wiki.
The numbering convention uses the following for the ones place of the scenario number.
1 = Observed Resampled, i.e., ISM applied to the historical record.
2 = Direct Paleo Resampled
3 = Paleo-conditioned
4 = CMIP3 Downscaled GCM Projected-
5 = CMIP5 Downscaled GCM Projected, BCSD downscaling, quantile mapping secondary bias correction
Then, for scenarios that use the observed resampled data, the decimal portion
should be set to reflect the years that ISM is applied to. For example, if
you are using the 1988-2012 record, the decimal portion should be set to
19882012, where the first 4 numbers represent the start year and the second
four numbers represent the end year. Thus scen_number
should be 1.19882012
in this example. This tells the user of CRSS that the supply scenario is
the observed historical natural flows with the ISM method applied to the
1988-2012 data.
crss_nf, nfd, write_crssi()
, sac_year_type_get()
# get natural flow and Sacremento Year Type data for 2000-2002
nf <- crss_nf(
CoRiverNF::monthlyInt["2000/2002"],
flow_space = "intervening",
time_step = "monthly"
)
sac <- sac_year_type_get(internal = TRUE)["2000/2002"]
in_data <- crssi(nf, sac, scen_number = 1.20002002)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.