NatLabRockies / NatLabRockies/EnergyPlus

Missing simulation days when starting with a leap year and end with the next year

Open
#8,772 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.6k
Forks
490
Avg merge
6d 21h
Merged PRs (30d)
22

Description

Issue overview

It was reported that there are missing simulation days when dealing with leap starting year. For a full year simulation (expecting 365 days), one to two days of simulations were found missing at the end of the running period.

After some experiment runs, one common problematic scenario is when the simulation start year is a leap year, but the end year is next year. In this case, the number of total simulation days would get a 364 instead of 365 if a full year is specified—for example, running from Oct 1, 2020 to Sep 30, 2021 will only get simulation runs (and reports) s from Oct 1, 2020 to Sep 29, 2021, with the last day (Sep 30, 2021) missing.

Actually this would happen to any ordinary idf file---just ordinary year and no special specification for "leap year weather" or "actual weather treatment". See the attached idf file modified from the example file 1ZoneUncontrolled_DD2009.idf. The problem will occur when the simulation period from Oct 1, 2016 to Sep 30, 2021 in any file with default setting with typical default (blank) and typical weather file (default Atlantic weather with HOLIDAYS/DAYLIGHT SAVINGS,No,0,0,0--so it is just a case for ordinary year and not for leap year at all, but the problem happens and the simulation only run from 2016-10-01 to 2017-09-29.

The root cause is the processing of the start Julian day inputs have some missing logic in handling the case of having a starting leap year and then a different ending year.

1ZoneUncontrolled_DD2009_rev1.idf.txt

Details

Some additional details for this issue (if relevant):

  • Platform (Operating system, version): All
  • Version of EnergyPlus (if using an intermediate build, include SHA): v9.4 v9.5
  • Refer to Helpdesk ticket number 15720
Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added (list location of defect file here)
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)

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 running the attached 1ZoneUncontrolled_DD2009_rev1.idf.txt case for Oct 1, 2016 through Sep 30, 2021 and inspect the date-processing logic for start Julian day inputs. Compare the reported simulation range with the requested period; done means the final day is included and a full-year run produces the expected 365 simulation days.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.