How to convert the data type of non-consecutive "HOY" to "Period" in ladybug?

Hi,

I have an urgent maths issue, hoping someone can help me.

I want to select the daytime data only from the day and night data throughout the wintertime period (6 Nov to 4 Feb, HOY = 7416~839, total 2184 hours). The sun path component will help me to identify the daytime HOY, giving 851 hours of daytime HOY output.

HOWEVER, there is no HOY input in the Apply Analysis Period component, but the Period input.

Does anyone know how to convert HOY to Period? HOY_to_PERIOD.gh (386.5 KB)

Thanks so much!

You could try using the DateTime component. This will input HOY and output period.

Hi Nach,

Thank you for your suggestion. The DateTime component does not output period, unfortunately, but the ‘date’ output. It is not the right input for Apply Analysis Period component.

Do you know how to partition the EPW data based on non-consecutive HOYs?

I have simplified my question.

Is there any solution for converting the HOY output as the input for the AnalysisPeriod component? I can’t connect my non-consecutive HOY data to the start/end month/day/hour or the timestep.

@Kai_zp

I’m not sure if it’s possible to convert a list of discontinuous HOYs to an analysis period. For one thing, such periods wouldn’t work, for example, with the numerical methods used by EnergyPlus, which compute new states based on previous timesteps.

But one thing you can do is simulate an entire, continuous analysis period, and then filter out the output data based on the HOYs you’ve computed. You can do this by applying conditional statements to your output data.

1 Like

Thanks, Saeran for helping with my problem again!

Yes, the current Ladybug doesn’t have a direct component for converting HOY to Period. But I have sorted it out.
Dispatch_Daytime_Weather_Data_From_8760H_EPW_Dataset.gh (381.7 KB)

Using Member Index and “List Item” components, we can dispatch 8760 hours of weather data into two groups of daytime and nighttime data within the selected period.

1 Like