max_diff_ncYou are here: home page →
max_diff_nc.
This is a program which compares two NetCDF files.
Only NetCDF variables of type nf90_float or
nf90_double are compared. The program either compares
variables with the same NetCDF ID (varid) or variables
with the same name. Compared variables are assumed to have the same
type and shape. For each such couple of variables, the program
computes the maximum of the absolute value of the difference, and the
maximum of the absolute value of the relative difference. The program
also tells you at what location (the subscript list of the array) the
maximum difference is reached.
There is a known problem in older versions of Gfortran, fixed in
version 4.4.5 of Gfortran. The program
max_diff_nc prints differences with the Fortran format
1pg7.1. Older versions of Gfortran produce wrong results
with this format. For example, according to the Fortran 95 standard,
printing the number 0.96 with the format 1pg7.1 should
give the same result than with format f3.0. Thus, the
result should be 1., but Gfortran produces the surprising
result 0. If you cannot use another compiler, a
work-around is to change 1pg7.1 to 1pg8.2 in
the file compare.f90.
-v for comparison
of a given variable. Generalized installation process to accomodate
version 4 of NetCDF.-i.