NatLabRockies / NatLabRockies/H2Integrate

Feature request: leap year

Open
#766 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement framework
Dominant language
Python
Stars
26
Forks
44
Avg merge
3d 22h
Merged PRs (30d)
16

Description

Leap year

Data for leap years includes 8784 hours rather than the typical 8760. We do not have a way to handle this right now. We can work around it by excluding a day from the data, and we could create the capability to specify how many hours in a year to adjust annual production to work for leap year. However, there is interest in doing multi-year simulations, which would then likely include leap years. I think we should consider how to handle leap years, and then how to handle multi-year simulations with different hour lengths in each year.

Proposed solution

Instead of just providing n_timestep, we could allow n_timesteps to be a list, where each entry is the number of time steps for that year.

n_timesteps: [8760, 8760, 8784, 8760]

Alternatives considered

Additional context

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the existing handling of n_timestep and how annual production is adjusted for 8760-hour years. Trace the simulation entry points that would consume a per-year n_timesteps list, then determine how leap years and multi-year simulations should be represented. Done requires an agreed design and working support for differing yearly timestep counts.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.