This project contains Python scripts for analyzing climate phenomena, particularly ENSO (El Niño-Southern Oscillation) dynamics and energy balance modeling.
energy_balance_model.py- Simple energy balance model for global temperatureenso_jin_model.py- Implementation of Jin's ENSO model with feedback mechanismsenso_spectrum_analysis.py- Spectral analysis of ENSO34 observational dataenso_parameter_optimization.py- Parameter optimization for ENSO model using MSE minimization
ENSO34.txt- ENSO 3.4 index observational data (1950-2023)ENSO34_anomalies.txt- ENSO 3.4 anomaly dataJin1998.pdf- Jin's 1998 paper on ENSO dynamicsProject_2024_2025.pdf- Project description and requirements
shell.nix- Nix environment configuration with required Python packages.envrc- Direnv configuration for automatic environment activation
The project uses Python with the following packages:
- numpy
- matplotlib
- scipy
- scikit-learn
- pygame
- keyboard
Activate the environment:
nix-shell
# or if using direnv
direnv allowRun the energy balance model:
python energy_balance_model.pyAnalyze ENSO spectrum:
python enso_spectrum_analysis.pyOptimize ENSO model parameters:
python enso_parameter_optimization.pyComputes global temperature evolution using heat capacity and radiative balance:
- Heat capacity: 8.36×10⁸ J/(m²·K)
- Solar constant: 1360 W/m²
- Albedo: 0.3
Recharge oscillator model for ENSO with:
- Bjerknes feedback (μ parameter)
- Zonal advection feedback (ad parameter)
- Hadley cell feedback (μH parameter)
- Stochastic forcing (σ parameter)
Finds optimal μ and σ values by minimizing mean squared error between simulated and observed ENSO power spectra.