This file is indexed.

/usr/share/doc/gmt/html/man/mgd77manage.html is in gmt-doc 4.5.12-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<!-- Creator     : groff version 1.22.2 -->
<!-- CreationDate: Thu Feb 27 18:14:47 2014 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title>MGD77MANAGE</title>

</head>
<body bgcolor="#ffffff">

<h1 align="center">MGD77MANAGE</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#DISCUSSION">DISCUSSION</a><br>
<a href="#CREDITS">CREDITS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#REFERENCES">REFERENCES</a><br>

<hr>


<h2>NAME
<a name="NAME"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">mgd77manage
&minus; Manage extra columns in MGD77+ files</p>

<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>mgd77manage</b>
<i>NGDC-ids</i> [
<b>&minus;A</b>[<b>+</b>]<b>a</b>|<b>c</b>|<b>d</b>|<b>D</b>|<b>e</b>|<b>E</b>|<b>g</b>|<b>i</b>|<b>n</b>|<b>t</b>|<b>T</b><i>fileinfo</i>
] [ <b>&minus;Cf</b>|<b>g</b>|<b>e</b> ] [
<b>&minus;D</b><i>abbrev1,abbrev2,...</i> ] [
<b>&minus;E</b><i>empty</i> ] [ <b>&minus;F</b> ] [
<b>&minus;I</b><i>abbrev</i>/<i>name</i>/<i>unit</i>/<b>t</b>/<i>scale</i>/<i>offset</i>/<i>comment</i>
] [ <b>&minus;Ne</b>|<b>k</b>|<b>m</b>|<b>n</b> ] [
<b>&minus;Q</b>[<b>b</b>|<b>c</b>|<b>l</b>|<b>n</b>][[<b>/</b>]<i>threshold</i>]
] [ <b>&minus;V</b> ] [
<b>&minus;bi</b>[<b>s</b>|<b>S</b>|<b>d</b>|<b>D</b>[<i>ncol</i>]|<b>c</b>[<i>var1</i><b>/</b><i>...</i>]]
]</p>

<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>mgd77manage</b>
deals with maintaining extra custom columns in MGD77+ netCDF
files. You can either delete one or more columns, add a new
column, update an existing column with new data, or supply
error correction information (*.e77 files). New data may
come from a table (ASCII unless <b>&minus;b</b> is used), be
based on existing columns and certain theoretical
expressions, or they may be obtained by sampling a grid
(choose between GMT grid or a Sandwell/Smith Mercator *.img
grid) along track. The new data will be appended to the
MGD77+ file in the form of an extra data column of specified
type. The data file will be modified; no new file will be
created. For the big issues, see the DISCUSSION section
below. <i><br>
NGDC-ids</i></p>

<p style="margin-left:22%;">Can be one or more of five
kinds of specifiers: <br>
1) 8-character NGDC IDs, e.g., 01010083, JA010010etc., etc.
<br>
2) 2-character &lt;agency&gt; codes which will return all
cruises from each agency. <br>
3) 4-character &lt;agency&gt;&lt;vessel&gt; codes, which
will return all cruises from those vessels. <br>
4) =&lt;list&gt;, where &lt;list&gt; is a table with NGDC
IDs, one per line. <br>
5) If nothing is specified we return all cruises in the data
base. <br>
(See mgd77info <b>&minus;L</b> for agency and vessel codes).
The &quot;.mgd77&quot; or &quot;.nc&quot; extensions will
automatically be appended, if needed (use <b>&minus;I</b> to
ignore certain file types). Cruise files will be looked for
first in the current directory and second in all directories
listed in <b>$MGD77_HOME</b>/mgd77_paths.txt [If
<b>$MGD77_HOME</b> is not set it will default to
<b>$GMT_SHAREDIR</b>/mgd77].</p>

<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">No space
between the option flag and the associated arguments</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;A</b></p></td>
<td width="8%"></td>
<td width="78%">


