Useful Tools: Difference between revisions
Line 163: | Line 163: | ||
This tells us two things, the <tt>h5diff</tt> we have to use is slow and one should develop at lower-resolution if diffing restarts is part of your process. | This tells us two things, the <tt>h5diff</tt> we have to use is slow and one should develop at lower-resolution if diffing restarts is part of your process. | ||
==== Behavior when two files differ ==== | |||
All the above examples show two files that don't differ. If they do differ, CDO provides additional useful information like: | |||
For each pair of fields the operator prints one line with the following information: | |||
- Date and Time | |||
- Level, Gridsize and number of Missing values | |||
- Occurrence of coefficient pairs with different signs (S) | |||
- Occurrence of zero values (Z) | |||
- Maxima of absolute difference of coefficient pairs | |||
- Maxima of relative difference of non-zero coefficient pairs with equal signs | |||
- Parameter name | |||
as seen here: | |||
$ cdo diffn stock-G40U-CPU-2013Jun11-6hour-144.geosgcm_prog.20000415_0000z.nc4 stock-G40U-GPU-2013Jun11-6hour-144.geosgcm_prog.20000415_0000z.nc4 | $ cdo diffn stock-G40U-CPU-2013Jun11-6hour-144.geosgcm_prog.20000415_0000z.nc4 stock-G40U-GPU-2013Jun11-6hour-144.geosgcm_prog.20000415_0000z.nc4 | ||
Line 189: | Line 202: | ||
$ echo $? | $ echo $? | ||
0 | 0 | ||
''''NOTE'''': CDO returns a status of 0 any time it doesn't encounter an error. Thus, if two files are different, CDO will report differences, but the return status will still be 0 as cdo technically completed successfully: | |||