create.scPDSI.from.files: Create scPDSI

View source: R/create.scPDSI.from.files.R

create.scPDSI.from.filesR Documentation

Create scPDSI

Description

Create scPDSI

Usage

create.scPDSI.from.files(
  input.files,
  output.file,
  author.data,
  climdex.time.resolution = "daily",
  axis.to.split.on = "Y",
  parallel = 4,
  verbose = FALSE,
  cluster.type = "SOCK",
  start = NULL,
  end = NULL,
  cal_start = NULL,
  cal_end = NULL
)

Arguments

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 create.indices.from.files.

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 snow library.

Details

The purpose of this function is to compute scPDSI 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').

Note

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.

Examples

## Not run: 
## Prepare input data and calculate scPDSI for file.
input.files <- c(paste0(in.dir,"rr_0.50deg_regular_1971-2016.nc"),paste0(in.dir,"pet_0.50deg_regular_1971-2016.nc"))
author.data <- list(institution="Looney Bin", institution_id="LBC")
create.scPDSI.from.files(input.files, out.file, input.files[1], author.data,  parallel=3)

## End(Not run)


ECA-D/ecad_indices_grid documentation built on Nov. 23, 2022, 6:04 a.m.