Skip to content

Repository files navigation

Southern Oscillation Reproduction Project

Python 3.9+ License: MIT

Reproduction of the landmark 1981 study by John D. Horel and John M. Wallace on "Planetary-Scale Atmospheric Phenomena Associated with the Southern Oscillation" using modern ERA-5 reanalysis data.

πŸ“– About

This project provides a complete, reproducible workflow for analyzing the Southern Oscillation (now known as ENSO - El NiΓ±o Southern Oscillation) and its global teleconnections using state-of-the-art climate reanalysis data.

Original Paper: Horel, J. D., and J. M. Wallace, 1981: Planetary-Scale Atmospheric Phenomena Associated with the Southern Oscillation. Monthly Weather Review, 109, 813-829.

✨ Features

  • 🌍 Comprehensive Analysis: Reproduces all major figures from the original 1981 paper
  • πŸ“Š Modern Data: Uses ERA-5 reanalysis (1950-present) from Copernicus Climate Data Store
  • πŸ”§ MCP Server: Custom server for efficient ERA-5 data access and caching
  • πŸ““ Interactive Notebook: Jupyter notebook with detailed explanations and visualizations
  • 🎨 Publication-Quality Figures: All figures saved in high-resolution format
  • 🧩 Extensible: Easy to modify time periods, regions, and analysis methods

πŸš€ Quick Start

Prerequisites

  1. Python 3.9 or higher
  2. Copernicus Climate Data Store Account

Installation

Option 1: Using Conda (Recommended)

# Clone the repository
git clone https://github.com/yourusername/southern-oscillation-demo.git
cd southern-oscillation-demo

# Create conda environment
conda env create -f environment.yml
conda activate southern-oscillation

# Configure CDS API key
echo "url: https://cds.climate.copernicus.eu/api/v2" > ~/.cdsapirc
echo "key: YOUR_UID:YOUR_API_KEY" >> ~/.cdsapirc

Option 2: Using pip

# Clone the repository
git clone https://github.com/yourusername/southern-oscillation-demo.git
cd southern-oscillation-demo

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Configure CDS API key (same as above)

Run the Analysis

# Start Jupyter notebook
jupyter notebook notebooks/southern_oscillation_reproduction.ipynb

Or run from command line:

python -m notebooks.southern_oscillation_reproduction

πŸ“ Repository Structure

southern-oscillation-demo/
β”œβ”€β”€ CLAUDE.MD                          # Detailed project documentation
β”œβ”€β”€ README.md                          # This file
β”œβ”€β”€ LICENSE                            # MIT License
β”œβ”€β”€ environment.yml                    # Conda environment
β”œβ”€β”€ requirements.txt                   # Python dependencies
β”œβ”€β”€ .gitignore                         # Git ignore rules
β”‚
β”œβ”€β”€ mcp_server/                        # MCP server for ERA-5 data
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ era5_server.py                # Main server implementation
β”‚   β”œβ”€β”€ config.json                   # Server configuration
β”‚   └── README.md                     # Server documentation
β”‚
β”œβ”€β”€ notebooks/                         # Jupyter notebooks
β”‚   └── southern_oscillation_reproduction.ipynb
β”‚
β”œβ”€β”€ skills/                            # Custom analysis skills
β”‚   β”œβ”€β”€ climate_analysis/
β”‚   β”‚   └── SKILL.md                  # Climate analysis methods
β”‚   └── teleconnection_viz/
β”‚       └── SKILL.md                  # Visualization methods
β”‚
β”œβ”€β”€ data/                              # Data directory (gitignored)
β”‚   β”œβ”€β”€ era5/                         # Downloaded ERA-5 data
β”‚   β”œβ”€β”€ station/                      # Station data
β”‚   └── processed/                    # Processed datasets
β”‚
β”œβ”€β”€ figures/                           # Generated figures
β”‚   └── reproductions/                # Reproduced figures
β”‚
└── tests/                             # Unit tests
    └── test_analysis.py

🎯 What's Included

