climate.accumulator: Climate Accumulator

Description Usage Arguments Value Examples

View source: R/ClimateAccumulator.R

Description

Takes the time series of rainfall and returns a rainfall accumulation table of every possible combination of the max accumulation period and the max offset period.

Usage

1
2
3
4
5
6
7
8
climate.accumulator(
  CTSR.VI,
  clim.data,
  max.acp,
  max.osp,
  temperature = FALSE,
  cliwindow = 0
)

Arguments

CTSR.VI

Complete Time Series of Vegetation Index. An object of class 'ts'. Monthly time series of VI values

clim.data

Complete Time Series of monthly rainfall or temperature. An object of class 'ts'. Must have the same end date as CTSR.VI and be longer than the CTSR.VI by more than the max acsumuation period (max.acp) plus the max offset period.(max.ops)

max.acp

The max accumuation period. Must be an integer > 1.

max.osp

The max offset period. Must be an integer >1

temperature

Bool. If the clim.data being accumulated is temperature, will take a mean not a sum. This makes it easier to comapare regions with different accumulation and offset periods. This is new in v0.3.0. Defualt=FALSE which replicates the behaviour of TSSRESTREND versions <0.2.16.

cliwindow

The size of the window in years to be used for calculating climate change.

Value

ACP.table A matrix with ever possible accumuated climate combination

Examples

1
2
3
4
5
# Define the max accumuulation period
acp <- 12
#Define the max offset period
osp <- 4
rftable <- climate.accumulator(segRESTRENDCTSR$cts.NDVI, segRESTRENDctRF$precip, acp, osp)

TSS.RESTREND documentation built on Aug. 3, 2020, 1:07 a.m.