Description
Hi,
I've been encountering a problem I don't understand with the predict.gstat function.
I would like to use it to interpolate residuals using a cokriging model. Running the function with nsim=0 works fine but if I increase it to a larger number (even a small one like 10, although I need to run it eventually with nsim=300) it automatically causes the following error, even on computers with large computing power and memory:
*** caught segfault *** address 0x38, cause 'memory not mapped'
Could you help me identify the issue ?
I checked for duplicate coordinates with zerodist, for unmatching CRSs, I tried with many values of maxdist and nmax, as well as with fewer points, so I'm at a loss here.
Below is a minimal example, and here is the link to download data: https://filesender.renater.fr/?s=download&token=911d7d4c-6bf5-4bec-a316-8adc5417b9d8
Thank you very much in advance.
I remain available for any complementary information.
library(gstat)
# Load variogram
load("./var_awc.RData")
awc_sem <- cv.fit
# Load data to predict
val_sp <- readRDS("./point_data.Rdata")
# Works fine
gstat:::predict.gstat(awc_sem, newdata = val_sp)
# Crashes
gstat:::predict.gstat(awc_sem, newdata = val_sp, nsim=10, maxdist=500)