1MGD77CONVERT(1) GMT MGD77CONVERT(1)
2
3
4
6 mgd77convert - Convert MGD77 data to other file formats
7
9 mgd77convert NGDC-ids -Fa|c|m |t
10 -T[+]a|c|m|t [ -C ] [ -D ] [ -L[w][e][+] ] [ -V[level] ]
11
12 Note: No space is allowed between the option flag and the associated
13 arguments.
14
16 mgd77convert reads versions of MGD77 files and writes the same data in
17 (probably) another format to a new file in the current directory. Both
18 pre- and post-Y2K MGD77 formats can be processed.
19
21 NGDC-ids
22 Can be one or more of five kinds of specifiers:
23
24 1. 8-character NGDC IDs, e.g., 01010083, JA010010etc., etc.
25
26 2. 2-character agency codes which will return all cruises from
27 each agency.
28
29 3. 4-character <agency><vessel> codes, which will return all
30 cruises from those vessels.
31
32 4. =list, where list is a table with NGDC IDs, one per line.
33
34 5. If nothing is specified we return all cruises in the data
35 base.
36
37 (See mgd77info -L for agency and vessel codes). If no file
38 extension is given then we search for files with one of the four
39 known extensions. The search order (and the extensions) tried
40 is MGD77+ (".nc"), MGD77T (".m77t"), MGD77 (".mgd77" ) and plain
41 text file (".dat"). Use -I to ignore one or more of these file
42 types). Cruise files will be looked for first in the current
43 directory and second in all directories listed in
44 $MGD77_HOME/mgd77_paths.txt [If $MGD77_HOME is not set it will
45 default to $GMT_SHAREDIR/mgd77].
46
47 -Fa|c|m |t
48 Specifies the format of the input (From) files. Choose from a
49 for standard MGD77 ASCII table (with extension .mgd77), c for
50 the new MGD77+ netCDF format (with extension .nc), m for the new
51 MGD77T format (extension .m77t) and t for a plain ASCII tab-sep‐
52 arated table dump (with extension .dat). Use -FC to recover the
53 original MGD77 setting from the MGD77+ file [Default will apply
54 any E77 corrections encoded in the file].
55
56 -T[+]a|c|m |t
57 Specifies the format of the output (To) files. Choose from a for
58 standard MGD77 ASCII table (with extension .mgd77), c for the
59 new MGD77+ netCDF format (with extension .nc), m for the new
60 MGD77T format (extension .m77t) and t for a plain ASCII tab-sep‐
61 arated table dump (with extension .dat). We will refuse to cre‐
62 ate the file(s) if they already exist in the current directory.
63 Prepend + to override this policy.
64
66 -C Convert from NGDC two-file data sets *.h77, *.a77 to single file
67 *.mgd77. No other options (except -V) are allowed. Give one or
68 more names of *.h77 files, *.a77 files, or just the file pre‐
69 fixes.
70
71 -D By default, the storage types used in a MGD77+ netCDF file
72 greatly exceed the precision imposed by the ASCII MGD77 format.
73 However, for the five items faa, eot, mag, diur and msd we use
74 2-byte integers with implied precisions of 0.1 mGal, 0.1 nTesla,
75 and 1 m as in the MGD77 format. It is possible that at some
76 point these items will need to be stored as 4-byte ints which
77 would allow precisions of 10 fTesla, 1 nGal, and 0.01 mm,
78 respectively. This option activates such storage [Default uses
79 2-byte integers].
80
81 -L[w][e][+]
82 Set the level of verification reporting [none] and where to send
83 such reports [stderr]. Append a combination of w for warnings, e
84 for errors, and + to send such log information to stdout.
85
86 -V[level] (more ...)
87 Select verbosity level [c].
88
89 -^ or just -
90 Print a short message about the syntax of the command, then
91 exits (NOTE: on Windows just use -).
92
93 -+ or just +
94 Print an extensive usage (help) message, including the explana‐
95 tion of any module-specific option (but not the GMT common
96 options), then exits.
97
98 -? or no arguments
99 Print a complete usage (help) message, including the explanation
100 of all options, then exits.
101
103 To convert a large set of a77,h77 pairs to proper mgd77 files, try
104
105 gmt mgd77convert -C *.h77
106
107 To convert 01010047.mgd77 and 01010008.mgd77 to new netCDF .nc files,
108 and capture all verification messages, try
109
110 gmt mgd77convert 01010047 01010008 -Fa -Tc -V -Lew+ > log.lis
111
112 To convert 01010047.nc back to MGD77 ASCII and make sure it is identi‐
113 cal to the original file, try (Bourne shell syntax)
114
115 orig=`gmt mgd77path 01010047 -Ic`
116 gmt mgd77convert 01010047 -Fc -Ta -V
117 diff $orig 01010047.mgd77
118
119 To convert 01010047.nc to a plain ASCII table for manual editing, over‐
120 writing any existing table, try
121
122 gmt mgd77convert 01010047 -Fc -T+t -V
123
124 To recover the original NGDC MGD77 version of 01020051.nc and ignore
125 any E77 corrections, use
126
127 gmt mgd77convert 01020051 -FC -Ta -V
128
130 mgd77convert handles four different formats. (1) NGDC has now started
131 to use the new tab-delimited version of the MGD77 data format, called
132 MGD77T. In addition to all the info in old MGD77 files it contains a
133 few more quality flags for grav, mag, and bathymetry. (2) The MGD77+
134 netCDF format was developed to facilitate the use of MGD77 data by sci‐
135 entists. It contains all the information of the original MGD77 file and
136 if you convert back and forth you end up with the original. However,
137 file sizes are typically ~30% of the original ASCII format and is much
138 faster to operate on. (3) The MGD77 ASCII tables are the traditional
139 standard for distribution of underway geophysical data to and from the
140 NGDC data center, now superseded by MGD77T. Normally, only the
141 ship-operations people and the cruise PI might be involved in making an
142 MGD77 ASCII file for transmission to NGDC; users are more interested in
143 reading such files. (4) The plain ASCII tab-separated dump is available
144 for users who need to manually edit the content of a MGD77 file. This
145 is usually easier to do when the columns are tab-separated than when
146 they are all crunched together in the MGD77 punch-card format.
147
149 The MGD77+ netCDF files are CF-1.0 and COARDS compliant and can be
150 examined with general-purpose tools such as ncBrowse and ncView.
151
153 mgd77manage, mgd77list, mgd77info, mgd77track x2sys_init
154
156 ncBrowse, see http://www.epic.noaa.gov/java/ncBrowse/ ncView, see
157 http://meteora.ucsd.edu/~pierce/ncview_home_page/ The Marine Geophysi‐
158 cal Data Exchange Format - "MGD77", see
159 http://www.ngdc.noaa.gov/mgg/dat/geodas/docs/mgd77.txt
160
162 2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
163
164
165
166
1675.4.5 Feb 24, 2019 MGD77CONVERT(1)