rasterClimApply: Extension of "ClimApply" to a Raster

Description Usage Arguments See Also Examples

Description

Function "ClimApply" to ...

Usage

1
2
rasterClimApply(P = NULL, Tx = NULL, Tm = NULL, Tn = NA, month = NA,
  clim_fun = "contin", ...)

Arguments

P, Tx, Tm, Tn

daily precipitation, maximum, mean and minimum temperature.

month

vectors of months. Default is NA

clim_fun

climate function index of ClimClass package

...

further arguments for listClimApply

See Also

climApply,listClimApply

climStack2List,listClimApply

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(ClimClassMap)
wpath <- system.file("raster_maps/1981-2010",package="ClimClassMap")
temp_map  <- "t/t1981-2010%02d.tif" 
prec_map  <- "p/p1981-2010%02d.tif"


fact <- 5

prec <- aggregate(stack(paste(wpath,
			sprintf(prec_map,1:12),sep="/")),fact=fact) ## 1000 m resolution 
Tm <- aggregate(stack(paste(wpath,sprintf(temp_map,1:12),sep="/")),fact=fact)

names(prec) <- sprintf("M%02d",1:12)
names(Tm) <- sprintf("M%02d",1:12)

# Actally no info for daily maximum and minimum temeparature

Tn <- stack(Tm-5)
Tx <- stack(Tm+5)




indexMap <- rasterClimApply(P=prec,Tx=Tx,Tn=Tn,Tm=Tm,clim_fun="contin",indices=4)

ecor/ClimClassMap documentation built on May 15, 2019, 8 p.m.