Hi,
I’m just wondering if it’s possible to have the LB Construct Data
accept a value length of a leap year (i.e., 8784)?
Also, could the Hourly Plot
display information for leap years as well?
Thanks.
Hi,
I’m just wondering if it’s possible to have the LB Construct Data
accept a value length of a leap year (i.e., 8784)?
Also, could the Hourly Plot
display information for leap years as well?
Thanks.
Hi @tutu7931 ,
Assuming you mean the LB Construct Data component (since I don’t think we have a Construct Date one), this is all possible if you are willing to do a little editing of the Python inside the component. Mainly, when you are constructing the LB Analysis Period that gets assigned to the LB Header of the data collection that you are creating, you need to make sure that the AnalysisPeriod object has the is_leap_year
flag set to True
.
So just replace these lines of code in the component:
… with the following:
anp = ap.AnalysisPeriod(
_start_month_, _start_day_, _start_hour_,
_end_month_, _end_day_, _end_hour_, _timestep_,
is_leap_year=True)
… and you will be able to make data collections for leap years.
Those leap year data collections should work with all other Ladybug Tools components, including the Hourly Plot
, Monthly Chart
, Sunpath
, etc. Just be aware that any LBT components that use an analysis period will expect the is_leap_year
of that analysis period to be set to True
if it’s being used on those leap year data collections.