# mgd77track

Plot track-lines of MGD77 cruises

## Synopsis

gmt mgd77track GEODAS-ids -R region -J parameters [ -A[c][size][+i spacing] ] [ -B[p|s]parameters ] [ -Da startdate ] [ -D b stopdate ] [ -F ] [ -G d|t|n gap ] [ -I ignore ] [ -L trackticks ] [ -S a startdist ] [ -S b stopdist ] [ -T T|t|d ms,mc,mfs,mf,mfc ] [ -U[stamp] ] [ -V[level] ] [ -W[pen] ] [ -X[a|c|f|r][xshift] ] [ -Y[a|c|f|r][yshift] ] [ -p flags ] [ -t transp ] [ --PAR=value ]

Note: No space is allowed between the option flag and the associated arguments.

## Description

mgd77track reads NCEI MGD77 cruises and plots one or more ship tracks on a map using the specified projection.

## Required Arguments

NGDC-ids

  Can be one or more of five kinds of specifiers:

  1. 8-character GEODAS IDs, e.g., 01010083, JA010010etc., etc.

  2. 2-character agency codes which will return all cruises from each agency.

  3. 4-character <agency><vessel> codes, which will return all cruises from those vessels.

  4. =list, where list is a table with GEODAS IDs, one per line.

  5. If nothing is specified we return all cruises in the data base.

  (See mgd77info -L for agency and vessel codes). If no file extension is given then we search for files with one of the four known extensions. The search order (and the extensions) tried is MGD77+ (“.nc”), MGD77T (“.m77t”), MGD77 (“.mgd77” ) and plain text file (“.dat”). Use -I to ignore one or more of these file types). Cruise files will be looked for first in the current directory and second in all directories listed in $MGD77_HOME/mgd77_paths.txt [If $MGD77_HOME is not set it will default to $GMT_SHAREDIR/mgd77].

-J parameters (more …)

  Select map projection.

-R west/east/south/north[/zmin/zmax][+r][+u unit]

  west, east, south, and north specify the region of interest, and you may specify them in decimal degrees or in [±]dd:mm[:ss.xxx][W|E|S|N] format Append +r if lower left and upper right map coordinates are given instead of w/e/s/n. The two shorthands -Rg and -Rd stand for global domain (0/360 and -180/+180 in longitude respectively, with -90/+90 in latitude). Set geographic regions by specifying ISO country codes from the Digital Chart of the World using -R code1,code2,…[+r|R[incs]] instead: Append one or more comma-separated countries using the 2-character ISO 3166-1 alpha-2 convention. To select a state of a country (if available), append .state, e.g, US.TX for Texas. To specify a whole continent, prepend = to any of the continent codes AF (Africa), AN (Antarctica), AS (Asia), EU (Europe), OC (Oceania), NA (North America), or SA (South America). Use +r to modify the bounding box coordinates from the polygon(s): Append inc, xinc/yinc, or winc/einc/sinc/ninc to adjust the region to be a multiple of these steps [no adjustment]. Alternatively, use +R to extend the region outward by adding these increments instead, or +e which is like +r but it ensures that the bounding box extends by at least 0.25 times the increment [no extension]. Alternatively for grid creation, give R code lon/lat/nx/ny, where code is a 2-character combination of L, C, R (for left, center, or right) and T, M, B for top, middle, or bottom. e.g., BL for lower left. This indicates which point on a rectangular region the lon/lat coordinate refers to, and the grid dimensions nx and ny with grid spacings via -I is used to create the corresponding region. Alternatively, specify the name of an existing grid file and the -R settings (and grid spacing and registration, if applicable) are copied from the grid. Appending +u unit expects projected (Cartesian) coordinates compatible with chosen -J and we inversely project to determine actual rectangular geographic region. For perspective view (-p), optionally append /zmin/zmax. In case of perspective view (-p), a z-range (zmin, zmax) can be appended to indicate the third dimension. This needs to be done only when using the -Jz option, not when using only the -p option. In the latter case a perspective view of the plane is plotted, with no third dimension.

## Optional Arguments

