Latent Diffusion Models for Atmospheric Large Eddy Simulation

DOI

This repo contains much of the code developed in the manuscript "Ensemble flow reconstruction in the atmospheric boundary layer from spatially limited measurements through latent diffusion models" (Rybchuk et al. 2023a) and deployed in "A baseline for ensemble-based, time-resolved inflow reconstruction for a single turbine using large-eddy simulations and latent diffusion models" (Rybchuk et al. 2023b). The code here builds on the original LDM repo and is purpose built for a specific application: given synthetic measurements from an approximation of the observing network in the Rotor Aerodynamics Aeroelastics & Wake (RAAW) field campaign, generate an ensemble of plausible large eddy simulation states that could be used as initial conditions in the AMR-Wind code. Our intent in sharing the code is to make reproducibility easier, as well as provide a demo on how to modify the original LDM code for other researchers who hope to apply this algorithm to their problem.

This codebase works very similarly to the original LDM codebase, although we carry out inpainting differently. Here, inpainting is achieved by running main.py through slurm/inpaint_* as opposed to using an additional script.

Below, we plug one of our LDM-generated samples back into our LES code, and demonstrate that the LES successfully runs and doesn't crash :)

ldm_spinup.mp4