hist10YClimateNA: Access Decadal Historical ClimateNA Data

View source: R/hist10YClimateNA.R

hist10YClimateNAR Documentation

Access Decadal Historical ClimateNA Data

Description

This is a specialty function that has several preliminary requirements. The output produces the 10 years averaged historical climate variables for the provided CSV file. In order to properly use this function, you must prepare the CSV file so that it is compatible with the ClimateNA requirements (using the demToCSV tool). The working directory must be set to the location which the ClimateNA app is located.

Usage

hist10YClimateNA(file, dateR, tFrame, exe, outdir = dirname(file))

Arguments

file

the prepared DEM as a CSV file.

dateR

the historical date range for the climate data. Make sure it is in the 10 years format of 'XXX1_XXX0'. Underscore is necessary, as opposed to dash.

tFrame

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

exe

Full name of the ClimateNA exe file. The working directory must be the location of this file.

outdir

The output directory for the climate data. As a default, it will be outputted to the same location as the input CSV file.

Value

A CSV file with historical climate data

Author(s)

Michael Burnett - UBC Faculty of Forestry

Examples

#setwd("E:/Climatena_v721");getwd() # Set up location for the application
#exe <- "E:/Climatena_v721/ClimateNA_v7.21.exe"
#files <- list.files(pattern = '*.csv$')
#hist10YClimateNA(files[1],'1981_1990','M',exe)

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