Hi Chris. Thank you very much for this answer.
I understand that design choice. I’ve been discussing this with our engineers and in fact, this might be more of a theoretical issue. We might have to deal with multi-year simulations but then, as you say, it’s nice already if Ladybug gets us close and we only have a few steps remaining to stitch the files together.
Moving on with Ladybug, I’ve been trying to extend my “one year weather data -> EPW file” tool to manage shorter periods and I’m almost done except I just stumbled upon an exception which seem to mean explicitly that only full year periods can be exported to EPW files.
Can you please clarify whether Ladybug can export files shorter than a full year?
I’ve been overriding EPW.from_missing_values to allow it to create shorter periods (still with full days):
@classmethod
def from_missing_values(
cls,
st_month=1, st_day=1, end_month=12, end_day=31,
timestep=1, is_leap_year=False
):
# Initialize the class with all data missing
epw_obj = cls(None)
epw_obj._is_leap_year = is_leap_year
epw_obj._location = Location()
# create an analysis period
analysis_period = AnalysisPeriod(
st_month=st_month, st_day=st_day,
end_month=end_month, end_day=end_day,
timestep=timestep, is_leap_year=is_leap_year
)
[...]
Then I got this length error exception while writing the EPW file.
I managed to override to_file_string to reuse the analysis period created in from_missing_values rather than creating an annual analysis period here:
After this, I could output an EPW file, but there is still at least one thing wrong with the generated file as DATA_PERIODS is hard-coded as well:
(New user, can only add two links… Perhaps the forum could accept a regex whitelist including github links.)
data_str = 'DATA PERIODS,1,1,Data,Sunday, 1/ 1,12/31\n'
return [loc_str, des_str, week_str, grnd_st, leap_str, c_str1, c_str2, data_str]
I could also override headers property, or, easier and dirtier, patch its output from the to_file_string method I’m already overriding, but at this point I’m wondering if I’m on the right track.
Looks like I found at least two occurrences of that explicitly don’t support periods shorter than a full year.
Is this really a feature that is meant to be supported?
Thanks.