MB-System Basic Plotting

(From my old blog, but a post that I like to go back to…)

Here’s how I put together a rough bathymetry plot of a couple of survey areas, overlaid with the track lines.

1) Created a list of the files that I wanted to plot. I got this from one of Kurts blog posts from the Revelle:

ls *_raw.all | awk '{print $1, 56}' > PatchLines

I’ve never used Awk before. I felt some guilt in just blindly copying Kurt’s Awk command – it felt like cheating. But it would have taken me a long time to figure out some alternative: either do it in Python or Bash or Matlab or something (time consuming), or figure out enough Awk that I could understand how to construct this command myself (ugh, even MORE time consuming). So I just blindly copied.

2) Used the MB-System command mbm_plot, which takes some arguments, and then creates an executable script that generates a GMT plot of the bathymetry.

mbm_plot -F-1 -IPatchLines -N -G1 -W1/2 -Z1050/2100

The -F is the format. I set it to a negative number to tell the program to look into the list of files in the PatchLines file (generated in step 1).

The next argument, -I gives the name of the file containing the list of files, along with the file identifier.

-N gets the tracklines on the plot.

-G1 generates color filled bathymetry data

-W1/2 tells the program to to use continuous color shading (instead of discrete), and I specified color palette 2 (high intensity colors)

-Z1050/2100 says that the depth color scale goes from 1050m to 2100m.

3) The previous step generated PatchLines.cmd. I run this using ./PatchLines.cmd, and wind up with a Patchlines.ps postscript file. Here’s the final product, bearing in mind that it is completely raw data (no corrections, no cleaning, no sound speed corrections, nothing):

And one from the grid survey:

Leave a Reply

Your email address will not be published. Required fields are marked *