GTGRID User Guide > Examples > Example 1
  

Example 1
This demo calls the function GTGRID three times using the same random X, Y, and Z data for each example and then displays the results using the SURFACE command.
For a complete description of the calls and the keywords used for each call, refer to the PV-WAVE GTGRID User's Guide.
To start this demo, enter wgtdemo at the PV-WAVE prompt. The results are shown in First Grid Generated in Example 1, Second Grid Generated in Example 1, and Third Grid Generated in Example 1.
This example is located in the directory:
<RW_DIR>/gtgrid-3_0/lib/wgtdemo.pro
 
The demonstration code is:
PRO WGTDEMO, zz, zzf, zzall
;
; PV-WAVE procedure file to execute the GTGRID examples in
; Users Guide.
;
; Load the GTGRID option
;
@gtgrid_startup
;
; First, get the test data for the examples.
;
GT_GET_DATA, x, y, z, xf, yf, xc, yc
;
; Use the fewest number of parameters and keywords for the
; first call to GTGRID. All keywords use their defaults. 
; After each example, display the results as a surface.
;
PRINT, ""
PRINT, "  This demo calls the function GTGRID three times"
PRINT, " using the same random X Y Z data for each example"
PRINT, " and then displays the results using the SURFACE"
PRINT, " command."
PRINT, ""
PRINT, " For a complete description of the calls and the "
PRINT, " keywords used for each call, refer to the "
PRINT, " PV-WAVE:GTGRID User's Guide. Hit any key to begin" 
PRINT, " the first set of GTGRID examples:"
HAK
;
PRINT, ""
PRINT, "  *** This example uses all default settings to" 
PRINT, " GTGRID."
PRINT, ""
zz = GTGRID(x, y, z)
SURFACE, zz, /Skirt
PRINT, "  Please hit any key to continue with the next GTGRID" 
PRINT, " example:"
HAK
;
; Next, add fault processing, reduce the number of smoothing 
; passes and increase the size of the output grid.
;
PRINT, ""
PRINT, "  *** This example adds fault data, sets the number"
PRINT, "  *** of smoothing passes to 10, and defines the"
PRINT, "  *** gridded output mesh size to be 41 by 41 array."
PRINT, ""
zzf = GTGRID(x, y, z, Xf=xf, Yf=yf, Nsm=10, Nx=41)
SURFACE, zzf, /Skirt
PRINT, "  Please hit any key to continue with the next GTGRID" 
PRINT, " example:"
HAK
;
; This last example uses every available keyword.  See the
;            PV-WAVE:GTGRID Users Guide
; for an description of each of the keywords.
;
PRINT, ""
PRINT, "  *** The next SURFACE uses all of the keywords"
PRINT, "  *** possible for GTGRID: includes fault data,"
PRINT, "  *** returns a gridded mesh size of 51 by 51, sets a"
PRINT, "  *** range within the data and a radius to be used"
PRINT, "  *** by the gridding algorithm, increases the number"
PRINT, "  *** of smoothing passes to 50, as well as defining"
PRINT, "  *** a null value and setting the method to use the"
PRINT, "  *** 'Cluster' technique. All of these keywords are"
PRINT, "  *** more fully explained in the PV-WAVE:GTGRID"
PRINT, " User's Guide."
zzall = GTGRID(x, y, z, Xf=xf, Yf=yf, Nx=51, Ny=51, $
               Xmin=3200, Xmax=4500, Ymin=3000, Ymax=4000, $
            Method='cluster', Nulval=200, Nsm=50, $
            Radius=100)
SURFACE, zzall, /Skirt
;
END
 
Figure A-1: First Grid Generated in Example 1
 
Figure A-2: Second Grid Generated in Example 1
 
Figure A-3: Third Grid Generated in Example 1
 

Version 3.0
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.