The subseasonal_toolkit
package provides implementations of the subseasonal forecasting ABC model of
Adaptive Bias Correction for Subseasonal Forecasting Soukayna Mouatadid, Paulo Orenstein, Genevieve Flaspohler, Judah Cohen, Miruna Oprescu, Ernest Fraenkel, and Lester Mackey. Nature Communications. June 2023.
@article{mouatadid2023adaptive,
author = {Mouatadid, Soukayna and Orenstein, Paulo and Flaspohler, Genevieve and Cohen, Judah and Oprescu, Miruna and Fraenkel, Ernest and Mackey, Lester},
journal = {Nature Communications},
number = {1},
pages = {3482},
title = {Adaptive bias correction for improved subseasonal forecasting},
volume = {14},
year = {2023}}
and the machine learning models and meteorological baselines of
SubseasonalClimateUSA: A Dataset for Subseasonal Forecasting and Benchmarking Soukayna Mouatadid, Paulo Orenstein, Genevieve Flaspohler, Miruna Oprescu, Judah Cohen, Franklyn Wang, Sean Knight, Maria Geogdzhayeva, Sam Levang, Ernest Fraenkel, and Lester Mackey. Advances in Neural Information Processing Systems (NeurIPS). Dec. 2023.
@inproceedings{mouatadid2023toolkit,
author = {Soukayna Mouatadid, Paulo Orenstein, Genevieve Flaspohler, Miruna Oprescu, Judah Cohen, Franklyn Wang, Sean Knight, Maria Geogdzhayeva, Sam Levang, Ernest Fraenkel, and Lester Mackey},
booktitle = {Advances in Neural Information Processing Systems},
editor = {A. Globerson and K. Saenko and M. Hardt and S. Levine},
publisher = {Curran Associates, Inc.},
title = {SubseasonalClimateUSA: A Dataset for Subseasonal Forecasting and Benchmarking},
volume = {36},
year = {2023}
}
This package has been tested with the following operating system and Python pairings:
Data to train and evaluate models is made available through the subseasonal_data
package. To download data through this package, you will need to have the Azure Storage CLI azcopy installed on your machine.
A complete list of Python dependencies can be found in setup.cfg
; these dependencies are required upon installation.
pip install subseasonal-toolkit
$SUBSEASONALDATA_PATH
to point to your desired data directory; any data files needed by a model will be read from, saved to, or synced with this directorystd_paper_forecast
evaluation period of "Adaptive Bias Correction for Subseasonal Forecasting":python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -u -e -m raw_cfsv2 --task us_tmp2m_1.5x1.5_34w
models/cfsv2pp/submodel_forecasts/cfsv2pp-debiasFalse_years12_margin0_days1-1_leads15-15_lossmse/us_tmp2m_1.5x1.5_34w/
containing daily forecast files from 20180101 through 20211231eval/metrics/raw_cfsv2/submodel_forecasts/cfsv2pp-debiasFalse_years12_margin0_days1-1_leads15-15_lossmse/us_tmp2m_1.5x1.5_34w/
containing 6 evaluation metrics:
lat_lon_error-us_tmp2m_1.5x1.5_34w-std_paper_forecast.h5
lat_lon_rmse-us_tmp2m_1.5x1.5_34w-std_paper_forecast.h5
lat_lon_skill-us_tmp2m_1.5x1.5_34w-std_paper_forecast.h5
rmse-us_tmp2m_1.5x1.5_34w-std_paper_forecast.h5
score-us_tmp2m_1.5x1.5_34w-std_paper_forecast.h5
skill-us_tmp2m_1.5x1.5_34w-std_paper_forecast.h5
The following examples demonstrate how to generate contiguous US forecasts for the target dates evaluated in "Adaptive Bias Correction for Subseasonal Forecasting" or "SubseasonalClimateUSA: A Dataset for Subseasonal Forecasting and Benchmarking" using each implemented model.
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m ccsm4pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m ccsm4
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m cfsv2pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m cfsv2
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m ecmwfpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m ecmwf
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m fimr1p1pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m fimr1p1
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m gefspp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m gefs
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m gemspp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m gems
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m geos_v2p1pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m geos_v2p1
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m nesmpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m nesm
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m subx_meanpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -a -m subx_mean
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -m autoknn
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m ccsm4pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m ccsm4pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m cfsv2pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m cfsv2pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m climatology
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m climpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m deb_cfsv2
subseasonal_toolkit/models/deb_ecmwf/selected_submodel.json
by setting the forecast_with
and debias_with
keys as described in deb_ecmwf.ipynb
.python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m deb_ecmwf
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m deb_loess_cfsv2
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m deb_loess_ecmwf
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m deb_quantile_cfsv2
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m deb_quantile_ecmwf
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m deb_subx_mean
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m ecmwfpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m ecmwfpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m fimr1p1pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m fimr1p1pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m gefspp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m gefspp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m gempp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m gempp
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m geos_v2p1pp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m geos_v2p1pp
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -m informer
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -u -b -m localboosting
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -tu -m localboosting
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -m multillr
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -m nbeats
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m nn-a
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -m online_learning
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -m persistence
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -u -e -m perpp_ccsm4
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -u -e -m perpp_cfsv2
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -u -e -m perpp_ecmwf
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m perpp_fimr1p1 -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m perpp_gefs -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m perpp_gem -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m perpp_geos_v2p1 -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m perpp_nesm -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m perpp_subx_mean -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -m prophet
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -u -e -m raw_ccsm4
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -u -e -m raw_cfsv2
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -u -e -m raw_ecmwf
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m raw_fimr1p1 -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m raw_gefs -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m raw_gem -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m raw_geos_v2p1 -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m raw_nesm -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -m raw_subx_mean -u -e
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -u -b -m salient2
python -m subseasonal_toolkit.generate_predictions -t std_paper -u -tu -m salient2
python -m subseasonal_toolkit.generate_predictions -t std_paper_eval -e -u -b -m subx_meanpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -tu -m subx_meanpp
python -m subseasonal_toolkit.generate_predictions -t std_paper_forecast -e -u -m linear_ensemble
After cloning this repository, install from source in editable mode using pip install -e .
in this directory or pip install -e path/to/directory
from another directory.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.