grid <- list( x= seq( 0,5,,100), y= seq(0,5,,100))
obj <- Exp.image.cov( grid=grid, theta=.5, setup=TRUE)
look <- sim.rf( obj)
look[ look < 0] <- 0
look <- zapsmall( look)
look2 <- sim.rf( obj)
look2[ look2 < 0] <- 0
look2 <- zapsmall( look2)
look3 <- sim.rf( obj)
look3[ look3 < 0] <- 0
look3 <- zapsmall( look3)
hold <- make.SpatialVx( look, look2, thresholds = c(0.1, 1),
field.type = "random", units = "units")
plot( hold )
res <- wavePurifyVx( hold, climate = look3, return.fields = TRUE, verbose = TRUE )
plot(res, type="fields")
plot(res, type="stats")
summary(res)
if (FALSE) {
data( "UKobs6" )
data( "UKfcst6" )
data( "UKloc" )
hold <- surrogater2d( UKobs6, n=1, maxiter=50, verbose=TRUE)
hold <- matrix(hold, 256, 256)
UKobj <- make.SpatialVx( UKobs6, UKfcst6, thresholds = c(0.1, 2, 5, 10),
loc = UKloc, map = TRUE, field.type = "Rainfall", units = "mm/h",
data.name = "Nimrod", obs.name = "obs 6", model.name = "fcst 6" )
plot(UKobj )
look <- wavePurifyVx( object = UKobj, climate = hold,
return.fields = TRUE, verbose = TRUE)
plot(look, type = "fields" )
plot(look, type = "stats" )
summary( look )
}
Run the code above in your browser using DataLab