VEFD

VE2D22

2-D Visco-Elastic Finite Difference Modelling - Version 2.2

DOCUMENTATION AND RELATED PROGRAMS


Written by: Alan Levander, J. O. Blanch, J.O.A. Robertsson and W.W. Symes
Rice University
Houston, Texas 77005
USA
e-mail: alan@geophysics.rice.edu

Documentation by: Andrew Gorman
now at:
Department of Geology
University of Otago
P.O. Box 56
Dunedin 9015
New Zealand
e-mail: andrew.gorman@otago.ac.nz

This documentation was produced as a result of a visit to Rice University by Andrew Gorman at the end of June 1999. It is based partly on email correspondence from Tim Henstock and on documentation written by John O.A. Robertsson and Peeter M. Akerberg in 1996.


This documentation is specific to the program and utility routines compiled at the University of British Columbia. UBC users will find the program executable at

/seis/shire/gorman/modelling_2-D/vefd/ve2d22/ve2d22*

and all utility routines in the directory

/seis/shire/gorman/modelling_2-D/vefd/fd_utils/

Example input files to pipe into the routines can be found in the directory

/seis/shire/gorman/modelling_2-D/vefd/fd_utils/examples/


See also:

Table of Contents

VE2D22 FD Utility Programs

VE2D22

Program Description

A program to model seismic wave propagation through 2D media using visco-elastic finite difference methods.


Modelling Overview

1. Initial Consideration of Finite Difference Parameters

Choose suitable parameters for the FD run based on the model requirements and hardware capabilities. The centre frequency of the input wavelet, and maximum and minimum velocities in the input model will control the grid spacing and time step requirements.

Model size

Model size is a significant concern given the expected run times for models. Compilation of the programs should be optimised for the platform on which it is running; this has now been done (attempted?) for craton at UBC (Amor and Gorman 20.3.00) but maximum model sizes have not yet been determined. We successfully ran a model that was 540 km by 100 km with a 100 m grid length which required just over 1 Gb total arrays and about 11 hours to run.

Typical models created by Tim Henstock for Deep Probe modelling used a grid spacing of 100 m and a 1.75 Hz centre frequency (0.8-3.5 Hz bandwidth). On tienshan, a four-processor computer at Rice, these parameters enable a model to be run which is up to 1949 km long and 138 km deep. Even though tienshan (the four-processor computer at Rice) has 4 Gb memory, the compiler will only allow up to 1.75 Gb total arrays. (Tim tried from February to June to get the new compiler which will allow all the memory to be used but without any success!)

Free surface

VE2D22 cannot accommodate structure at the surface; this has been attempted in later versions of the code, but these enhancements are not part of this version (2.2). The top of the input model must be a line. For crustal modelling, it may be desirable to start the modelling at a datum beneath the surface, perhaps even beneath the sedimentary layer if one is present. From a computational viewpoint, this will have the added benefit of increasing the value of the lowest velocity in the model which will increase the maximum freqency that can be included in the forward model without dispersion. However, it should be noted that stripping off the near surface can have an adverse effect on surface wave attenuation which will result in very large surface waves relative to other phases in the model.

Rules of thumb for selecting dt and fmax (from Alan Levander)

The following two rules are meant to ensure non-dispersive propagation of the input waveform in a forth-order finite-difference routine.

dt =< 0.75*sqrt(3/8)*(h/vmax) where h is the dimension of a single cell in the grid (they must be square cells)

fmax = vmin / (5*h)

To be absolutely free of grid dispersion, the 5 in the last formula should be 10.

Radial Earth models

If a radial Earth RAYINVR model has been used, then an Earth flattening transform should be performed on the model in order to approximate a flat Earth representation of the data. A routine has been produced for this which converts a radial Earth v.in file to a flat Earth v.in file (see Andrew Gorman).

2. Construction of input model from RAYINVR

In this step, start with a v.out file from RAYINVR with the model you want to use. This v.out file must have the same sample spacing in the x-direction as it does in the z-direction. This sample spacing does not need to be as fine as that which you choose for the FD model, but it should be small enough so that little interpolation is required; it may be desireable to use a multiple of the desired FD model spacing.

