MetOffice / MetOffice/cube_helper
issues with extracting bounded sections of cubes (decouple _fix_partial_datetime())
- Dominant language
- Python
- Stars
- 3
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Proposals for a method to extract data from 2 specified points along the time bounds. This could potentially be quite complicated as it would mean de-coupling the lambda construction.
This will be done eventually but it would also require a similar lambda construction for the bounds function. A solution like the one below was originally proposed.
``def extract_bounds(cube, lower_bound, upper_bound):
constraint = iris.Constraint(
time=lambda cell: lower_bound >= cell.point <= upper_bound)
return extract(cube, constraint)``
Contributor guide
Research direction
Start by locating the existing extract and _fix_partial_datetime() entry points referenced in the issue, then compare their lambda construction with the proposed extract_bounds(cube, lower_bound, upper_bound) example. Clarify how bounded cube extraction and bounds handling should be decoupled; done means a decided approach that supports both specified time points and corresponding bounds behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100