SearcharxivSearch

arXiv · 2608.29532

Python-Fortran Hybrid Programming to Fuse AI and Physical Models: Examples of AI-LDA in climate and weather models (Hf2pMDA_v1.0)

Abstract

AI provides an unprecedented opportunity for advancing physics numerical modeling including data assimilation, which is a highly efficient and critically-important tool for advancing our understanding on Earth system and its applications. At the same time, deep incorporation of AI and physical modeling can make great driving to advance AI by injecting it rich physics from long time physics-based modeling development. However, since such physics models are conventionally coded in Fortran and AI algorithms usually are conveniently designed in Python, difficulties exist to directly incorporate AI algorithms into physics models, vice versa. Here, based on the F2PY protocol, we have developed a procedure that implements an infrastructure which conveniently conducts Hf2pMDA to form a program entity so that AI algorithms and physical models can invoke mutually. As examples, within Hf2pMDA, a climate coupled data assimilation (CDA) system is naturally upgraded to a strongly CDA (SCDA) system, and a 1 km high-resolution weather DA system is conveniently implemented within a multi-layer downscaling model that has multiscale DA in different nesting layers. In the climate SCDA system, a coupled general circulation model (CGCM) and a multiscale filtering algorithm is integrated by a Python main controller (PMC) that calls Fortran CGCM components and Weakly-CDA modules as well as a data-trained SCDA algorithm by latent space autoencoder in Python. In the high-resolution weather DA system, the downscaled model consisting of traditional Fortran DA modules in all mother domains and Python AE DA algorithm in the central child domain is integrated by a PMC that organizes these components. With convenient realization of deep incorporation of any AI algorithm and physics model, the Hf2pMDA has a great potential to make progress on both AI and scientific modeling.

Explore related subjects

Keep this discovery

BibTeXRIS

Xianrui Zhu, Zikuan Lin, Shaoqing Zhang, Zebin Lu, Songhua Wu, Xiangyun Hou, Zhisheng Xiao, Zhicheng Ren, Jiangyu Li, Jing Xu, Yang Gao, Rixu Hao, Xiaolin Yu, Mingkui Li, Guangliang Liu. 2026-08-30. Python-Fortran Hybrid Programming to Fuse AI and Physical Models: Examples of AI-LDA in climate and weather models (Hf2pMDA_v1.0). https://arxiv.org/abs/2608.29532

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Windowed Envelope Statistics for Time-Domain Significant Wave Height Estimation From HF Radar

Significant wave height (SWH) retrieval from high-frequency (HF) radar typically relies on a weak second-order Doppler continuum that is sensitive to noise, interference, and spectral leakage. This letter presents a Windowed Envelope Statistics Estimator (WESE) that operates directly on beam-formed time-domain voltages. A second-order term obtained from a Neumann expansion of the rough-surface field equation motivates quadratic compensation of localized radar features. WESE extracts the mean, standard deviation, or variance from overlapping windows of the in-phase, quadrature, or envelope-magnitude sequence, followed by quadratic compensation, rank ordering, least-squares regression, and causal smoothing. Evaluation used 335 synchronized hourly observations from a 13.385 MHz, 12-element WERA system at Argentia, Newfoundland and Labrador. The optimal configuration used quadrature variance, a 16-sample window, 896 retained chronological samples, and 30-h smoothing, achieving an RMSE of 0.152 m and a Pearson correlation of 0.978. This represents RMSE reductions of 32.1% and 18.7% relative to previously reported linear and second-order compensated ordered-statistics models, respectively. The results demonstrate robust time-domain SWH estimation without explicit Doppler-spectrum construction.

physics.ao-ph

KiloDA: Reconstructing kilometer-scale near-surface wind states from sparse station observations

Accurate kilometer-scale near-surface winds are important for understanding atmospheric processes over complex terrain, yet remain difficult to reconstruct from sparse and unevenly distributed observations. Here we introduce KiloDA, a diffusion framework for hourly kilometer-scale wind reconstruction from surface stations. KiloDA learns the statistical distribution and spatial structure of wind fields from historical 3-km Weather Research and Forecasting (WRF) model forecasts. At each reconstruction time, no contemporaneous WRF field is used. Instead, station observations provide the only constraints on the current atmospheric state and guide posterior sampling from the learned prior. In idealized WRF experiments, KiloDA recovers localized wind structures when only 0.24% of grid cells are observed and shows an overall advantage over conventional interpolation across terrain conditions and wind speed regimes. This capability largely transfers to real observations. In a fully withheld region, KiloDA reduces the median wind speed root mean square error (RMSE) by 19% relative to ERA5 reanalysis, using only observations outside the region, with the largest improvements over high-elevation and high-relief terrain. A random station holdout further confirms that this advantage extends across different complex-terrain locations and holdout configurations. These results show that historical model archives can provide useful structural knowledge for reconstructing kilometer-scale wind fields from sparse observations without requiring an accurate model estimate of the current atmospheric state.

physics.ao-ph