Filename convention incompatibility
Modeler Instructive S1.3 gives two options:
- long version: contain both start & end dates (date & time component in isoformat);
- short version (only for whole-day forecasts): only the start date
Since commit 86534036, pymock's forecast filenames (libs.syncat_path
) contain both the start & end dates and drop the time component if both refer to midnight, but this causes incompatibility with S1.3:
- for the long version: the time is not included
- for the short version: the end date is included
Suggested solution (for the instructive and pymock
)
The CSEP Italy Experiment only foresees whole-day forecasts as stated in section 2.4: "1-day intervals, [...] starting at midnight". So I very much like the short version as the go-to solution, because:
- dropping the end date is justified by the experiment defining/fixing the forecast interval;
- dropping the time if it is always 00:00:00 is elegant and gives easy digestible filenames. Only if the experiment foresees some irregular forecast updates during the day, the time component should be included - even for midnight forecasts for consistency & reduced file writer/reader complexity.
So there should be no need for the long version at all.
Specifically for libs.syncat_path
I'd restore the previous version:
def syncat_path(date, folder):
if isinstance(date, str):
date = datetime.fromisoformat(date)
return os.path.join(folder, f'pymock_{date.date().isoformat()}.csv')
(Remove .date()
if irregular forecast updates may indeed occur.)
Edited by Marcus Herrmann