Provided by: pnetcdf-bin_1.12.2-1_amd64 bug

NAME

       ncmpidiff - compares two netCDF files in parallel

SYNOPSIS


       mpiexec -n np ncmpidiff [-b] [-q] [-h] [-v var1,...,varn] [-t diff,ratio] file1 file2

DESCRIPTION

       ncmpidiff runs in parallel on np number of MPI processes to compare the contents of the two files and re‐
       ports the first difference to the standard output.

       For  variables and attributes, it reports the array indices of the first element found different when op‐
       tion -t is not used. When option -t is used, it reports the element  with  the  largest  difference  that
       fails to meet the tolerance requirements.

       If neither argument -v nor -h is given besides the two file names, the entire files are compared.

       When  comparing  two  files  entirely, the difference between ncmpidiff and the Unix command diff is that
       ncmpidiff skips the gaps between variables. The gaps may occur when the alignment feature is used to cre‐
       ate a new file. This alignment allows to allocate a larger space for the file header and align the start‐
       ing file offsets of fixed-size variables (see API ncmpi__enddef and PnetCDF hints). Oftentimes, the  con‐
       tents  of  gaps  are non-zero arbitrary bytes. Thus, two netCDF files (of same or different sizes) can be
       reported identical by ncmpidiff but not by diff.

OPTIONS

       -b     Verbose mode - print results (same or different) for all components (file, header,  or  variables)
              in comparison

       -q     Quiet  mode  -  print nothing on the command-line output. This also disables verbose mode. When in
              quiet mode, users should check exit status. See below in "EXIT STATUS".

       -h     Compare file header only

       -v var1,...,varn
              Compare only the given list of variables (names separated by comma without space).

       -t diff,ratio
              Compare variables element-wisely with tolerance (diff and ratio separated by comma without space).
              diff is the absolute value of element-wise difference of any two variables.  ratio is the relative
              element-wise ratio, for instance, MAX(x,y) / MIN(x,y) - 1, where x is  an  array  element  from  a
              variable  in  the  first file and y is the corresponding array element of the same variable in the
              second file. Note when this option is used, the comparison will compare the entire  variables  and
              reports  the  element  with  the largest difference that fails to meet the both tolerance require‐
              ments.

EXIT STATUS

       An exit status of 0 means no differences were found, and 1 means some differences were  found.   Note  on
       VMS-based system, the exit status values are reversed.

SEE ALSO

       ncmpidump(1), cdfdiff(1), diff(1), pnetcdf(3)

DATE

       PNETCDF_RELEASE_DATE

Printed: 2025-07-18                      PnetCDF PNETCDF_RELEASE_VERSION                            ncmpidiff(1)