Provided by: gmt_4.5.11-1build1_amd64
NAME
nc2xy - Converting netCDF column file(s) to ASCII xy data
SYNOPSIS
nc2xy files [ -Fvar1/var2/... ] [ -S[r] ] [ -V ] [ -fcolinfo ] [ -bo ]
DESCRIPTION
nc2xy reads one or more netCDF files with column data and writes out those columns in ASCII format to standard output, so that they can be used by psxy, psxyz, or xyz2grd. Modify the precision of the ASCII output format by editing the D_FORMAT parameter in your .gmtdefaults4 file or use --D_FORMAT=value on the command line. files Names of netCDF files to be converted.
OPTIONS
-F Specify up to 10 names of the variables (separated by slashes) to be printed out. All variables to be 1-dimensional and be of equal length. When omited, the first two variables in the netCDF file will be printed. -S Suppress output for records with one or more NaN values [Default outputs all nodes]. Append r to reverse the suppression, i.e., only output the records with at least one NaN value. -V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. -bo Selects binary output. Append s for single precision [Default is d (double)]. Uppercase S or D will force byte-swapping. Optionally, append ncol, the number of desired columns in your binary output file. -f Special formatting of input and/or output columns (time or geographical data). Specify i or o to make this apply only to input or output [Default applies to both]. Give one or more columns (or column ranges) separated by commas. Append T (absolute calendar time), t (relative time in chosen TIME_UNIT since TIME_EPOCH), x (longitude), y (latitude), or f (floating point) to each column or column range item. Shorthand -f[i|o]g means -f[i|o]0x,1y (geographic coordinates). See also TIME COORDINATES below.
TIME COORDINATES
Time coordinates in netCDF files will be recognized as such. The variable's unit attribute is parsed to determine the unit and epoch of the time coordinate in the grid. Values are then converted to the internal time system specified by TIME_UNIT and TIME_EPOCH in the .gmtdefaults file or on the command line. The default output is relative time in that time system, or absolute time when using the option -f0T, -f1T, etc.
EXAMPLES
To print out latitude, longitude and height in a netCDF file as ASCII records, while suppressing all NaN values: nc2xy -F lat/lon/height -S trackfile.nc > trackfile.xy
SEE ALSO
gmtdefaults(1), GMT(1), psxy(1), psxyz(1), xyz2grd(1)