The NonLinLoc (Non-Linear Location) package by Anthony Lomax, is a set of programs for velocity model construction, travel-time calculation and probabilistic, non-linear, global-search earthquake location in 3D structures, and for visualisation of 3D volume data and location results. Many of the programs operate with a 3D Grid structure which defines a specific, gridded, rectangular volume (Non-GLOBAL mdoe) or spherical section (GLOBAL mode).
More info on Anthony Lomax website
Compiled an tested on INTEL-Mac with Mac OS X 10.5.5 and Apple XCode 3.1.1 developer tools This works also on Mac OS X 10.6 Snow Leopard
Download the tar-gzipped (.tgz) NonLinLoc Software file on your Mac and decompress it with:
#mkdir NLLoc-5.0-MacOSX
#mv NLL5.00_src.tgz
#cd NLLoc-5.0-MacOSX
#tar -zxvf NLL5.00_src.tar.gz
The uncompressed file should create a “src” directory inside the “NLLoc-5.0-MacOSX” directory. Now we just need to get into the “src” directory and edit some files (Makefile, nrutil.c and Time_3d.c).
#cd src
Open up “TextEdit” or download the free and great “TextWrangler” and follow these steps:
- In “nrutil.c” remove line or comment #include <malloc.h>
- In “Time_3d.c” remove line or comment #include <malloc.h>
- In “Makefile” change “BINDIR=” to #BINDIR=. (or else we get errors “ld: in bin/Grid2GMT, can’t link with a main executable”)
- In “Makefile”: to avoid “open_memstream” errors, edit section “Custom Builds”:
The line should look like “GNU_SOURCE=” (and not “GNU_SOURCE=-D _GNU_SOURCE”) - Then compile the whole stuff in ROOT mode:
- Copy all your files to “/usr/bin” or “/usr/local/bin” (as you whish but don’t forget to update your PATH in .bash_profile or .bashrc in your HOME directory)
# Custom builds
#
# For GNU (LINUX) uncomment this line
# GNU_SOURCE=-D _GNU_SOURCE
#
# For Mac OS X uncomment the next line or else you will get "open_memstream" errors:
GNU_SOURCE=
#sudo make all
Comments are closed.