************************************************************************ ************************************************************************ Code for the clustering-based forecasting method used in the paper: “S2S Reboot: An Argument for Greater Inclusion of Machine Learning in Subseasonal to Seasonal (S2S) Forecasts” Judah Cohen, Dim Coumou Jessica Hwang, Lester Mackey, Paulo Orenstein, Sonja Totz and Eli Tziperman ************************************************************************ ************************************************************************ Python version: python 2.7 library Requirements: - numpy - netCDF4 - scipy - matplotlib - operator - os - sklearn (for CCA) In the file functions.py the observational data as well as the mask-file is loaded in the class "forecast_variable" (line 126 & 130) The precursors are loaded in the class "precursors" (l147 - l.193): In line 521 the precursors for forecasting the temperature can be selected by numbers: 0="SIC", 1="SCE", 2="SST_tropics",3="SST_atl",4="SST_medi",5="SLP_nh",6="GPH500_EU" In line 525 the number of clusters can be chosen. It is also possible to choose a range of number of clusters. Uncomment the following lines to save forecast plots, correlation plots and forecast data(netcdf): l. 193 - 200 and adapt paths. Program usage: python forecast_temperature_europe_class.py