vmap.auto

Here you can report the problems encountered when using a function relative to the variography:
- experimental variography (vario.calc, vario.grid, vmap.calc, ...)
- model fitting (model.auto)

vmap.auto

Postby Jeffrey Yarus » Fri Feb 18, 2022 11:40 pm

I have created a variogram map, which worked really well. However, I'm having a hard time understanding what vmap.auto is doing -
Vmap_autofit.png
I understand the variogram map perfectly, and it's reasonable. However, I do not understand what the vmap.auto - automatic model fitting on variogram map - showing me. The orientation seems perpendicular to what I expected.
Vmap_autofit.png (57.76 KiB) Viewed 7848 times
automatic model fitting on variogram map. My variogram map shows a clear N 9deg E directional continuity. The variogram model shows an ellipse running E-W. I'm not sure how to read the vmap.auto... How do I interpret this?

JY
Jeffrey Yarus
 
Posts: 48
Joined: Wed Jun 26, 2019 9:39 pm

Re: vmap.auto

Postby Jeffrey Yarus » Sun Feb 20, 2022 5:21 pm

I think what I need is a better explanation of what vmap.auto does. Also, shouldn't I be able to see the modeling parameters it came up with?
Jeffrey Yarus
 
Posts: 48
Joined: Wed Jun 26, 2019 9:39 pm

Re: vmap.auto

Postby Didier Renard » Mon Feb 21, 2022 3:49 pm

Hi Jeffrey

The vmap.auto() has certainly not given you good results in your case. Let me clarify some points:
- the variogram map is NOT calculated on polar grid (as in Isatis). As a matter of fact, although graphically appealing, this representation is not optimal: as matter of fact, the sizes of the polar cells are not equal, which biases the graphical rendition. I finally prefer the square regular grid.
In this square representation, we simply fill each grid cell with the average of half-squared differences values between pairs of points located at a distance/direction which correspond to the location of the grid cell with respect to the center of the plot.
- the variogram map can be calculated in two different ways:
. using vmap.grid when data are located on a regular grid
. using vmap.calc otherwise
Note that you can always use vmap.calc (even when data are on a grid) but calculations take much more time.
- the variogram map, at the end of calculations, stand as a grid whose origin is located in the center of the grid.
This grid can be represented with any graphical module dedicated to a standard grid, such as plot, 3-D block...

THen comes the vmap.auto() module. This module is meant to fit atuomatically the variogram information contained in the variogram map informed on all the cells of the variogram map grid, i.e. in may directions and distances. If you specified nx and ny in the vmapXXX function, the resulting vmap (in 2-D) is automatically dimensioned to (2*nx+1) * (2*ny+1). To give numbers, if you say that nx=ny=10, the vmap grid contains 441 cells. This explains that the fitting procedure may take some time (as when running a traditional variogram fitting procedure with 441 calculated lags!!!).

The fitting procedure uses the same type of arguments as the one performed on a set of traditional variograms: i.e. some recommended structures, the switches to allows/forbid anisotropy, rotation ...

The result is a standard model with possible complex anisotropies.

In order to better understand the fitting, the procedure automatically draw (with the same color scale) the experimental variogram map (left) and the one corresponding to the Model (right).

Usually the fit is rather correct as the amount of experimental information is large. However, one has to pay attention to the cell dimension and the overall grid dimensions for the variogram map grid. If too small, only the small scale structures will be fitted correctly. Another issue comes from the number of pairs. This information is also stored in the variogram map grid. One has to remember that the number of pairs will come as a weight during the fitting procedure: a cell whose weight is small corresponds to a small number of pairs assigned to this cell and it will be disregarded dugin the fitting step.

As I do not have your data in hand, I cannot see which could be the origin for such a mismatch between the left and the right figures resulting from the automatic fit.
Didier Renard
 
Posts: 337
Joined: Thu Sep 20, 2012 4:22 pm

Re: vmap.auto

Postby Jeffrey Yarus » Mon Feb 21, 2022 4:16 pm

