Papers
Topics
Authors
Recent
Search
2000 character limit reached

TerraFlow Model: Dual Flow Prediction Approaches

Updated 25 January 2026
  • TerraFlow is a dual-model framework integrating a Transformer for glacier time-series prediction and an algorithm for planetary runoff simulation.
  • The IceWatch TerraFlow model employs a four-layer Transformer with quantile loss to deliver robust, interpretable glacier velocity forecasts for GLOF risk assessment.
  • The Handmer TerraFlow algorithm utilizes depression filling and steepest descent flow accumulation to simulate water redistribution on Martian terrains.

TerraFlow refers to two distinct, technically rigorous models in contemporary research: (1) a Transformer encoder for glacier velocity time-series regression central to the IceWatch multimodal GLOF prediction system (Fatima et al., 18 Jan 2026), and (2) a global surface-runoff and catchment network algorithm for disordered planetary terrain, particularly Mars, as developed in the Handmer model (Handmer, 2016). These models share an emphasis on physics-informed flow modeling, algorithmic interpretability, and integration with remote sensing data, but differ fundamentally in mathematical formulation, input structure, and intended application domain.

1. Time-Series Transformer Architecture for Glacier Flow (IceWatch TerraFlow)

The IceWatch TerraFlow module is a four-layer Transformer encoder trained on long-term NASA ITS_LIVE glacier velocity series to predict daily surface velocity for the Shisper Glacier, enabling robust, cross-validated warnings of glacial lake outburst floods (GLOFs) (Fatima et al., 18 Jan 2026). The model uses transformer-specific constructs as follows:

  • Model structure: 4 stacked encoder blocks, each incorporating multi-head self-attention (h=8h=8), with embedding dimension dmodel=256d_{\text{model}}=256 and per-head projection dk=dv=32d_k=d_v=32. Each block contains a two-layer feed-forward subnet (ReLU, hidden size dff=512d_{ff}=512), layer normalization, and residuals.
  • Input representation: Sequence windows of 30 days (L=30L=30), batch size 2048, with 9 engineered features (coordinates, year, cyclical encodings for month/day, mean/max velocities), standardized.
  • Mathematics: Inputs are embedded via

Z0=XWE+P,Z^0 = XW_E + P,

with learnable positional encoding PP. Attention is realized through

Attention(Q,K,V)=softmax(QKdk)V\mathrm{Attention}(Q,K,V) = \mathrm{softmax}\left(\frac{QK^\top}{\sqrt{d_k}}\right)V

and multi-head composition:

MHA(Q,K,V)=Concat(head1,,headh)WO.\mathrm{MHA}(Q,K,V) = \mathrm{Concat}(\mathrm{head}_1,\dots,\mathrm{head}_h)W_O\,.

  • Loss function: Quantile (pinball) loss at τ=0.5\tau=0.5 (median prediction), which is robust to surge-day outliers:

