projClimateNA: Access Climate Projections from ClimateNA

View source: R/projClimateNA.R

projClimateNAR Documentation

Access Climate Projections from ClimateNA

Description

This is a specialty function that has several preliminary requirements for accessing climate projections within a given site. The output produces the projected climate variables for the provided CSV file. In order to properly use this function, the following steps much be taken. The steps include : 1. Set the working directory to where the ClimateNA app is located on your computer. 2. Prepare the CSV file so that it is compatible with the ClimateNA requirements. 3. Relocate the CSV file so it is located within the ClimateNA app directory.

Usage

projClimateNA(
  file,
  tFrame,
  exe,
  scen = c("ACC", "CNRM", "EC", "GFDL", "GISS", "MIR", "MPI", "MRI", "UK"),
  ssp = c("S1", "S2", "S3"),
  years = c("Y2", "Y3", "Y4", "Y5")
)

Arguments

file

string. The prepared DEM as a CSV file. This file must be located within the same directory which the ClimateNA application is located.

tFrame

string. The averaged time frame of each climate variable. Use 'M' for monthly, 'Y' for annual, and 'S' for seasonal.

exe

string. File name of the ClimateNA exe file. This must be located within the current working directory.

scen

string. The GCM selection. Options include : '8GCM' (8GCMs_ensemble); '13GCM' (13GCMs_ensemble); 'ACC' (ACCESS-ESM1-5); 'BCC' (BCC-CSM2-MR); 'CAN' (CanESM5); 'CNRM' (CNRM-ESM2-1); 'EC' (EC-Earth3); 'GFDL' (GFDL-ESM4); 'GISS' (GISS-E2-1-G); 'INM' (INM-CM5-0); 'ISPL' (IPSL-CM6A-LR); 'MIR' (MIROC6); 'MPI' (MPI-ESM1-2-HR); 'MRI' (MRI-ESM2-0); 'UK' (UKESM1-0-LL). As default, only the scenarios used by Amy Wotherspoon for Silva21 are selected.

ssp

string. The SSP scenario selection. Options include : 'S1' (ssp126); 'S2' (ssp245); 'S3' (ssp370); 'S5' (ssp585).

years

string. The annual, 20-years, or 30-years time frames selection. Options include : 'Y1' (2001-2020); 'Y2' (2021-2040); 'Y3' (2041-2060); 'Y4' (2061-2080); 'Y5' (2081-2100); 'Y_1' (2011-2040); 'Y_2' (2041-2070); 'Y_3' (2071-2100); or just the single year as a string.

Details

This function works with either annual, 20 years, or 30 years averages.

Value

CSV files within a new folder within the current directory

Author(s)

Michael Burnett - UBC

Examples

rm(list=ls())
#setwd("E:/Climatena_v721");getwd() # Set up location for the application
#exe <- "E:/Climatena_v721/ClimateNA_v7.21.exe"

#files <- list.files(pattern = '*.csv$')

## Access specific climate scenarios
# Access climate projections for 2041-2060
#projClimateNA(files[1],'M',exe,c('ACC','BCC','MRI','UK'),c('S2','S3'), years = 'Y3')
# Access climate projections for 2035
#projClimateNA(files[2],'M',exe, years = '2035')
# Access climate projections for 2041-2070
#projClimateNA(files[3],'S',exe,'CAN',c('S1','S2'),years = 'Y_2')

Silva21-irss/silvR21 documentation built on Sept. 14, 2022, 7:55 a.m.