View source: R/create.utci.from.files.R
create.utci.from.files | R Documentation |
Create Climdex UTCI
create.utci.from.files( input.files, output.file, author.data, climdex.time.resolution = "daily", axis.to.split.on = "Y", parallel = 4, verbose = FALSE, cluster.type = "SOCK" )
input.files |
A list of filenames of NetCDF files to be used as input. A NetCDF file may contain one or more variables. |
output.file |
The name of the file to be created. |
author.data |
A vector containing named elements describing the author; see |
axis.to.split.on |
The axis to split up the data on for parallel / incremental processing. |
parallel |
The number of parallel processing threads, or FALSE if no parallel processing is desired. |
verbose |
Whether to be chatty. |
cluster.type |
The cluster type, as used by the |
The purpose of this function is to compute UTCI on the data supplied, saving them to the file specified.
The metadata is stored in JSON files that are included with the pacakge. Right now, the metadata relevant to EOBS is used by default. To switch to another set of metadata, use the metadata.id
global option:
options(metadata.id = 'eobs')
Note that currently only EOBS metadata is available (metadata.id = 'eobs'
).
NetCDF input files may contain one or more variables, named as per variable.name.map
(read from config json file). The code will search the files for the named variables.
## Not run: ## Prepare input data and calculate utci for file. input.files <- c(paste0(in.dir,"tn_0.50deg_regular_1971-2018.nc"), paste0(in.dir,"tx_0.50deg_regular_1971-2018.nc"), paste0(in.dir,"rh_0.50deg_regular_1971-2018.nc"), paste0(in.dir,"rs_0.50deg_regular_1971-2018.nc"), paste0(in.dir,"ws_0.50deg_regular_1971-2018.nc")) author.data <- list(institution="Looney Bin", institution_id="LBC") create.utci.from.files(input.files, out.file, input.files[1], author.data, parallel=3) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.