<p>Add a new data column. If an existing column with the
same abbreviation already exists in the file we will
cowardly refuse to update the file. Specifying
<b>&minus;A+</b> overcomes this reluctance (However,
sometimes an existing column cannot be upgraded without
first deleting it; if so you will be warned). Select a
column source code among <b>a</b>, <b>c</b>, <b>d</b>,
<b>D</b>, <b>e</b>, <b>g</b>, <b>i</b>, <b>n</b>, <b>t</b>,
or <b>T</b>; detailed descriptions for each choice
follow:</p> </td></tr>
</table>

<p style="margin-left:22%; margin-top: 1em"><b>a</b> Append
filename of a single column table to add. File must have the
same number of rows as the MGD77+ file. If no file is given
we read from stdin instead.</p>

<p style="margin-left:22%; margin-top: 1em"><b>c</b> Create
a new column that derives from existing data or formulas for
corrections and reference fields. Append <b>c</b> for the
Carter corrections subtracted from uncorrected depths,
<b>g</b> for the IGF gravity reference field (a.k.a
&quot;normal gravity&quot;), <b>m</b> for the IGRF total
field magnetic reference field, and <b>r</b> for recomputed
magnetic anomaly (append 1 or 2 to specify which total field
column to use [1]). For gravity we choose the reference
field based on the parameter Gravity Theoretical Formula
Code in the cruise&rsquo;s MGD77 header. If this is not set
or is invalid we default to the IGF 1980. You can override
this behaviour by appending the desired code: 1 = Heiskanen
1924, 2 = International 1930, 3 = IGF1967, or 4 =
IGF1980.</p>

<p style="margin-left:22%; margin-top: 1em"><b>d</b> Append
filename of a two-column table with the first column holding
distances along track and the second column holding data
values. If no file is given we read from stdin instead.
Records with matching distances in the MGD77+ file will be
assigned the new values; at other distances we set them to
NaN. Alternatively, give upper case <b>D</b> instead and we
will interpolate the column at all record distances. See
<b>&minus;N</b> for choosing distance units and
<b>&minus;C</b> for choosing how distances are
calculated.</p>

<p style="margin-left:22%; margin-top: 1em"><b>e</b>
Expects to find an e77 error/correction log from
<b><A HREF="mgd77sniffer.html">mgd77sniffer</A></b> with the name <i>NGDC_ID</i>.e77 in the
current directory or in $MGD77_HOME/E77; this file will
examined and used to make modifications to the header
values, specify a systematic correction for certain columns
(such as scale and offset), specify that a certain anomaly
should be recalculated from the observations (e.g.,
recalculate mag from mtf1 and the latest IGRF), and add or
update the special column <b>flag</b> which may hold
bitflags (0 = GOOD, 1 = BAD) for each data field in the
standard MGD77 data set. Any fixed correction terms found
(such as needing to scale a field by 0.1 or 10 because the
source agency used incorrect units) will be written as
attributes to the netCDF MGD77+ file and applied when the
data are read by <b><A HREF="mgd77list.html">mgd77list</A></b>. Ephemeral corrections
such as those determined by crossover analysis are not kept
in the data files but reside in correction tables (see
<b><A HREF="mgd77list.html">mgd77list</A></b> for details). By default, the first
character of each header line in the e77 file (which is ?, Y
or N) will be consulted to see if the corresponding
adjustment should be applied. If any undecided settings are
found (i.i, ?) we will abort and make no changes. Only
records marked Y will be processed. You can override this
behavior by appending one or more modifiers to the
<b>&minus;Ae</b> command: <b>h</b> will ignore all header
corrections, <b>f</b> will ignore all fixed systematic trend
corrections, <b>n</b>, <b>v</b>, and <b>s</b> will ignore
bitflags pertaining to navigation, data values, and data
slopes, respectively. Use <b>&minus;A+e</b> to replace any
existing E77 corrections in the file with the new values.
Finally, e77 corrections will not be applied if the E77 file
has not been verified. Use <b>&minus;AE</b> to ignore the
verification status.</p>

<p style="margin-left:22%; margin-top: 1em"><b>g</b> Sample
a GMT geographic (lon, lat) grid along the track given by
the MGD77+ file using bicubic interpolation (however, see
<b>&minus;Q</b>). Append name of a GMT grid file.</p>

<p style="margin-left:22%; margin-top: 1em"><b>i</b> Sample
a Sandwell/Smith Mercator *.img grid along the track given
by the MGD77+ file using bicubic interpolation (however, see
<b>&minus;Q</b>). Append the img grid filename, followed by
the comma-separated data scale (typically 1 or 0.1), the IMG
file mode (0-3), and optionally the img grid max latitude
[80.738]. The modes stand for the following: (0) Img files
with no constraint code, returns data at all points, (1) Img
file with constraints coded, return data at all points, (2)
Img file with constraints coded, return data only at
constrained points and NaN elsewhere, and (3) Img file with
constraints coded, return 1 at constraints and 0
elsewhere.</p>

<p style="margin-left:22%; margin-top: 1em"><b>n</b> Append
filename of a two-column table with the first column holding
the record number (0 to nrows - 1) and the second column
holding data values. If no file is given we read from stdin
instead. Records with matching record numbers in the MGD77+
file will be assigned the new values; at other records we
set them to NaN.</p>

<p style="margin-left:22%; margin-top: 1em"><b>t</b> Append
filename of a two-column table with the first column holding
absolute times along track and the second column holding
data values. If no file is given we read from stdin instead.
Records with matching times in the MGD77+ file will be
assigned the new values; at other times we set them to NaN.
Alternatively, give upper case <b>T</b> instead and we will
interpolate the column at all record times.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p style="margin-top: 1em"><b>&minus;C</b></p></td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em">Append a one-letter code to
select the procedure for along-track distance calculation
when using <b>&minus;Ad</b>|<b>D</b> (see <b>&minus;N</b>
for selecting distance units):</p></td></tr>
</table>

<p style="margin-left:22%;"><b>f</b> Flat Earth distances.
<b><br>
g</b> Great circle distances [Default]. <b><br>
e</b> Geodesic distances on current GMT ellipsoid.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">


<p style="margin-top: 1em"><b>&minus;D</b></p></td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em">Give a comma-separated list of
column abbreviations that you want to delete from the MGD77+
files. Do NOT use this option to remove columns that you are
replacing with new data (use <b>&minus;A+</b> instead).
Because we cannot remove variables from netCDF files we must
create a new file without the columns to be deleted. Once
the file is successfully created we temporarily rename the
old file, change the new filename to the old filename, and
finally remove the old, renamed file.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">


<p><b>&minus;E</b></p></td>
<td width="7%"></td>
<td width="78%">


<p>Give a single character that will be repeated to fill
empty string values, e.g., &rsquo;9&rsquo; will yield a
string like &quot;99999...&quot; [9].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">


<p><b>&minus;F</b></p></td>
<td width="7%"></td>
<td width="78%">


<p>Force mode. When this mode is active you are empowered
to delete or replace even the standard MGD77 set of columns.
You better know what you are doing!</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">


<p><b>&minus;I</b></p></td>
<td width="7%"></td>
<td width="78%">


<p>In addition to file information we must specify
additional information about the extra column. Specify a
short (16 char or less, using lower case letters, digits, or
underscores only) abbreviation for the selected data, its
more descriptive name, the data unit, the data type
1-character code (<b>b</b>yte, <b>s</b>hort, <b>f</b>loat,
<b>i</b>nt, <b>d</b>ouble, or <b>t</b>ext) you want used for
storage in the netCDF file, any scale and offset we should
apply to the data to make them fit inside the range implied
by the chosen storage type, and a general comment (&lt; 128
characters) regarding what these data represent. Note: If
text data type is selected then the terms &quot;values&quot;
in the <b>&minus;A</b> discussion refer to your text data.
Furthermore, the discussion on interpolation does not apply
and the NaN value becomes a &quot;no string&quot; value (see
<b>&minus;E</b> for what this is). Place quotes around terms
with more than one word (e.g., &quot;Corrected
Depth&quot;).</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">


<p><b>&minus;N</b></p></td>
<td width="7%"></td>
<td width="78%">


<p>Specify the distance unit used when using
<b>&minus;Ad</b>|<b>D</b> by appending <b>e</b> (meter),
<b>k</b> (km), <b>m</b> (miles), or <b>n</b> (nautical
miles). [Default is <b>&minus;Nk</b> (km)].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">


<p><b>&minus;Q</b></p></td>
<td width="7%"></td>
<td width="78%">


<p>Quick mode, use bilinear rather than bicubic
interpolation [Default]. Alternatively, select the
interpolation mode by adding <b>b</b> for B-spline
smoothing, <b>c</b> for bicubic interpolation, <b>l</b> for
bilinear interpolation or <b>n</b> for nearest-neighbor
value. Optionally, append <i>threshold</i> in the range
[0,1]. This parameter controls how close to nodes with NaN
values the interpolation will go. E.g., a <i>threshold</i>
of 0.5 will interpolate about half way from a non-NaN to a
NaN node, whereas 0.1 will go about 90% of the way, etc.
[Default is 1, which means none of the (4 or 16) nearby
nodes may be NaN]. <b>&minus;Q0</b> will just return the
value of the nearest node instead of interpolating. This is
the same as using <b>&minus;Qn</b>. Only relevant when
<b>&minus;Ag</b>|<b>i</b> is selected.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">


<p><b>&minus;V</b></p></td>
<td width="7%"></td>
<td width="78%">


<p>Selects verbose mode, which will send progress reports
to stderr [Default runs &quot;silently&quot;].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">


<p><b>&minus;bi</b></p></td>
<td width="7%"></td>
<td width="78%">


<p>Selects binary input. Append <b>s</b> for single
precision [Default is <b>d</b> (double)]. Uppercase <b>S</b>
or <b>D</b> will force byte-swapping. Optionally, append
<i>ncol</i>, the number of columns in your binary input file
if it exceeds the columns needed by the program. Or append
<b>c</b> if the input file is netCDF. Optionally, append
<i>var1</i><b>/</b><i>var2</i><b>/</b><i>...</i> to specify
the variables to be read. This applies to the input 1- or
2-column data files specified under some of the
<b>&minus;A</b> options. The binary input option is only
available for numerical data columns.</p></td></tr>
</table>

<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">To append
Geosat/ERS-1 gravity version 11.2 as an extra data column in
the cruises 01010047.nc and 01010008.nc, storing the values
as mGal*10 in a 2-byte short integer, try</p>


<p style="margin-left:11%; margin-top: 1em"><b>mgd77manage</b>
01010047 01010008 <b>&minus;Ai</b> 10/1/grav.11.2.img
<b>&minus;I</b> satgrav/&quot;Geosat/ERS-1
gravity&quot;/&quot;mGal&quot;/s/10/0/&quot;Sandwell/Smith
version 11.2&quot; <b>&minus;V</b></p>

<p style="margin-left:11%; margin-top: 1em">To append a
filtered version of magnetics as an extra data column of
type float for the cruise 01010047.nc, and interpolate the
filtered data at the times given in the MGD77+ file, try</p>


<p style="margin-left:11%; margin-top: 1em"><b>mgd77manage</b>
01010047 <b>&minus;AT</b> mymag.tm <b>&minus;I</b>
filtmag/&quot;Intermediate-wavelength magnetic
residuals&quot;/&quot;nTesla&quot;/f/1/0/&quot;Useful for
looking for isochrons&quot; <b>&minus;V</b></p>

<p style="margin-left:11%; margin-top: 1em">To delete the
existing extra columns satfaa, coastdist, and satvgg from
all MGD77+ files, try</p>


<p style="margin-left:11%; margin-top: 1em"><b>mgd77manage</b>
&lsquo;cat allmgd77.lis&lsquo; <b>&minus;D</b>
satfaa,coastdist,satvgg <b>&minus;V</b></p>

<p style="margin-left:11%; margin-top: 1em">To create a
4-byte float column with the correct IGRF reference field in
all MGD77+ files, try</p>


<p style="margin-left:11%; margin-top: 1em"><b>mgd77manage</b>
&lsquo;cat allmgd77.lis&lsquo; <b>&minus;Acm &minus;I</b>
igrf/&quot;IGRF reference
field&quot;/&quot;nTesla&quot;/f/1/0/&quot;IGRF version 10
for 1990-2010&quot; <b>&minus;V</b></p>

<h2>DISCUSSION
<a name="DISCUSSION"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>1.
Preamble</b> <br>
The mgd77 supplement is an attempt to (1) improve on the
limited functionality of the existing mgg supplement, (2)
incorporate some of the ideas from Scripps&rsquo; gmt+
supplement by allowing extra data columns, and (3) add new
capabilities for managing marine geophysical trackline data
stored in an architecture-independent CF-1.0- and
COARDS-compliant netCDF file format. Here are some of the
underlying ideas and steps you need to take to maintain your
files.</p>

<p style="margin-left:11%; margin-top: 1em"><b>2.
Introduction</b> <br>
Our starting point is the MGD77 ASCII data files distributed
from NGDC on CD-ROMS, DVD-ROMS, and via FTP. Using Geodas to
install the files locally we choose the &quot;Carter
corrected depth&quot; option which will fill in the depth
column using the two-way traveltimes and the Carter tables
if twt is present. This step yields ~5000 individual cruise
files. Place these in one or more sub-directories of your
choice, list these sub-directories (one per line) in the
file mgd77_paths.txt, and place that file in the directory
pointed to by <b>$MGD77_HOME</b>; if not set this variable
defaults to <b>$GMT_SHAREDIR</b>/mgd77.</p>

<p style="margin-left:11%; margin-top: 1em"><b>3.
Conversion</b> <br>
Convert the ASCII MGD77 files to the new netCDF MGD77+
format using <b><A HREF="mgd77convert.html">mgd77convert</A></b>. Typically, you will make a
list of all the cruises to be converted (with or without
extension), and you then run</p>


<p style="margin-left:11%; margin-top: 1em"><b>mgd77convert
&minus;Fa &minus;Tc &minus;V &minus;Lwe+</b> &lsquo;cat
cruises.lis&lsquo; &gt; log.txt</p>

<p style="margin-left:11%; margin-top: 1em">The verbose
settings will ensure that all problems found during
conversion will be reported. The new *.nc files may also be
placed in one or more separate sub-directories and these
should also be listed in the mgd77_paths.txt file. We
suggest you place the directories with *.nc files ahead of
the *.mgd77 directories. When you later want to limit a
search to files of a certain extension you should use the
<b>&minus;I</b> option.</p>

<p style="margin-left:11%; margin-top: 1em"><b>4. Adding
new columns <br>
mgd77manage</b> will allow you to add additional data
columns to your *.nc files. These can be anything, including
text strings, but most likely are numerical values sampled
along the track from a supplied grid or an existing column
that have been filtered or manipulated for a particular
purpose. The format supports up to 32 such extra columns.
See this man page for how to add columns. You may later
decide to remove some of these columns or update the data
associated with a certain column. Data extraction tools such
as <b><A HREF="mgd77list.html">mgd77list</A></b> can be used to extract a mix of standard
MGD77 columns (navigation, time, and the usual geophysical
observations) and your custom columns.</p>

<p style="margin-left:11%; margin-top: 1em"><b>5. Error
sources</b> <br>
Before we discuss how to correct errors we will first list
the different classes of errors associated with MGD77 data:
(1) Header record errors occur when some of the information
fields in the header do not comply with the MGD77
specification or required information is missing.
<b><A HREF="mgd77convert.html">mgd77convert</A></b> will list these errors when the extended
verbose setting is selected. These errors typically do not
affect the data and are instead errors in the
<i>meta-data</i> (2) Fixed systematic errors occur when a
particular data column, despite the MGD77 specification, has
been encoded incorrectly. This usually means the data will
be off by a constant factor such as 10 or 0.1, or in some
cases even 1.8288 which converts fathoms to meters. (3)
Unknown systematic errors occur when the instrument that
recorded the data or the processing that followed introduced
signals that appear to be systematic functions of time along
track, latitude, heading, or some other combination of terms
that have a physical or logical explanation. These terms may
sometimes be resolved by data analysis techniques such as
along-track and across-track investigations, and will result
in correction terms that when applied to the data will
remove these unwanted signals in an optimal way. Because
these correction terms may change when new data are
considered in their determination, such corrections are
considered to be ephemeral. (4) Individual data points or
sequences of data may violate rules such as being outside of
possible ranges or in other ways violate sanity.
Furthermore, sequences of points that may be within valid
ranges may give rise to data gradients that are
unreasonable. The status of every point can therefore be
determined and this gives rise to bitflags GOOD or BAD. Our
policy is that error sources 1, 2, and 4 will be corrected
by supplying the information as meta-data in the relevant
*.nc files, whereas the corrections for error source 3
(because they will constantly be improved) will be
maintained in a separate list of corrections.</p>

