Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Physically constrained generative adversarial networks for improving precipitation fields from Earth system models


Precipitation results from complex processes across many scales, making its accurate simulation in Earth system models (ESMs) challenging. Existing post-processing methods can improve ESM simulations locally but cannot correct errors in modelled spatial patterns. Here we propose a framework based on physically constrained generative adversarial networks to improve local distributions and spatial structure simultaneously. We apply our approach to the computationally efficient CM2Mc–LPJmL ESM. Our method outperforms existing ones in correcting local distributions and leads to strongly improved spatial patterns, especially regarding the intermittency of daily precipitation. Notably, a double-peaked Intertropical Convergence Zone, a common problem in ESMs, is removed. Enforcing a physical constraint to preserve global precipitation sums, the generative adversarial network can generalize to future climate scenarios unseen during training. Feature attribution shows that the generative adversarial network identifies regions where the ESM exhibits strong biases. Our method constitutes a general framework for correcting ESM variables and enables realistic simulations at a fraction of the computational cost.

This is a preview of subscription content, access via your institution

Relevant articles

Open Access articles citing this article.

Access options

Rent or buy this article

Prices vary by article type



Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Schematic of the CycleGAN model.
Fig. 2: Comparison of global ME maps over the June–August season.
Fig. 3: Qualitative and quantitative comparison of the intermittency in daily precipitation above 1 mm day−1 on 25 December 2014.
Fig. 4: Large-scale trends as a 3-year rolling mean of monthly and spatially average precipitation for the CMIP6 SSP5-8.5 scenario.
Fig. 5: Annual average of daily precipitation fields from CM2Mc-LPJmL together with attribution maps.

Data availability

The ERA5 reanalysis data are available for download at the Copernicus Climate Change Service (C3S) (!/dataset/reanalysis-era5-single-levels?tab=overview and!/dataset/reanalysis-era5-single-levels-preliminary-back-extension?tab=overview). Output data from the CM2Mc-LPJmL model are available at (ref. 67). The CMIP6 data can be downloaded at

Code availability

