MBARI creates and globally scales the visionary technologies required to explore, map, and understand our changing ocean.
Resources for educators, students, and anyone aspiring to learn how science and technology brings us closer to the ocean.
Integrate MBARI data with lesson plans and workshops.
Discover deep-sea critters, including exclusive footage and info.
Dive into topics about ocean health and its fascinating features.
Explore deep-sea observations with this interactive guide.
Learn about the MLML/MBARI Research Library at SJSU.
Access more educational resources from the teams at MBARI.
MBARI is a non-profit oceanographic research center advancing marine science and engineering to understand our changing ocean.
Learn about MBARI’s mission, vision, and values.
Learn about our strategic priorities for the years ahead.
Meet our staff, leadership, and board of directors.
Find job openings and postdoc and internship opportunities.
Follow MBARI on social media and stay updated.
See upcoming seminars, lectures, and public events.
Access the latest annual reports and financial information.
Explore MBARI’s rich history spanning over three decades.
Get media-specific information and assets.
Find the latest job openings and join the team.
Learn about our summer internship program.
Meet our leadership and staff.
Discover deep-sea critters of all types.
Search MBARI’s library of data.
Learn about our technologies.
Poseidon Linux
MB-System is included in Poseidon Linux, the “Scientific GNU/Linux”. Poseidon is an Ubuntu Linux based distribution including a selection of open source software packages intended to support scientific research. In particular, it offers several specific tools in the areas of GIS, 3D Visualization, Mathematics, Statistics and several other fields of research.
UbuntuGIS for Ubuntu Linux
MB-System is one of the packages maintained in the UbuntuGIS repository.
HomeBrew for MacOs
MB-System has been packaged for MacOs X using the Homebrew package manager.
MacOS does not include Homebrew by default, or a compiler suite or the X11 windowing system. First install XCode (the Apple development environment architected using the LLDB compiler suite) from the Apple App Store. Then install the current version of XQuartz available from the web page http://www.xquartz.org. Next, install homebrew by following the directions at the website https://brew.sh
The MB-System project maintains a private Homebrew “tap” (dwcaress/mbsystem) because this software is frequently updated and has an optional dependency, OTPS (tidal prediction software), that is not available through the core homebrew repositories.
There are two MB-System packages available: mbsystem and mbsystem-beta. The first (mbsystem) installs the most recent major (stable) release from the Github repository. The second (mbsystem-beta) installs the most recent release whether it is major (stable) or beta (unstable). The MB-System development team uses beta releases for testing of new features and bug fixes. We do not recommend installing mbsystem-beta releases unless you are involved in the testing or the release includes bug fixes or new features that are directly relevant to you.
To install the mbsystem package:
brew updatebrew tap dwcaress/mbsystembrew install mbsystem
To install the mbsystem-beta package:
brew updatebrew tap dwcaress/mbsystembrew install mbsystem-beta
To switch between mbsystem and mbsystem-beta installations, first uninstall the current package before installing the one you want, e.g.:
brew uninstall mbsystembrew install mbsystem-beta
or:
brew uninstall mbsystem-betabrew install mbsystem
To update mbsystem or mbsystem-beta installations use these commands
brew updatebrew upgrade
The MB-System tide modeling program mbotps will only function if the tidalprediction software package called OTPS is also installed, along with filescomprising a global tide model. OTPS and the global tide models it uses topredict tides are products of the Oregon State University Tide Group.We provide a homebrew formula for OTPS in the MB-System tap.
brew updatebrew tap dwcaress/mbsystembrew install ops
In the past, this private Homebrew formula installed the TPXO8_atlas_v1tidal model along with the software. However, as of mid-2019 the OregonState University tide group no longer makes their TPXO tidal models openlyavailable for download. Consequently, this formula now installs the OTPSsoftware required for the MB-System program mbotps to work, but not theassociated tidal model.
The program mbotps is currently set up to workwith the TPXO9-atlas global tide model,which is their latest 1/30 degreeresolution fully global solution, obtained by combining a 1/6 degree baseglobal solution (TPXO9.v1) with thirty 1/30 degree resolution local solutionscovering all coastal areas, including the Arctic and the Antarctic.Academic users can register and request access to the TPXO9-atlas modelfiles at this website:
https://www.tpxo.net
There are 25 model files:
grid_tpxo9_atlas_30h_2n2_tpxo9_atlas_30h_k1_tpxo9_atlas_30h_k2_tpxo9_atlas_30h_m2_tpxo9_atlas_30h_m4_tpxo9_atlas_30h_mn4_tpxo9_atlas_30h_ms4_tpxo9_atlas_30h_n2_tpxo9_atlas_30h_o1_tpxo9_atlas_30h_p1_tpxo9_atlas_30h_q1_tpxo9_atlas_30h_s2_tpxo9_atlas_30u_2n2_tpxo9_atlas_30u_k1_tpxo9_atlas_30u_k2_tpxo9_atlas_30u_m2_tpxo9_atlas_30u_m4_tpxo9_atlas_30u_mn4_tpxo9_atlas_30u_ms4_tpxo9_atlas_30u_n2_tpxo9_atlas_30u_o1_tpxo9_atlas_30u_p1_tpxo9_atlas_30u_q1_tpxo9_atlas_30u_s2_tpxo9_atlas_30
The h__tpxo9_atlas_30 and grid_tpxo9_atlas_30 files are 47 MB each, and the u__tpxo9_atlas_30 files are 93 MB each. These files should all be placed into the directory /usr/local/opt/otps/DATA/ – once these files are present, the combination of mbotps and opts/predict_tide should work. See the mbotps manual page for details.
Fink for MacOs
MB-System has been packaged for MacOS X as part of the Fink Project for several years. Unfortunately, as of May 2017 there are library namespace issues associated with the OpenMotif package that result in MB-System graphical utilities not working. For now, we recommend installing MB-System on MacOS computers using the Homebrew package manager. Until further notice, we are not attempting to maintain or update the MB-System distribution in Fink.
The MB-System Fink package can be found at: http://pdb.finkproject.org/pdb/package.php/mbsystem
If the fink package manager is installed, then MB-System and its prerequisites can be installed using this command: fink install mbsystem
Acknowledgements
Thanks to Christian Ferreira for creating and distributing Poseidon Linux, to Johan Van de Wauw for updating the MB-System package in UbuntuGIS, to Kurt Schwehr for maintaing the Fink MB-System package, to Anthony Lukach, Simon Dreutter, and Andrew Janke for maintaining the Homebrew MB-System package, and to Hamish Bowman for maintaining the OSGeo-Live MB-System package.
The source code for MB-System is available from the source code archive on Github and also as a compressed tar archive from an ftp server operated by the Monterey Bay Aquarium Research Institute. This archive file is about 16 megabytes in size and, depending on the speed of your internet connection, may take a few minutes to transfer.
Click here to ftp the current MB-System release as a compressed tar archive from the Github source code repository.
Click here to open the releases page of the MB-System source code repository on Github. This provides access to both beta and major releases.
Click here to ftp the current MB-System release as a compressed tar archive from the MBARI ftp site.
Click here to get point-and-click ftp access to all of the available MB-System related files on the MBARI ftp site (these may include data examples and beta distributions of MB-System).
[The above links do not work properly with some versions of the MacOs browser Safari. If the links fail for you while using Safari, please try Firefox, Chrome, or some other browser.]
If access to the MBARI ftp server through the above links fails, try running ftp from a terminal shell. The following commands represent a typical anonymous ftp session (note that literallyanythingornothing literally means to enter anything or nothing terminated by a return, and that many modern ftp clients do not require the “binary” command).
ftp mbsystemftp@ftp.mbari.orgPassword: literallyanythingornothing> binary> get MB-System-5.7.8.tar.gz> quit
ftp mbsystemftp@ftp.mbari.org
Password: literallyanythingornothing
> binary
> get MB-System-5.7.8.tar.gz
> quit
The MB-System source code repository is managed using Git and is hosted on GitHub at:
https://github.com/dwcaress/MB-System
The entire repository, or individual files, can be downloaded through the GitHub web interface.
For many years the MB-System source code was archived and managed at the Lamont Doherty Earth Observatory using the Subversion open source version control system. The switch to Git and GitHub began during the Fall of 2018, and was made official on December 17, 2018.
MB-System requires a number of other software packages and databases to be fully functional. These are:
MB-System produces Postscript based graphics. Most current Unix operating systems provide a program which serves as a screen-based Postscript viewer. If you do not have a Postscript viewer, one option is to obtain one of several Ghostscript-based packages from the Free Software Foundation. The best is gv:
The MB-System source code is extracted from the distribution using the tar utility:
tar xvzf MB-System-5.7.8.tar.gz
or for some older systems with feature-limited versions of tar, a combination of gunzip and tar:
gunzip MB-System-5.7.8.tar.gztar xvf MB-System-5.7.8.tar
This will create a directory called (for the 5.7.6 distribution):
MB-System-5.7.6
In order to build and install MB-System from an interactive shell, you need to change your current directory to the distribution:
cd MB-System-5.7.8
General Instructions
The configure script has been generated using the autoconf package. The current configure script does not resolve all of the flags and locations needed to build MB-System on all platforms, but does allow for flexible installation and generation and use of shared libraries without requiring interactive editing. These improvements make MB-System distributions much more amenable to inclusion in package manager systems like Debian and Homebrew. We hope to improve the configure script so that less intervention is required.
The basic steps for building MB-System using the configure script are:
1. Move to the top of the MB-System distribution directory:
2. Run the configure script to generate the Makefile files throughout the distribution directory structure. The command line options for configure are discussed below.
[…pre-options…]./configure […options…]
3. Run the make utility to build the software within the source distribution.
make
4. Run the make utility with the install option to install the software within the target location that was specified while running configure. This step copies the libraries, programs, scripts, manual pages, and web pages to the target destinations.
make install
The configure script is intended to discern the environment, locate prerequisite packages, and construct the makefiles with a minimum of user intervention. In practice, users generally need to set at least some options when using the configure script in order to successfully build, install, and run MB-System. If NetCDF and GMT installations cannot be located, MB-System cannot be built. If FFTW3, Motif, or OpenGL cannot be found MB-System will be built, but without the applications that depend on these packages.
Depending on how user permissions are set on your system and where the package is to be installed, it may be necessary to execute some or all of the above commands with superuser privileges. On older styles of Unix and Linux, this was typically accomplished by using the su command to become root, or superuser, a step that requires knowing the root password for the system. Following a successful invocation of su in a command shell, all commands have superuser privileges. On MacOS X and other “modern” flavors of Unix and Linux, it’s more common to use the sudo command in front of other commands in order to execute them with superuser privileges. An administrator password is required for the first instance of sudo, but not for subsequent instances (at least for a period of time, typically five minutes). In this case, the commands become:
sudo ./configuresudo makesudo make install
The default destination is /usr/local, and so one should find the MB-System executable programs and scripts in /usr/local/bin, the shared libraries in /usr/local/lib, the manual pages in /usr/local/man, and the projection and Levitus databases accessed by MB-System in /usr/local/share/mbsystem. However, one can control the installation destination of the configure script on the command line by using a “–prefix” argument. For example, to install MB-System into /Users/caress/sandbox/mbsystem, you can use:
sudo ./configure‐‐prefix=/Users/caress/sandbox/mbsystem
The complete list of configure’s installation location options is:
--prefixThis is the common installation prefix for all files.If exec_prefix is defined to a different value, prefixis used only for architecture-independent files.[Default: /usr/local]
--prefix
--exec_prefixThe installation prefix for architecture-dependent files.By default it’s the same as prefix. You should avoidinstalling anything directly to exec_prefix. However,the default value for directories containingarchitecture-dependent files should be relative toexec_prefix.[Default: ${prefix} ==> /usr/local]
--exec_prefix
--datarootdirThe root of the directory tree for read-only architecture independent data files.[Default: ${exec_prefix}/share ==> /usr/local/share]
--datarootdir
--bindirThe directory for installing executables that users run.[Default: ${exec_prefix}/bin ==> /usr/local/bin]
--bindir
--libdirThe directory for installing object code libraries.[Default: ${exec_prefix}/lib ==> /usr/local/lib]
--libdir
--includedirThe directory for installing C header files.[Default: ${exec_prefix}/include ==> /usr/local/include]
--includedir
MB-System depends on libraries from a number of different packages, including NetCDF, GMT5, GDAL, FFTW3, X11, and Motif. Sometimes a user will have more than one installation of a package available, and specifying which is used is desirable. Also, unfortunately the configure script does not always successfully find all needed packages. Consequently, the configure script allows users to set the locations on the command line when necessary. The configure command line options controlling the locations of prerequisites are:
--with-netcdf-configLocation of NetCDF configuration script nc-config
--with-netcdf-config
‐‐with-gdal-configLocation of GDAL configuration script gdal-config
‐‐with-gdal-config
‐‐with-gmt-configLocation of GMT configuration script gmt-config
‐‐with-gmt-config
‐‐with-proj-libLocation of PROJ libs
‐‐with-proj-lib
‐‐with-proj-includeLocation of PROJ lib
‐‐with-proj-include
‐‐with-fftw-libLocation of FFTW3 libs (optional)
‐‐with-fftw-lib
‐‐with-fftw-includeLocation of FFTW3 headers (optional)
‐‐with-fftw-include
‐‐with-x11-libLocation of X11 libs (optional)
‐‐with-x11-lib
‐‐with-x11-includeLocation of X11 headers (optional)
‐‐with-x11-include
‐‐with-motif-libLocation of Motif libs (optional)
‐‐with-motif-lib
‐‐with-motif-includeLocation of Motif headers (optional)
‐‐with-motif-include
‐‐with-opengl-libLocation of OpenGL libs (optional)
‐‐with-opengl-lib
‐‐with-opengl-includeLocation of OpenGL headers (optional)
‐‐with-opengl-include
‐‐with-otps-dirLocation of OTPS installation (optional)
‐‐with-otps-dir
Note that specification of FFTW3, Motif, and OpenGL is optional. If the configure script does not find these packages and the user does not specify their locations, then some MB-System programs will not be built. Lack of FFTW3 means that mbsegypsd is not built. No OpenGL results in the visualization programs mbgrdviz and mbeditviz not being built. Lack of Motif means that no graphical programs of any type are built.
User Environment Setup
Regardless of where the MB-System programs are installed, users must have that location included in their path environment variable in order to execute the programs from a command line. If MB-System has been installed using a package manager or installed manually into a common location (e.g. /usr/local/bin), the user path probably already references the needed location. If altering the user path variable is required, it can be accomplished by editing the initialization files hidden in the user’s home directory. Which files need to be edited depends on which command line shell is being used. If the user works with csh, then the .cshrc and .login files need to be changed. If the shell is bash, then the .bashrc and .profile files must be altered. See the manual pages for the relevant shell program to determine how to set the user environment. The executable perl must also be available in the user’s path for most of the macros to work.
The GMT plug-in modules mbcontour, mbswath, and mbgrdtiff are invoked as modules of the program gmt:
gmt mbcontour (….various arguments…..)gmt mbswath (….various arguments…..)gmt mbgrdtiff (….various arguments…..)
In order for GMT to successfully execute the MB-System modules, the location of the shared libraries containing the dynamically loaded modules must be known to GMT. This can be accomplished by either setting the GMT_CUSTOM_LIBS parameter in the file gmt.conf that is part of the GMT installation, by setting this parameter in the file gmt.conf in the user’s home directory, or by using the GMT module gmtset to modify this parameter in the current working directory. The Mb-System GMT modules are included in a shared library file named mbsystem.so that is installed in the same location as the regular MB-System shared libraries (e.g. libmbio), which is typically a location such as /usr/local/lib. If mbsystem.so has been installed in /usr/local/lib, then the GMT_CUSTOM_LIBS parameter in a gmt.conf file can be set to:
GMT_CUSTOM_LIBS = /usr/local/lib/mbsystem.so
The parallel processing modules mbm_multiprocess, mbm_multidatalist, and mbm_multicopy require the perl module Parallel::ForkManager. This can be added to your local perl installation using the command line utility cpan:
cpan Parallel::ForkManager
The MB-System plotting macros mbm_grdplot, mbm_plot, etc all generate shellscripts that in turn execute a combination of GMT, MB-System, and other programs to generate and then display postscript plots or images. By default, these scripts use the system default applications for viewing postscript or images, which vary amongst operating systems and distributions. If you have particular programs you want to use to display postscript files and images on the screen, this can be set using the MB-System program mbdefaults. If, for instance, you want to use “gv” to display postscript and “feh” to display images, then run:
mbdefaults -Dgv -Ifeh -V
These defaults are stored in a hidden file called “.mbio_defaults” in the user’s home directory. To remove a personal setting for file viewers and return to using the system defaults, either delete the “.mbio_defaults” file or run:
mbdefaults -DDefault -IDefault -V
As noted above, MB-System has been packaged for MacOs X using the Homebrew package manager. One can also use Homebrew to install the prerequisite packages and then build and install MB-System from a local source code distribution.
MacOS does not include a compiler suite or the X11 windowing system by default. First install XCode (the Apple development environment architected using the LLVM compiler suite) from the Apple App Store. Then install the current version of XQuartz available from the web page http://www.xquartz.org.
Next, install homebrew by following the directions at the website https://brew.sh
Once you have Homebrew installed, install the MB-System prerequisites. First, install GMT:
brew updatebrew install gmt ghostscript ffmpeg graphicsmagick
As part of installing GMT, Homebrew will install its prerequisites, including proj, netcdf, fftw, and gdal.
The MB-System interactive programs all depend on the Motif widget set and X11 windowing system. Some of these interactive programs also require OpenGL for 3D graphics. Although Homebrew core includes an OpenMotif package, this package depends on X11 packages also in Homebrew core rather than on Xquartz. Unfortunately, the Homebrew core X11 packages do not include an extension GLX that enables the rendering of OpenGL graphics in X11 windows. Consequently, it has proven necessary to clone a separate OpenMotif package that depends on Xquartz; this package is called mbopenmotif and is available from the same private Homebrew tap that hosts MB-System. To install mbopenmotif:
brew tap dwcaress/mbsystembrew install mbopenmotif
Even if installed, the MB-System graphical utilities will not work if the Homebrew core OpenMotif and X11 packages are installed. The consequence is that no other X11 based packages can be installed through Homebrew. For example, installing the text editor nedit will break an MB-System installation.
The MB-System tide modeling program mbotps will only function if the tidal prediction software package called OTPS is also installed, along with files comprising a global tide model. OTPS and the global tide models it uses to predict tides are products of the Oregon State University Tide Group. We provide a homebrew formula for OTPS in the MB-System tap.
brew install dwcaress/mbsystem/otps
In the past, this private Homebrew formula installed the TPXO8_atlas_v1 tidal model along with the software. However, as of mid-2019 the Oregon State University tide group no longer makes their TPXO tidal models openly available for download. Consequently, this formula now installs the OTPS software required for the MB-System program mbotps to work, but not the associated tidal model.
The program mbotps is currently set up to work with the TPXO9-atlas global tide model,which is their latest 1/30 degree resolution fully global solution, obtained by combining a 1/6 degree base global solution (TPXO9.v1) with thirty 1/30 degree resolution local solutions covering all coastal areas, including the Arctic and the Antarctic. Academic users can register and request access to the 25 TPXO9-atlas model files at this website:
Once all of the prerequisites are installed, get the current MB-System distribution tarball as described in the section above. Put the distribution in /usr/local/src and unpack it:
mkdir /usr/local/srccp MB-System-5.7.8.tar.gzcd /usr/local/srctar xvzf MB-System-5.7.6.tar.gzcd MB-System-5.7.6
Run the configure script to generate the makefiles:
./configure \‐‐with-x11-include=/opt/X11/include \‐‐with-x11-lib=/opt/X11/lib \‐‐with-motif-include=/usr/local/include \‐‐with-motif-lib=/usr/local/lib \‐‐with-opengl-include=/opt/X11/include \‐‐with-opengl-lib=/opt/X11/lib \‐‐with-otps-dir=/usr/local/opt/otps
Now that the makefiles exist, run make:
Many MacOsX users have their NetCDF, GDAL, PROJ, GMT5, FFTW3, and OpenMotif installations through the Fink package manager, which installs packages in /sw. Unfortunately, as of May 2017 there are library namespace issues associated with the Fink OpenMotif package that result in MB-System graphical utilities not working when linked with this package. Until further notice, we recommend using the Homebrew package manager to install MB-System prerequisites on MacOx computers. To install the MB-System prerequisites with Fink, do the following:
sudo fink installgmt5 gmt5-devgdal gdal-dev gdal-shlibsnetcdf-c7 netcdf-c7-shlibsproj proj-bin proj-shlibsopenmotif4 openmotif4-shlibs x11 x11-devfftw3 fftw3-shlibslibicu55-shlibs
The configure script is able to find the NetCDF, GDAL and GMT5 installations because they install the programs nc-config, gdal-config, and gmt-config, respectively, in /sw/bin. However, the configure script fails to find the PROJ, FFTW3, and OpenMotif packages in /sw, and so the user must explicitly specify those packages. The OTPS tide modeling software used by mbotps is not packaged in Fink, and so must be manually installed by a user if mbotps is to work correctly. Installation of MB-System on a Mac will likely use a configure command that looks something like:
sudo CFLAGS="-I/opt/X11/include -L/opt/X11/lib"./configure‐‐with-proj-include=/sw/include‐‐with-proj-lib=/sw/lib‐‐with-fftw-include=/sw/include‐‐with-fftw-lib=/sw/lib‐‐with-motif-include=/sw/include‐‐with-motif-lib=/sw/lib‐‐with-otps-dir=/usr/local/OTPS2
As shown here, one can also add to the commands seen by the compiler (“CFLAGS”) and linker (“LDFLAGS”) if desired or necessary by prefacing the configure command with arguments setting the environment variables CFLAGS and LDFLAGS. Here the location of X11 header files and libraries in MacOS (in /opt) must be specified because this location is not known to the configure script. Another example is that in order to compile MB-System for user with a debugger, all compiler commands must include the “-g” argument. So, to enable use of the lldb debugger, the configure command becomes:
sudo CFLAGS="-g -I/opt/X11/include -L/opt/X11/lib"./configure‐‐with-proj-include=/sw/include‐‐with-proj-lib=/sw/lib‐‐with-fftw-include=/sw/include‐‐with-fftw-lib=/sw/lib‐‐with-motif-include=/sw/include‐‐with-motif-lib=/sw/lib‐‐with-otps-dir=/usr/local/OTPS2
For Ubuntu Linux 20, the following use of apt-get utility will install all of the MB-System prerequisites excepting OTPS:
sudo apt-get installgmt libgmt6 libgmt-dev gmt-gshhg gmt-commonlibx11-dev xorg-dev libmotif-dev libmotif-commonlibglu1-mesa libglu1-mesa-dev mesa-common-dev libsdl1.2-dev libsdl-image1.2-devbuild-essential gfortranlibfftw3-3 libfftw3-dev libproj-dev gdal-bin libgdal-dev
If the prerequisites have all been installed as shown above, and it is desired to install MB-System in /usr/local, then only a simple call to configure is required:
sudo ./configure
Once the makefiles have been generated by configure, build and install using:
sudo makesudo make install
sudo makesudo make instal
In some cases the system and/or user environment impedes the successful use of the GMT and/or MB-System shared libraries. In order to manually allow shared libraries to be found for linking or running, one can either set the CFLAGS environment variable during building or set the LD_LIBRARY_PATH environment variable at login by adding a command to the user’s ~/.profile or ~/.bashrc files.
To set the CFLAGS environment variable during building include “-Wl,-rpath -Wl,LIBDIR” in the configure command as shown here:
sudo CFLAGS="-Wl,-rpath -Wl,/usr/local/lib" ./configure
To augment the LD_LIBRARY_PATH environment variable during login add a line to the ~/.bashrc or ~/.profile file as shown here:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
For older Ubuntu releases, the list of MB-System prerequisites varies slightly from what is listed above for Ubuntu 20. Also, MB-System 5.7.6 requires GMT 5.4.x or later. Although the standard Ubuntu package manager apt-get installs GMT 6.1 on Ubuntu 20 and GMT 5.4.3 on Ubuntu 17 and 18, on Ubuntu 12, 14 and 16 the available GMT version is 5.1 or 5.2, with the consequence that a manual GMT installation is required before MB-System can be installed.
For Ubuntu Linux 18, the following use of apt-get utility will install all of the MB-System prerequisites excepting OTPS:
sudo apt-get installgmt libgmt5 libgmt-dev gmt-gshhg gmt-doclibx11-dev xorg-dev libmotif-dev libmotif-commonlibglu1-mesa libglu1-mesa-dev mesa-common-dev libsdl1.2-dev libsdl-image1.2-devbuild-essential gfortranlibfftw3-3 libfftw3-dev libproj-dev gdal-bin libgdal-dev
For Ubuntu Linux 17, the following use of the apt-get utility will install all of the MB-System prerequisites excepting OTPS:
sudo apt-get installgmt libgmt5 libgmt-dev gmt-gshhg gmt-doclibx11-dev xorg-dev libmotif-dev libmotif-commonlibglu1-mesa libglu1-mesa-dev mesa-common-dev libsdl1.2-dev libsdl-image1.2-devbuild-essential gfortran nautilus-open-terminallibfftw3-3 libfftw3-dev libproj-dev gdal-bin libgdal-dev
For Ubuntu Linux 16, the following use of the apt-get utility will install all of the MB-System prerequisites excepting GMT and OTPS:
sudo apt-get installgmt libgmt5 libgmt-dev gmt-gshhg gmt-doclibx11-dev xorg-dev libmotif-dev libmotif4libxp-dev mesa-common-dev libsdl1.2-dev libsdl-image1.2-devbuild-essential gfortran nautilus-open-terminallibfftw3-3 libfftw3-dev libnetcdf-dev netcdf-binlibgdal-bin gdal-dev libgmt-dev libproj-dev
For Ubuntu Linux 12 or 14, the following use of the apt-get utility will install all of the MB-System prerequisites excepting GMT and OTPS:
sudo apt-get installxorg-dev libmotif-dev libmotif4 libxp-dev mesa-common-devlibsdl1.2-dev libsdl-image1.2-dev build-essential gfortrannautilus-open-terminal libfftw3-3 libfftw3-devlibnetcdf-dev netcdf-bin gdal-bin gdal1-dev
The package managers usually used on CentOs or Red Hat Linux systems are yum and it’s recent new replacement dnf.
To install all of the MB-System prerequisites on CentOs 7 use the command:
sudo yum install openmotif openmotif-devel \fftw fftw-devel netcdf netcdf-devel \proj proj-devel gdal-devel gmt gmt-devel
If the prerequisites have all been installed with yum and it is desired to install MB-System in /usr/local, then only a simple call to configure is required to generate the makefiles:
To install all of the MB-System prerequisites on Fedora 32 use the command:
sudo dnf install openmotif openmotif-devel \ fftw fftw-devel netcdf netcdf-devel \ proj proj-devel gdal-devel gmt gmt-devel \ boost boost-python3 glibc-develsudo dnf install mesa*sudo dnf install xorg-x11-fonts*
sudo dnf install openmotif openmotif-devel \
fftw fftw-devel netcdf netcdf-devel \
proj proj-devel gdal-devel gmt gmt-devel \
boost boost-python3 glibc-devel
sudo dnf install mesa*
sudo dnf install xorg-x11-fonts*
To finish the makefile setup on Fedora 32 run configure as shown here:
sudo CFLAGS="-I/usr/include/tirpc" CXXFLAGS="-I/usr/include/tirpc" ./configure
Once the makefiles are made in either a CentOs or Fedora system, build and install using:
sudo make
sudo make install
The GMT version 5 plug-in modules mbcontour, mbswath, and mbgrdtiff are invoked as modules of the program gmt:
In order for GMT to successfully execute the MB-System modules, the location of the shared libraries containing the dynamically loaded modules must be known to GMT. This can be accomplished by using the GMT module gmtset to modify this parameter in the current working directory. The MB-System GMT modules are included in a shared library file named mbsystem.so that is installed in the same location as the regular MB-System shared libraries (e.g. libmbio), which is typically a location such as /usr/local/lib. If mbsystem.so has been installed in /usr/local/lib, then the GMT_CUSTOM_LIBS parameter can be set using the command:
gmtset GMT_CUSTOM_LIBS /usr/local/lib/mbsystem.so
The NetCDF 4.0 standard (from 2008) added the possibility of grid file compression. The compression benefits users with grids that are up 90% smaller, however many software still don’t support this feature either because it’s an old software or a new one where developers still haven’t updated their NetCDF driver. To disable the grid compression and make grids compatible with these software one can set MB-System/GMT to create grids without compression using:
gmtset IO_NC4_CHUNK_SIZE classic