[SUP-205] grib_compare: what is relative difference? Is this expressed in %, fraction, ... ? Created: 12/Jun/12 Updated: 28/Jul/14 Resolved: 27/Jun/12 Status: Project: Component/s: Affects Version/s: Fix Version/s: Resolved Software Support GRIB None Type: Reporter: Resolution: Labels: Task Administrator Fixed question None Priority: Assignee: Votes: Major Daniel Varela Santoalla 0 Institution Type: Other Description Hi, I am trying to use the GRIB PI tool grib_compare. I am comparing statistically 2 different files and I would like to understand what absolute/relative difference mean. I take that absolute difference is in the units of the variable found different, but what is relative difference? Is this expressed in %, fraction, ... ? Thanks for your help, I have gone through the manual in your web site but can't find a description. Comments Comment by Paul Dando [ 27/Jun/12 ] Let's look at an example. % grib_compare -c data:n 2t_128_nearest.grib 2t_128_nearest_env.grib -- GRIB #1 -- shortName=2t paramId=167 stepRange=0 levelType=sfc level=0 packingType=grid_simple gridType=regular_gg -double [packedValues]: 131072 out of 131072 different max absolute diff. = 8.7258148193359375e+00, relative diff. = 0.0303396 max diff. element 34426: 2.87605209350585937500e+02 2.78879394531250000000e+02 tolerance=0.0000000000000000e+00 packingError: [0.000984192] [0.000984192] values max= [317.515] [317.528] min= [213.217] [213.172] In this case: max absolute diff = 287.605209350585937500 - 278.879394531250000000 = 8.7258148193359375e+00 relative diff. = (287.605209350585937500 278.879394531250000000)/287.605209350585937500 = 0.0303396 In other words: The maximum absolute difference is computed by comparing the difference for each value between the two fields and is in units of the field being compared. The relative difference is then the maximum absolute difference divided by the larger of the two values. It is dimensionless. Further examples can be found in the grib_api manual: http://www.ecmwf.int/publications/manuals/grib_api/grib_compare.html I hope that helps Paul Comment by Daniel Varela Santoalla [ 27/Jun/12 ] Hello Julia Please note Paul's answer on this issue. Do come back to us if you have any further question or any problem to access this link. http://software.ecmwf.int/issues/browse/SUP205?focusedCommentId=14489&page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel#comment-14489 Regards Daniel Varela Software Support Comment by Daniel Varela Santoalla [ 27/Jun/12 ] Answered Generated at Mon Mar 07 08:16:24 GMT 2016 using JIRA 6.4.11#64026sha1:78f6ec473a3f058bd5d6c30e9319c7ab376bdb9c.