This file will be modified (see next paragraph) to correspond exactly with the FD model domain to be used for input to VE2D22. It will be windowed and shifted to start at 0 depth and 0 offset. (Starting at 0 offset is not strictly necessary, but later input will require this conversion anyway, so it is convenient to do it here.) The modified model can only contain positive offset distances in the x direction. Since the code does not handle topography (see above), you need to choose a sensible datum.

Modifying v.out file

  • Utility: conv_vout

    Extract a subset of the model using conv_vout (a modification of a routine, conv_vin from Tim Henstock). This routine will ask for four values (xmin, xmax, zmin and zmax) and will create a windowed file, v.out.new.

    IMPORTANT:Two minor edits are required to v.out.new. The declared size and depth of the model (line 2 of v.out.new) must be reduced by one grid point. (Tim says that, "basically there is a bug in a later piece of code put in to cope with a bug in rayinvr....")

    3. Creation of Acoustic Model

  • Utility: setupa3

    Once the desired model exists in a v.out file, run the utility program setupa3. This requires an input control file to be piped in to it (see notes in FD Utility section.)

    This produces a file named MTRPRP which is an acoustic model file.

    Cell size

    Cell size is a tricky thing. setupa3 will fill out the model by interpolating to the desired cell size. It will also fill 9.999's with more sensible values. It is not necessary to create a RAYINVR v.out with a small (e.g., 100 m) output spacing (which takes forever - and may be limited by space requirements of the system!). However, it is important to consider that the model is going to interpolated to create the FD input model, so the v.out file should have a sample spacing that is in the order of a km or so.

    Viewing the FD acoustic model

    The utility routine ac2gmt will create a three column output file of x, z and v which can then be read, gridded and countoured by gmt (or other packages) to produce a colour image of the FD model.

    (At Rice, Alan has a program called rdamod to generate a segy image of the acoustic model - Tim prefers to check the visco-elastic model after the next step.)

    4. Creation of Visco-elastic Model

  • Utility: convert_ac_vefd2

    Run the utility program convert_ac_vefd2 which uses a piped input file to interpolate Vp/Vs ratios, density, Qp and Qs for the viscoelastic code.

    This produces a (large) file MTRPRP.VE. You need to rename MTRPRP (the acoustic file) and then rename MTRPRP.VE to MTRPRP.

    Viewing the FD visco-elastic model

    The utility routine rdpmod_segy will produce a SEG-Y file of the input which is worth checking (in ProMAX for example) to make sure there are no glitches.

    5. Execute finite difference code

    Make a command file (e.g., vefd.in) for the VE code as shown below. Once set up, very few of these parameters will need to be changed. Some of the more important, model-specific, parameters are highlighted in red.

    Example vefd.in file

    24 lines of single quantity input. (Comments should not be included.)

    vefd.in

    Example Value Description
    1.75Central frequency of wavelet. (If Ricker wavelet is chosen (see below), this in the central frequency of a 2 octave wavelet.)
    10000.Width of absorbing boundary (in m)
    5000.Width of taper (in m)
    2.Qp in boundary
    2.Qs in boundary
    1Do you want to read all material propeties from Alan Levander's MTRPRP file? (yes=1)
    5.0000000000E-03Time step (in s)
    0 Output material properties on .cfl files (1=yes/0=no) ?
    29500Number of time steps. (Hint: Calculate for farthest offset for a particular shot to keep this number as small as possible.)
    30000Time steps between snap shots. (Set in connection with previous value.)
    4 Plane IC (1), point IC (2), BC (3), or insertion of point source in one point (4)?
    1Ricker wavelet (1), impulsive CW (2), time-series sepecified on file (3), or an integrated Ricker wavelet (4)?
    2Quantity to output in seismogram? (0=pressure (acoustic medium), 1=P/S energy,) (2=horizontal/vertical component of velocity)
    .016Time step between samples in seismogram (in sec)
    1How many HLA? (Horizontal Line Array, i.e., a receiver array)
    0How many VLA? (Vertical Line Array, i.e., for a vertical seismic profile)
    0.z co-ordinate of HLA 1* (in m)
    0.x1co-ordinate of HLA 1* (in m from left side of model.)
    750000.x2 co-ordinate of HLA 1* (in m from left side of model.)
    500.dx for HLA 1* (in m); must be a multiple of the bin size, h.
    1000.Source: Amplitude
    163000.Source: x-centre (in m from left side of model.)
    40.Source: z-centre (in m)
    -.20Source: Time shift (should be < 0)

    * repeated for each HLA and/or VLA designated.

    Utilising multi-processors

    Before execution of the routine, ensure that the parallel environment is set to the appropriate level. For craton (a two-processor machine) type:

    setenv PARALLEL 2

    then submit the job:

    ve2d22 < vefd.in

    and go for coffee.

    6. Output

  • Utility: seistrans_segy

    The program will produce two files, seismogram_ver and seismogram_hor; if you make a symbolic link

    seismogram->seismogram_ver

    then run seistrans_segy, the output of the vefd code is demultiplexed into a segy file (no parameters needed - output is hse01.sgy) You can run it quite happily while the vefd code is running to check on progress - worth doing after a couple of seconds are generated.


  • FD Utility Programs

    The following utility programs are fortran routines which reside on a directory called /seis/data3/gorman/modelling_2-D/vefd/fd_utils/. [Tim's directory at Rice is /home/henstock/fd_utils/].

    conv_vout

  • Modify a RAYINVR v.out file to make it suitable for FD modelling

    No input (beside the v.out file) is required. The user is prompted to give new limits of the model from the keyboard.

    Output is a file named v.out.new.

    conv_vout written by Andrew Gorman (19.10.99). This is an improvement of the conv_vin routine of Tim Henstock as it can deal with negative offsets.


    setupa3

  • Set up an acoustic input model

    This routine has a long history (as one will see if one examines the commented setupa3.f file) as the utility for creating input models for VEFD. The recommended way to set up an input model is to use a RAYINVR v.out file. The example file, setupa3.in (shown below), is set up for doing this. Simply pipe this file into the setupa3 program to create a input model for the FD run. (It is possible, but unlikely, that a few parameters may need to be changed -- for example, the source design is handled here as are masks which can be added to the basic deterministic structure of the model).

    FORMAT OF `setupa3.in' FILE

    • Main Block

      First Line -- Model Title: Title (maximun 80 characters)

      Second Line -- Variable Input: model, nsrce, fmax, tmax, nmask

      • model
        -1: user provides a zelt model file (v.out) for translation to fd format
        0: user provides a model file in fd format named (XXXXXXX)
        1: user provides parameters to build a model file. See subroutine `bldmod'.

      • nsrce
        -1: plane wave source inserted at some z level across the entire x length of the mode
        0: user provides a previously calculated source file
        n: user provides parameters to calculate n band limited line sources to be used in n fd runs. See subroutine `asrcr'.

      • fmax: the desired maximum frequency in the solution

      • tmax: the desired length of time to be calculated

      • nmask: a flag which determines if a stochastic model or another type of velocity mask is read in
        0: no mask
        n: n mask files are read in.

    • RAYINVR Conversion Block

      Used with subroutine zmodel when model = -1

      First Line -- Title: (maximun 80 characters)

      Second Line -- Variable Input: hs, stable, vreplace

      • hs: Spacial sample interval
      • stable: Used to constrain the value of recommended time step, dt, used for input to the FD model.
        dt = stable+sqrt(3/8)*(hs/vmax)
      • vreplace: Replaces values of 9.999 km/s in the model with more appropriate velocities.
        If vreplace = 0, the 9.999's are replaced with the value from a neighbouring cell.
        If vreplace > 0, the 9.999's are replaced with that value.

    • Source Definition Block

      Used with subroutine asrcr when nsrce = n

      First Line -- Title : (maximun 80 characters)

      Second Line -- Variable Input: hwsrc, spco, sx(1), sz(1), delxs

      • hwsrc: source width parameter.
        Must be at least 5*h, and should be an odd multiple of h. If entered as zero the source is entered on the FD grid at a single point. If hwsrc is less than zero the source halfwidth defaults to 5*h.
      • spco: value of the source power spectrum at fmax.
        If the source spectrum is f(s(t)) then
        spco = (f(s(t)))**2

        where f means fourier transform. spco defaults to 0.1 if specified as zero or negative.
      • sx(1) and sz(1): the co-ordinates of the source. (Or co-ordinates of the first source for nsrce > n.)
        Source co-ordinates should chosen so that sx+-(hwsrc+2*h) and sz+-(hwsrc+2*h) separate the source from any internal grid material property boundary or the free surface and at least 30*h separates the source from any absorbing boundary.
      • delxs: x spacing between sources when n > 1.
        If delxs = 0 when n = 1, then there is no need for multiple locations.
        If delxs = 0 when n > 1, then pairs of values for sx(j), sz(j) should be entered on next j-1 lines.

    • Mask Definition Block

      Used with subroutine mask when nmask = n.

      The subroutine reads n mask files written in ascii in the format [x,z,value(x,z)] The mask is applied to the already constructed seismic velocity model, vfd(x,z), in one of two ways:

      (a) by adding a velocity perturbation (dv) of an input mask file

      vnew(x,z)=vfd(x,z)+dv*value(x,z)
      This is especially useful when a percentage perturbation of the original velocity model is required. In this case, vfd(x,z) and value(x,z,) would pertain to the same model.

      (b) the vfd(x,z) is replaced by dv if the value of the mask is not 0.0

      vnew(x,z)=dv if(mask(x,z).ne.0.)

      The masked region must be trapezoidal, with vertical sides.

      First Line -- icont, dv

      • icont: type of masking.
        • 0: dv velocity is perturbation
        • 1: dv velocity is absolute

      • dv: see above.

      Second Line -- xoffset

      • xoffset: co-ordinate offset.
        Use to adjust co-ordinate system of velocity model to co-ordinate system of mask.

      Third line -- xltop,zltop,xrtop,zrtop

      • xltop,zltop,xrtop,zrtop: upper co-ordinates of masked region.

      Fourth line -- zlbot,zrbot

      • zlbot,zrbot: lower co-ordinates of masked region.
        The masked region is therefore a trapezoid with vertical sides.

    Example setup3.in file

    Deep Probe Ray Inverse model : Long-offset modelling
    -1,0,0.,3.0,0
    NO FRANCISCAN:CONTINUOUS SILLS:
    0.100,0.75,0.00
    Source: source will be generated with siac
    0.0 0.0 5.0 0.25 0.


    ac2gmt

  • Converts input file MTRPRP to three column output (x, z, v) suitable for plotting with gmt.

    A single line of input is required: xshift, zshift, zinc, xinc, xpos
    • xshift, zshift: Shift can be applied to model to return co-ordinate system to the same reference as the original RAYINVR model (km).
    • zinc, xinc: Output x and z increment (km).
    • xpos: Horizontal model position (km) for the extraction of the 1-D velocity profile through the model.

    Output (x,z,v) file is named vel.gmt.
    Output 1-D velocity profile, (z,v) file, is named plot1d.gmt.

    Example ac2gmt.in file

    -524.0, 1, 0.5, 5.0, 250


  • convert_ac_vefd2

  • Convert an acoustic model into a visco-elastic model

    First Line -- convert
    • convert: conversion from input units to metres

    Second Line -- nrange

    • nrange: number of lines of visco-elastic information to follow

    Third line -- vplow, vphi, vpvslow, vpvshi, density, qp, qs

    • vplow, vphi: low and high velocity for this range
    • vpvslow, vpvshi: Vp/Vs ratios at the low and high ends of the range
    • density: density for this range
    • qp, qs: p-wave and s-wave Q for this range

    Example convert.in file

    1000.
    7
    2900. 3600. 1.73 1.73 2600. 50. 10.
    3600. 3900. 1.73 1.73 2700. 50. 10.
    3900. 4200. 1.73 1.73 2700. 50. 10.
    4200. 5000. 1.73 1.73 2700. 100. 25.
    5000. 6500. 1.73 1.73 2750. 400. 200.
    6500. 7600. 1.78 1.78 3000. 400. 200.
    7600. 9000. 1.78 1.78 3300. 400. 200.


  • seistrans_segy

  • Demultiplex the FD output to a SEG-Y file

    The routine looks for a file named seismogram (which can be a soft link to either seismogram_hor or seismogram_ver as created by the vefd routine). The output is to a file names hse01.sgy.


  • rdpmod_segy

  • Reads an input model (MTRPRP) for ve2d22 and outputs it as a SEG-Y file for viewing or plotting.

  • rice2segy

  • Converts a rice formated (.cfl) file into SEG-Y. Useful for creating snapshots.

  • mergerice2segy


    Last updated: 2 November 2004
    A. R. Gorman(andrew.gorman@otago.ac.nz)