Hard-Constrained Deep Learning for Climate Downscaling

Paula Harder, Alex Hernández-García, Venkatesh Ramesh, Qidong Yang, Prasanna Sattegeri, Daniela Szwarcman, Campbell D. Watson, David Rolnick

Abstract

The availability of reliable, high-resolution climate and weather data is important to inform long-term decisions on climate adaptation and mitigation and to guide rapid responses to extreme events. Forecasting models are limited by computational costs and, therefore, often generate coarse-resolution predictions. Statistical downscaling, including super-resolution methods from deep learning, can provide an efficient method of upsampling low-resolution data. However, despite achieving visually compelling results in some cases, such models frequently violate conservation laws when predicting physical variables. In order to conserve physical quantities, here we introduce methods that guarantee statistical constraints are satisfied by a deep learning downscaling model, while also improving their performance according to traditional metrics. We compare different constraining approaches and demonstrate their applicability across different neural architectures as well as a variety of climate and weather data sets. Besides enabling faster and more accurate climate predictions through downscaling, we also show that our novel methodologies can improve super-resolution for satellite data and natural images data sets.

Introduction

Climate and weather models are computationally expensive, often necessitating simulations at coarse resolutions. To recover high-resolution details, researchers employ "downscaling"—a process analogous to super-resolution in computer vision. While deep learning models like Convolutional Neural Networks (CNNs) and Generative Adversarial Networks (GANs) excel at creating visually sharp outputs, they are often "physics-blind."

When predicting variables such as precipitation or water vapor, standard models frequently produce high-resolution patches where the total mass or energy does not match the low-resolution input. Previous attempts to mitigate this used "soft constraints" (penalizing physical violations in the loss function), but these only encourage consistency without guaranteeing it, often forcing a trade-off between predictive accuracy and physical validity.

Methodology: The Constraint Layer

To address these violations, this research introduces a specialized Constraint Layer integrated at the end of the neural network architecture. This layer acts as a final renormalization step, ensuring that the high-resolution output ($y$) perfectly averages back to the low-resolution input ($x$), thereby satisfying conservation laws by design.

The Softmax-based Constraint Layer (SmCL) ensures non-negativity and mass conservation by normalizing the network's raw predictions relative to the low-resolution input.

The authors explored four primary constraint mechanisms:

  • Additive (AddCL): Adjusts predicted pixels by adding a constant value to ensure the mean matches the input.
  • Scaled Additive (ScAddCL): Scales the adjustment based on pixel intensity.
  • Multiplicative (MultCL): Rescales the output by a factor.
  • Softmax-based (SmCL): Employs an exponential function to guarantee that the output is both physically consistent and strictly non-negative—a critical requirement for variables like water content.

By placing these layers at the network's output, the model is forced to search for solutions only within a "physically valid" subspace of the hypothesis space. This architectural choice ensures 100% physical consistency while often improving traditional performance metrics.

Integration of the constraint layer within a standard deep learning architecture, showing the direct path from the low-resolution input to the final constraining step.

Datasets and Evaluation

The methods were tested across a diverse array of data types to ensure robustness:

  • ERA5: A global climate reanalysis dataset, focusing on Total Water Content (TCW) with upsampling factors from 2x to 16x.
  • WRF & NorESM: Real-world weather and climate model outputs where low-res and high-res data originate from different simulations, providing a rigorous test of generalization.
  • MEn: A dataset requiring the simultaneous preservation of moist static energy and water mass.
  • Non-Climate Data: To test broader applicability, the layers were applied to lunar satellite imagery and standard computer vision benchmarks (Set5, Set14, Urban100, BSD100).

Key Results and Insights

Physics as a Regularizer

A significant finding is that hard constraints act as a powerful regularizer, actually improving standard performance metrics like Root Mean Square Error (RMSE) and Structural Similarity Index (SSIM). By restricting the model to physically possible outputs, the learning problem is simplified, leading to faster convergence and higher accuracy. On the TCW4 dataset, the constrained CNN improved the MS-SSIM from 99.40 to 99.50 and significantly reduced RMSE compared to unconstrained versions.

Zero Violation and Visual Quality

The hard-constrained models achieved zero mass conservation violation across all tests. Qualitatively, these models also removed common deep learning artifacts, such as "checkerboard" patterns, and significantly reduced errors in geographically complex regions like coastlines and mountain ridges.

Spatio-Temporal Modeling

The authors introduced the SR-FlowConvGRU architecture, combining optical flow with recurrent units. Integrating hard constraints into this model yielded the best results for time-evolving climate data, demonstrating that the methodology scales to complex, multi-dimensional tasks.

Limitations and Future Work

The efficacy of hard constraints relies on a known mathematical relationship between low-resolution and high-resolution data (e.g., the low-res pixel being a direct average of high-res pixels). In the NorESM dataset, where low-res and high-res data were generated by independent simulations that did not perfectly obey this relationship, the hard constraint was counterproductive. This suggests that the assumed constraint must accurately reflect the underlying data generation process.

Future research will focus on extending these layers to more complex climate emulation tasks and integrating these constrained neural networks directly into operational global climate models.

Summary updated

BibTeX
@article{harder2023hard,
  author = {Paula Harder and Alex Hernández-García and Venkatesh Ramesh and Qidong Yang and Prasanna Sattegeri and Daniela Szwarcman and Campbell D. Watson and David Rolnick},
  title = {{Hard-Constrained Deep Learning for Climate Downscaling}},
  journal = {J. Mach. Learn. Res.},
  year = {2023},
  url = {https://openreview.net/forum?id=hTpTHIWlQu},
}
Figure