MB-System Unix Manual Page

mbm_bpr

Section: MB\-System 5.0 (1)
Updated: 6 May 2018
Index
 

NAME

mbm_bpr - MB-System macro to process data from a Seabird SBE53 pressure sensor into a tidal model for use by mbprocess.

 

VERSION

Version 5.0

 

SYNOPSIS

mbm_bpr -Ibprfile -Otidefile [-Doffset -Fformat Rlon/lat Swindow -T -H -V]

 

DESCRIPTION

mbm_bpr is a perl shellscript used to translate pressure data from a Bottom Pressure Recorder (BPR) into tidal data that can be used to correct swath bathymetry data. The user specifies an input BPR data file and the output path for the resulting tidefile.

The input data must be in either the *.tid format produced by Seabird sensors such as the Seabird SBE53 (specified using -F0), or the CSV files output by Sonardyne AMT units (specified using -F1). In the latter case it is the lines tagged with "PR2" that are parsed for the AMT pressure data.


By default, the output tidefile will be in the form of a text file with two columns:
      time_d tide.
Here time_d are time values in decimal epoch seconds (seconds since 1970 Jan 1 00:00:00) and the tide values are in meters. In this case, the tidefile is in format 1 as supported by mbprocess, so to make use of this tide data to correct swath bathymetry, use mbset as follows:
      mbset -Idatalist.mb-1 -PTIDEFILE:tidefilename -PTIDEFORMAT:1
where datalist.mb-1 is the datalist referring to the data files to be processed. After using mbset to turn on tide correction, run mbprocess:
      mbprocess -Idatalist.mb-1

If the -T option is specified, then the output file will have the form of:
      year month day hour min sec tide
In this case, the tidefile is in format 2 as supported by mbprocess, so to make use of this tide data to correct swath bathymetry, use mbset as follows:
      mbset -Idatalist.mb-1 -PTIDEFILE:tidefilename -PTIDEFORMAT:2
where datalist.mb-1 is the datalist referring to the data files to be processed. After using mbset to turn on tide correction, run mbprocess.

The macro mbm_bpr calculates depth from pressure and latitude using the empirical formula for seawater in:

        N. P. Fofonoff and R. C. Millard, Jr., Algorithms for computation of fundamental
        properties of seawater, Unesco Tech. Papers in Mar. Sci., No. 44 1983.
and then calculates tidal data as the difference between the observed depth and a vertical reference depth. If a location is supplied using the -R option, mbm_bpr uses the latitude in the depth calculation and also extracts a tidal model corresponding the to BPR deployment site and timespan using the program mbotps. The vertical reference is then the average difference between the tidal model and the observed depths. If the user does not supply a location using the -R option, a location on the equator is assumed for the depth calculation and the vertical reference is the mean depth of the middle half of the depth time series (i.e. depths from 1/4 to 3/4 of the total time span). The user can specify an additional offset to apply to the tide data using the -Doffset option.

If the -Swindow option is used, then the calculated depth data will be smoothed using a boxcar window of window seconds.

If the -T option is not used, then mbm_bpr will also output a shellscript that will, if executed, generate a GMT postscript plot of the tide data output. If a location has been specified so that a tidal model was also generated, the model will be plotted with the tide data.

 

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

 

OPTIONS

-D
offset
An offset to be added to the calculated tidal data, in meters. Default: offset=0.
-F
format
This option specifies the format of the input BPR data. If format=0 then input data are in the *.tid format produced by Seabird software from sensors such as the Seabird SBE53. If format=1 then input data are in a CSV file output by Sonardyne AMT units. The pressure values used are those in lines with the "PR2" tag. Default: format=0.
-H
This "help" flag cause the program to print out a description of its operation and then exit immediately.
-I
bprfile
Input pressure data from the SBE53 pressure sensor in the Sea-Bird *.tid format.
-O
tidefile
Output tide data file path. The format of the tide data controlled by the use (or not) of the -T option.
-R
longitude/latitude
Sets the location of the BPR deployment. Here longitude and latitude are in decimal degrees.
-S
window
This option enables smoothing of the depth values calculated from BPR pressure using a boxcar window of window seconds. The number of samples that are averaged to generate each smoothed value depends on both the size of the window and the sampling interval.
-T
Changes the tide data format output. The format of the tide data are normally in the form of a text file with two columns:
      time_d tide
where time_d are time values in decimal epoch seconds (seconds since 1970 Jan 1 00:00:00) and the tide values are in meters. If the -T option is specified, then the output file will instead have the form of:
      year month day hour min sec tide
-V
Causes mbm_bpr to operate in "verbose" mode so that it outputs more information than usual.

 

Examples