Data Analysis

  1. EOF Analysis: Empirical Orthogonal Function analysis of Pacific SST
  2. Seasonal Averaging: DJF (December-January-February) means computation
  3. Normalization: Standardized anomalies for comparison
  4. Correlation Analysis: Spatial correlation maps
  5. Composite Analysis: Warm vs cold episode composites
  6. Teleconnection Indices: PNA, WP, SOI computation

Figures Reproduced

  • Figure 1: EOF of Pacific SST and time series
  • Figure 2: Normalized SST Index
  • Figure 3: Rainfall at equatorial Pacific stations
  • Figure 4: Southern Oscillation Index
  • Figure 5: Station location map
  • Figure 6: 200 mb height time series at stations
  • Figure 7: Tropical 200 mb height index
  • Figure 8: Composite 200 mb height maps
  • Figure 9: Correlation maps (700 mb height)
  • Figure 10: Teleconnection pattern indices

πŸ”¬ Scientific Background

The Southern Oscillation is a large-scale atmospheric pressure pattern in the tropical Pacific that is coupled with El NiΓ±o/La NiΓ±a ocean temperature variations. Key features:

  • Warm Episodes (El NiΓ±o):

    • Above-normal SST in equatorial Pacific
    • Weakening of trade winds
    • Enhanced rainfall in central Pacific
    • Teleconnections to mid-latitudes
  • Cold Episodes (La NiΓ±a):

    • Below-normal SST in equatorial Pacific
    • Strengthening of trade winds
    • Suppressed rainfall in central Pacific
    • Opposite teleconnection patterns

Historical Significance

The original 1981 paper was groundbreaking because it:

  • Documented global-scale atmospheric response to tropical SST
  • Established teleconnection patterns for seasonal forecasting
  • Provided physical basis for ENSO prediction
  • Connected tropical and extratropical variability

πŸ“Š Example Results

Key Findings (1951-1978)

  • SST EOF1: Explains ~23% of variance in Pacific SST
  • SOI Correlation: r β‰ˆ 0.80 with SST Index
  • Warm Episodes: 1951-53, 1957-59, 1963-64, 1965-66, 1969-70, 1972-73, 1977-78
  • 200 mb Height: Above-normal throughout tropics during warm episodes
  • Teleconnections: Strong PNA and WP patterns during El NiΓ±o

πŸ› οΈ Customization

Extending the Analysis

1. Different Time Period

# In notebook configuration cell
START_YEAR = 1979
END_YEAR = 2023

2. Additional Variables

# Download other ERA-5 variables
await era5_server.download_monthly_means(
    variable='u_component_of_wind',
    pressure_level=200,
    years=YEARS
)

3. Different Region

# Focus on Indian Ocean
DOMAIN = [30, 40, -30, 120]  # [north, west, south, east]

4. Seasonal Selection

# Analyze JJA (June-July-August) instead
SEASON_MONTHS = [6, 7, 8]

πŸ§ͺ Running Tests

pytest tests/

πŸ“š Documentation

Detailed documentation is available in:

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Areas for contribution:

  • Additional validation against original results
  • Optimization of data processing
  • Enhanced visualizations
  • Documentation improvements
  • Bug fixes

πŸ“– Citation

If you use this code in your research, please cite:

@article{horel1981southern,
  title={Planetary-Scale Atmospheric Phenomena Associated with the Southern Oscillation},
  author={Horel, John D and Wallace, John M},
  journal={Monthly Weather Review},
  volume={109},
  number={4},
  pages={813--829},
  year={1981}
}

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Original Authors: John D. Horel and John M. Wallace for their pioneering work
  • Copernicus Climate Data Store: For providing ERA-5 reanalysis data
  • xarray Community: For excellent climate data tools
  • Cartopy Team: For geospatial visualization capabilities

πŸ“§ Contact

For questions or issues:

πŸ”— Related Resources


Note: First data download may take significant time. Subsequent runs will use cached data for much faster execution.

About

This is an attempt to reproduce the Horel and Wallace paper from (1981)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages