grid2mopa0: Transform a grid or multigrid to a set of predictors to be...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/grid2mopa.R

Description

Transform a grid or multigrid to collections of raster files for modeling with the mopa package.

Usage

1
grid2mopa0(grid, varname = "variable", crs = NA)

Arguments

grid

Input grid or multigrid without member or runtime dimensions. Grid returned by function climatology are also supported.

varname

Variable name of the grid

crs

Optional (Default NA). Character or object of class CRS. PROJ.4 type description of a Coordinate Reference System (map projection). If this argument is missing, and the x coordinates are withing -360 .. 360 and the y coordinates are within -90 .. 90, "+proj=longlat +datum=WGS84" is used. Also see under Details if x is a character (filename).

Value

A raster for grid objects and a RasterStack for multigrids.

Author(s)

M. Iturbide

See Also

climatology; loadGridData

Examples

1
2
3
4
5
6
7
8
#' # Maximum July surface temp forecast climatology
data("CFS_Iberia_tas")
# Aggregate all members and compute climatology
t.clim <- climatology(CFS_Iberia_tas, by.member = FALSE)
plotClimatology(t.clim)
t.ras <- grid2mopa0(t.clim)
# require(sp)
# spplot(t.ras)

SantanderMetGroup/transformeR documentation built on April 1, 2020, 5:42 a.m.