If you are using
Navigator 4.x
or
Internet Explorer 4.x
or
Omni Web 4.x
, this site will not render
correctly!
SYNOPSIS
ncextract [-v var1[,...]] [-g att1[,...]] [-x gv] [-e var,att1[,...]] [-
i var,att1[,...]] [-cns] in_cdf out_cdf
DESCRIPTION
This netCDF operator extracts a subset of the data from in_cdf and writes
it to out_cdf. One can specify either the subset to appear in the
output, or the subset to exclude from the output. If no options are
specified, then this operator copies the input netCDF to the output
netCDF (deleting superfluous dimensions). If the output netCDF
specification is the same as the input netCDF specification, then the
extraction is performed in-place. The new, output netCDF will only be
created if the program is successful.
Input dimensions that are not associated with any output variable will
not appear in the output netCDF. Note that this feature can be used to
remove superfluous dimensions from a netCDF (`ncextract in_cdf').
OPTIONS
-v Variable-set. The set of variables (to be included or excluded) is
the (possibly empty set) var1,... This option may be specified more
than once. As a convenience, not specifying this option is
equivalent to specifying all variables.
-g Global-attribute set. The set of global-attributes (to be extracted
or excluded) is the (possibly empty set) att1,... This option may be
specified more than once. As a convenience, not specifying this
option is equivalent to specifying all global-attributes.
-x gv
Exclude the set of global-attributes (g) and/or variables (v) from
the output. (The `g' and `v' may be specified together or
separately.) In this mode, those entities (variables or global-
attributes) which are in their respective sets will not appear in the
output; all others will. The default mode is include, which extracts
from the input only those entities that are in their respective sets.
-e Exclude attributes. The attributes att1,... of variable var will not
appear in the output. This option may be specified more than once.
-i Include attributes. The attributes att1,... of variable var will
appear in the output if the variable itself will. This option may be
specified more than once.
-c Include coordinate-variables. All coordinate-variables associated
with the dimensions of the output variables will also appear in the
output.
netCDF.
EXAMPLES
Delete, in-place, any superfluous dimensions in netCDF `foo.bar':
ncextract foo.bar
Create netCDF `out_cdf' containing only variables `one', and `two' from
netCDF `in_cdf'; do not copy any global-attributes, but do create an
output history global-attribute.
ncextract -xg -v one,two in_cdf out_cdf
Create netCDF `out_cdf' containing all variables from netCDF `in_cdf'
except variables `one', and `two'; exclude from the output netCDF the
attribute `units' of variable `three' and only include the attributes
`scale' and offset' from variable `four':
ncextract -xv -v one,two -A three,units -a four,scale,offset in_cdf out_cdf
FILES
*.tnc Temporary output netCDF. If all goes well, the temporary output
netCDF will be renamed to the requested output netCDF.
SEE ALSO
netcdf(1).
BUGS
The constructed, temporary output netCDF specification might be too long
on some systems (the program checks for this).
MAINTAINER
Steve Emmerson <steve@unidata.ucar.edu>.
