Changes between Version 6 and Version 7 of Documentation/UserGuide/DifferencesNetcdf


Ignore:
Timestamp:
2019-10-16T15:32:58+02:00 (5 years ago)
Author:
alanso
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/DifferencesNetcdf

    v6 v7  
    2323 
    2424DISADVANTAGE: you only know whether the files are identical or not. If not, you have no idea which fields are different. 
     25 
     26=== Matlab === 
     27 
     28The matlab function nccmp are able to compare all variables contained within two netcdf files. The original version can be found here: https://fr.mathworks.com/matlabcentral/fileexchange/47857-comparing-two-netcdf-files. 
     29I have made some small modifications such that the information produced by the script are put into a file instead of printed to the screen. The update version can be found here:/ccc/work/cont003/dofoco/dofoco/SCRIPTS/debug  
     30 
     31Run the function by typing: 
     32{{{ 
     33NCCMP(ncfile1,ncfile2,tolerance,forceCompare) 
     34}}} 
     35Tolerance is if you allow some variation in the variables between the two files. We want identical files thus put [] here. 
     36 
     37forceCompare can be set to true or false.  
     38        True - write all occurrences of differences in a variable (specifically gives all the indices) to the file: all_diff.txt.  
     39 
     40        False - only write if there is differences in a variable and its first occurrence of such differences to the file: first_diff.txt.  
     41 
     42For global simulation the True option can produce a large file and the information might be hard to process, if there are many differences between the compared files. In addition, the True option can make the much script slower. However, for small simulation the true option might be very useful.