cropresamplenc: Resample nc file to spatial array

Description Usage Arguments Details Value

View source: R/workerfunctions.R

Description

Resample nc file to spatial array

Usage

1
cropresamplenc(file, r, Trace = TRUE)

Arguments

file

the name of the .nc file which the data are to be read from. If it does not contain an absolute path, the file name is relative to the current working directory, getwd(). Tilde-expansion is performed where supported.

r

an object of type raster. The returned spatialarray has the same resolution and extent as r.

Trace

optional logical indicating whether to create and plot a raster of every 100th entry to enable progress to be tracked.

Details

Currently, the UKCP18 nc files contain errors in both the times and the defined coordinate reference system. These are corrected in the function, but users are advised to check their data.

Value

an object of class spatialarray. An object of class spatialarray is a list containing the following components:

arraydata

A three-dimensional array of values corresponding to values of the resampled .nc file

times

An object of class POSIXlt of times arraydata

crs

An object of class crs indicating the coordinate reference system associated with arraydata

extent

An object of class extent indicating the geographic extent covered by arraydata

units

Units of arraydata

description

Description of arraydata


ilyamaclean/UKCP18adjust documentation built on Nov. 4, 2019, 2:08 p.m.