MetOffice / cube_helper

A Python module, for easier manipulation of Cubes with Iris
https://cube-helper.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Time constraints on ch.load alter the time origin #10

Open TheElectricFlock opened 4 years ago

TheElectricFlock commented 4 years ago

Using a constraint on time when loading a cube with ch.load() results in cube_helper altering the origin time of the resultant cube. I.e: >>> historical_constraint = iris.Constraint(time = lambda cell: cell.point.year > 1925 and cell.point.year < 2013) >>> cube = ch.load(hist_fnames, constraints=historical_constraint)

cube dim coordinates differ:

latitude coords var_name inconsistent

longitude coords var_name inconsistent

time coords long_name inconsistent

cube attributes differ:

history attribute inconsistent

tracking_id attribute inconsistent

creation_date attribute inconsistent

cube time coordinates differ:

time start date inconsistent

Deleting history attribute from cubes

Deleting tracking_id attribute from cubes

Deleting creation_date attribute from cubes

New time origin set to days since 1920-01-01 00:00:00