For the CM2Mc-LPJmL model code, see (ref. 68). The Python code for processing and analysing the data, together with the PyTorch Lightning69 code for training, is available as a compute capsule at Code Ocean (


  1. Palmer, T. & Stevens, B. The scientific challenge of understanding and estimating climate change. Proc. Natl Acad. Sci. USA. 116, 24390–24395 (2019).

    Article  Google Scholar 

  2. Wilcox, E. M. & Donner, L. J. The frequency of extreme rain events in satellite rain-rate estimates and an atmospheric general circulation model. J. Clim. 20, 53–69 (2007).

    Article  Google Scholar 

  3. Boyle, J. & Klein, S. A. Impact of horizontal resolution on climate model forecasts of tropical precipitation and diabatic heating for the TWP-ICE period. J. Geophys. Res. Atmos. 115, D23113 (2010).

    Article  Google Scholar 

  4. IPCC Climate Change 2021: The Physical Science Basis (Cambridge Univ. Press, In Press).

  5. Déqué, M. Frequency of precipitation and temperature extremes over France in an anthropogenic scenario: model results and statistical correction according to observed values. Glob. Planet. Change 57, 16–26 (2007).

    Article  Google Scholar 

  6. Tong, Y. et al. Bias correction of temperature and precipitation over China for RCM simulations using the QM and QDM methods. Clim. Dyn. 57, 1425–1443 (2021).

    Article  Google Scholar 

  7. Gudmundsson, L., Bremnes, J. B., Haugen, J. E. & Engen-Skaugen, T. Downscaling RCM precipitation to the station scale using statistical transformations–a comparison of methods. Hydrol. Earth Syst. Sci. 16, 3383–3390 (2012).

    Article  Google Scholar 

  8. Cannon, A. J., Sobie, S. R. & Murdock, T. Q. Bias correction of GCM precipitation by quantile mapping: how well do methods preserve changes in quantiles and extremes? J. Clim. 28, 6938–6959 (2015).

    Article  Google Scholar 

  9. Rasp, S. & Lerch, S. Neural networks for postprocessing ensemble weather forecasts. Mon. Weather Rev. 146, 3885–3900 (2018).

    Article  Google Scholar 

  10. Grönquist, P. et al. Deep learning for post-processing ensemble weather forecasts. Phil. Trans. R. Soc. A 379, 20200092 (2021).

    Article  MathSciNet  Google Scholar 

  11. François, B., Thao, S. & Vrac, M. Adjusting spatial dependence of climate model outputs with cycle-consistent adversarial networks. Clim. Dyn. 57, 3323–3353 (2021).

    Article  Google Scholar 

  12. LeCun, Y., Bengio, Y. & Hinton, G. Deep learning. Nature 521, 436–444 (2015).

    Article  Google Scholar 

  13. Goodfellow, I. et al. Generative adversarial nets. Adv. Neural Inform. Process. Syst. 27, 2672–2680 (2014).

    Google Scholar 

  14. Mirza, M. & Osindero, S. Conditional generative adversarial nets. Preprint at (2014).

  15. Isola, P., Zhu, J. Y., Zhou, T. & Efros, A. A. Image-to-image translation with conditional adversarial networks. In Proceedings of the 30th IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 5967–5976 (IEEE, 2017).

  16. Zhu, J.-Y., Park, T., Isola, P. & Efros, A. A. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2223–2232 (IEEE, 2017).

  17. Yi, Z., Zhang, H., Tan, P. & Gong, M. DualGAN: Unsupervised Dual Learning for Image-to-Image Translation. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2868–2876 (IEEE, 2017).

  18. Hoffman, J. et al. Cycada: cycle-consistent adversarial domain adaptation. In International Conference on Machine Learning (eds Dy, J., Krause, A.), 1989–1998 (PMLR, 2018).

  19. Ravuri, S. et al. Skillful precipitation nowcasting using deep generative models of radar. Nature 597, 672–677 (2021).

    Article  Google Scholar 

  20. Gagne, D. J., Christensen, H. M., Subramanian, A. C. & Monahan, A. H. Machine learning for stochastic parameterization: generative adversarial networks in the Lorenz’96 model. J. Adv. Model. Earth Syst. 12, e2019MS001896 (2020).

    Article  Google Scholar 

  21. Price, I. & Rasp, S. Increasing the accuracy and resolution of precipitation forecasts using deep generative models. In Proceedings of The 25th International Conference on Artificial Intelligence and Statistics (eds Camps-Valls, G., Ruiz, F. J. R. and Valera, I.), 10555–10571 (PMLR, 2022).

  22. Harris, L., McRae, A. T., Chantry, M., Dueben, P. D. & Palmer, T. N. A generative deep learning approach to stochastic downscaling of precipitation forecasts. Preprint at (2022).

  23. Raissi, M., Perdikaris, P. & Karniadakis, G. E. Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 378, 686–707 (2019).

    Article  MathSciNet  MATH  Google Scholar 

  24. Beucler, T. et al. Enforcing analytic constraints in neural networks emulating physical systems. Phys. Rev. Lett. 126, 098302 (2021).

    Article  MathSciNet  Google Scholar 

  25. Drüke, M. et al. CM2Mc-LPJmL v1.0: biophysical coupling of a process-based dynamic vegetation model with managed land to a general circulation model. Geosci. Model Dev. 14, 4117–4141 (2021).

    Article  Google Scholar 

  26. Hersbach, H. et al. The ERA5 global reanalysis. Q. J. R. Meteorol. Soc. 146, 1999–2049 (2020).

    Article  Google Scholar 

  27. Krasting, J. P. et al. NOAA-GFDL GFDL-ESM4 model output prepared for CMIP6 CMIP, Earth System Grid Federation, (2018).

  28. Smilkov, D., Thorat, N., Kim, B., Viégas, F. & Wattenberg, M. SmoothGrad: removing noise by adding noise. Preprint at (2017).

  29. Harris, D., Foufoula-Georgiou, E., Droegemeier, K. K. & Levit, J. J. Multiscale statistical properties of a high-resolution precipitation forecast. J. Hydrometeorol. 2, 406–418 (2001).

    Article  Google Scholar 

  30. Sinclair, S. & Pegram, G. Empirical mode decomposition in 2-D space and time: a tool for space–time rainfall analysis and nowcasting. Hydrol. Earth Syst. Sci. 9, 127–137 (2005).

    Article  Google Scholar 

  31. Allan, R. P. & Soden, B. J. Atmospheric warming and the amplification of precipitation extremes. Science 321, 1481–1484 (2008).

    Article  Google Scholar 

  32. Donat, M. G. et al. Updated analyses of temperature and precipitation extreme indices since the beginning of the twentieth century: the HadEX2 dataset. J. Geophys. Res. Atmos. 118, 2098–2118 (2013).

    Article  Google Scholar 

  33. Guerreiro, S. B. et al. Detection of continental-scale intensification of hourly rainfall extremes. Nat. Clim. Change 8, 803–807 (2018).

    Article  Google Scholar 

  34. Traxl, D., Boers, N., Rheinwalt, A. & Bookhagen, B. The role of cyclonic activity in tropical temperature-rainfall scaling. Nat. Commun. 12, 1–9 (2021).

    Article  Google Scholar 

  35. Tian, B. & Dong, X. The double-ITCZ bias in CMIP3, CMIP5, and CMIP6 models based on annual mean precipitation. Geophys. Res. Lett. 47, e2020GL087232 (2020).

    Article  Google Scholar 

  36. Galbraith, E. D. et al. Climate variability and radiocarbon in the CM2Mc Earth system model. J. Clim. 24, 4230–4254 (2011).

    Article  Google Scholar 

  37. Schaphoff, S. et al. LPJmL4 – a dynamic global vegetation model with managed land – part 1: model description. Geosci. Model Dev. 11, 1343–1375 (2018).

    Article  Google Scholar 

  38. Schaphoff, S. et al. LPJmL4 – a dynamic global vegetation model with managed land: part 2: model evaluation. Geosci. Model Dev. 11, 1377–1403 (2018).

    Article  Google Scholar 

  39. Von Bloh, W. et al. Implementing the nitrogen cycle into the dynamic global vegetation, hydrology, and crop growth model LPJmL (version 5.0). Geosci. Model Dev. 11, 2789–2812 (2018).

    Article  Google Scholar 

  40. Milly, P. C. & Shmakin, A. B. Global modeling of land water and energy balances. Part I: the land dynamics (LaD) model. J. Hydrometeorol. 3, 283–299 (2002).

    Article  Google Scholar 

  41. Anderson, J. L. et al. The new GFDL global atmosphere and land model AM2-LM2: evaluation with prescribed SST simulations. J. Clim. 17, 4641–4673 (2004).

    Article  Google Scholar 

  42. Sitch, S. et al. Evaluation of ecosystem dynamics, plant geography and terrestrial carbon cycling in the LPJ dynamic global vegetation model. Glob. Change Biol. 9, 161–185 (2003).

    Article  Google Scholar 

  43. Gerten, D., Schaphoff, S., Haberlandt, U., Lucht, W. & Sitch, S. Terrestrial vegetation and water balance – hydrological evaluation of a dynamic global vegetation model. J. Hydrol. 286, 249–270 (2004).

    Article  Google Scholar 

  44. Bondeau, A. et al. Modelling the role of agriculture for the 20th century global terrestrial carbon balance. Glob. Change Biol. 13, 679–706 (2007).

    Article  Google Scholar 

  45. Thonicke, K. et al. The influence of vegetation, fire spread and fire behaviour on biomass burning and trace gas emissions: results from a process-based model. Biogeosciences 7, 1991–2011 (2010).

    Article  Google Scholar 

  46. Drüke, M. et al. Improving the LPJmL4-SPITFIRE vegetation-fire model for South America using satellite data. Geosci. Model Dev. 12, 5029—5054 (2019).

    Article  Google Scholar 

  47. Forkel, M. et al. Identifying environmental controls on vegetation greenness phenology through model-data integration. Biogeosciences 11, 7025–7050 (2014).

    Article  Google Scholar 

  48. Forkel, M. et al. Constraining modelled global vegetation dynamics and carbon turnover using multiple satellite observations. Sci. Rep. 9, 18757 (2019).

    Article  Google Scholar 

  49. Fader, M., Rost, S., Mueller, C., Bondeau, A. & Gerten, D. Virtual water content of temperate cereals and maize: present and potential future patterns. J. Hydrol. 384, 218–231 (2010).

    Article  Google Scholar 

  50. Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. Preprint at (2014).

  51. He, K., Zhang, X., Ren, S. & Sun, J. Identity mappings in deep residual networks. In Computer Vision – ECCV 2016, Proceedings, Part IV (eds Leibe, B., Matas, J., Sebe, N., Welling, M.), 630–645 (Springer, 2016).

  52. Goodfellow, I., Bengio, Y. & Courville, A. Deep Learning (MIT Press, 2016).

  53. Johnson, J., Alahi, A. & Fei-Fei, L. Perceptual losses for real-time style transfer and super-resolution. In Computer Vision – ECCV 2016, Proceedings, Part II (eds Leibe, B., Matas, J., Sebe, N., Welling, M.), 694–711 (Springer, 2016).

  54. Courtier, P., Thépaut, J.-N. & Hollingsworth, A. A strategy for operational implementation of 4D-Var, using an incremental approach. Q. J. R. Meteorol. Soc. 120, 1367–1387 (1994).

    Article  Google Scholar 

  55. Rasp, S. et al. WeatherBench: a benchmark data set for data-driven weather forecasting. J. Adv. Model. Earth Syst. 12, e2020MS002203 (2020).

    Article  Google Scholar 

  56. Beck, H. E. et al. MSWEP V2 global 3-hourly 0.1° precipitation: methodology and quantitative assessment. Bull. Am. Meteorol. Soc. 100, 473–500 (2019).

    Article  Google Scholar 

  57. Zhuang, J., Dussin, R., Jüling, A. & Rasp, S. JiaweiZhuang/xESMF: v0.3.0 adding ESMF.LocStream capabilities, (2020).

  58. Rasp, S. & Thuerey, N. Data-driven medium-range weather prediction with a resnet pretrained on climate simulations: a new model for WeatherBench. J. Adv. Model. Earth Syst. 13, e2020MS002405 (2021).

    Article  Google Scholar 

  59. Logan, T. et al. Ouranosinc/xclim: v0.31.0. Zenodo (2021).

  60. Zhao, M. et al. The GFDL global atmosphere and land model AM4.0/LM4.0: 1. simulation characteristics with prescribed SSTs. J. Adv. Model. Earth Syst. 10, 691–734 (2018).

    Article  Google Scholar 

  61. Zhao, M. et al. The GFDL global atmosphere and land model AM4.0/LM4.0: 2. model description, sensitivity studies, and tuning strategies. J. Adv. Model. Earth Syst. 10, 735–769 (2018).

    Article  Google Scholar 

  62. GFDL Global Atmospheric Model Development Team. et al. The new GFDL global atmosphere and land model AM2–LM2: evaluation with prescribed SST simulations. J. Clim. 17, 4641–4673 (2004).

    Article  Google Scholar 

  63. Murdoch, W. J., Singh, C., Kumbier, K., Abbasi-Asl, R. & Yu, B. Definitions, methods, and applications in interpretable machine learning. Proceedings of the National Academy of Sciences 116, 22071–22080 (2019).

    Article  MathSciNet  MATH  Google Scholar 

  64. Toms, B. A., Barnes, E. A. & Ebert-Uphoff, I. Physically interpretable neural networks for the geosciences: applications to Earth system variability. J. Adv. Model. Earth Syst. 12, e2019MS002002 (2020).

    Article  Google Scholar 

  65. Sundararajan, M., Taly, A. & Yan, Q. Axiomatic attribution for deep networks. In International Conference on Machine Learning (eds Precup, D., Teh, Y. W.), 3319–3328 (PMLR, 2017).

  66. Montavon, G., Binder, A., Lapuschkin, S., Samek, W. & Müller, K.-R. in Explainable AI: Interpreting, Explaining and Visualizing Deep Learning (eds Samek, W., Montavon, G. et al.) pp. 193–209 (Springer, 2019).

  67. Drüke, M. Output data for the GMD publication gmd-2020-436. Zenodo (2021).

  68. Drüke, M., Petri, S., von Bloh, W. & Schaphoff, S. Model code for the GMD publication gmd-2020-436 (version 1.0). Zenodo (2021).

  69. Falcon, W. et al. PyTorch Lightning. GitHub (2019).

  70. Hess, P., Drüke, M., Petri, S., Strnad, F. & Boers, N. Physically constrained generative adversarial networks for improving precipitation fields from Earth system models. Code Ocean (2022).

Download references


The authors thank the referees for their helpful comments and suggestions. N.B. and P.H. acknowledge funding by the Volkswagen Foundation, as well as the European Regional Development Fund (ERDF), the German Federal Ministry of Education and Research and the Land Brandenburg for supporting this project by providing resources on the high-performance computer system at the Potsdam Institute for Climate Impact Research. M.D. acknowledges funding by the Volkswagen Foundation project POEM-PBSim. The authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting F.M.S. N.B. acknowledges further funding by the Federal Ministry of Education and Research under grant no. 01LS2001A.

Author information

Authors and Affiliations



P.H. and N.B. conceived the research and designed the study with input from all authors. P.H. performed the numerical analysis. M.D. conducted the CM2Mc-LPJmL experiments. All authors interpreted and discussed the results. P.H. wrote the manuscript with input from all authors.

Corresponding author

Correspondence to Philipp Hess.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Machine Intelligence thanks Lucy Harris and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Supplementary Information

Supplementary Figs. 1–14 and Tables 1 and 2.

Reporting summary

Rights and permissions

Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hess, P., Drüke, M., Petri, S. et al. Physically constrained generative adversarial networks for improving precipitation fields from Earth system models. Nat Mach Intell 4, 828–839 (2022).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:

This article is cited by


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing