GTGRID User Guide > Reference > GTGETGRID Function
  

GTGETGRID Function
Retrieves the grid matrix from a surface.
Usage
result = GTGETGRID(surf_id)
Input Parameters
surf_id—(long) A valid ID for a gridded surface.
Returned Value
result—A 2D floating-point array containing the grid matrix associated with the gridded surface.
Input Keywords
Nx—(integer) Specifies the x-dimension size of the returned grid. If Nx is not specified, but Ny is specified, then Nx is set equal to Ny. (Default: 20)
Ny—(integer) Specifies the y-dimension size of the returned grid. If Ny is not specified, but Nx is specified, then Ny is set equal to Nx. (Default: 20)
Output Keywords
Grid_nx—(integer) Returns the actual number of rows in the original grid.
Grid_ny—(integer) Returns actual number of columns in the original grid.
Discussion
The value of surf_id is obtained from the Surf_id keyword in the GTGRID function or from the output of the GTINSTALLSURF function.
Use GTGETGRID to obtain the 2D grid after restoring a surface from a file (GTRESTORESURF). It can also be used to obtain different grid dimensions than were originally used to generate the surface description. For example, if the original grid was generated using nx=ny=20, a 50-by-50 grid can be obtained using GTGETGRID and the surface ID from the 20-by-20 grid.
 
note
Using GTGETGRID with nx=ny=50 is not the same a defining nx=ny=50 during a GTGRID call. When extracting a larger dimensioned grid from a surface with a smaller dimensioned grid, the larger grid will be centered in the grid array and points beyond the original grid dimensions will be set to the null value for that grid.

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