intersectGrid: Intersection of multiple grids

View source: R/intersectGrid.R

intersectGridR Documentation

Intersection of multiple grids

Description

Takes multiple input grids and crops the overlapping part

Usage

intersectGrid(
  ...,
  type = c("temporal", "spatial", "members"),
  which.return = 1
)

Arguments

...

Input grids

type

Character. Options are "temporal" (default) or "spatial".

which.return

Integer of the index to specify which grids in "..." are to be returned.

Details

If type = "members" the function directly loads the resulting objects to the global environment and argument which.return is ignored (see examples).

Value

The grids indicated in which.return, encompassing the overlapping time period.

Author(s)

M Iturbide

See Also

subsetGrid

Other subsetting: getTemporalIntersection(), intersectGrid.spatial(), intersectGrid.time(), limitArea(), subsetCluster(), subsetDimension(), subsetGrid(), subsetMembers(), subsetRuntime(), subsetSeason(), subsetSpatial(), subsetStation(), subsetVar(), subsetYears()

Examples


require(climate4R.datasets) 
data("EOBS_Iberia_tas")
a <- subsetGrid(EOBS_Iberia_tas, lonLim = c(-8,-1), latLim = c(37, 40))
b <- subsetGrid(EOBS_Iberia_tas, lonLim = c(-4,3), latLim = c(39, 43))
z <- intersectGrid(a, b, type = "spatial", which.return = 1)
 data("CFS_Iberia_tas")
 data("CFS_Iberia_pr")
 intersectGrid(CFS_Iberia_tas, CFS_Iberia_pr, type = "members")


SantanderMetGroup/transformeR documentation built on Oct. 28, 2023, 5:26 a.m.