Lτ(y,y^)=1Ni=1N{τ(yiy^i),yiy^i (τ1)(yiy^i),yi<y^i\mathcal L_{\tau}(y,\hat y)=\frac{1}{N}\sum_{i=1}^N\begin{cases}\tau(y_i-\hat y_i), & y_i \ge \hat y_i \ (\tau-1)(y_i-\hat y_i), & y_i < \hat y_i\end{cases}

  • Optimization: Adam (1×1051\times10^{-5}, β1=0.9\beta_1=0.9, β2=0.999\beta_2=0.999), 50 epochs, mixed precision.
  • Output: Scalar velocity (y^R\hat{y} \in \mathbb{R}) in m/yr for day t+1t+1.

2. Preprocessing and Feature Engineering for Glacier Time-Series

The data pipeline for TerraFlow leverages ~73.6 million glacier surface velocity measurements (2000–2024). Key preprocessing steps are:

  • Spatial subsampling: Shisper basin mask (~1,000 km²).
  • Temporal aggregation: Daily raster averaging.
  • Outlier and missing-value management: Removal of samples >3σ from local mean or flagged bad quality; gaps ≤7 days interpolated, else masked.
  • Feature set: Latitude ϕ\phi, longitude λ\lambda, year, cyclical month/day, daily mean/max velocities.
  • Normalization: Z-score within training split.
  • Window construction: 30-day sliding sequences.

The harmonization protocol aligns TerraFlow outputs with RiskFlow's Sentinel-2 image acquisition and TempFlow's MODIS-derived temperature records on matched grid cells, enabling precise multimodal fusion for GLOF event detection (Fatima et al., 18 Jan 2026).

3. Performance Evaluation and Cross-Validation

On the Shisper Glacier dataset (2000–2024; ~11.9M cell-days), TerraFlow demonstrates superior predictive accuracy across several baselines:

Model type MAE (m/yr) Validation R²
Linear regression, tree ensembles 40–100
LSTM (30-day window) 44
Transformer (+MSE loss) 35
Transformer (+weighted MAE) 30
Transformer (+quantile loss) 25.6 ≈0.95

The quantile loss formulation yields resilience to velocity surges, and attention weights offer interpretability, indicating which temporal features drive predictions. Cyclical time encodings preserve seasonal periodicity relevant for glacier acceleration/deceleration cycles. Quantile loss extension to (τ=0.1,0.5,0.9\tau=0.1,0.5,0.9) provides approximate prediction intervals for y^\hat{y} (Fatima et al., 18 Jan 2026).

4. Algorithmic Surface-Runoff Modeling for Planetary Terrain (Handmer TerraFlow)

The Handmer TerraFlow model (Handmer, 2016) is an algorithmic framework for simulating catchment networks and water redistribution on planetary-scale, high-relief DEMs, developed for Martian terraforming scenarios. The principal components are:

  • Assumptions: Surface-only flow, negligible infiltration, orographically modulated precipitation, spatially uniform evaporation, constant conductance CC, and depression-filled DEM preprocessing.
  • Continuity equation:

wi,jt=Pi,jEi,j+Qk,i,jQi,jk,\frac{\partial w_{i,j}}{\partial t} = P_{i,j} - E_{i,j} + \sum Q_{k,\ell\to i,j} - \sum Q_{i,j\to k,\ell}

  • Flux computation:

Qi,jk,=Cmax(0,hi,jhk,)×Li,jk,Q_{i,j\to k,\ell} = C\,\max(0, h_{i,j}-h_{k,\ell}) \times L_{i,j\to k,\ell}

where hi,j=Ti,j+wi,jh_{i,j}=T_{i,j}+w_{i,j}.

  • Pit/depression filling: Priority-Flood min-heap algorithm ensures all cells can drain.
  • Water redistribution: Enforced non-negativity through proportional scaling of outflows.
  • Flow accumulation and channel/ catchment identification: Steepest descent direction and recursive area tally.

5. Computational Complexity and Convergence

For the Handmer model, depression filling is O(NlogN)O(N\log N), time-stepping O(N)O(N) per iteration, with empirical convergence in O(104)\mathcal{O}(10^4) steps on 720×1440720\times1440 grids. Watershed labeling and channel detection are O(N)O(N) post-convergence. The CFL condition constrains maximum stable timestep: Δtmini,jΔxC(hi,jhk,)max\Delta t \le \min_{i,j} \frac{\Delta x}{C (h_{i,j}-h_{k,\ell})_{\text{max}}}

6. Applications and Validation Examples

  • IceWatch TerraFlow: Enables real-time, robust GLOF risk assessment by fusing glacier velocity with image-based meltwater assessment and temperature anomaly scores—synchronized on common spatiotemporal grids (Fatima et al., 18 Jan 2026).
  • Handmer TerraFlow: Capable of reconstructing plausible Martian hydrology, predicting distribution of channel networks, catchment basins, and steady-state water depths. Notable results include accurate identification of fossilized Martian waterways, validation against high-resolution terrain, and metrics on global drainage density and flow-length statistics. The model supports engineering assessment of terraformed hydrological cycles with minimal intervention required.

7. Interpretability and Domain-Specific Insights

Attention mechanisms in IceWatch TerraFlow enable factor analysis of periodicity and surge-detection, whereas the Handmer surface-runoff construct transparently exposes algorithmic transformation from raw DEM to catchment map. Quantile loss in the transformer is physically motivated, optimizing prediction robustness for rare surges. Depression filling and flow-accumulation calculations in the runoff model assure physical validity and correspondence to observable channel morphology.

A plausible implication is that both paradigms could be extended for other planetary hydrology or terrestrial hazard domains, where integration of multimodal remote sensing data and physics-informed time-series prediction is essential for interpretability and operational reliability.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to TerraFlow Model.