previous up next print clean
Next: INTERFACE TO SEPF90 Up: Clapp & Crawley: SEPF90SEPF90 Previous: Terminology

STRUCTURE

The SEP90 data structure was designed with the goal of mirroring SEPlib90. Seismic data exists primarily as traces, regularly sampled in time, and regularly or irregularly sampled along various gridding axes, which may be spatial, such as midpoint and shot location; or non-spatial, such as shot number. In SEPlib90, separate grid and header files are used to represent the regular (binned) and irregular properties, respectively, of a given data set. SEP90's structure is similar to SEPlib90, using two levels of defined type to achieve this representation. The basic units are the trace, sep_tr and the header sep_hdr. The sep_tr is an allocatable one dimensional array. [*] One of these is allocated for each trace. The sep_hdr type is similar, consisting of pointers to real and integer allocatable arrays for storing header keys. These types are like the data and header records of a SEPlib90 data set.

Structure is given to these random traces and headers through organization into larger arrays. There are allocatable one dimensional arrays of type sep_hdr and sep_tr, labeled traces and headers, respectively. That is, traces is a one dimensional array, and each element of traces is a sep_tr. The one dimensional traces and headers are associated with an N-D grid through the allocatable arrays n, o, d, and label. These may reflect the history file, HFF, or GFF depending on the nature of the dataset. For economy of memory, missing traces are allocated to length 0. This enables safe array operations (no segmentation faults) without the expense of storing zeroes. Along with the grid arrays and axis parameters, a data set has space for number, names and formats of header keys, and a logical flag indicating whether or not a data set is sparsely sampled (if any traces have zero length).

The structure is most easily described graphically. This is done in Figure 1. Figure 1 displays the shape and connectivity of a two dimensional data set, such as a common midpoint gather. The figure shows a data set with four traces, binned onto a grid with six grid cells. In the example there are three header keys, described by the three elements of the array keys, each of which consists of a name, type, and format (the identifying traits in a SEPlib90 header format file), and an index referring to location inside each sep_hdr array. It is not shown, but each sep_hdr can consist of real and integer components.

 
s2
s2
Figure 1
Diagrammatic representation of Fortran90 data structure for SEPlib90.
view

Below is the complete sep_90 structure. The brackets used to close each type are not part of standard Fortran 90, but are translated by ratfor90.

module sep_90_mod{ 
    type sep_tr {  #the type (structure) containing the data (seismic trace)
        real, pointer, dimension(:)   :: rdata #array containing the data
    }

type sep_hdr { real, dimension(:), pointer :: rhdr #containing real header values #associated with the traces integer, dimension(:), pointer :: ihdr #integer header values }

type sep_key_info { #a structure containg #information about the keys integer :: location #location of the key inside #the rhdr and ihdr array character(len=128) :: name,type,fmt }

type sep_90 { type(sep_tr), dimension(:), pointer :: traces #1-D array containg trace #values type(sep_hdr), dimension(:), pointer :: headers #headers associated with #the traces integer, dimension(:), pointer :: n #length of data axes real, dimension(:), pointer :: o,d #first sample and #sampling interval character(len=128),dimension(:),pointer:: label #description of axes integer :: n_keys,n_int #number of keys associated #with each traces and #the number that are #integers type(sep_key_info),dimension(:),pointer:: keys #description of the keys logical :: sparse_grid #whether the grid has #holes } }


previous up next print clean
Next: INTERFACE TO SEPF90 Up: Clapp & Crawley: SEPF90SEPF90 Previous: Terminology
Stanford Exploration Project
11/11/1997