MB-System Unix Manual Page

mbm_multicopy

Section: MB-System 5.0 (1)
Updated: 3 June 2013
Index
 

NAME

mbm_multicopy - Apply mbcopy to all files referenced through a datalist using parallel processes. As with mbm_copy, the MB-System file suffix convention is used to name the output files.

 

VERSION

Version 5.0

 

SYNOPSIS

mbm_multicopy -Foutputformat -Idatalist [-H -C -T -V -Xnprocesses]

 

DESCRIPTION

mbm_multicopy is a macro used to copy large numbers of swath data files from one data format to another using the program mbcopy. This macro is the same as mbm_copy except that it can execute more than one instance of mbcopy simultaneously.

The input is a datalist file referencing all of the target swath files. The output swath file format is specified with the -F option. If the output swath file format is not specified, the output format will be the same as the input format.

The macro identifies a filename root for each input swath file. For files with recognized filename suffixes (e.g. ".mb61" for a format 61 file), the filename root is the part of the filename that comes before the suffix. For files without a recognized suffix, the filename root is the entire filename. So, for a format 57 data file called "0007_20020425_060531.mb57", the filename root is "0007_20020425_060531". For a format 121 file named "009_1659", the filename root "009_1659".

The output filenames are automatically constructed by adding the standard MB-System file suffix to the filename root. This suffix is ".mbXXX" where XXX is the two or three digit format id number. In the event that the output filename is the same as the input filename (likely only if the -F option is not used to set the output format), a "c" will be placed at the beginning of the output file suffix, making it "c.mbXXX".

The -Xnprocesses option sets the number of parallel processes that can be started by mbm_multicopy. In general, the most efficient (fastest) execution of the overall command will be achieved when nprocesses equals the number of available CPUs or cores.

The -T option causes this macro to print out the mbcopy commands it will execute without actually executing them. This test option allows users to check the consequences of their command before actually running it.

 

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

 

AUTHORSHIP OF THIS PROGRAM

Christian do Santos Ferreira

  MARUM - Center for Marine Environmental Sciences

  University of Bremen

 

SIMPLE DESCRIPTION OF BASIC OPTIONS

-H
This "help" flag cause the program to print out a description of its operation and then exit immediately.
-C

This option causes the program to check if each output file already exists, and to forgo copying those that do exist.
-F
outputformat
This option sets the output swath format. All of the swath data files referenced in the datalist specified with the -I option will be copied to format outputformat using mbcopy. If the -F option is not given, then the input files will be copied to their input formats.
-I
datalist
Sets the input datalist filename. A datalist is an ascii file containing a list of the input swath sonar data files to be copied and their formats. In the datalist file, each swath data file should be followed by a data format identifier, e.g.:
        datafile1 11

        datafile2 24

As discussed in the MB-System manual page, datalists may reference other datalists, allowing users to construct recursive datalist structures. This program uses the MBIO library and will read or write any swath sonar format supported by MBIO. A list of the swath sonar data formats currently supported by MBIO and their identifier values is given in the MBIO manual page.
-T

This option causes mbm_multicopy to print out the mbcopy commands it will execute without actually executing them. This test option allows users to check the consequences of their command before actually running it.
-V
Causes mbm_multicopy to operate in "verbose" mode so that it outputs more information than usual.
-X
nprocesses
This option sets the number of parallel, simultaneous mbcopy processes that may be run.

 

EXAMPLES

Suppose one has three raw (format 56) Simrad EM300 data files:
        0001_20020424_212920_raw.all

        0002_20020425_011607_raw.all

        0003_20020425_022926_raw.all

One can generate a datalist called datalistr.mb-1 referencing these three swath files using a text editor or by using awk:
        ls -1 *all | awk '{print $1" 56"}' > datalistr.mb-1

In order to translate all three files in the processing format for Simrad multibeam data (format 57), use the mbm_multicopy macro:
        mbm_multicopy -I datalistr.mb-1 -F 57 -T -X2 -V

The macro prints out the following as it translates the swath data:
        Running mbm_multicopy...

        Getting file list using mbdatalist...

        Initializing parallel processing with as many as 2 processes


        Running: mbcopy -F56/57

                -I0001_20020424_212920_raw.all

                -O0001_20020424_212920.mb57

        Running: mbcopy -F56/57

                -I0002_20020425_011607_raw.all

                -O0002_20020425_011607.mb57

        Running: mbcopy -F56/57

                -I0003_20020425_022926_raw.all

                -O0003_20020425_022926.mb57

 

SEE ALSO

mbsystem(1), mbm_copy(1), mbcopy(1), mbdatalist(1)

 

BUGS

Perhaps.


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
MB-SYSTEM AUTHORSHIP
AUTHORSHIP OF THIS PROGRAM
SIMPLE DESCRIPTION OF BASIC OPTIONS
EXAMPLES
SEE ALSO
BUGS


Last Updated: 3 June 2013