Fortran 77 package FD version 5.30

By Jiri Zahradnik
Department of Geophysics, Charles University Prague
V Holesovickach 2, 180 00 Praha 8, Czech Republic
Tel.: +420-2-21912546, Fax: +420-2-21912555
E-mail: jz@karel.troja.mff.cuni.cz
Data input and output modified by Vaclav Bucha and Ludek Klimes
Department of Geophysics, Charles University Prague
Ke Karlovu 3, 121 16 Praha 2, Czech Republic
E-mails: bucha@seis.karlov.mff.cuni.cz
klimes@seis.karlov.mff.cuni.cz

Package FD contains programs for 2-D P-SV elastic second-order finite differences.

See file fdver.htm for the list of released versions and changes made in this version.

Package FD employs package FORMS for unified memory management and unified compilation.

All Fortran 77 source code and include files of the FD package are assumed to be located in a single directory together with all source code and include files of the FORMS and MODEL packages when being compiled and linked. The files with main programs contain, at their ends, Fortran 90 INCLUDE command for all subroutine files required. In this way, each program may simply be compiled and linked as a single file.

All filenames are assumed to be expressed in lowercase.

Fortran 77 source code files have extension '.for'. The corresponding files with specifications of the COMMON blocks have extension '.inc' and are included in the Fortran 77 source code by means of Fortran 90 INCLUDE command.

Compiling and linking programs of package FD

Running programs of package FD

It is recommended to run the programs from the history files. The history files may contain the information how to execute the programs, the data read from standard input (Fortran) or from the command line (Perl) and the data read from the SEP parameter files.
Data from standard input *:
Main input data of each program are read from the standard input and mostly consist of a single line containing filenames and at most few numerical parameters.
Description of input data for 'modfd.for'
Calculating effective elastic parameters (harmonic averages of elastic parameters) for 2-D elastic finite differences in models specified by means of the MODEL package.
Description of input data for 'fd2d.for'
Performing 2-D P-SV elastic second-order finite differences.
Description of input data for 'newpar.for'
Modifying the effective elastic parameters (harmonic averages of elastic parameters) for 2-D elastic finite differences.
Brief descriptions of Perl scripts
'fdmax.pl'
'fdpcx.pl'
'fdgifdos.pl'
'fdgiflux.pl'
designed to facilitate creation of wavefield movies (animated GIF).
Example of the history file to run the programs

Example of snapshots for the demo model (1.2 MB)

List of error messages

File list of package FD

Package FD consists of packages FORMS and MODEL and of the following Fortran 77 and Perl source code and demo files:

(A) Documentation:
fd.htm
This file (main HTML file containing basic description and links the files of this package).
fdver.htm
List of the released versions.
fderr.htm
List of error messages with the links to their descriptions.
(B) Fortran and Perl programs and subroutines:
modfd.for
Program to calculate effective elastic parameters (harmonic averages of elastic parameters) for 2-D elastic finite differences in models specified by means of the MODEL package.
fdmod.for
Program to generate finite-difference effective parameters (harmonic averages of elastic parameters) in 2-D models specified in terms of homogeneous convex polygons (this backward compatibility is included just for test purposes).
fd2d.for
Program for 2-D P-SV elastic second-order finite differences.
fdaux.for
Auxiliary subroutines for FD code, reading and writing input data.
gmtra.for
Subroutine GMTRA of the IBM Scientific Subroutine Package to transpose a general matrix.
newpar.for
Program NEWPAR to modify the effective elastic parameters (harmonic averages of elastic parameters) for 2-D elastic finite differences.
newpar.pl
Perl-script counterpart of 'newpar.for', employing program 'grdcal.for' of package FORMS.
fdmax.pl
Perl script to display the colour saturation of the snapshots.
fdmax.pro
Auxiliary PostScript file to 'fdmax.pl'.
(C) General-purpose scripts and data files
fdpcx.pl
Perl script to convert PostScript snapshots into PCX format using program GhostScript.
fdpcx.bat
MS-DOS batch file to speed up execution of 'fdpcx.pl' using RAM disk.
fdgiflux.pl
Perl script to convert PCX snapshots into GIF (just for Linux).
fdgifdos.pl
Perl script to convert PCX snapshots into GIF (just for MS-DOS).
ffd.pl
Perl script to compile the FD package by means of predefined script 'f.pl' compiling and linking a single Fortran 77 source code file.
snapdiv.cal
snaprot.cal
snap.cal
Input command files for program 'grdcal.for' to transform displacement snapshots into normalized divergence and rotation and, finally, into norm and angle for plotting by program 'grdps.for'.
(D) Demo data:
fd.h
History file with demo data for 2-D FD. It may be executed by command 'perl go.pl fd.h'.
modfd.dat
Input data for package MODEL specifying the demo model for 2-D elastic finite differences.
fdmod.dat
Input data for program 'fdmod.for' specifying the same demo model for 2-D elastic finite differences (just for test purposes).
fdsrc.dat
Source coordinates.
fdrec.dat
Receiver coordinates.
addrec.cal
Script for 'grdcal.for' to overlay snapshots with receiver positions.
modfdps.h
History file to plot the effective elastic parameters calculated by program 'modfd.for' in the demo model.
(E) Comparison with ray-theory seismograms in particular models:
Note that package CRT is required for the comparison. Since the history files for FD require the same data files with receiver and source coordinates as the ray tracing history files, they are located together with referred data files in the respective subdirectories of the CRT package.
rm-fd.h
1-D model RM to test the ray-matrix method.
u2d-fd.h
2-D model UNCONFORMITY (Cormier and Mellen 1984).
(F) Pictures:
fdsnaps.htm
HTML link to the example of snapshots for the demo model.
fdcolor.ps
PostScript diagram showing colours used to display snapshots.
fdcolor.bat
MS-DOS batch file to convert 'fdcolor.ps' into PCX format using program GhostScript.

Acknowledgements

The development of this package has been partially supported by: