mgd77convert − Translate between different formats of MGD77 files |
mgd77convert NGDC-ids −Fa|b|t −T[+]a|b|t [ −L[w][e][+] ] [ −V ] |
mgd77convert reads versions of MGD77 files and writes the same data in (probably) another format to a new file in the current directory. |
NGDC-ids |
Can be one or more MGD77 8-character cruise identifiers. To give a list of names, use ‘cat cruises.lis‘. The ".mgd77" or ".nc" extensions will automatically be appended, if needed (use −I to ignore certain 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 $GMTHOME/share/mgd77]. |
−F |
Specifies the format of the input (From) files. Choose from a for standard MGD77 ASCII table (with extension .mgd77), b for the new MGD77+ netCDF format (with extension .nc), and t for a plain ASCII tab-separated table dump (with extension .dat). |
||
−T |
Specifies the format of the output (To) files. Choose from a for standard MGD77 ASCII table (with extension .mgd77), b for the new MGD77+ netCDF format (with extension .nc), and t for a plain ASCII tab-separated table dump (with extension .dat). We will refuse to create the file(s) if they already exist in the current directory. Prepend + to override this policy. |
No space between the option flag and the associated arguments. |
−L |
Set the level of verification reporting [none] and where to send such reports [stderr]. Append a combination of w for warnings, e for errors, and + to send such log information to stdout. |
||
−V |
Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. |
To convert 01010047.mgd77 and 01010008.mgd77 to new netCDF .nc files, and capture all verification messages, try mgd77convert 01010047 01010008 −Fa −Tc −V −Lew+ > log.lis To convert 01010047.nc back to MGD77 ASCII and make sure it is identical to the original file, try (Bourne shell syntax) orig=‘mgd77path 01010047
−Ic‘ To convert 01010047.nc to a plain ASCII table for manual editing, overwriting any existing table, try mgd77convert 01010047 −Fc −T+t −V |
mgd77convert handles three different formats. (1) The MGD77 ASCII tables are the established standard for distribution of underway geophysical data to and from the NGDC data center. Normally, only the ship-operations people and the cruise PI might be involved in making an MGD77 ASCII file for transmission to NGDC; users are more interested in reading such files. (2) The MGD77+ netCDF format was developed to fascilitate the use of MGD77 data by scientists. It contains all the information of the original MGD77 file and if you convert back and forth you end up with the original. However, file sizes are typically ~30% of the original ASCII format and is much faster to operate on. (3) The plain ASCII tab-separated dump is available for users who need to manually edit the content of a MGD77 file. This is usually easier to do when the columns are tab-separated than when they are all crunched together in the MGD77 punch-card format. |
The MGD77+ netCDF files are CF-1.0 and COARDS compliant and can be examined with general-purpose tools such as ncBrowse and ncView. |
mgd77manage(l), mgd77list(l), mgd77sample(l), mgd77track(l) x2sys_init(l) |
Wessel, P., and W. H. F. Smith, 2005, The Generic Mapping
Tools (GMT) version 4.1 Technical Reference & Cookbook,
SOEST/NOAA. |