View source: R/ensembleGenerator.R
ensembleGenerator | R Documentation |
This function uses the desired SSPs and variables to generate averaged ensembles. Its outputs will consist of a series of ensemble CSV files, each consisting of the average value for each variable under every SSP scenario and time frames. This function is only used with monthly data outputs.
ensembleGenerator( files, tFrame = c("M", "S", "Y"), var = c("Tmax", "Tmin", "PPT", "DD5", "NFFD", "PAS", "CMI"), ssp = c("S1", "S2", "S3"), years = c("Y2", "Y3", "Y4", "Y5"), concatenate = TRUE )
files |
The list of files provided by the projClimateNA20Y output, after using the AnnualSeasonalMeans function to process annual and seasonal averages/sums. |
tFrame |
The variable time frames included in the climate data. If the AnnualSeasonalMeans tool has been used, then the default value is desired. Otherwise, 'M' represents monthly, 'S' represents seasonal, and 'Y' represents annual time frames. |
var |
The desired variables to produce averages of. Variables include : 'Tmax','Tmin','Tavg','PPT','Rad','DD_0','DD5','DD18','DD_18','NFFD','CMI','PAS','Eref','CMD','RH'. Default value includes 'Tmin','Tmax','PPT','DD5_','NFFD','CMI','PAS'. |
ssp |
The SSP scenarios. 'S1' = 'ssp126' ; 'S2' = 'ssp245' ; 'S3' = 'ssp370' ; 'S5' = 'ssp585'. Default value is c('S1','S2','S3'). |
years |
The 20-years time frames selection. Options include : 'Y1' (2001-2020); 'Y2' (2021-2040); 'Y3' (2041-2060); 'Y4' (2061-2080); 'Y5' (2081-2100). |
concatenate |
logical. If TRUE, all of the GCM ensemble data is concatenated into one mega file and producing a second file containing the GCM emsemble area's mean for each variable. |
Directory with ensemble files as CSVs
Michael Burnett - UBC Faculty of Forestry
#files <- list.files(pattern='*.csv$') # Access all CSV files #ensembleGenerator(files) # Generate ensemble using the default parameters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.