Jupyter Notebooks

This directory contains interactive Jupyter notebooks demonstrating various use cases and features of varunayan.

Available Notebooks

  1. Getting Started (Varunayan Demo)

    Introduction to varunayan’s basic functionality and core concepts.

  2. ERA5 vs IMD Comparison (Comparison of ERA5 and IMD Monthly Rainfall Across Indian States (2000–2024))

    Comparing ERA5 reanalysis data with Indian Meteorological Department observations.

  3. Temperature Change Analysis (Visualizing Climate Change in India)

    Analyzing long-term temperature trends across India using ERA5 data.

  4. Weather-dependent Sales Analysis (Total Precipitation and Umbrella Search Trends in India (2004–2024))

    Correlating umbrella sales with precipitation patterns in India.

  5. Regional Climate Analysis (Temperature and Sunscreen Search Trends in California (2004–2024))

    Analyzing UV radiation and temperature patterns in California.

  6. Public Health Applications (Do Rainy Months Increase Public Concern About Dengue and Malaria?)

    Exploring relationships between climate variables and disease patterns.

  7. Seasonal Patterns (Peak Month of Precipitation and Annual Rainfall Trends in India (2000–2024))

    Identifying rainfall peaks and monsoon patterns across Indian regions.

  8. Comparative Analysis (Comparison of ERA5 and IMD Daily Temperature Extremes Across Maharashtra (2024))

    Detailed temperature comparison between ERA5 and IMD datasets.

  9. Pressure Level Data (Working with Pressure Level Data)

    Working with atmospheric pressure level data for vertical profiles and multi-level analysis.

Running the Notebooks

Prerequisites

Before running the notebooks, ensure you have:

  1. varunayan installed with notebook dependencies:

    pip install varunayan[notebooks]
    
  2. CDS API configured with your Copernicus Climate Data Store credentials:

    # Create ~/.cdsapirc with your API key
    echo "url: https://cds.climate.copernicus.eu/api/v2" > ~/.cdsapirc
    echo "key: YOUR_API_KEY" >> ~/.cdsapirc
    
  3. Jupyter installed:

    pip install jupyter
    

Local Execution

To run the notebooks locally:

# Navigate to the notebooks directory
cd docs/notebooks

# Start Jupyter
jupyter notebook

Then open any .ipynb file in your browser.

Online Viewing

You can also view the notebooks online without running them:

  • GitHub: View static versions on the varunayan GitHub repository

  • Documentation: Pre-rendered versions are available in this documentation

Common Issues

Data Download Timeouts

If you encounter timeouts when downloading large datasets:

  • Reduce the temporal range of your requests

  • Use lower spatial resolution (higher resolution parameter values)

  • Process data in smaller chunks

CDS API Errors

Common CDS API issues:

  • Invalid API key: Check your ~/.cdsapirc configuration

  • Rate limiting: Wait between large requests

  • Service unavailable: CDS maintenance periods

Memory Issues

For large datasets:

  • Use chunked processing (automatically handled by varunayan)

  • Increase available RAM

  • Process data in smaller geographical regions

Getting Help

If you encounter issues with the notebooks:

  1. Check the GitHub Issues page

  2. Create a new issue with:

    • Notebook name and cell number

    • Complete error message

    • Your system information (OS, Python version, varunayan version)

Contributing Notebooks

We welcome contributions of new notebooks! See our Contributing guide for details on:

  • Notebook structure and style guidelines

  • Documentation requirements

  • Submission process

When contributing notebooks:

  • Include clear explanations and motivation

  • Use realistic but manageable dataset sizes

  • Provide expected outputs and runtime estimates

  • Test thoroughly before submission