Looks like the code to check diffs for dim coords and aux coords is near identical - could you consider factoring these bits into their own function?