<p style="margin-left:11%; margin-top: 1em"><b>6. Finding
errors</b> <br>
The <b><A HREF="mgd77sniffer.html">mgd77sniffer</A></b> is a tool that does a thorough
along-track sanity check of the original MGD77 ASCII files
and produces a corresponding *.e77 error log. All problems
found are encoded in the error log, and recommended fixed
correction terms are given, if needed. An analyst may verify
that the suggested corrections are indeed valid (we only
want to correct truly obvious unit errors), edit these error
logs and modify such correction terms and activate them by
changing the relevant code key (see <b><A HREF="mgd77sniffer.html">mgd77sniffer</A></b> for
more details). <b>mgd77manage</b> can ingest these error
logs and (1) correct bad header records given the
suggestions in the log, (2) insert scale/offset correction
terms to be used when reading certain columns, and (3)
insert any bit-flags found. Rerun this step if you later
find other problems as all E77 settings or flags will be
recreated based on the latest E77 log.</p>

<p style="margin-left:11%; margin-top: 1em"><b>7. Error
corrections</b> <br>
The extraction program <b><A HREF="mgd77list.html">mgd77list</A></b> allows for
corrections to be applied on-the-fly when data are
requested. First, data with BAD bitflags are suppressed.
Second, data with fixed systematic correction terms are
corrected accordingly. Third, data with ephemeral correction
terms will have those corrections applied (if a correction
table is supplied). All of these steps require the presence
of the relevant meta-data and all can be overruled by the
user. In addition, users may add their own bitflags as
separate data columns and use <b><A HREF="mgd77list.html">mgd77list</A></b>&rsquo;s
logical tests to further dictate which data are suppressed
from output.</p>

<h2>CREDITS
<a name="CREDITS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The IGRF
calculations are based on a Fortran program written by Susan
Macmillan, British Geological Survey, translated to C via
f2c by Joaquim Luis, and adapted to GMT style by Paul
Wessel.</p>

<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><i><A HREF="mgd77convert.html">mgd77convert</A></i>(1),
<i><A HREF="mgd77list.html">mgd77list</A></i>(1), <i><A HREF="mgd77info.html">mgd77info</A></i>(1),
<i><A HREF="mgd77sniffer.html">mgd77sniffer</A></i>(1) <i><A HREF="mgd77track.html">mgd77track</A></i>(1)
<i><A HREF="x2sys_init.html">x2sys_init</A></i>(1)</p>

<h2>REFERENCES
<a name="REFERENCES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">Wessel, P., and
W. H. F. Smith, 2014, The Generic Mapping Tools (GMT)
version 4.5.12 Technical Reference &amp; Cookbook,
SOEST/NOAA. <br>
Wessel, P., and W. H. F. Smith, 1998, New, Improved Version
of Generic Mapping Tools Released, EOS Trans., AGU, 79 (47),
p. 579. <br>
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released, EOS Trans., AGU, 76 (33), p.
329. <br>
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released,
http://www.agu.org/eos_elec/95154e.html, Copyright 1995 by
the American Geophysical Union. <br>
Wessel, P., and W. H. F. Smith, 1991, Free Software Helps
Map and Display Data, EOS Trans., AGU, 72 (41), p. 441. <br>
The Marine Geophysical Data Exchange Format -
&quot;MGD77&quot;, see
<i>http://www.ngdc.noaa.gov/mgg/dat/geodas/docs/mgd77.txt</i>
<br>
IGRF, see
<i>http://www.ngdc.noaa.gov/IAGA/vmod/igrf.html</i></p>
<hr>
</body>
</html>