-A[c][size][+i spacing]

  Append c to annotate using the MGD77 cruise ID [Default uses the filename prefix]. Optional size is the font size in points. The leg annotation font is controlled by FONT_LABEL. By default, each leg is annotated every time it enters the map region. Alternatively, append +i spacing to place this label every spacing units apart along the track. Append one of the units k (km), n (nautical mile), d (day), or h (hour).

-B[p|s]parameters (more …)

  Set map boundary frame and axes attributes.

-Da startdate

  Do not plot data collected before startdate (yyyy-mm-ddT[hh:mm:ss]) [Default is first day].

-Db stopdate

  Do not plot data collected after stopdate (yyyy-mm-ddT[hh:mm:ss]). [Default is last day].

-F

  Do not apply the error bit flags if present in a MGD77+ file [Default will apply these flags upon reading the data].

-G d|t|n gap

  Let successive point separations exceeding d gap (km) or t gap (minutes) indicate a break in the track where we should not draw a line [no gaps recognized]. Repeat to use both types of gap checking. The n N form is used to plot only one every other N points. This is useful to reduce plot file size bat cannot be used (will be ignored) with the other two gap types.

-I ignore

  Ignore certain data file formats from consideration. Append a|c|m|t to ignore MGD77 ASCII, MGD77+ netCDF, MGD77T ASCII, or plain table files, respectively. The option may be repeated to ignore more than one format. [Default ignores none].

-L trackticks

  To put time/distance log-marks on the track. E.g. a500ka24ht6h means (a)nnotate every 500 km (k) and 24 h(ours), with (t)ickmarks every 500 km and 6 hours. Alternatively you may use the modifiers d (days) and n (nautical miles).

-Sa startdist

  Do not plot data that are less than startdist meter along track from port of departure. Append k for km, m for miles, or n for nautical miles [Default is 0 meters].

-Sb stopdist

  Do not plot data that are more than stopdist meter along track from port of departure. Append k for km, m for miles, or n for nautical miles [Default is end of track].

-TT|t|d ms,mc,mfs,mf,mfc

  Controls the attributes of the three kinds of markers (T for the first time marker in a new day, t for additional time markers in the same day, and d for distance markers). For each of these you can specify the 5 comma-separated attributes markersize, markercolor, markerfontsize, markerfont, and markerfontcolor. Repeat the -T option for each marker type.

-U[label][+c][+j just][+o dx/dy] (more …)

  Draw GMT time stamp logo on plot.

-W[pen]

  Append pen used for the trackline. [Defaults: width = default, color = black, style = solid].

-X[a|c|f|r][xshift]

-Y[a|c|f|r][yshift] (more …)

  Shift plot origin.

-V[level] (more …)

  Select verbosity level [w].

-p[x|y|z]azim[/elev[/zlevel]][+w lon0/lat0[/z0]][+v x0/y0] (more …)

  Select perspective view.

-t[transp] (more …)

  Set transparency level in percent.

-^ or just -

  Print a short message about the syntax of the command, then exit (NOTE: on Windows just use -).

-+ or just +

  Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exit.

-? or no arguments

  Print a complete usage (help) message, including the explanation of all options, then exit.

--PAR=value

  Temporarily override a GMT default setting; repeatable. See gmt.conf for parameters.

## Examples

Note: Since many GMT plot examples are very short (i.e., one module call between the gmt begin and gmt end commands), we will often present them using the quick modern mode GMT Modern Mode One-line Commands syntax, which simplifies such short scripts.

To generate a Mercator map of the track of the cruise 01010007 in the area 70W to 20E, 40S to 20N, using a Mercator scale of 0.1inch/degree, label the tracks with 10 points characters, annotate the boundaries every 10 degrees, draw gridlines every 5 degrees, and mark the track every day and 1000 km, with ticks every 6 hours and 250 km, and create a PDF map, enter the following command:

>     gmt mgd77track 01010007 -R70W/20E/40S/20N -Jm0.1 -B10g5 -A10 \
>                    -La1da1000kf6hf250k -pdf map

## References

The Marine Geophysical Data Exchange Format - MGD77, see http://www.ngdc.noaa.gov/mgg/dat/geodas/docs/mgd77.txt

## See Also

mgd77info, basemap, mgd77list