Thank you Niall,
After running "iris.util.unify_time_units(cubes)" I see that the time coordinate in cubes[1].dim_coords has changed from 0 to 0.25 (as these are 6 hourly fields this seems correct). However, the cubes still won't merge. I tried "cubes[1].dim_coords[0].attributes = cubes[0].dim_coords[0].attributes" but this sets the time coordinate in cubes[1] back to 0, and still no luck with merging.
Can you see what I should chance manually to get these cubes to merge? (see code below)
Thanks in advance,
Scott
In [67]: cubes[0].dim_coords[0]
Out[68]: DimCoord(array([ 0.], dtype=float32), standard_name=None, units=Unit('days since 1979-01-01 00:00:00', calendar='gregorian'), long_name=u't', var_name='t', attributes={'time_origin': '01-JAN-1979:00:00:00'})
In [68]: cubes[1].dim_coords[0]
Out[67]: DimCoord(array([ 0.25],
dtype=float32), standard_name=None, units=Unit('days since 1979-01-01
00:00:00', calendar='gregorian'), long_name=u't', var_name='t',
attributes={'time_origin': '01-JAN-1979:06:00:00'})
In [69]: cubes.merge_cube()
---------------------------------------------------------------------------
MergeError Traceback (most recent call last)
/home/scott/ERAI_6hrly/<ipython-input-69-7d5141b128cf> in <module>()
----> 1 cubes.merge_cube()
/usr/local/lib/python2.7/dist-packages/Iris-1.7.1-py2.7.egg/iris/cube.pyc in merge_cube(self)
341 proto_cube = iris._merge.ProtoCube(self[0])
342 for cube in self[1:]:
--> 343 proto_cube.register(cube, error_on_mismatch=True)
344
345 # Extract the merged cube from the ProtoCube.
/usr/local/lib/python2.7/dist-packages/Iris-1.7.1-py2.7.egg/iris/_merge.pyc in register(self, cube, error_on_mismatch)
1235 coord_payload = self._extract_coord_payload(cube)
1236 match = coord_payload.match_signature(self._coord_signature,
-> 1237 error_on_mismatch)
1238 if match:
1239 # Register the cube as a source-cube for this ProtoCube.
/usr/local/lib/python2.7/dist-packages/Iris-1.7.1-py2.7.egg/iris/_merge.pyc in match_signature(self, signature, error_on_mismatch)
257 match = not bool(msgs)
258 if error_on_mismatch and not match:
--> 259 raise iris.exceptions.MergeError(msgs)
260 return match
261
MergeError: failed to merge into a single cube.