Giter Site home page Giter Site logo

anowacki / seismo-fortran Goto Github PK

View Code? Open in Web Editor NEW
15.0 6.0 6.0 6.41 MB

Utility modules for dealing with generally-anisotropic elastic constants and other geophysics problems

License: MIT License

Fortran 41.81% Makefile 0.91% Shell 17.47% MATLAB 0.01% HTML 19.64% CSS 0.13% PostScript 0.75% Roff 19.28%
seismology anisotropy plate-motion shear-wave-splitting elasticity

seismo-fortran's Introduction

modules
=======

Andy Nowacki
[email protected]

About
-----
http://github.com/anowacki/seismo-fortran

This repo contains Fortran modules which I have adapted or written for use in
my geophysics work, primarily dealing with seismic anisotropy.

Many command line utility programs wrap the functionality in these modules for
use in scripting and quick processing of data.


Installation
------------
A Fortran and C compiler are needed.

The modules can be statically compiled directly into your own code like this:

    $ $FC -o program module.f90 program.f90

Typing `make' in the root directory builds the modules as shared and static
libraries.  Edit the Makefile to reflect the compiler and options you need.

On OS X, nothing more is needed to use the dynamic libraries; just link to them
as normal with -L and -l options.  The absolute path to the shared libraries is
written into the programs on linking.

On Linux, you will need to export LD_LIBRARY_PATH to include the `lib` directory
like so:

    $ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${path_to_seismo-fortran}/lib"

I use these modules on various flavours of Linux and OS X without trouble,
but portability issues are always possible.  Any reports of how to make them
work on unusual distributions are welcome.


Requirements
------------
The codes rely on a some freely-available libraries:
    - FFTW (http://www.fftw.org/), including the single-precision version.
      This can be installed, e.g., using MacPorts.  (If using this, make
      sure to install the variant relevant for the compilers you are using.)
      Edit the Makefile to reflect where the libraries are installed.
    - LAPACK.  This often comes supplied as a vendor-optimised library; by
      default these codes use the Accelerate framework provided by OS X, but
      update the Makefile if this is not available.


Site specific notices
---------------------
The code has been developed using gfortran/gcc on Mac OS X, so some idiosyncracies
of this platform may have crept in, though I've tried to make everything as
portable as possible.  Current portability issues are as follows:

. plate_motion.f90:  This won't compile with the Cray compilers, complaining about
        the declaration of type parameters.  I don't know if this is a bug in
        the compiler, or a violation of the standard.  A workaround is to simply
        to not build this module if you don't need it.
. On ARCHER, when running any programs on the head node, you will see when using
        the Cray compilers:
            LIBDMAPP WARNING: Unable to open kgni version file 
            /sys/class/gemini/kgni0/version errno 2
        This is because the Cray communication libraries have been linked in but
        are not accessible to serial programs on the head nodes.  You can silence
        this (harmless) warning by compiling with
            -target=local_host
        (From: https://bluewaters.ncsa.illinois.edu/faq)


Acknowledgements
----------------
The module anisotropy_ajn has benefited hugely from David Mainprice's
expectionally clear articles, and from James Wookey and Andrew Walker's prowess
with coding.

Some of the code is taken wholly or partly from other sources; see the licences
of the respective packages for more info.  These are:
    - f90sac         (c) James Wookey (f90sac/f90sac.F90)
    - SHTOOLS        (c) Mark Wieczorek (spherical_splines/SHTOOLS/LICENSE)

Individual routines and modules contain references where appropriate to
publications relevant.


Notice about EmatrixUtils
-------------------------
The repo contains references to EmatrixUtils, a module which contained routines
written by David Mainprice for his Ematrix CareWare programs
(http://www.gm.univ-montp2.fr/PERSO/mainprice/W_data/CareWare_Unicef_Programs/)
which I have replaced with my own routines.  This means that checking out older
commits may lead to not being able to build some of the modules.  The offending
routine will be CIJ_phasevels(), which has been replaced by CIJ_phase_vels().
'use EmatrixUtils' statements can be replaced by 'use anisotropy_ajn' and
changing the calling convention of the CIJ_phasevels() routine for the new one.


Licence
-------
See the LICENCE file for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.