I want to use plurigaussian simulation to create a model with five facies. Two of them should be non-stationary (proportion linear increasing with z-coordinate). So I created a database for the proportions and added five vectors with the proportions to it. However, I always get the message "Number of Facies inconsistent between Rule (5) and DbProp (4)". I mostly followed the tutorial for PGS. It worked without dbprop in simpgs but then the proportions where stationary. Why does Dbprop only contain 4 facies?
- Code: Select all
library(RGeostats)
outgrid2 <- db.create(flag.grid=TRUE,x0=c(0,0,0),nx=c(40,40,50),dx=c(500,500,50))
Dbprop <- db.create(flag.grid=TRUE,x0=c(0,0,0),nx=c(40,40,50),dx=c(500,500,50))
Dbprop <- db.add(Dbprop,Prop2=0.1)
Dbprop <- db.add(Dbprop,Prop3=0.1)
Dbprop <- db.add(Dbprop,Prop5=0.3*(x3/50))
Dbprop <- db.add(Dbprop,Prop6=0.3*(x3/50))
Dbprop <- db.add(Dbprop,Prop1=1-Prop2-Prop3-Prop5-Prop6)
Dbprop <- db.locate(Dbprop,seq(4,7),loctype="p")
pal4fac <- c("red","orange","green","blue","gray")
rule4fac <- rule.create(c("T","S","F3","T","T","F1","F2","F4","F5"))
plot (rule4fac,col=pal4fac)
modY1 <- model.input(ndim=3)
1
4
1
y
n
10000
10000
10
modY2 <- model.input(ndim=3)
1
4
1
y
n
10000
10000
10
outgrid2<- simpgs(dbout=outgrid2, dbprop = Dbprop, rule=rule4fac, model1=modY1, model2=modY2, nbsimu=1,nbtuba=25,seed=126543)
db.write.format(outgrid2, mode="eclipse", file="1-001_RGeostats.grdecl", must.noproj=TRUE, nsamplex=1, nsampley=1, nmult=1, flag.low=0, flag.high=1, valmin=1, valmax=4, append =FALSE, ncolor=NA, red=NA, green=NA, blue=NA, mask_red=0, mask_green=0, mask_blue=0, ffff_red=232, ffff_green=232, ffff_blue=0, low_red =255, low_green =255, low_blue =255, high_red=255, high_green=0, high_blue=0, sep=",", dec=".")