mbotps
Section: MB-System 5.0 (1)
Updated: 30 August 2025
Index
NAME
mbotps - Predicts tides using the OSU Tidal Prediction Software (OTPS) distribution.VERSION
Version 5.0SYNOPSIS
mbotps
[
--input=datalist {-Idatalist}
--format=format_id {-Fformat_id}
--use-mbprocess {-M}
--skip-existing {-S}
--tide-output=file {-Ooutput}
--tide-position=lon/lat {-Rlon/lat}
--tide-format=format_id {-Atideformat}
--interval=interval {-Dinterval}
--start-time=year/month/day/hour/minute/second {-Byear/month/day/hour/minute/second}
--end-time=year/month/day/hour/minute/second {-Eyear/month/day/hour/minute/second}
--tide-station-file=file {-Ntidestationfile}
--tide-station-position=lon/lat {-Ulon/lat}
--tide-station-format=format_id {-Ctidestationformat}
--otps-model=model_name {-Tmodel}
--otps-path=path {-Ppath}
--help {-H}
--verbose {-V}
]
DESCRIPTION
MBotps is a utility that predicts tides using software and global tidal models available from Gary Egbert and Svetlana Erofeeva of Oregon State University (OSU) at:
https://www.tpxo.net In order for mbotps to function, users must separately obtain and install the OSU Tidal Prediction Software (OTPS) and the associated TPXO tidal models. Both software and models are made available at no cost for academic, research or other noncommercial use, but must be licensed for a fee for commercial use. Instructions (current as of 2024) are given below for installing the software and a model.MBotps can be operated in two modes. First, users may use the -R, -B, and -E options to specify a location and the beginning and end times of a tidal model for that location. The -D option sets the time interval of values in the output tidal model, and the -O option sets the output tidal model filename.
Alternatively, instead of specifying a place and time range, the user may specify one or more swath data files using the -I option. A tidal model is produced for each swath file in which tidal values are calculated using the sonar navigation locations at intervals specified with the -D option, and if the -M option is specified, the swath file's processing parameter file is modified so that mbprocess applies the tidal model during processing.
The -Ctidestationformat, -Ntidestationfile, and -Utidestationlon/tidestationlat commands together allow users to input observations from a tide station; these observations can be used to calculate corrections to tidal model values in the vicinity of the tide station. If tide station data are specified, then MBotps calculates the difference between the observed and modeled tide at that station for each data point in the input tide station data. This difference time series is then used as a correction to the output tide models, whether at a location specified with the -Rlon/lat option or for swath data specified with the -Idatalist option.
OBTAINING AND INSTALLING OTPS AND TXPO MODELS
The OSU Tidal Prediction Software (OTPS) can be downloaded from
https://www.tpxo.net/otps
Three versions of the software are available, the first of which consists of Fortran 90 programs that work with OTPS binary model files, the second of which is a MATLAB package also working with the binary model files, and the third of which is Fortran 90 programs that work with netCDF format model files. These instructions discuss only the first binary file case that has been tested with MB-System, and present only one of many possible installation scenarios (but this case fits MB-System default settings).On the OTPS web page, use the "Download OTPS" button to download the OTPS software distribution in the form of a file named "OTPS.tar.Z". The MB-System default settings include locating the OTPS installation in the directory /usr/local/src/ . Move the distribution file to this directory:
mv OTPS.tar.Z /usr/local/src
If the user does not have write privileges in /usr/local/src, then it may be necessary to operate in "sudo" mode (which assumes the user is a system administrator):
sudo mv OTPS.tar.Z /usr/local/srcMove to /usr/local/src and unpack the distribution:
cd /usr/local/src
gunzip OTPS.tar.Z
tar xvf OTPS.tar or
uncompress OTPS.tar.Z
tar xvf OTPS.tarThis will unpack a directory called OTPS. Moving into the directory and listing the contents:
cd OTPS
ls
yields:
COPYRIGHT makefile*
DATA/ matlab/
README predict_tide.f90
constit.h* predict_tide_sample_out
dumsetup setup.atl
extract_HC.f90* setup.inp
extract_HC_sample_out setup.local
extract_local_model.f90 subs.f90
lat_lon time
lat_lon_time
The component of OTPS that is required for mbotps is the program predict_tide, which must be compiled from the Fortran 90 source file predict_tide.f90.
On a Linux computer with the GCC compiler suite installed, the gfortran program (a Fortran compiler) is already available, or can be easily installed via apt on Debian and Ubuntu or via yum on CentOs or Red Hat:
sudo apt install gfortran
or
sudo yum install gcc-gfortranOn a Mac, the LLVM compiler suite installed with the XCode development tools does not include a Fortran compiler, and so it is necessary to install GCC as well. Assuming that a Mac user is already installing prerequisite packages for MB-System using the MacPorts package manager, then gfortran can be installed via the commands:
sudo port install gcc14 +gfortran
sudo port select --set gcc mp-gcc14
sudo ln -s /opt/local/bin/gfortran-mp-14 gfortran
Note that the version of GCC will continue to increment over time, and so may no longer be GCC 14. The last command links the installed Fortran compiler to the name "gfortran" (to allow the use of the OTPS makefile without modification).In the OTPS directory, apply the Fortran compiler using the make utility:
sudo make predict_tide
The program predict_tide now exists in a location known to mbotps.The OTPS directory described above includes a directory named DATA, which has the following contents:
HAW/ Model_tpxo9.v2
Model_Hawaii Model_tpxo9_atlas_v5
Model_tpxo10.v2 load_file
Model_tpxo10_atlas
Here the files with names beginning with "Model_" describe different available tidal models, each of which consists of a directory containing many model files. In order to install a tidal model, the associated directory and files must be obtained and placed inside the DATA directory. We recommend use of the TPXO10-atlas-v2 bin model, which combines a global model with higher resolution local models for many coastal areas. This is described in the Model_tpxo10_atlas file.The tidal model must be obtained from OSU via instructions on the web pages:
https://www.tpxo.net/global
https://www.tpxo.net/tpxo-products-and-registration
Basically, one must request access to a model via email. If approved, you will receive a link to download a directory named TPXO10_atlas_v2 which contains the following files:
grid_tpxo10_atlas_30_v2 u_2n2_tpxo10_atlas_30_v2
h_2n2_tpxo10_atlas_30_v2 u_k1_tpxo10_atlas_30_v2
h_k1_tpxo10_atlas_30_v2 u_k2_tpxo10_atlas_30_v2
h_k2_tpxo10_atlas_30_v2 u_m2_tpxo10_atlas_30_v2
h_m2_tpxo10_atlas_30_v2 u_m4_tpxo10_atlas_30_v2
h_m4_tpxo10_atlas_30_v2 u_mf_tpxo10_atlas_30_v2
h_mf_tpxo10_atlas_30_v2 u_mm_tpxo10_atlas_30_v2
h_mm_tpxo10_atlas_30_v2 u_mn4_tpxo10_atlas_30_v2
h_mn4_tpxo10_atlas_30_v2 u_ms4_tpxo10_atlas_30_v2
h_ms4_tpxo10_atlas_30_v2 u_n2_tpxo10_atlas_30_v2
h_n2_tpxo10_atlas_30_v2 u_o1_tpxo10_atlas_30_v2
h_o1_tpxo10_atlas_30_v2 u_p1_tpxo10_atlas_30_v2
h_p1_tpxo10_atlas_30_v2 u_q1_tpxo10_atlas_30_v2
h_q1_tpxo10_atlas_30_v2 u_s1_tpxo10_atlas_30_v2
h_s1_tpxo10_atlas_30_v2 u_s2_tpxo10_atlas_30_v2
h_s2_tpxo10_atlas_30_v2
Move the directory TPXO10_atlas_v2 to /usr/local/src/OTPS/DATA/ :
mv TPXO10_atlas_v2 /usr/local/src/OTPS/DATA/
The tidal model should now be installed, and mbotps should access it successfully. This can be tested by running mbotps with the --help option:
Program mbotps
MB-system Version 5.8.3beta03
MBotps predicts tides using methods and data derived from the OSU Tidal Prediction Software (OTPS) distributions.
usage: mbotps
[
--input=datalist {-Idatalist}
--format=format_id {-Fformat_id}
--use-mbprocess {-M}
--skip-existing {-S}
--tide-output=file {-Ooutput}
--tide-position=lon/lat {-Rlon/lat}
--tide-format=format_id {-Atideformat}
--interval=interval {-Dinterval}
--start-time=year/month/day/hour/minute/second {-Byear/month/day/hour/minute/second}
--end-time=year/month/day/hour/minute/second {-Eyear/month/day/hour/minute/second}
--tide-station-file=file {-Ntidestationfile}
--tide-station-position=lon/lat {-Ulon/lat}
--tide-station-format=format_id {-Ctidestationformat}
--otps-model=model_name {-Tmodel}
--otps-path=path {-Ppath}
--help {-H}
--verbose {-V}
]
Checking for available OTPS tide models
OTPS location: /usr/local/src/otps
Default OTPS model name: tpxo10_atlas
Specified OTPS model name:
Possible OTPS tidal models:
tpxo10_atlas <installed>
Number of available OTPS tide models: 1
Using OTPS tide model: tpxo10_atlas
The output of mbotps indicates that the desired tidal model is available.
MB-SYSTEM AUTHORSHIP
David W. Caress
Monterey Bay Aquarium Research Institute
Dale N. Chayes
Center for Coastal and Ocean Mapping
University of New Hampshire
Christian do Santos Ferreira
MARUM - Center for Marine Environmental Sciences
University of Bremen
Program mbotps
MB-system Version 5.8.3beta03
Checking for available OTPS tide models
OTPS location: /usr/local/src/otps
Default OTPS model name: tpxo10_atlas
Specified OTPS model name:
Possible OTPS tidal models:
tpxo10_atlas <installed>
Number of available OTPS tide models: 1
Using OTPS tide model: tpxo10_atlas
Running: cd /usr/local/src/otps; ./predict_tide
Lat/Lon/Time file:/Users/caress/t30135.txt
Predict OCEAN tide
DATA/TPXO10_atlas_v2/h_m2_tpxo10_atlas_30_v2
Model: src/otps/DATA/Model_tpxo10_atlas
Lat limits: -90.0166702 90.0166702
Lon limits: 1.66666675E-02 360.016663
Constituents: m2 s2 k1 o1 n2 p1 k2 q1 2n2 mf mm m4 ms4 mn4 s1
Predict elevations (m)
Constituents to include: m2 s2 k1 o1 n2 p1 k2 q1 2n2 mf mm m4 ms4 mn4 s1
Infer minor constituents except those listed above.
The grid bathymetry defined in z, u, v - nodes
Bathymetry at u/v nodes is used to calculate currents
Opening atlas files:m2 s2 k1 o1 n2 p1 k2 q1 2n2 mf mm m4 ms4 mn4 s1 done
Results are in /Users/caress/u30135.txt
Results are really in tide_model.txt
The output tidal model is in the file tide_model.txt, which includes
data that look like:
# Tide model generated by program mbotps
# MB-System Version: 5.8.3beta03
# Tide model generated by program mbotps
# which in turn calls OTPS program predict_tide obtained from:
# http://www.coas.oregonstate.edu/research/po/research/tide/
#
# OTPSnc tide model:
# tpxo10_atlas
# Output format:
# year month day hour minute second tide
# where tide is in meters
# Run by user <caress> on cpu <RAITT-1121.local> at <Tue Nov 19 21:36:30 2024>
# Model: src/otps/DATA/Model_tpxo10_atlas
# Constituents included: m2 s2 k1 o1 n2 p1 k2 q1 2n2 mf mm m4 ms4 mn4 s1
2009 02 21 00 00 00 -0.6780
2009 02 21 00 01 00 -0.6760
2009 02 21 00 02 00 -0.6730
2009 02 21 00 03 00 -0.6710
2009 02 21 00 04 00 -0.6680
2009 02 21 00 05 00 -0.6650
2009 02 21 00 06 00 -0.6630
2009 02 21 00 07 00 -0.6600
2009 02 21 00 08 00 -0.6580
2009 02 21 00 09 00 -0.6550
2009 02 21 00 10 00 -0.6520
2009 02 21 00 11 00 -0.6490
2009 02 21 00 12 00 -0.6470
2009 02 21 00 13 00 -0.6440
.................
2009 02 21 23 54 00 -0.7900
2009 02 21 23 55 00 -0.7890
2009 02 21 23 56 00 -0.7870
2009 02 21 23 57 00 -0.7860
2009 02 21 23 58 00 -0.7840
2009 02 21 23 59 00 -0.7820
Now, suppose that one wants to apply tide corrections directly to a set of EM3002
data in GSF format. First, execute mbotps with the datalist for the swath
data specified as input:
mbotps --input=datalist.mb-1 --verbose
The resulting shell output looks like:
Program mbotps
MB-system Version 5.8.3beta03
Checking for available OTPS tide models
OTPS location: /usr/local/src/otps
Default OTPS model name: tpxo10_atlas
Specified OTPS model name:
Possible OTPS tidal models:
tpxo10_atlas <installed>
Number of available OTPS tide models: 1
Using OTPS tide model: tpxo10_atlas
Running: cd /usr/local/src/otps; ./predict_tide
---------------------------------------
Processing tides for himbb05291.d23.mb121
35602 records read from himbb05291.d23.mb121.fnv
Lat/Lon/Time file:tmp_mbotps_llt_7413.txt
Constituents to include: m2 s2 n2 k2 k1 o1 p1 q1
Predict OCEAN tide
Interpolate minor constituents
DATA/TPXO10_atlas_v2/h_m2_tpxo10_atlas_30_v2
Model: src/OTPS/DATA/Model_tpxo10_atlas
Model is on grid uniform in lat,lon
Lat limits: -90.125 90.125
Lon limits: 0.125 360.125
Constituents: m2 s2 k1 o1 n2 p1 k2 q1 2n2 mf mm m4 ms4 mn4 s1
Predict elevations (m)
Constituents to include: m2 s2 k1 o1 n2 p1 k2 q1 2n2 mf mm m4 ms4 mn4 s1
Infer minor constituents except those listed above.
The grid bathymetry defined in z, u, v - nodes
Bathymetry at u/v nodes is used to calculate currents
Opening atlas files:m2 s2 k1 o1 n2 p1 k2 q1 2n2 mf mm m4 ms4 mn4 s1 done
Results are in tmp_mbotps_llttd_7413.txt
Results are really in himbb05291.d23.mb121.tde
The output tide files have the same structure shown above:
# Tide model generated by program mbotps
# MB-System Version: 5.8.3beta03
# Tide model generated by program mbotps
# which in turn calls OTPS program predict_tide obtained from:
# http://www.coas.oregonstate.edu/research/po/research/tide/
#
# OTPSnc tide model:
# tpxo10_atlas
# Output format:
# year month day hour minute second tide
# where tide is in meters
# Run by user <caress> on cpu <deitz> at <Tue Nov 19 17:53:22 2024>
# Model: src/OTPS/DATA/Model_tpxo10_atlas
# Constituents included: m2 s2 n2 k2 k1 o1 p1 q1 mf mm m4 ms4 mn4
2005 10 18 19 01 36 0.0800
2005 10 18 19 02 36 0.0790
2005 10 18 19 03 36 0.0770
2005 10 18 19 04 36 0.0760
2005 10 18 19 05 37 0.0750
2005 10 18 19 06 37 0.0730
2005 10 18 19 07 37 0.0720
2005 10 18 19 08 37 0.0710
2005 10 18 19 09 37 0.0700
In addition to generating *.tde files for each swath file referenced by the
input datalist structure, when the --use-mbprocess option is specified,
mbotps modifies the parameter file associated
with each swath file (creating it if necessary) so that tide correction is enabled
using the *.tde file and tide format 2. When mbprocess is run on the same
datalist, the files will be reprocessed, and the processing will include the
application of the tide correction to all bathymetry.
Last Updated: 30 August 2025
<< MB-System website | MB-System Documenation>> | MB-System Manual Page List