NatLabRockies / NatLabRockies/chronify

Support discontinuous time ranges

Open
#35 0 comments 0 reactions 1 assignee View on GitHub

@JensZack is already working on this.

Since Jan 15, 2025.

enhancement
Dominant language
Python
Stars
5
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Chronify time configs currently only support a single, continuous time range. We will likely need to support discontinuous ranges in dsgrid. An example is where a modeled dataset will have multiple weather years and model years. Suppose that model years are 2030, 2040, 2050 and weather years are 2012, 2018, and 2024. Chronify will ultimately have to check time consistency on the resulting dataset. Each of the the three model years will have the time ranges 2012-01-01 - 2012-12-31, 2018-01-01 - 2018-12-31, and 2024-01-01 - 2024-12-31.

We could change the current data models to allow multiple ranges or make a new data model that includes instances of the existing models, like this:

class ListTimeRange(TimeBaseModel):

    ranges: list[DatetimeRange] | list[AnnualTimeRange] | list[IndexTimeRange] | list[RepresentativePeriodTime]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.