View source: R/Functions_Supporting.R
get_values_from_sw2 | R Documentation |
Extract values, determine time series, and assign time steps to groups based on an rSOILWAT2 output as generated by rSFSW2
get_values_from_sw2(
id_scen,
path,
name_sw2_run,
group_by_month,
first_month_of_year,
sw2_tp,
sw2_out,
sw2_var,
varnames_are_fixed = TRUE,
zipped_runs = FALSE
)
id_scen |
An integer value. The climate scenario ID as generated by rSFSW2. |
path |
A character string. The directory path where rSFSW2 stored the rSOILWAT2 output, by default “3_Runs”. |
name_sw2_run |
A character string. The rSFSW2 name identifying
a run, i.e., the full experimental label x site name. The folder name
within |
group_by_month |
An integer vector of length 12. The group IDs of each
month. If no grouping is requested, then provide,
e.g., |
first_month_of_year |
An integer value. The number of the
month |
sw2_tp |
A character string. One of the rSOILWAT2 output time slots. Note: currently, only “Month” and “Day” are implemented. |
sw2_out |
A character vector. One (or multiple) of the rSOILWAT2
output groups. These will be recycled if |
sw2_var |
A character vector. One (or multiple) of the column names
of the output group(s) corresponding to the |
varnames_are_fixed |
A logical value. If |
zipped_runs |
A logical value. Describes whether |
A list with three elements:
vals A list with one element for each sw2_var
. Each
element is a vector of values for that sw2_var
,
if varnames_are_fixed
is TRUE
; otherwise, a vector
or matrix where columns represent all the SOILWAT2 output
corresponding to that sw2_var
interpreted as
regular expression.
The length of vectors (or the number of rows) corresponds to the
number time steps requested by sw2_tp
.
year A vector of calendar years for each time step.
groups_by_time A vector of group ID, based on
group_by_month
, for each time step.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.