Hi Didier:
Thanks for your quick reply. The data set (attached) has 281 samples with a number of measurements at each location (the same West Texas data set I've been using). There are two outlier values at the sample sample location, one for P_PHI and one for the variable P_KH_md. P_PHI is porosity and P_KH_md is permeability. The variable I was building the variogram map from is P_PHI. You're welcome to use the data set or even include it in the RGeostats or gstlearn repository. It's public domain. If you can run the data and take a look that would be great!
Jeffrey Yarus
 
Posts: 48
Joined: Wed Jun 26, 2019 9:39 pm

Re: vmap.auto

Postby Jeffrey Yarus » Mon Feb 21, 2022 4:22 pm

Following up... It appears that issue is the presence of the outlier. I now have a better result (see below).
Attachments
WT_P_PHI_Noout.png
WT_P_PHI_Noout.png (24.95 KiB) Viewed 7838 times
Jeffrey Yarus
 
Posts: 48
Joined: Wed Jun 26, 2019 9:39 pm

Re: vmap.auto

Postby Jeffrey Yarus » Tue Feb 22, 2022 3:36 pm

Upon further investigation, the issue here is not simply the outlier. The code I produced mitigates the outlier using Tukey's Fense (1.5 * the IQR +/- upper and lower quartile). Prior to the creation of the database (db), I use mutate() to create a TRUE and FALSE column which captures the results of Tukey's Fense. The data frame is then converted to two different databases (via RGeostats); one with the outlier, and one without. In this way I can produce various statistical and geostatistical metrics and graphs with or without the outlier present. This works really well, for example, to see the impact of an outlier on the variogram. However, using the database without the outlier produces the results you see in the initial question - the variogram map looks good, but the mode is incorrect. Yet, if I re-run the script without changing anything but the input data file (initial csv) that has no outlier to begin with, the variogram map and variogram model is correct. So, there must be something in the code that vmap.calc() and/or vmap.auto() does not like. To be clear, the only difference in the two codes is the initial input data file. The first (that generates the incorrect variogram map) has an outlier which the code mitigates using Tukey's Fence. It has 262 samples and one is flagged. The second has an input file on 261 values. Tukey's Fence is applied, but as there are no outliers to begin with, it does not find any, therefore, the flag column contains only the value "FALSE" - each sample is identified as 'not an outlier.' So far, this is still a bit of a mystery, but I thought I would document it here and see if anyone has suggestions...

Jeffrey
Jeffrey Yarus
 
Posts: 48
Joined: Wed Jun 26, 2019 9:39 pm

Re: vmap.auto

Postby Didier Renard » Fri Apr 01, 2022 6:28 pm

Sorry for the delay... I am working hard to be ready for the second module of CFSG (multivariate and non-stationary).
To continue on your problem it would certainly help if you could join the data file (CSV format) for me to be able to test it.
As a preliminary remark through, let me recall that the current version of the Db (data base) structure in the current version of RGeostats is limited to numeric information. This is particularly true when the input data contains some alphanumeric information (such as the well Name for example). Unfortunately no efficient test is available to look for such alphanumeric information and the results appear to be unpredictable. I am not sure that the same could not happen when reading FALSE and TRUE type of information: in other words, I am not sure that an automatic procedure would ensure to translate TRUE to 1 and FALSE to 0 prior to storing this information in the Db.
Before sending the CSV files, you could possibly try to replace all TRUE by 1 and FALSE by 0 and check if the bug still shows up.
Thanks in advance.
Didier Renard
 
Posts: 337
Joined: Thu Sep 20, 2012 4:22 pm

Re: vmap.auto

Postby Jeffrey Yarus » Thu Apr 21, 2022 2:57 pm

Hi Didier:

Here is the csv file I am using...
Attachments
WT-2D-all-outlier.zip
(4.96 KiB) Downloaded 117 times
Jeffrey Yarus
 
Posts: 48
Joined: Wed Jun 26, 2019 9:39 pm


Return to Variography

Who is online

Users browsing this forum: No registered users and 4 guests

cron