MetOffice / MetOffice/cube_helper

Time constraints on ch.load alter the time origin

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3
Forks
4
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue through cube_helper's ch.load() entry point with the shown historical_constraint and inspect how the loaded cube's time coordinate is handled. Done means applying the constraint no longer changes the cube's time origin or produces the reported coordinate and attribute inconsistencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.