# How WeatherNext Handles Different Geographical Regions: Geodesic-Aware Cyclone Tracking Across the Globe

> Discover how WeatherNext achieves geodesic-aware cyclone tracking globally. Learn about its methods for handling different geographical regions and ensuring consistent performance worldwide.

- Repository: [Google DeepMind/weathernext](https://github.com/google-deepmind/weathernext)
- Tags: deep-dive
- Published: 2026-08-16

---

**WeatherNext tracks cyclones globally by building local bounding boxes around candidate centers, with longitude wrap-around handling and hard latitude limits to ensure consistent performance across all geographical regions.**

The WeatherNext model from Google DeepMind performs cyclone tracking on a global latitude-longitude grid. Its regional handling strategy, implemented in the `DirectTracker` class, combines geodesic calculations with defensive constraints to operate reliably from the tropics to the poles. This article examines the specific mechanisms that enable robust tracking across diverse geographical regions.

## Core Regional Handling in DirectTracker

The `DirectTracker` class in [`weathernext/cyclones/direct_tracker.py`](https://github.com/google-deepmind/weathernext/blob/main/weathernext/cyclones/direct_tracker.py) serves as the primary entry point for region-aware cyclone processing. When analyzing a track or cyclogenesis candidate, the tracker constructs a **local bounding box** around the current cyclone center coordinates (`latlon`).

### Latitude-Longitude Bounding Box Construction

The `_get_bounding_box_sides_in_degrees()` method converts a geodesic disc radius into degree-based box dimensions:

```python

# From weathernext/cyclones/direct_tracker.py (lines 87-94)

def _get_bounding_box_sides_in_degrees(
    self, latlon: np.ndarray, disc_radius_km: float
) -> Tuple[float, float]:
    """Compute lat/lon sides of bounding box in degrees."""
    lat_side = 2 * disc_radius_km / KM_PER_DEGREE_LAT
    # Scale longitude by cosine of extreme latitudes

    cos_lat = np.cos(np.deg2rad(np.abs(latlon[0]) + lat_side/2))
    lon_side = min(2 * disc_radius_km / (KM_PER_DEGREE_LAT * cos_lat), 360.0)
    return lat_side, lon_side

```

The longitude span calculation caps at **360°** to prevent overflow, while the cosine scaling accounts for meridian convergence at higher latitudes.

### Longitude Wrap-Around Safety

For boxes that straddle the 0°/360° seam, the tracker delegates to `utils.slice_data_array_latlon_box_with_lon_wraparound()`:

```python

# From weathernext/cyclones/direct_tracker.py (lines 574-580)

local_region = slice_data_array_latlon_box_with_lon_wraparound(
    data_array=gridded_predictions[variable],
    center_lat=lat,
    center_lon=lon,
    lat_side_degrees=lat_side,
    lon_side_degrees=lon_side,
)

```

This utility ensures seamless operation across the **International Date Line**—critical for Pacific basin cyclone tracking.

## Geographical Constraints and Validation

### Hard Latitude Ceiling

WeatherNext enforces a global latitude boundary to filter spurious high-latitude artifacts:

```python

# From weathernext/cyclones/direct_tracker.py (lines 78-81)

MAX_ABSOLUTE_LATITUDE = 80.0  # degrees

def _is_valid_latitude(self, lat: float) -> bool:
    return abs(lat) <= self.MAX_ABSOLUTE_LATITUDE

```

Any candidate center beyond **±80° latitude** is automatically discarded. This prevents the model from chasing unrealistic polar disturbances while preserving coverage of extratropical transition events.

## Position Refinement with Spherical Geometry

Once a local region is isolated, the tracker computes refined positions using **geodesically-aware** methods:

### Mean Position (Probability-Weighted)

The `_get_mean_latlon_of_grid_points_within_disc()` method calculates a probability-weighted average:

```python

# Simplified representation of lines 96-105

weights = probabilities / probabilities.sum()
weighted_lat = np.average(lats, weights=weights)
weighted_lon = np.average(lons, weights=weights)

# Project onto sphere via 3D averaging

mean_position = _average_in_three_dimensions_and_project_on_sphere(
    weighted_lat, weighted_lon
)

```

### Mode Position (Maximum Probability)

The `_get_mode_latlon_of_grid_points_within_disc()` method finds the maximum probability point:

```python

# Simplified representation of lines 124-131

max_idx = np.unravel_index(
    np.argmax(probabilities), probabilities.shape
)
mode_lat = lats[max_idx]
mode_lon = lons[max_idx]

```

Both methods leverage `cyclone_utils.geodesic_distance` for accurate distance calculations on the Earth's surface.

## Cyclogenesis Regional Handling

For initial storm detection, the tracker implements a **coarse-to-fine** regional strategy:

1. **Grid sampling**: Builds a coarse grid of candidate bounding boxes across the global domain
2. **Mode-then-mean refinement**: Applies the mode method first, then refines with the mean method
3. **Spatial pruning**: Removes candidates within `min_disc_radius_between_cyclogenesis_candidates_km` (default 250 km) of existing tracks

The same latitude limits and wrap-around handling apply at each stage.

## Practical Configuration

Regional behavior is controlled via constructor parameters:

```python
from weathernext.cyclones.direct_tracker import DirectTracker

tracker = DirectTracker(
    # Regional extraction radii for different operations

    disc_radius_mean_latlon_km=300.0,          # Mean position calculation

    disc_radius_mode_latlon_km=200.0,          # Mode position calculation

    disc_radius_mean_probability_of_existence_km=400.0,  # Existence check

    disc_radius_cyclogenesis_refinement_km=150.0,        # Cyclogenesis refinement

    
    # Strategy and validation

    tracking_mode="mode_then_mean",            # Or "mean_only", "mode_only"

    min_disc_radius_between_cyclogenesis_candidates_km=250.0,  # Pruning distance

    temporal_resolution_hours=6,
)

```

## Key Supporting Files

- **[`weathernext/cyclones/tracker_utils.py`](https://github.com/google-deepmind/weathernext/blob/main/weathernext/cyclones/tracker_utils.py)**: Grid slicing with longitude wrap-around
- **[`weathernext/cyclones/constants.py`](https://github.com/google-deepmind/weathernext/blob/main/weathernext/cyclones/constants.py)**: Global constants including `MAX_ABSOLUTE_LATITUDE`
- **[`weathernext/utils/typed_graph.py`](https://github.com/google-deepmind/weathernext/blob/main/weathernext/utils/typed_graph.py)**: Geodesic distance calculations

## Summary

- **Geodesic awareness**: All regional calculations use spherical geometry, not planar approximations
- **Longitude wrap-around**: Dedicated utilities handle 0°/360° seam crossing for Pacific basin coverage
- **Latitude bounds**: Hard limit at ±80° prevents spurious polar artifacts
- **Configurable radii**: Disc radius parameters control local region size per operation type
- **Dual refinement**: Mode-then-mean strategy balances precision and robustness across varying storm structures

## Frequently Asked Questions

### How does WeatherNext handle cyclones near the International Date Line?

The tracker uses `slice_data_array_latlon_box_with_lon_wraparound()` in [`tracker_utils.py`](https://github.com/google-deepmind/weathernext/blob/main/tracker_utils.py) to correctly extract sub-grids that cross the 0°/360° longitude seam. This ensures continuous tracking as storms move between the western and eastern Pacific basins.

### What prevents WeatherNext from detecting false cyclones near the poles?

A hard-coded `MAX_ABSOLUTE_LATITUDE = 80` constant in [`direct_tracker.py`](https://github.com/google-deepmind/weathernext/blob/main/direct_tracker.py) automatically discards any candidate center beyond this threshold. This boundary eliminates spurious high-latitude artifacts that can arise from model bias or orographic effects.

### Why does the longitude bounding box use cosine scaling?

The cosine scaling in `_get_bounding_box_sides_in_degrees()` accounts for meridian convergence—longitude degrees represent smaller physical distances at higher latitudes. Without this adjustment, the geodesic disc would become elliptical, distorting probability calculations.

### Can the regional extraction radius be customized per storm?

Yes. The `DirectTracker` accepts separate `disc_radius_*_km` parameters for mean position, mode position, probability-of-existence, and cyclogenesis refinement operations. Smaller radii improve precision for compact storms; larger radii capture broader systems.