mgd77track

Plot track-lines of MGD77 cruises

Synopsis

gmt mgd77track GEODAS-ids -Rregion -Jparameters [ -A[c][size][+ispacing] ] [ -B[p|s]parameters ] [ -Dastartdate ] [ -Dbstopdate ] [ -F ] [ -Gd|t|ngap ] [ -Ia|c|m|t ] [ -Ltrackticks ] [ -Sastartdist ] [ -Sbstopdist ] [ -TT|t|dms,mc,mfs,mf,mfc ] [ -U[stamp] ] [ -V[level] ] [ -W[pen] ] [ -X[a|c|f|r][xshift] ] [ -Y[a|c|f|r][yshift] ] [ -pflags ] [ -ttransp ] [ --PAR=value ]

Description

mgd77track reads NCEI MGD77 cruises and plots one or more ship tracks on a map using the specified projection [Wessel and Chandler, 2007].

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].

-Jparameters

Specify the projection. (See full description) (See technical reference) (See projections table).

-Rwest/east/south/north[/zmin/zmax][+r][+uunit]

Specify the region of interest.

The region may be specified in one of several ways:

  1. -Rwest/east/south/north. This is the standard way to specify geographic regions when using map projections where meridians and parallels are rectilinear. The coordinates may be specified in decimal degrees or in [±]dd:mm[:ss.xxx][W|E|S|N] format.

  2. -Rwest/south/east/north+r. This form is useful for map projections that are oblique, making meridians and parallels poor choices for map boundaries. Here, we instead specify the lower left corner and upper right corner geographic coordinates, followed by the modifier +r. This form guarantees a rectangular map even though lines of equal longitude and latitude are not straight lines.

  3. -Rg or -Rd. These forms can be used to quickly specify the global domain (0/360 for -Rg and -180/+180 for -Rd in longitude, with -90/+90 in latitude).

  4. -Rcode1,code2,…[+e|r|Rincs]. This indirectly supplies the region by consulting the DCW (Digital Chart of the World) database and derives the bounding regions for one or more countries given by the codes. Simply append one or more comma-separated countries using either the two-character ISO 3166-1 alpha-2 convention (e.g., NO) or the full country name (e.g., Norway). To select a state within a country (if available), append .state (e.g, US.TX), or the full state name (e.g., Texas). To specify a whole continent, spell out the full continent name (e.g., -RAfrica). Finally, append any DCW collection abbreviations or full names for the extent of the collection or named region. All names are case-insensitive. The following modifiers can be appended:

    • +r to adjust the region boundaries to be multiples of the steps indicated by inc, xinc/yinc, or winc/einc/sinc/ninc [default is no adjustment]. For example, -RFR+r1 will select the national bounding box of France rounded to nearest integer degree, where inc can be positive to expand the region or negative to shrink the region.

    • +R to adjust the region by adding the amounts specified by inc, xinc/yinc, or winc/einc/sinc/ninc [default is no extension], where inc can be positive to expand the region or negative to shrink the region.

    • +e to adjust the region boundaries to be multiples of the steps indicated by inc, xinc/yinc, or winc/einc/sinc/ninc, while ensuring that the bounding box is adjusted by at least 0.25 times the increment [default is no adjustment], where inc can be positive to expand the region or negative to shrink the region.

  5. -Rxmin/xmax/ymin/ymax[+uunit] specifies a region in projected units (e.g., UTM meters) where xmin/xmax/ymin/ymax are Cartesian projected coordinates compatible with the chosen projection (-J) and unit is an allowable distance unit [e]; we inversely project to determine the actual rectangular geographic region. For projected regions centered on (0,0) you may use the short-hand -Rhalfwidth[/halfheight]+uunit, where halfheight defaults to halfwidth if not given. This short-hand requires the +u modifier.

  6. -Rjustifylon0/lat0/nx/ny, where justify 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). The two character code justify indicates which point on a rectangular region region the lon0/lat0 coordinates refer to and the grid dimensions nx and ny are used with grid spacings given via -I to create the corresponding region. This method can be used when creating grids. For example, -RCM25/25/50/50 specifies a 50x50 grid centered on 25,25.

  7. -Rgridfile. This will copy the domain settings found for the grid in specified file. Note that depending on the nature of the calling module, this mechanism will also set grid spacing and possibly the grid registration (see Grid registration: The -r option).

  8. -Ra[uto] or -Re[xact]. Under modern mode, and for plotting modules only, you can automatically determine the region from the data used. You can either get the exact area using -Re [Default if no -R is given] or a slightly larger area sensibly rounded outwards to the next multiple of increments that depend on the data range using -Ra.

Optional Arguments

-A[c][size][+ispacing]

Append c to annotate the track 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 +ispacing 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

Set map boundary frame and axes attributes. (See full description) (See technical reference).

-Dastartdate

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

-Dbstopdate

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].

-Gd|t|ngap

Let successive point separations exceeding dgap (km) or tgap (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 nN 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.

-Ia|c|m|t

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].

-Ltrackticks

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).

-Sastartdist

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].

-Sbstopdist

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|dms,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][+jjustify][+odx[/dy]][+ttext]

Draw GMT time stamp logo on plot. (See full description) (See technical reference).

-V[level]

Select verbosity level [w]. (See full description) (See technical reference).

-W[pen]

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

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

Shift plot origin. (See full description) (See technical reference).

-Y[a|c|f|r][yshift]

Shift plot origin. (See full description) (See technical reference).

-p[x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0] (more …)

Select perspective view.

-ttransp[/transp2] (more …)

Set transparency level(s) 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.

Wessel, P., and Chandler, M. T., 2007, The mgd77 supplement to the Generic Mapping Tools, Comp. Geosci., 33(1), 62-75, https://doi.org/10.1016/j.cageo.2006.05.006.

See Also

mgd77info, basemap, mgd77list