Re: [netcdfgroup] how do I tell the version of an nccopy binary?

Hi Chris,

Unfortunately, the nccopy version is currently not available from the
binary.

However, if you invoke ncdump with no arguments from the directory that
nccopy is in, the ncdump version will be printed on the last line of the
resulting usage message, and that will correspond to the nccopy version.

There will be a fix for nccopy in the upcoming 4.3.3 release so that the
library version will be printed at the end of a usage message for nccopy,
as it already is for the ncdump and ncgen utilities.

If you don't have the associated ncdump utilities, you can still bracket
the versions of nccopy by what usage message gets printed when nccopy is
invoked with no arguments, because later versions supported more arguments.
 Here's usage messages from various versions:

netCDF 4.1.1:
nccopy [-k n] [-m n] infile outfile
  [-k n]    kind of netCDF format for output file, default same as input
    1 classic, 2 64-bit offset, 3 netCDF-4, 4 netCDF-4 classic model
  [-m n]    size in bytes of copy buffer
  infile    name of netCDF input file
  outfile   name for netCDF output file

netCDF 4.1.2, 4.1.3:
nccopy [-k n] [-d n] [-s] [-c chunkspec] [-u] [-m n] infile outfile
  [-k n]    specify kind of netCDF format for output file, default same as
input
    1 classic, 2 64-bit offset, 3 netCDF-4, 4 netCDF-4 classic model
  [-d n]    set deflation compression level, default same as input (0=none
9=max)
  [-s]      add shuffle option to deflation compression
  [-c chunkspec] specify chunking for dimensions, e.g. "dim1/N1,dim2/N2,..."
  [-u]      convert unlimited dimensions to fixed-size dimensions in output
copy
  [-m n]    set size in bytes of copy buffer, default is 5000000 bytes
  infile    name of netCDF input file
  outfile   name for netCDF output file

netCDF 4.2.0:
nccopy [-k n] [-d n] [-s] [-c chunkspec] [-u] [-m n] [-h n] [-e n] infile
outfile
  [-k n]    specify kind of netCDF format for output file, default same as
input
    1 classic, 2 64-bit offset, 3 netCDF-4, 4 netCDF-4 classic model
  [-d n]    set deflation compression level, default same as input (0=none
9=max)
  [-s]      add shuffle option to deflation compression
  [-c chunkspec] specify chunking for dimensions, e.g. "dim1/N1,dim2/N2,..."
  [-u]      convert unlimited dimensions to fixed-size dimensions in output
copy
  [-m n]    set size in bytes of copy buffer, default is 5000000 bytes
  [-h n]    set size in bytes of chunk_cache for chunked variables
  [-e n]    set number of elements that chunk_cache can hold
  infile    name of netCDF input file
  outfile   name for netCDF output file

netCDF 4.2.1:
nccopy [-k n] [-d n] [-s] [-c chunkspec] [-u] [-w] [-m n] [-h n] [-e n]
[-r] infile outfile
  [-k n]    specify kind of netCDF format for output file, default same as
input
    1 classic, 2 64-bit offset, 3 netCDF-4, 4 netCDF-4 classic model
  [-d n]    set deflation compression level, default same as input (0=none
9=max)
  [-s]      add shuffle option to deflation compression
  [-c chunkspec] specify chunking for dimensions, e.g. "dim1/N1,dim2/N2,..."
  [-u]      convert unlimited dimensions to fixed-size dimensions in output
copy
  [-w]      write whole output file from diskless netCDF on close
  [-m n]    set size in bytes of copy buffer, default is 5000000 bytes
  [-h n]    set size in bytes of chunk_cache for chunked variables
  [-e n]    set number of elements that chunk_cache can hold
  [-r]      read whole input file into diskless file on open (classic or
64-bit offset format only)
  infile    name of netCDF input file
  outfile   name for netCDF output file

netCDF 4.3.0, 4.3.1, 4.3.1.1, 4.3.2:
nccopy [-k n] [-d n] [-s] [-c chunkspec] [-u] [-w] [-[v|V] varlist] [-[g|G]
grplist] [-m n] [-h n] [-e n] [-r] infile outfile
  [-k n]    specify kind of netCDF format for output file, default same as
input
    1 classic, 2 64-bit offset, 3 netCDF-4, 4 netCDF-4 classic model
  [-d n]    set deflation compression level, default same as input (0=none
9=max)
  [-s]      add shuffle option to deflation compression
  [-c chunkspec] specify chunking for dimensions, e.g. "dim1/N1,dim2/N2,..."
  [-u]      convert unlimited dimensions to fixed-size dimensions in output
copy
  [-w]      write whole output file from diskless netCDF on close
  [-v var1,...] include data for only listed variables, but definitions for
all variables
  [-V var1,...] include definitions and data for only listed variables
  [-g grp1,...] include data for only variables in listed groups, but all
definitions
  [-G grp1,...] include definitions and data only for variables in listed
groups
  [-m n]    set size in bytes of copy buffer, default is 5000000 bytes
  [-h n]    set size in bytes of chunk_cache for chunked variables
  [-e n]    set number of elements that chunk_cache can hold
  [-r]      read whole input file into diskless file on open (classic or
64-bit offset format only)
  infile    name of netCDF input file
  outfile   name for netCDF output file

--Russ

On Tue, Aug 26, 2014 at 8:32 AM, Lynnes, Christopher S. (GSFC-6102) <
christopher.s.lynnes@xxxxxxxx> wrote:

> We’re seeing odd behavior with nccopy (one binary exec works for a
> particular URL, another doesn’t, another takes 100X too long…).
>
> Is there any way to tell what version of an nccopy binary I am running?
> —
> Christopher Lynnes   NASA/GSFC    301-614-5185
> “I love it when a plan comes together.” — Hannibal Smith
>
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
>
  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: