iri-pycpt / pycpt

package joining pycpt stuff
4 stars 1 forks source link

Inconsistent hindcast periods when initializations span Jan 1 #57

Open aaron-kaplan opened 7 months ago

aaron-kaplan commented 7 months ago

first_year and final_year are interpreted as the year of the initialization date, not the year of the target period. This is handled consistently within the notebook, which only deals with a single initialization month, but when generating multiple initializations for the same target period, if some initializations are in the same calendar year as the target and others are in the previous year, it results in different hindcast target periods for different initializations, which gets confusing, and violates assumptions we have made in other programs (FBF application, python flexible forecast maproom).

My current workaround is to shift first_year and final_year back by one in automation.py when the start month is later in the calendar year than the season.

A cleaner solution would be to redefine first_year and final_year to mean the year of the target season rather than the year of the initialization, but that would be a backwards-incompatible change, and would require some care to make that change everywhere.

aaron-kaplan commented 2 weeks ago

Addressed for generate-forecasts in 2.8.2, and in notebooks in #78