Welcome to pywrfkit documentation!

pywrfkit is a comprehensive toolkit for Weather Research and Forecasting (WRF) data processing, analysis, and visualization.

PyPI version Python 3.8+ License: MIT Tests Build Publish

Installation

# Install from PyPI
pip install pywrfkit

# Install with cartopy support (for visualization modules)
pip install pywrfkit[cartopy]

# Or install from source
git clone https://github.com/ankurk017/pywrfkit.git
cd pywrfkit
pip install -e .

Quick Start

import xarray as xr
from pywrfkit import wrf, polar, download

# Load WRF data
ds = xr.open_dataset('wrf_output.nc')

# Add coordinate information
ds_with_coords = wrf.add_coords(ds['T2'], rename=True)

# Convert to polar coordinates for hurricane analysis
polar_data = polar.convert_to_polar(
    ds['wind_speed'],
    radius=5,  # degrees
    resolution=0.1
)

# Download GFS forecast data
download.gfs_forecast(
    start_date='2024120100',  # YYYYMMDDHH format
    total_forecast_hours=72
)

Indices and tables