upscaleGrid: Horizontal grid upscaling

Description Usage Arguments Details Value Author(s) Examples

View source: R/upscaleGrid.R

Description

Aggregates a grid along the target dimensions using user-defined functions.

Usage

1
upscaleGrid(grid, times = 5, aggr.fun = list(FUN = max, na.rm = TRUE))

Arguments

grid

a grid or multigrid to be aggregated.

times

Degradation times. For instance, if the resolution of grid is 1 degree and times = 2, the resolution of the output grid will be 2 degrees.

aggr.fun

Upscale function. Default retains the maximum value.

Details

The development of a more eficient and fast version of the function is planned.

Value

A grid or multigrid aggregated along the chosen dimension(s).

Author(s)

M. Iturbide

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data("EOBS_Iberia_pr")
library(visualizeR)
spatialPlot(climatology(EOBS_Iberia_pr))
newgrid <- upscaleGrid(redim(EOBS_Iberia_pr), 
                       times = 2,
                       aggr.fun = list(FUN = "min", na.rm = TRUE))
spatialPlot(climatology(newgrid))

## End(Not run)

SantanderMetGroup/transformeR documentation built on Feb. 14, 2020, 5:55 p.m.