Suppose one has deployed an SBE53 at 110 deg 40.92220'W 26deg 27.18960'N at about 1200 m depth. The Sea-Bird processing software outputs data in *.tid files with output something like:
     1   03/14/2012 16:27:21 99999.9999    20.2731
     2   03/14/2012 16:28:21 99999.9999    20.2696
     3   03/14/2012 16:29:21 99999.9999    20.2589
     4   03/14/2012 16:30:21 99999.9999    20.2537
     5   03/14/2012 16:31:21 99999.9999    20.2448
     6   03/14/2012 16:32:21 99999.9999    20.2322
     7   03/14/2012 16:33:21 99999.9999    20.2188
     8   03/14/2012 16:34:21 99999.9999    20.2656
     9   03/14/2012 16:35:21 99999.9999    20.3567
    10   03/14/2012 16:36:21 99999.9999    20.4316
    11   03/14/2012 16:37:21 99999.9999    20.4929
    12   03/14/2012 16:38:21 99999.9999    20.5661
    13   03/14/2012 16:39:21 99999.9999    20.6242
    14   03/14/2012 16:40:21 99999.9999    20.6891
    15   03/14/2012 16:41:21 99999.9999    20.7590
    16   03/14/2012 16:42:21 99999.9999    19.8901
    17   03/14/2012 16:43:21 99999.9999    18.1037
    18   03/14/2012 16:44:21 99999.9999    17.2487
    19   03/14/2012 16:45:21 99999.9999    15.9275
    20   03/14/2012 16:46:21 99999.9999    14.7406
    21   03/14/2012 16:47:21 99999.9999    13.7798
    22   03/14/2012 16:48:21 99999.9999    13.0540
    23   03/14/2012 16:49:21 99999.9999    12.3869
    24   03/14/2012 16:50:21 99999.9999    11.8464
    25   03/14/2012 16:51:21 99999.9999    11.1999
    26   03/14/2012 16:52:21   528.8065    10.5061
    27   03/14/2012 16:53:21   583.2633     9.9686
    28   03/14/2012 16:54:21   637.7951     9.3547
    29   03/14/2012 16:55:21   693.5947     8.8287
    30   03/14/2012 16:56:21   748.5921     8.3998
    31   03/14/2012 16:57:21   804.0302     8.0251
    32   03/14/2012 16:58:21   859.5471     7.6560
    33   03/14/2012 16:59:21   914.8043     7.3006
    34   03/14/2012 17:00:21   969.7692     7.0322
    35   03/14/2012 17:01:21  1023.0636     6.6673
    36   03/14/2012 17:02:21  1077.7238     6.3327
    37   03/14/2012 17:03:21  1132.0991     6.0528
    38   03/14/2012 17:04:21  1186.9391     5.8203
    39   03/14/2012 17:05:21  1241.4040     5.6089
    40   03/14/2012 17:06:21  1295.6002     5.4167
    41   03/14/2012 17:07:21  1350.1353     5.2188
    42   03/14/2012 17:08:21  1404.8882     5.0195
    43   03/14/2012 17:09:21  1460.2095     4.9215
    44   03/14/2012 17:10:21  1514.6683     4.7630
    45   03/14/2012 17:11:21  1568.9270     4.5651
    46   03/14/2012 17:12:21  1623.3903     4.4452
    47   03/14/2012 17:13:21  1678.6771     4.3075
    48   03/14/2012 17:14:21  1733.7411     4.1910
    49   03/14/2012 17:15:21  1789.1549     4.0284
    50   03/14/2012 17:16:21  1844.5557     3.8760
    51   03/14/2012 17:17:21  1869.8892     3.7976
    52   03/14/2012 17:18:21  1869.8176     3.7534
    53   03/14/2012 17:19:21  1869.8197     3.7088
    54   03/14/2012 17:20:21  1869.8224     3.6828
    55   03/14/2012 17:21:21  1869.8241     3.6682
where the third column is the pressure in dbar and the fourth column is temperature in degrees C. The pressure increases and the temperature decreases as the sensor sinks to the seafloor following deployment off a ship. Once the sensor is on the seafloor, pressure variations reflect the tides.

To extract a tidal model, use mbm_bpr as follows:
    mbm_bpr -I BPR.tid -OBPR.tde -R-110.682037/27.453160 -V
The output to the shell looks like:
    Program  Status:
      1771 pressure values read from BPR.tid
      Vertical reference to tidal model for position -110.682037 27.453160
      Tide will be output as <time_d tide> values
      A plot will be generated
      Executing: mbotps -A1 -D1200 -R-110.682037/27.453160 -B2012/03/14/16/52/21 -E2012/03/15/22/22/21 -OBPR.tid_tidemodel.txt
      Results are really in BPR.tid_tidemodel.txt
      1690 pressure values output to BPR.tde
      Vertical reference: 1267.31678290355 m
      Executing mbm_xyplot -R1331743941.000000/1331850141.000000/-0.5071/0.5071 -IW0/0/0:BPR.tde -IW255/0/0:BPR.tid_tidemodel.txt -OBPR.tde_tideplot -L"Tide Data from BPR <BPR.tde> (black) & Tide Model (red):Seconds:Tide (meters)" -V
      Executing <BPR.tde_tideplot.cmd> also invokes gv to view the plot on the screen.
The output tidal data file BPR.tde has the form:
    1331745441.000000 -0.0803109226781089
    1331745501.000000 -0.129052283649798
    1331745561.000000 -0.127622718432121
    1331745621.000000 -0.125784706023751
    1331745681.000000 -0.124627438960488
    1331745741.000000 -0.123334022838208
    1331745801.000000 -0.12285750111073
    1331745861.000000 -0.121768308595847
where the first column is time in seconds since January 1, 1970 (epoch seconds, aka unix seconds, aka time_d values within MB-System), and the second column is the tidal signal in meters. In this case the reference tidal model is provided by mbotps, and the plot created by running the output shellscript BPR.tde_tideplot.cmd plots both the tidal data calculated by mbm_bpr and the tidal model extracted using mbotps.

 

SEE ALSO

mbsystem(1), mbprocess(1), mbset(1)

 

REFERENCES

N. P. Fofonoff and R. C. Millard, Jr., Algorithms for computation of fundamental properties of seawater, Unesco Tech. Papers in Mar. Sci., No. 44 1983.

 

BUGS

Lobsters, really.


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
MB-SYSTEM AUTHORSHIP
OPTIONS
Examples
SEE ALSO
REFERENCES
BUGS


Last Updated: 6 May 2018