pattern2grid: Transform a climate4R pattern into a climate4R grid.

View source: R/pattern2grid.R

pattern2gridR Documentation

Transform a climate4R pattern into a climate4R grid.

Description

Transform a climate4R pattern into a climate4R grid.

Usage

pattern2grid(
  pattern,
  index.code,
  members = 1,
  season = 1,
  coords = NULL,
  dates = NULL
)

Arguments

pattern

A climate4R pattern, obtained from circIndexGrid.

index.code

Circulation index to be extracted. Only ONE circulation index can be extracted at a time. See circIndexShow() for details.

members

In a model ensemble, position of the desired member. Default: 1 (no member dimension).

season

Season to be extracted. Default: 1.

coords

List of xyCoords, as in C4R grids.

dates

List of (start and end) dates, as in C4R grids.

Value

A typical C4R grid.

Examples

## Not run:  
require(climate4R.indices)
data(NCEP_hgt500_2001_2010)
cpc <- indicesCPC(grid=NCEP_hgt500_2001_2010, index.code = c("NAO", "EA","PNA"), season=1)
cpc2plot <- pattern2grid(cpc, index.code="NAO", coords =NCEP_hgt500_2001_2010$xyCoords,
                        dates=NCEP_hgt500_2001_2010$Dates)
spatialPlot(cpc2plot, backdrop.theme="coastline")

## End(Not run)

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