Skip to content
/ pyESA Public

Contributions for weather forecast groups in West Africa (WA), Eastern and Southern Africa (ESA).

License

Notifications You must be signed in to change notification settings

tamiratB/pyESA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyCPT2

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

  1. Clone this github repository as follows:

git clone https://github.com/tamiratB/pyESA

  1. 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:

  1. Activate your pycpt conda environment (e.g., conda activate pycpt-2.8.2)
  2. Run the Jupyter Notebook (e.g., jupyter-notebook) and open your exampleNotebooks/pycpt-operational.ipynb or exampleNotebooks/pycpt-s2s.ipynb notebook.
  3. Perform a fresh start by selecting "Restart & Clear Output" or restarting the Jupyter kernel to incorporate the changes from step 2.
  4. 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 or exampleNotebooks/pycpt-s2s.ipynb provided in this github repository).
  5. Run all cells in exampleNotebooks/pycpt-operational.ipynb and/or exampleNotebooks/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!

About

Contributions for weather forecast groups in West Africa (WA), Eastern and Southern Africa (ESA).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published