|
From: Thomas M. H. <tho...@gm...> - 2009-12-04 12:44:46
|
Hi Alireza. mGstat (http://mgstat.sourceforge.net/) contains a Matlab interface to SGeMS that lets you call SGeMS from within Matlab and manipulate the parameter file controlling SGeMS. If you intend to try the example below, I suggest you download mGstat from SVN (http://sourceforge.net/projects/mgstat/develop) as the support for SGeMS has been updated a lot since the last release. At the moment the semivariogram computaton of SGeMS cannot be performed using the commandline interface, and therefore this is not available in mGstat. You can however manually fit semivariogram models in Matlab (see below) Say you want to perform sequential Gaussian I suggest you try out the small example in Chapter 3.1 in the online documentation (http://mgstat.sourceforge.net/htmldoc/chapSGEMSuse.html#SGEMS_seqsim) In short to to get a default SGSIM XML-parameter file loaded into matlab: -- S = sgems_get_par('sgsim); % Loads a default SGSIM parameter file -- All options for controlling SGeMS is in the matlab structure : S.XML.parameters If you want to change the variogram model, you should change the structure below S.XML.parameters.Variogram -- >> S.XML.parameters.Variogram ans= nugget: 1.0000e-003 structures_count: 1 structure_1: [1x1 struct -- To run 10 simulation with increasing range do for example: -- for i=1:1:10 r=i*10; S.XML.parameters.Variogram.structure_1.ranges.max=[r]; S.XML.parameters.Variogram.structure_1.ranges.medium=[r]; S.XML.parameters.Variogram.structure_1.ranges.min=[r]; S=sgems_grid(S); subplot(4,3,i);imagesc(S.x,S.y,S.D(:,:,1)'); end -- You can also specify the variogram model using a shorter notation (same format as when using GSTAT) (only available in the SVN version): -- S.XML.parameters.Variogram=sgems_variogram_xml('0.1 Nug(0) + 0.4 Exp(10) + 0.5 Sph(40,30,0.2)'); -- In mGstat you will find a few m-files that should help you manully fit a semivariogram model to the experimental semivariogram obtained from your data. Check out 'semivar_exp_gstat.m' I hope this can help a bit. Have a nice day - Thomas Mejer Hansen 2009/11/25 Alireza <ars...@ma...>: > Dear SGEMS's friends, > > I am new in SGEMS and I am doing reservoir history matching in matlab. I > like to know how I can call SGEMS from matlab to create variograms and make > use of the created variogram to do 2D Kriging. Any comment regarding import, > export, from/to Matlab/SGEMS and format files is appreciated. > > Best regards, > Alireza, > |