PyCPT is a python interface to CPT, the IRI Climate Predictability Tool (https://iri-pycpt.github.io/).
I made minor changes to the core PyCPT plotting functions to include administrative boundary shapefiles, improved the predictor and predictand domains plot. These updates also enable us to save the predictor and predictand domains, and each weekly forecasts separately (please check exampleNotebooks/pycpt-s2s.ipynb
notebook). If you would like to incorporate these changes for your specific country, please follow these steps and refer to the specific examples provided in exampleNotebooks
for Ethiopia. This has been tested with the latest pycpt-2.8.2
as installed following the instructions at PyCPT Installation Guide.
Steps to follow
- Clone this github repository as follows:
git clone https://github.com/tamiratB/pyESA
- Copy the following files from the cloned repository to the specified pyCPT installation directory:
cp pyESA/pycpt/src/pycpt/{subseasonal.py,notebook.py}
/home/username/miniconda3/envs/pycpt-2.8.2/lib/python3.10/site-packages/pycpt/
Note: username
typically refers to the name of your computer login account. Please verify the path to your PyCPT installation.
Next steps:
- Activate your pycpt conda environment (e.g.,
conda activate pycpt-2.8.2
) - Run the Jupyter Notebook (e.g.,
jupyter-notebook
) and open yourexampleNotebooks/pycpt-operational.ipynb
orexampleNotebooks/pycpt-s2s.ipynb
notebook. - Perform a fresh start by selecting "Restart & Clear Output" or restarting the Jupyter kernel to incorporate the changes from step 2.
- Define the path to your regional shapefiles and pass this defined variable for each plotting function as the last argument (refer to the update in
exampleNotebooks/pycpt-operational.ipynb
orexampleNotebooks/pycpt-s2s.ipynb
provided in this github repository). - Run all cells in
exampleNotebooks/pycpt-operational.ipynb
and/orexampleNotebooks/pycpt-s2s.ipynb
.
This shapefile object argument for each function is optional. You can pass it to the needed function or skip it if not required. These changes do not break the original code in the model or notebooks.
Happy forecasting, Enjoy!