histAnnualClimateNA: Access Annual Historical ClimateNA Data

View source: R/histAnnualClimateNA.R

histAnnualClimateNAR Documentation

Access Annual Historical ClimateNA Data

Description

This is a specialty function that has several preliminary requirements. The output produces the 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

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

Arguments

file

the prepared DEM as a CSV file.

dateR

the historical year for the climate data. Make sure it is in the number format of 'XXXX'.

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$')
#histAnnualClimateNA(files[1],'1981','M',exe)

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