---
name: "mgd77header"
section: "1gmt"
platform: "linux"
package: "gmt-common"
version: "5.4.5+dfsg-2"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/mgd77header"
---

# mgd77header(1gmt)

Create MGD77 headers from A77 files

## NAME

mgd77header - Create MGD77 headers from A77 files

## SYNOPSIS

**mgd77header** *NGDC-id.a77* \[  **-H***headervalues.txt* \] \[  **-Mf**\[*item*\]\|**r**\|**t** \] \[  **-V**\[*level*\] \]

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

## DESCRIPTION

**mgd77header** generates an MGD77 header by reading A77 data (i.e., the data record portion of MGD77 files), determines temporal and spatial extents, ten degree boxes crossed, and data columns present. Optionally, it can also read an input file consisting of header field values (**-H**) to be included in program output. Header field values determined from data and read from input are output in either MGD77 format or as a list.

## REQUIRED ARGUMENTS

- ***NGDC-ids***

  Can be one or more of five kinds of specifiers:

  - 1\.

    8-character NGDC 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 NGDC 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\].

## OPTIONAL ARGUMENTS

- **-H***headervalues.txt*

  Obtain header field values from the input text file. Each row of the input file should consist of a header field name and its desired value, separated by a space. See below for a sample header file and for the full list of header field names.

- **-Mf**\[*item*\]\|**r**\|**r**

  List the meta-data (header) for each cruise. Append **f** for a formatted display. This will list individual parameters and their values, one entry per output line, in a format that can be searched using standard UNIX text tools. Alternatively, append the name of a particular parameter (you only need to give enough characters - starting at the beginning - to uniquely identify the item). Give - to display the list of all parameter names. You may also specify the number of a parameter. For the raw, punchcard-formatted MGD77 original header block, append **r** instead. For the M77T format, append **t** instead.

- **-V**\[*level*\] (more ...)

  Select verbosity level \[c\].

- **-^** or just **-**

  Print a short message about the syntax of the command, then exits (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 exits.

- **-?** or no arguments

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

## HEADER ITEM SAMPLE FILE

Format\_Acronym MGD77

Source\_Institution SOEST - UNIV. OF HAWAII

Country USA

Platform\_Name KILO MOANA

Platform\_Type\_Code 1

Platform\_Type SHIP

## NAMES OF ALL MGD77 HEADER FIELDS

Survey\_Identifier

Format\_Acronym

Data\_Center\_File\_Number

Parameters\_Surveyed\_Code

File\_Creation\_Year

File\_Creation\_Month

File\_Creation\_Day

Source\_Institution

Country

Platform\_Name

Platform\_Type\_Code

Platform\_Type

Chief\_Scientist

Project\_Cruise\_Leg

Funding

Survey\_Departure\_Year

Survey\_Departure\_Month

Survey\_Departure\_Day

Port\_of\_Departure

Survey\_Arrival\_Year

Survey\_Arrival\_Month

Survey\_Arrival\_Day

Port\_of\_Arrival

Navigation\_Instrumentation

Geodetic\_Datum\_Position\_Determination\_Method

Bathymetry\_Instrumentation

Bathymetry\_Add\_Forms\_of\_Data

Magnetics\_Instrumentation

Magnetics\_Add\_Forms\_of\_Data

Gravity\_Instrumentation

Gravity\_Add\_Forms\_of\_Data

Seismic\_Instrumentation

Seismic\_Data\_Formats

Format\_Type

Format\_Description

Topmost\_Latitude

Bottommost\_Latitude

Leftmost\_Longitude

Rightmost\_Longitude

Bathymetry\_Digitizing\_Rate

Bathymetry\_Sampling\_Rate

Bathymetry\_Assumed\_Sound\_Velocity

Bathymetry\_Datum\_Code

Bathymetry\_Interpolation\_Scheme

Magnetics\_Digitizing\_Rate

Magnetics\_Sampling\_Rate

Magnetics\_Sensor\_Tow\_Distance

Magnetics\_Sensor\_Depth

Magnetics\_Sensor\_Separation

Magnetics\_Ref\_Field\_Code

Magnetics\_Ref\_Field

Magnetics\_Method\_Applying\_Res\_Field

Gravity\_Digitizing\_Rate

Gravity\_Sampling\_Rate

Gravity\_Theoretical\_Formula\_Code

Gravity\_Theoretical\_Formula

Gravity\_Reference\_System\_Code

Gravity\_Reference\_System

Gravity\_Corrections\_Applied

Gravity\_Departure\_Base\_Station

Gravity\_Departure\_Base\_Station\_Name

Gravity\_Arrival\_Base\_Station

Gravity\_Arrival\_Base\_Station\_Name

Number\_of\_Ten\_Degree\_Identifiers

Ten\_Degree\_Identifier

Additional\_Documentation\_1

Additional\_Documentation\_2

Additional\_Documentation\_3

Additional\_Documentation\_4

Additional\_Documentation\_5

Additional\_Documentation\_6

Additional\_Documentation\_7

## EXAMPLES

To generate an MGD77 header from A77 input, try

```
gmt mgd77header km0201 -Hkmheaderitems.txt -Mf > km0201.h77
```

## SEE ALSO

mgd77info, mgd77list, mgd77manage, mgd77path, mgd77track, x2sys\_init

## REFERENCES

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

## COPYRIGHT

2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
