Changes between Version 3 and Version 4 of Documentation/UserGuide/DifferencesNetcdf
- Timestamp:
- 2014-12-11T19:34:04+01:00 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/UserGuide/DifferencesNetcdf
v3 v4 1 1 = How to check whether two netcdf files are identical = 2 3 === cdo diffv === 2 4 3 5 Rather than comparing plots, its faster and more precise to compare whether two netcdf files (i.e. a history or restart file between 2 model versions) are numerically identical. The follow command works on asterix and obelix … … 6 8 cdo diffv path_file_1 path_file_2 > output_file_name.txt 7 9 }}} 10 ADVANTAGE: the output file tells you which fields are different. Be aware, though that this method works best for smaller netCDF files. If your history file is more than a few megabytes, the output text file may be many hundreds of megabytes. In that case, the md5sum command may be a better option. 8 11 9 Be aware, though that this method works best for smaller netCDF files. If your history file is more than a few megabytes, the output text file may be many hundreds of megabytes. In that case, using an analysis package such as IDL to calculate the differences between variables is better. 12 === md5sum === 13 14 If you expect that the files are identical (bit by bit) you can use 15 {{{ 16 md5sum path_file 17 }}} 18 as a result you will get a code. Run the same command on the second file and only when the code is identical for both files, the files are exactly the same. 19 20 DISADVANTAGE: you only know whether the files are identical or not. If not, you have no idea which fields are different.