weightmaskZAMG: Returns cost733-ZAMG Style Weighting Mask

Description Usage Arguments Value Author(s) See Also Examples

Description

The cost733 WLK weather type classification algorithm uses a weight mask. This allows to “focus” on specific parts of the area of interest. There are three different zones called “core”, “mid” and “margin”.

getClassification provides an option which is called zamg=TRUE. In case this is set the algorithm used the ZAMG weighting mask as shown in “Trendanalyse von hydro-meteorologischen Extremwerten”. The are using a fixed weight-mask specification for Austria.

This function returns the weights with respect to the WLK classification as used by the ZAMG in Vienna.

Usage

1
2
## Basic usage
weightmaskZAMG( lon, lat, weights=c(15,2,1), ... )

Arguments

lon

numeric vector of longitude values.

lat

numeric vector of latitude values.

weights

numeric vector of length three with the weights for the three zones “core”, “mid” and “margin”.

...

Unused additional arguments.

Value

Returns a matrix of size length(lon) times length(lat) with the corresponding weights.

Author(s)

Reto Stauffer

See Also

weightmask, getClassification

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
lons <- seq( 5,30,by=0.25)
lats <- seq(40,60,by=0.25)
w1 <- weightmaskZAMG( lons, lats )
w2 <- weightmaskZAMG( lons, lats, weights=c(3,2,1) )
w3 <- weightmaskZAMG( lons, lats, stripsize = 10 )
w4 <- weightmaskZAMG( lons, lats, weights=c(3,2,1), stripsize = 4.5 )

# Pretty ugly plots
par(mfrow=c(2,2))
   image(w1,zlim=c(1,15),col=1:15,main="weight mask c(15,2,1) stripsize 5")
   image(w2,zlim=c(1,15),col=1:15,main="weight mask c(3,2,1) stripsize 10")
   image(w3,zlim=c(1,15),col=1:15,main="weight mask c(15,2,1) stripsize 5")
   image(w4,zlim=c(1,15),col=1:15,main="weight mask c(3,2,1) stripsize 4.5")

retostauffer/Rcost documentation built on May 7, 2019, 9:43 p.m.