Skip to content
Back to formatted view

Raw Message

Message-ID: <DUB126-DS155BBB1A3B597216D0F4EEF3FE0@phx.gbl>
Date: 2013-11-12T10:41:26Z
From: Ioanna Ioannou
Subject: Error in grf using geoR

Hello all, 

I cant find a thread with a problem similar to mine. I am trying to create a
random fields and I get the same error:

library(geoR)
N<-10
nslon<-250
nslat<-250
range<-10
sim2 <- grf(nslon*nslat, grid="reg", nx=nslon, ny=nslat,cov.pars=c(1,
range), 
              nsim=N, cov.model = "exponential",
              xlims=c(30.02,35.00),ylims=c(30.02,35.00) )

Error in FUN(X[[1L]], ...) : 
  different grid distances detected, but the grid must have equal distances
in each direction -- try gridtriple=TRUE that avoids numerical errors.

 I can't understand why as the code seems to run if I change the limits of
the grid:

sim2 <- grf(nslon*nslat, grid="reg", nx=nslon, ny=nslat,cov.pars=c(1,
range), 
              nsim=N, cov.model = "exponential",
              xlims=c(0.02,5.00),ylims=c(0.02,5.00) )

Any ideas?

Best 
Ioanna