Useful Tools: Difference between revisions
Line 203: | Line 203: | ||
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: | ''''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 as seen above. Thus, any tests you might have that depend on the return of cmp for binary need to be altered for NetCDF4. One possible formulation is: | ||
set NUMDIFF = `cdo -s diffn | grep differ | awk '{print $1}'` | |||
if ( $NUMDIFF == 0 ) then | |||
success | |||
else | |||
failure | |||
endif | |||
=== Extract fields(s) from a file === | === Extract fields(s) from a file === |