Merges NetCDF files across one or more dimensions.
ncmerge is a program for merging two or more netCDF
files along all their (common!) coordinate variables
(a.k.a. axes).
It is implicitly assumed that each netCDF file have the same
A valid command line has the format:
ncmerge [-v [-v [...]]] [-c | -C] [-h] [-f] [-H] [-M] [-t] [-U] in1.nc [in2.nc ...] out.nc
Use "ncmerge -V" for help.
Description of options:
-v: Increase verboseness. Default is silent.
More "-v" options mean more output.
-c: Assume CONTIGUOUS data. Data from no two files are (at
least along the fastest varying dimension) inter spaced
in a "zebra" fashion. Contiguous data are faster to copy
than non-contiguous data. By default program will test if
data are contiguous or not, and use the fast method if
possible. Option "-c" suppresses the test to gain a
(possibly very slight) speedup.
This option cannot be used with "-C" or "-t".
If you are in doubt, you can use option "-t" to see if
your data meets the requirement.
-C: Assume NON-CONTIGUOUS data. Use slow copy method without
examining if a fast method i feasible. As the potential
again in speed is much larger than the price to pay for
the test, this option is NOT RECOMMENDED.
This option cannot be used with "-c" or "-t".
-h: No History. The default is to append a time stamp and the
command line to the history attribute of the output file.
Option "-h" suppresses this behavior, and is useful, for
instance if you want to see if two generated output files
are absolutely identical (e.g. using the "diff" UNIX
command) and you do not want the history attributes to
differ.
-f: Do not copy FILL values.
The default behavior is to copy all input file data to the
output file. Option "-f" suppresses the copy of FILL
values (the copy processes becomes more CPU intensive using
this option). As the output variables will be initialized
with fill, this is normally not needed. It may become
useful, however, if several input files contain values for
the same position of some variables (one of them might have
only FILL the other meaningful data). Then option "-f"
may prevent that meaningful data copied once are not
subsequently overwritten with fill from a different input
file.
Unless you really need it, this option is not recommended.
-H: High precision compare for coordinate variable values.
Standard behavior is to compare only (about) half the
significant digits of two floats. This option increases
the needed accuracy to (about) three quarters of the
significant digits.
-M: Much Memory (big M ;) available.
Merge an entire variable in memory before writing to file.
The default is to read, merge and write only a single
record of a single variable at a time. Option "M" tends
to decrease the time spent on write (and to some extent on
read), but it is not certain that the program as a whole
executes faster (this seems to be an issue with vectors
being larger than cache size). If you are planning on
merging similar files many times, then you may try to use
this option and observe the behavior. In other cases this
option is not recommended.
-t: Test if input data are contiguous (see option "-c") and
stop execution, if they are not (the default is to make
the test, but then to use slow copy without complaint if
data are found to be non-contiguous.
This option cannot be used with "-c" or "-C".
-U: Accept non-unique values in coordinate variables.
This violates the netCDF standard, but it may be
convenient in some special cases, such as when
coordinates are initialized to a certain value
and not always changed later (effectively this
"looks like" undef/FILL values in coordinate
variables.)
This option cannot be used with "-c".
This option is not recommended unless you really
need it.
Wiki: GETM Utils
Wiki: ncscatter
Anonymous