<<

Stormscapes: Simulating Dynamics in the Now

TORSTEN HÄDRICH, KAUST MIŁOSZ MAKOWSKI, UAM WOJTEK PAŁUBICKI, UAM DANIEL T. BANUTI, UNM SÖREN PIRK, Google AI DOMINIK L. MICHELS, KAUST

Fig. 1. Three types of simulated with our framework: low (left), a classical supercell (middle), and a high- precipitation supercell (right).

The complex interplay of a number of physical and meteorological phenom- ACM Reference Format: ena makes simulating a challenging and open research problem. We Torsten Hädrich, Miłosz Makowski, Wojtek Pałubicki, Daniel T. Banuti, explore a physically accurate model for simulating clouds and the dynamics Sören Pirk, and Dominik L. Michels. 2020. Stormscapes: Simulating Cloud of their transitions. We propose first-principle formulations for computing Dynamics in the Now. ACM Trans. Graph. 39, 6, Article 175 (December 2020), buoyancy and air pressure that allow us to simulate the variations of atmo- 16 pages. https://doi.org/10.1145/3414685.3417801 spheric density and varying temperature gradients. Our simulation allows us to model various cloud types, such as cumulus, stratus, and stratoscu- mulus, and their realistic formations caused by changes in the atmosphere. 1 INTRODUCTION Moreover, we are able to simulate large-scale cloud super cells – clusters Clouds are among the most common weather phenomena that one of cumulonimbus formations – that are commonly present during thunder- can observe. Ranging from dense layers of ground or during storms. To enable the efficient exploration of these stormscapes, we propose overcast skies, to the well known ‘cotton-like’ appearance at lower a lightweight set of high-level parameters that allow us to intuitively ex- altitudes, and even their absence during blue skies, clouds are the plore cloud formations and dynamics. Our method allows us to simulate result of the complex interplay of various physical and meteorologi- cloud formations of up to about 20 km × 20 km extents at interactive rates. cal phenomena that define the atmosphere. Due to their enthralling We explore the capabilities of physically accurate and yet interactive cloud simulations by showing numerous examples and by coupling our model visual appearance, cloud formations evoke fascination and fear alike, with atmosphere measurements of real-time weather services to simulate which makes clouds an important visual asset for the content cre- cloud formations in the now. Finally, we quantitatively assess our model ation in visual media, such as games or movies. with cloud fraction profiles, a common measure for comparing cloud types. In computer graphics, existing methods for clouds either focus on simulating specific cloud types [Goswami and Neyret 2017; Harris CCS Concepts: • Computing methodologies → Physical simulation. et al. 2003], their interactive generation [Dobashi et al. 2008], repre- Additional Key Words and Phrases: Cloud Simulation, Fluid Dynamics, sentations to enable cloud formations [Vimont et al. 2020], or the Physics-based Modeling and Simulation, Stormscapes, Weather Simulation. realistic rendering [Bitterli et al. 2018; Novák et al. 2018]. Moreover, it has even been recognized that clouds and other weather phenom- Authors’ addresses: Torsten Hädrich, KAUST, Visual Computing Center, Thuwal 23955, KSA; Miłosz Makowski, UAM, Umultowska 87, 61-614 Poznań, Poland; Wojtek Pałubicki, ena can be used as a means for modeling urban landscapes [Garcia- UAM, Umultowska 87, 61-614 Poznań, Poland; Daniel T. Banuti, UNM, Mechanical Dorado et al. 2017]. However, despite these advances the degree Engineering, Building #122, Albuquerque, NM 87131, USA; Sören Pirk, Google AI, 1600 of realism and the variety of simulated clouds is still limited and Amphitheatre Parkway, Mountain View, CA, 94043, USA; Dominik L. Michels, KAUST, Visual Computing Center, Thuwal 23955, KSA. the physically accurate simulation of cloud dynamics has only been partially covered by the visual computing community. Permission to make digital or hard copies of part or all of this work for personal or Due to their presence in our daily lives and due to their impor- classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation tance for weather prediction, the motivation to understand clouds on the first page. Copyrights for third-party components of this work must be honored. and their dynamics also extends far beyond common applications For all other uses, contact the owner/author(s). in visual computing. Existing methods in meteorology, engineer- © 2020 Copyright held by the owner/author(s). 0730-0301/2020/12-ART175 ing, and environmental sciences, aim to realistically simulate atmo- https://doi.org/10.1145/3414685.3417801 spheric conditions to enable more reliable predictions of weather

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. 175:2 • Hädrich, T. et al. phenomena – often over large spatial extents and based on com- Today, a large body of work exists to model and simulate fluid dy- plex and physically accurate models [Houze 1994; Yau and Rogers namics with their many intricate details [Bridson 2008]. While this 1996]. Most of these models are computationally demanding and spans a breadth of work that we cannot conclusively discuss, here therefore prevent the interactive exploration of cloud dynamics. we provide an overview of fluid dynamics, weather phenomena, and We argue that fast and yet realistic simulations of clouds play a cloud simulation models related to our work. significant role for further understanding weather phenomena, also Fluid Dynamics. Since the seminal work of Stam [1999] many for the data generation of learning-based approaches [Kim et al. methods have been introduced to improve solvers for two way cou- 2019; Ummenhofer et al. 2020; Wiewel et al. 2019]. pling [Lu et al. 2016; Teng et al. 2016; Zhu and Bridson 2005], based In this paper, we advance simulations of clouds by introducing on reduced order methods [Gupta and Narasimhan 2007; Jones a new physical model that allows expressing various cloud types et al. 2016; Treuille et al. 2006], Smoothed Particle Hydrodynam- and their transitions, as well as more dynamic phenomena such ics [Ihmsen et al. 2014; Koschier et al. 2019], or with an empha- as the formation of thunderheads, mesocyclones, and super-cell sis on compute and memory efficiency [Ferstl et al. 2014; Losasso , that we refer to as stormscapes. We enable these et al. 2004; McAdams et al. 2010; Setaluri et al. 2014; Zehnder et al. simulations by introducing novel formulations for buoyancy and 2018]. Numerous methods focus on even more intricate features of temperature distributions based on first-principles. Buoyancy is de- fluid flows, for example based on eigenfunctions [Cui. etal 2018], fined so as to consider variations of density in the atmosphere, while momentum transfer and regional projections [Zhang et al. 2016], our formulation for temperature profiles allows for varying temper- style-transfer [Sato et al. 2018b], optimization [Inglis et al. 2017], ature gradients, including temperature inversion profiles. Unlike or based on narrow band representations [Ferstl et al. 2016]. More existing models, this enables us to create conditions necessary to recently, it has also been recognized that neural networks provide simulate formations and even more complex a powerful means to represent details of fluids, for example with phenomena like the Kelvin-Helmholtz instability. Figure 1 shows an emphasis on temporal coherency [Xie et al. 2018], liquid splash three supercell thunderstorms simulation with our framework. modeling [Um et al. 2018], Lagrangian simulations [Ummenhofer To provide users with an intuitive way to interact with cloud et al. 2020], or even style-transfer [Kim et al. 2020]. formations, we identify a lightweight set of high-level physical pa- Cloud Rendering. While early methods for rendering clouds rameters that determine a weather scenario. Specifically, we find specifically focus on the efficient rendering based on impostors [Har- that ground humidity controls the cloud base altitude, while the at- ris and Lastra 2001], more advanced methods explicitly simulate mospheric temperature lapse rate independently controls the cloud light scattering based on estimating particles present in clouds top altitude. Our model is implemented as a grid-based fluid solver [Nishita et al. 1996] or by approximating the energy transport and to allow for the efficient simulation of complex cloud formations scattering of light [Bouthors et al. 2006, 2008]. Recent methods rely over large spatial extents. To further increase the realism of our on more accurate algorithms, such for computing non-exponential simulations we couple the fluid dynamics with detailed representa- free-flight distributions [Bitterli et al. 2018], fractional Gaussian tions of terrain obtained from real map data. Together this enables fields [Guo et al. 2019], radiative transfer [Miller et al. 2019], or physically accurate simulations and the interactive exploration of – more generally – Monte Carlo Integration [Novák et al. 2018] large-scale stormscapes. for modeling light transport in volumetric and participating media. In summary, our key contributions are: (1) we propose novel While all these methods aim to improve the visual fidelity of clouds first-principle formulations for computing buoyancy and air pres- or other volumetric media, we focus on simulating cloud formations sure that allow us to simulate the variations of atmospheric density by modeling the atmospheric effects that generate clouds. and varying temperature gradients; (2) we incorporate these for- Cloud Modeling and Artistic Control. A number of methods mulations into a grid-based fluid dynamics model allowing for the aim to realistically generate clouds along with their transitions and physically accurate simulation of various cloud types and transi- temporal evolution; prominent examples include fractals [D. Ebert, tions between them, including cumulus, stratus, fog, stratocumulus, F. Musgrave, D. Peachey, K. Perlin, and S. Worley. 2002; Peitgen and cumulonimbus; (3) we introduce a lightweight set of parameters and Saupe 1988; Voss 1988], noise [Lagae et al. 2010], and cellular that allow us to intuitively explore and model cloud formations; (4) automata [Dobashi et al. 2000]. Furthermore, due to the importance we successfully address the simulation of several complex weather for content creation a number of methods aim to model clouds while phenomena, such as thunderheads, mesocyclones, and various types facilitating artistic control through user-defined sketches [Stiver of super-cell thunderstorms; (5) we quantitatively assess our model et al. 2010; Wither et al. 2008], morphing [Yu and Wang 2011], using cloud fraction profiles, a common measure for comparing keyframing [Webanck et al. 2018], or animation [Schpok et al. 2003]. cloud types; (6) finally, we couple our model with data of real-time Dobashi et al. [2008] and Sato et al. [2018a] introduce sketch-based weather services to interactively explore cloud formations in the interfaces for cloud-shape control with plausible simulations of now. clouds, while other methods focus on extracting visual features from images to correlate them with simulated clouds [Dobashi et al. 2010; Yuan et al. 2014]. Garcia-Dorado [2017] go even further and 2 RELATED WORK employ a weather model along with urban procedural modeling Modeling and rendering complex natural phenomena such as fog of cities. Their approach specifically allows for sketching terrain [Blinn 1982], fluids [Kass and Miller 1990; Stam 1999], or clouds [Ka- properties that are used as initial conditions for weather simulations. jiya and Von Herzen 1984], has a long tradition in computer graphics. While these methods provide ways to control the modeling and

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. Stormscapes: Simulating Cloud Dynamics in the Now • 175:3 authoring of clouds, we introduce a physically accurate model for 12000m simulations along with an intuitive set of parameters to control Cirrus their formations. High Cloud and Weather Simulations. Physics-based methods aim Cumulonimbus Cirrostratus at simulating clouds as meteorological phenomena in the atmo- sphere. Among the first methods is the work of Kajiya andVon 7000m Altocumulus Altostratus Herzen [1984] who introduce a dynamical model for generating animations. A number of methods rely on Eulerian fluid Mid solvers for the interactive simulation of clouds that carefully balance Stratocumulus physical plausibility and compute limitations [Harris et al. 2003; 2000m Miyazaki et al. 2002; Overby et al. 2002]. Due to the complexity Cumulus of cloud simulations, also considering the often very large spatial Low Stratus extend, numerous methods introduce refined representations for simulating clouds. This ranges from geometric- and particle-based representations [Bouthors and Neyret 2004; Gardner 1985; Neyret 1997], coupled map lattices for extended cellular automata [Miyazaki Fig. 2. Illustration of the tropospheric cloud classification: altocumulus, al- et al. 2001], position-based dynamics [Ferreira Barbosa et al. 2015] to tostratus, cumulonimbus, cirrocumulus, cirrus, cirrostratus, cumulonimbus, layer-based approaches [Vimont et al. 2020]. Due to these representa- nimbostratus, stratocumulus, and stratus. Illustration inspired by Valentin tions a wide range of cloud phenomena can be simulated realistically de Bruyn (CC BY-SA 3.0). and efficiently. Goswami and Neyret [2017] introduce a Lagrangian approach for a convective cloud simulation that by definition allows a more convenient way to express boundary and atmospheric con- ditions. On another trajectory, Duarte and Gomes [2017] introduce and precipitation in the form of . Cloud supercells [Grant and a real-time approach for simulating cumulus clouds by exploiting Van Den Heever 2014] are clusters of cumulonimbus formations real atmospheric measurements represented as sounding curves. commonly present during thunderstorms resulting in the formation Similar to many of these approaches, we aim to simulate clouds of complex stormscapes. in a physically accurate manner; however, unlike them our cloud The realistic simulation of these phenomena includes complex model is based on first-principles and implemented as an integrated processes such as the exchange of water, vapor and heat between fluid solver that does not require a specialized representation, such parcels of air and the terrain. These dynamics can lead to fast, tur- as particles or layers. This offers the advantage that our method can bulent air flows, which are challenging to compute numerically. more realistically simulate cloud various and cloud phenomena that We introduce height maps and noise functions for vapor and heat are not captured by existing methods. as light-weight means to represent the water and temperature ex- change between terrain and air. Further, we allow users to specify conditions as an external velocity field acting on the fluid 3 OVERVIEW simulation. We develop a model derived from thermo- and fluid The main motivation for our approach is to enable the realistic dynamics that is comprised by two sets of parameters, one for the simulation of cloud types and their dynamic transitions. From a dynamic control of cloud formation and another for describing the meteorology perspective we are interested in simulating the at- atmospheric background. This enables us to express the transitions mospheric conditions in the troposphere (i.e. ground level up to between different cloud types and stormscapes. 13 km). Clouds form when a parcel of humid air is cooled below In the following sections we introduce our cloud dynamics model the saturation point of the contained water vapor. This includes and showcase its capabilities through a number of experiments. We ‘warm’ clouds such as cumulus, stratocumulus, stratus, altocumulus, simulate various cloud types, the transitions between clouds, and altostratus, and cumulonimbus and nimbostratus, as well as ‘cold’ the formation of complex stormscapes. To validate the plausibility clouds that form from ice, such as cirrus, cirrostratus, and cirrocu- of our model we use cloud fraction profiles to quantitatively assess mulus. Each cloud type can have further variations of so called cloud cloud formation. Finally, to explore the capabilities of physically species, such as cumulonimbus capillatus and cumulonimbus incus accurate and yet interactive simulations we couple our model with clouds. Figure 2 shows an illustration of the various cloud types and atmospheric measurements of real-time weather services to simulate at which altitudes they appear. For a more thorough overview on cloud formations in the now. cloud dynamics we refer the interested reader to the books of Yau and Rogers [1996] and Houze [1994]. 4 MODEL In this paper, we restrict ourselves to ‘warm’ clouds for which the In this section we provide an overview of our cloud dynamics model, transition is limited to liquid water. Specifically, we focus on simu- which can be divided into an atmospheric model that describes tem- lating cumulus, stratocumulus, cumulonimbus, and stratocumulus perature and pressure changes as a function of altitude, a 0D ther- clouds, as well as their transitions. Additionally, we simulate ad- modynamics model that determines local forces and the formation vanced cloud phenomena that are not captured by previous methods, of clouds, and the fluid dynamic model that determines the motion such as different types of supercells, thunderheads, mesocyclones, of humid air in the atmosphere.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. 175:4 • Hädrich, T. et al.

17000m Supercell

14500m Anvil Cumuliform Cumulonimbus 12000m (clouds with increasing vertical extent)

High Cumulus Congestus

7000m

Mid Stratocumulus Cumulus Humilis Stratus 2000m Fog Low

Fig. 3. Left to right: illustration of the development of a cumulonimbus cloud further becoming a part of a supercell (right).

4.1 Atmosphere 4.2.1 Generalities. In the present model, the background air is as- The background atmosphere is determined by the temperature dis- sumed to be dry. Then its molar mass is constant with tribution and the fundamental hydrostatic equation [Houze 1994] Mair = 28.96 g/mol . (5) for compressible fluids. The thermal (i.e. a column of rising air) is an air-water mixture, with 4.1.1 Atmospheric Pressure. The hydrostatic equation relates the a water vapor mole fraction XV , and the water molar mass density ρ of a fluid to the pressure gradient, MW = 18.02 g/mol , (6) dzp = −ρд , (1) so that, using the water vapor mole fraction X , an average molar in which д ≈ 9.81 m/s2 denotes the acceleration due to gravity. In V mass for the humid air in the thermal can be calculated as an ideal gas, pressure p is related to density and temperature T as ρ = p/(RT ), where R = R/M is the specific gas constant, i.e. the Mth = XV MW + (1 − XV )Mair . (7) ratio of the general gas constant R and the molar mass M. We introduce a temperature distribution analogous to the ‘International Mole fractions X and mass fractions Y are related through Standard Atmosphere’ (ISA; see Appendix A) using the temperature MW lapse rate d T = Γ, so that Eq. (1) can be integrated to YV = XV . (8) z Mth z z z ∫ dp д ∫ dz д ∫ dz Following Kessler [Kessler 1969], the amount of water in the atmo- = = , (2) sphere can be expressed in terms of the mass ratio qi of water per p R T (z) R T0 + Γz 0 0 0 mass unit of dry air, specifically vapor qv , cloud qc , and rain qr . The yielding an equation for pressure as a function of altitude, mole fractions Xi are related to the mass ratios qi via д qi   RΓ Xi = . (9) Γz q + 1 p(z) = p0 1 − . (3) i T0 4.2.2 Temperature in the Rising Thermal. The warm and humid air 4.1.2 Temperature Profile. Interesting weather phenomena occur at in a thermal rises when it has a lower density than the surrounding an inversion layer at high altitudes, for which we introduce a second air. The temperature profile of the atmosphere is prescribed and lapse rate Γ1, valid beyond an altitude of z1, so that the temperature ultimately a function of the weather, whereas the rising thermal profile is described as changes its local temperature because of its expansion to lower pressures at higher altitudes. Heat exchange with the surrounding 0 ≤ z ≤ z : T (z) = T + Γ z , 1 0 0 atmosphere can be neglected, and the process is slow enough to z1 < z : T (z) = Tz1 + Γ0z = T0 + Γ0z1 + Γ1(z − z1) . (4) assume an isentropic expansion to take place. The change in pressure directly determines the change in tem- An interesting stratification is given for Γ0 < 0, Γ1 > 0, then perature through the classical isentropic relations [Anderson 2003] the temperature inversion at z1 would act as an obstacle for the rising thermal, allowing the distinct flattened top (the ‘anvil’) ofa γ −1   th cumulonimbus to form. Usually, we employ a simple inversion by p(z) γth Tth(z) = Tˆ , (10) making use of a single lapse rate Γ setting Γ0 := Γ and Γ1 := −Γ. pˆ ˆ ˆ 4.2 Thermodynamics where T and p are the conditions at the ground. The isentropic exponent γ for water vapor and air are, respectively γair = 1.4 and The thermodynamics model based on first-principles provides lo- γV = 1.33, so that the isentropic exponent of the humid thermal is cal descriptions of air-water mixture properties, the temperature approximately change of the rising thermal, the buoyancy and thus resulting local γ = Y γ + (1 − Y )γ , (11) acceleration, and the phase transitions between vapor, cloud, and th V V V air rain. where YV is the mass fraction of water in the thermal.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. Stormscapes: Simulating Cloud Dynamics in the Now • 175:5

a) Cloud boundaries b) 4.2.3 Buoyancy and Acceleration of the Thermal. A difference in 10 buoyancy h = z1 density between atmosphere and thermal will result in a vertical 8 humidity acceleration following Archimedes’ principle. The humid thermal 6 2h0 air parcel of volume V and density ρ experiences an upward lift th 4

in in km h B(h )=0 force in air of density ρair of 0 휙 2 휙rel = 1 rel = 1 L = Vд(ρair − ρth) . (12) 0 0 1 0 1 B , 휙 B , 휙 Then, the buoyant acceleration on this thermal parcel, from New- rel rel ton’s second law F = ma, is given by Fig. 4. Illustration of relation between atmospheric profile data and cloud   L Vд(ρair − ρth) ρair boundaries. A warm/humid thermal will form on the ground and rise up, B = = = д − 1 . (13) cooling down in the process. The cloud base will form at the point where the m V ρth ρth relative humidity ϕrel has increased to unity due to the reduced temperature. We can treat thermal and air as ideal gases, for which (a) the thermal will be accelerated upwards to neutral buoyancy B(h0) = 0, p p and will be decelerated beyond. For the linear buoyancy profiles found here, ρ = = , (14) RT (R/M)T the top of the cloud will be found where the thermal has come to rest at approximately h = 2h . (b) An inversion layer will stop the upward draft of R = 0 with the universal gas constant 8314 J/g K and the gas molar the air that has not been decelerated, creating the characteristic flat anvil mass M. The pressure at every altitude is equilibrated between the shape of the cumulonimbus cloud top. thermal and the surrounding air, so that Eq. (13) can be simplified to  M T  B = д air th − 1 . (15) 4.2.6 Prediction of Cloud Boundaries. This static model already M th Tair allows for parameter studies and identification of relevant variables. The air temperature Tair = f (z) is specified by our atmospheric Figure 4 shows how the relative humidity ϕrel = qv /qvs and the model, Eq. (4), and the thermal temperature from the cooling due to buoyancy B determine the base and the top of the cloud. As an expansion, Eq. (10), the molar masses Mi as introduced in Sec. 4.2.1. approximation for this initial exploration, the effect of latent heat is neglected. Specifically, the buoyancy is determined by the tem- 4.2.4 Condensation and Cloud Formation. The initial water content perature gradient; the relative humidity in the thermal is controlled rises with the thermal. However, the rising humid air in the thermal by the temperature and the vapor mass ratio q . Figure 5 shows a cools down as it gains altitude and loses capacity to keep the water v number of atmospheric profiles of temperature, density, buoyancy, vapor solved. When the partial pressure on the water vapor in the vapor fraction, and relative humidity, to illustrate representative air drops below the saturation pressure at the local temperature, profiles for fog, stratocumulus, cumulus, and cumulonimbus clouds the excess water vapor that cannot be solved in the air anymore that can be created with this model. condenses into tiny droplets – clouds. This saturation mixing ratio Figure 5 further reveals the physical parameters that can be used q (T,p) can be approximated for the relevant temperature range vs to control the cloud dimensions. The cloud base is determined from as 380.16  17.67T  the point where the relative humidity exceeds unity and the vapor qvs (T,p) = exp (16) condenses. The top is reached where the upward velocity of the p T + 243.50 rising thermal vanishes, with the altitude of vanishing buoyancy for given temperature and pressure in Celsius respectively Pas- marking the mid-point altitude. cal [Yau and Rogers 1996]. The temperature and density plots are mostly similar across fog, 4.2.5 Heat Release from Condensation. In order to account for the stratocumulus, and cumulus clouds. They differ for cumulonimbus energy released by water vapor condensing into droplets when sat- as the temperature values of the thermal are higher relative to uration is reached at the base of the cloud, the temperature of the the atmospheric temperature values, which can be controlled by thermal, Eq. (4) has to be extended. The energy release per con- the temperature lapse rate Γ. The intersection point of the graphs densed water mass fraction XC is the latent heat L. The associated indicates the altitude of the top of the clouds, which is several temperature increase ∆TV then depends on the heat capacity, so dozen meters for fog, 2 000 meters for stratocumulus clouds, 2 500 that meters for cumulus clouds and 8 000 meters for cumulonimbus γ −1 γ −1 clouds. Alternatively, the top of the clouds is shown by the buoyancy   th   th p(z) γth p(z) γth L graph. Relative humidity ϕrel defines the base altitude at which a Tth(z) = Tˆ + ∆TV = Tˆ + XC . (17) pˆ pˆ cp cloud forms. Fog forms close to the ground surface, while cumulus and cumulonimbus clouds form at an altitude of 1 500 meters and Now, the heat capacity cp of the air in the thermal is required. This is with respect to only the gaseous part of the thermal, i.e. dry air stratocumulus at 1 800 meters. Analogously, this relationship can be expressed by the proportions of vapor fraction q and saturation and water vapor XV , v mixing ratio qvs . Varying the parameter values over time allows th γthR cp = , (18) us to describe the temporal development of weather, such as the Mth(γth − 1) transition of fog to stratocumulus clouds. By additionally applying with the thermal air molar mass Mth from Eq. (7), and the thermal an external (rotating) wind field to the simulation we can transition air ratio of specific heats γth from Eq. (11). to a typical summer afternoon thunderstorm.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. 175:6 • Hädrich, T. et al.

(a) Simulated fog, stratocumulus, cumulus, and cumulonimbus clouds (left to right). The corresponding altitude-temperature, -density, -buoyancy, -vapor fraction and -relative humidity profiles can be found below.

Temperature Density Buoyancy Vapor fraction Relative humidity 10 10 10 10 10 saturation 8 8 8 8 8 thermal m m 6 m m m k 6

k k 6 k 6 k 6

n n n n n i i i i i

4 4 4 4 4 h h thermal thermal h h h 2 2 2 2 2 atmosphere atmosphere 0 0 0 0 0 0 100 200 300 0.25 0.50 0.75 1.00 1.25 0.4 0.2 0.0 0.2 0.4 0.000 0.005 0.010 0.015 0.0 0.5 1.0 1.5 2.0 3 T in K in kg/m Acceleration B in m/s qvs, qv rel

(b) Fog: Vanishing buoyancy at ground level prevents thermals from rising, a relative humidity of one at ground level causes formation of fog. Temperature Density Buoyancy Vapor fraction Relative humidity 10 10 10 10 10 thermal saturation 8 8 8 8 8 atmosphere thermal m m 6 m m m k 6

k k 6 k 6 k 6

n n n n n i i i i i

4 4 4 4 4 h h thermal h h h 2 2 2 2 2 atmosphere 0 0 0 0 0 0 100 200 300 0.25 0.50 0.75 1.00 1.25 0.4 0.2 0.0 0.2 0.4 0.000 0.005 0.010 0.015 0.0 0.5 1.0 1.5 2.0 3 T in K in kg/m Acceleration B in m/s qvs, qv rel

(c) Stratocumulus: Finite buoyancy at ground causes thermal to rise, with a top of 2000 m, and a base with ϕrel = 1 at 1800 m. Temperature Density Buoyancy Vapor fraction Relative humidity 10 10 10 10 10 thermal saturation 8 8 8 8 8 atmosphere thermal m m 6 m m m k 6

k k 6 k 6 k 6

n n n n n i i i i i

4 4 4 4 4 h h thermal h h h 2 2 2 2 2 atmosphere 0 0 0 0 0 0 100 200 300 0.25 0.50 0.75 1.00 1.25 0.4 0.2 0.0 0.2 0.4 0.000 0.005 0.010 0.015 0.0 0.5 1.0 1.5 2.0 3 T in K in kg/m Acceleration B in m/s qvs, qv rel

(d) Cumulus: Buoyancy at ground causes thermal to rise, the higher humidity increases the top to 2500 m, and reduces the base with ϕrel = 1 to 1500 m. Temperature Density Buoyancy Vapor fraction Relative humidity 10 10 10 10 10 saturation 8 8 8 8 8 thermal m m 6 m m m k 6

k k 6 k 6 k 6

n n n n n i i i i i

4 4 4 4 4 h h thermal thermal h h h 2 2 2 2 2 atmosphere atmosphere 0 0 0 0 0 0 100 200 300 0.25 0.50 0.75 1.00 1.25 0.4 0.2 0.0 0.2 0.4 0.000 0.005 0.010 0.015 0.0 0.5 1.0 1.5 2.0 3 T in K in kg/m Acceleration B in m/s qvs, qv rel

(e) Cumulonimbus: a higher temperature lapse rate causes a constant upward acceleration of the thermal to the inversion layer at 8000 m, while maintaining a base of 1500 m.

Fig. 5. Simulation of the development of different cloud types (5a) and corresponding altitude-temperature, -density, -buoyancy, -vapor fraction and -relative humidity profiles: fog (5b), stratocumulus (5c), cumulus (5d), and cumulonimbus (5e) clouds. In accordance with Fig. 4, the cloud base is determined by the vapor reaching saturation conditions with the relative humidity ϕrel reaching unity; the top of the cloud is where the upward motion of the rising thermal has vanished.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. Stormscapes: Simulating Cloud Dynamics in the Now • 175:7

Condensation: Autoconversion:

Evaporation: Accretion: Evaporation:

Fig. 6. Illustration of Kessler’s scheme [1969] for modeling the transport between vapor, cloud water, and rain.

4.3 Fluid Dynamics The fluid dynamics model solves the motion of air in the atmosphere, Fig. 7. Visualization of the distribution of vapor (left; blue intensity map) as caused by external wind and differences in density. and heat (right; red intensity map) emission used for simulating high fog around Half Dome in Yosemite National Park (see Figure 15, top). The 4.3.1 Transport Equations. The system of equations for fluid trans- corresponding satellite image is shown in the background. While vapor port is developed from the principles of conservation of mass, en- emission is only present in the valley, a small amount of heat is also emitted ergy, and Newton’s second law. Following Boussinesq’s classical at its borders. assumption, we account for variable density in the source terms, but assume an approximately constant density in the flow dynamics due to the very low Mach numbers involved. From this follows directly that the momentum and energy equations are decoupled and can be solved independently. Our model is closed by using the water phase transport equations for vapor qv , condensed cloud qc , and rain qr based on Kessler’s classical model [1969]. The simulation of fluids is an established and ongoing research topic within the computer graphics community. Among others, Bridson and Müller provided a detailed introduction to fluid simu- lation from a computer graphics’ perspective in their SIGGRAPH Fig. 8. Illustration of a layered wind field profile (left) extracted by tracking course [2007]. the motion of streamlines from image data provided by an online weather As usual, in our model, the fluid’s state is described by a velocity service. The streamlines visualize the wind flow around the San Francisco field u : (x, t) 7→ u(x, t) which for given time t ∈ R+ and position Bay Area on Thursday, May 21, 2020 at 12noon local time. A scaling function 0 κ : h 7→ κ(h) (right) inspired from Limpinsel et al. [2018] is applied to scale x ∈ R3 returns the corresponding local flow u(x, t) ∈ R3. the velocities at different altitudes. 4.3.2 Mass. The conservation of mass prescribes the continuity equation of a solenoidal velocity field as ∇ · u = 0 . (19) Appendix B) is written as the Exner function used in atmospheric 4.3.3 Momentum. The change in momentum according to New- modeling. It can be considered as a non-dimensionalized pressure. ton’s second law is expressed in terms of the Navier-Stokes equa- tions, allowing for the solution of the temporal evolution of the 4.3.5 Water Continuity. The simplest model for rain, based on velocity field, Kessler’s methodology as illustrated in Figure 6, includes a third transport equation for a rain phase q in addition to vapor and cloud, −1 r ∂tu = −u · ∇u − ρ ∇p + ν∇ · ∇u + b + f , (20) along with source terms that couple the transport equations. Using in which the density is denoted by ρ, the pressure by p, and the the material derivative Dt φ = ∂φ/∂t + υ · ∇φ [Kundu et al. 2012], kinematic viscosity by ν. The first term on the right side of Eq. (20) we can write describes phenomena caused by advection followed by a pressure and a viscosity term. Buoyancy is taken into account by the force Dt qv = −Cc + Ec + Er , (22) 3 b ∈ R and other external forces are combined and described by an Dt qc = Cc − Ec − Ac − Kc , (23) additional external net force f ∈ R3. Please note, that the vector Dt qr = Ac + Kc − Er , (24) Laplacian in Eq. (20) is similarly defined as its scalar counterpart and simply acts component-wise. with the source terms Cc describing condensation, Ec describing the 4.3.4 Energy. The conservation of energy in temperature form can evaporation of clouds, Er describing the evaporation of rain, Ac de- be written [Houze 1994] as scribing autoconversion of raindrops from clouds, and Kc describing L the accretion of cloud water due to falling drops. Kessler suggests ∂t θ + (u · ∇)θ + Cc = 0 , (21) models in the form Ac = αA(qc − aT ) with aT = 0.001 kg/kg, and cp Π Kc = αKqcqr . Rain drops technically fall and are accelerated, but in which Cc = ∂t qc + (u · ∇)qc denotes the rate of condensation. they reach a constant terminal velocity almost right away (≈ 10 m/s). In Eq. (21), the latent head is given by L ≈ 2.5 J/kg, and the ratio We employ a constant vertical terminal velocity and the local lateral Π := T (t0)/θ of the absolute and the potential temperature (see wind velocity.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. 175:8 • Hädrich, T. et al.

5 IMPLEMENTATION The atmospheric and fluid dynamic models described in the previ- ous section provide the basis for the implementation of our cloud simulation framework. In the following, we provide details for the numerical integration procedure including the setup of the boundary conditions, different terrain properties allowing for variations in va- por and heat emission, as well as external wind fields. Furthermore, we introduce a lightweight parameter set to allow for effortless user control of our interactive simulator, and briefly describe the rendering process. Fig. 9. Cloud formation (top) caused by different noise patterns modeling 5.1 Numerical Integration the terrain (bottom) of the domain Ω. It is sampled from 128 × 128 noise Our simulator performs the numerical integration of a coupled patterns. The color-maps visualize texture values from 0 (black) to 1 (red). system of differential equations containing the Navier-Stokes equa- The terrain is completely flat at zero altitude and parameters E = 7.000 and tion (20), the incompressibility equation (19), the first law of ther- ϕrel = 26.9% as well as mixture parameters γheat ∈ {0.120, 0.332, 0.300} ∈ { } modynamics (21), and the water continuity equations (22–24). respectively γvapor 0.267, 0.221, 0.295 are used (from left to right). We discretize a spatial domain Ω ⊂ R3 using a uniform grid scale ∆x in which we store the current state of the system which 5.2 Terrain consists of the masses of water vapor q , condensed water q , and v c To conveniently include a variety of interesting landscapes we rain q next to the potential temperature θ and the velocity field u. r make use of a height map H : (x,y) 7→ H(x,y) defining the lower In most simulations, we employ a rectangular domain Ω but allow boundary ∂Ω := {(x,y, H(x,y))T ∈ Ω} of the domain Ω. for a non-flat terrain defined by a height map in order to include bottom We allow for temperature variations on ∂Ω . The tempera- interesting terrains as described in Section 5.1. bottom ture θ at a specific position x = (x,y,h)T on the ground is computed An overview of the numerical integration procedure is provided as the sum of the temperature T (according to ISA, see Appen- in Algorithm 1 in Appendix C. First, the velocity field is advected ISA dix A) for a given altitude h := H(x,y) and the specific heat emitter followed by the integration of viscosity-related effects by solving value E at position x, i.e. θ(x) = T (h) + E(x). We set E(x) = E as the corresponding diffusion process [Stam 1999]. For the advection ISA a constant global parameter within the whole scene and allow for process, we employ no-slip conditions at the bottom and free-slip scaling local heat emission by sampling from a terrain heat emission conditions at the ceiling. The vertical velocity is set identically to map (x,y) 7→ heat(x,y) ∈ [0, 1] for all (x,y, H(x,y)) ∈ ∂Ω as zero at the side boundaries and if an external wind field is specified, bottom illustrated in Figure 7. The temperature θ at a specific position x is the horizontal velocities are computed as the corresponding wind then computed as speeds. While controllable physical damping stabilizes the simulation, the θ(x) = TISA(h) + E · (γheat (m · heat(x,y) − 1) + 1) , (25) non-controllable and non-physical damping caused by numerical in which a mixture parameter γheat ∈ [0, 1] is used to scale the dissipation in these previous steps removes interesting turbulent influence of the noise pattern. In particular, if γheat = 0, the noise flow features on different scales, which are essential to obtain re- pattern is not influencing the temperature reducing Eq. (25) toθ(x) = alistic cloud patterns. By employing a vorticity confinement force TISA(h) + E. Instead, if γheat = 1, Eq. (25) is reduced to θ(x) = f ω as introduced by Steinhoff and Underhill [1994], we inject this TISA(h) +m · heat(x,y)· E, i.e. for maximum value of heat(x,y) = 1, energy back into the system. The strength of f ω can by controlled the heat emitter value E is scaled by a factor of m. We set m = 2 by a scale parameter ϵ [Fedkiw et al. 2001]. In the upcoming steps, in our simulations. From the temperature θ and the pressure p at buoyancy and external net forces (e.g., caused by wind effects or altitude h according to ISA, the corresponding static water vapor external user input) are computed and integrated numerically. This qvs is computed. Similarly to the mixture parameter γheat in Eq. (25), is followed by the enforcement of incompressibility due to pressure an additional mixture parameter γvapor ∈ [0, 1] is introduced scaling 2 −1 projection by solving the Poisson pressure equation ∇ p = ∆t ∇·u the influence of another emission map (x,y) 7→ vapor(x,y) ∈ [0, 1] and subtracting the pressure gradient form the velocity field [Brid- for all (x,y, H(x,y)) ∈ ∂Ωbottom modeling the distribution of vapor son and Müller 2007]. We employ Jacobi pressure projection using emission on the ground as illustrated in Figure 7. The emitted water 20 iterations on average. Pure Neumann boundary conditions are vapor qv at a specific position x is then computed as employed. Finally, θ, q , q , and q , whose temporal evolutions v c r q (x) = ϕ · q (θ(x),p (h)) are described by Eq. (21) and Eq. (22–24), are solved by advecting v rel vs ISA  these quantities and updating their mixing ratios. At the top and · γvapor (m · vapor(x,y) − 1) + 1 , (26) at the side boundaries, θ is set to the ambient temperature. For q , v in which the qvs (θ,p) is estimated using Eq. (16) for the saturation periodic side boundary conditions are used and it is set to zero at mixing ratio. Eq. (26) also takes the relative humidity ϕrel as a scaling the ceiling. The setup of θ on the ground is defined by heat emission parameter into account since the approximation (16) presupposes as qv is defined by the emission of water vapor. This is described in that the air is saturated. Section 5.1. At the whole boundary ∂Ω, the values of qc and qr are set identically to zero.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. Stormscapes: Simulating Cloud Dynamics in the Now • 175:9

Fig. 10. Variations of different cloud types (top) and corresponding photo comparisons (bottom): cumulus (a, b), cumulus humilis (c, d), stratus (e), stratocumulus (f, g), and cumulus congestus (h).

5.3 Wind Fields at a given altitude and scale it with a function κ : h 7→ κ(h). An While the general structure of heat and vapor emission maps is example of a wind field layer and a scaling function is shownin mainly designed based on relevant features of the specific terrain as Figure 8. illustrated Figure 7, our framework also supports the use of noise patterns as emission maps. The influence of different noise patterns 6 RESULTS for heat and vapor emission on cloud formations is illustrated in In this section, we present a variety of results simulated with our Figure 9. Moreover, we support the use of Perlin noise [1985] in C++/CUDA framework implemented as described in the previous order to add random perturbations to predefined emission maps. section. Table 1 provides an overview of the different scenes pre- Next to the number of octaves, specifically the noise parameters sented throughout this section including relevant parameters. Most frequency νPerlin and its persistence pPerlin can be controlled by the scenes can be simulated interactively or even in real-time. The user. computation times listed in Table 1 are measured on an up-to- Supporting the use of realistic wind fields is an essential feature date desktop computer running our simulation framework on a for simulating complex weather scenes. In theory, a wind field can NVIDIA®GeForce ®GTX 1080. Double precision floating point arith- be incorporated by defining the external force f . However, when metic is used. approaching different sources for weather data, we found that three- To render these scenes, we implemented volume ray casting [Pharr dimensional wind field profiles taking different altitude levels into et al. 2016] using OpenGL/GLSL. Rays of light are evaluated as they account are usually very sparse. In fact, mostly two-dimensional pass through the cloud volume. The opacity and color for each pixel layered profiles are available. Also, when employing user-designed intersecting the volume is returned and visualized on the screen. wind fields, generating them is more convenient when the task is This technique is suitable for real-time computing allowing for ex- reduced to specifying layered profiles in two dimensions. Since for ploring our simulations interactively within our framework. Unless most scenes, horizontal wind fields are particularly relevant, we otherwise stated, the final results shown throughout the paper are usually employ a single layer that specifies the wind field profile rendered offline using the Cycles renderer integrated in Blender.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. 175:10 • Hädrich, T. et al.

Fig. 11. Visualization of cloud transitions from fog (left) over stratocumulus to cumulus (right). The parameters listed in Table 1 are applied, and toallowfor the presentation of transitions in between, we interpolated the parameters linearly from left to right.

Fig. 12. Temporal evolution of a cumulonimbus cloud emerging from cumulus clouds.

Fig. 13. Simulation of the Kelvin-Helmholtz instability [North et al. 2014] generated with our framework.

6.1 Cloud Types and Transitions of Clouds We can simulate transitions of different cloud types, e.g., as illus- To support the effortless control of our simulation framework, we trated in Figure 3 from fog over stratus, stratocumulus and cumulus introduce a lightweight parameter set (see Appendix D) which con- to cumulonimbus. This is demonstrated in Figures 11 and 12. Start- ing form an ‘empty’ scene, fog can be generated by adjusting E > 0, tains the heat emitter value E and the scaling parameter γheat, the γ = γ = 0, and ϕ = 100%. Please note, that noise is not relative humidity ϕrel on the ground, the scaling parameter γvapor, heat vapor rel necessarily needed at this point. To transition the fog into stratus, and the Perlin noise frequency νPerlin and persistence pPerlin. For the convenient use of the simulator, all other parameters defining the E has to be slightly increased and ϕrel decreased. Stratocumulus atmospheric background can stay constant, and the aforementioned can then be generated by increasing γheat and γvapor slightly. Noise parameters can be manipulated interactively during the simulation should be enabled, and νPerlin and pPerlin adjusted depended on the to control the development of cloud formations and transitions. desired cloud pattern. To achieve the typical mixture of closed and separated structures, the parameter p should be explored. To While γheat and γvapor control the heat and the vapor emission Perlin further transition to cumulus clouds, E should be increased and ϕ variance, E and ϕrel directly influence the altitude of the upper and rel lower part of the clouds, respectively. In particular, increasing E decreased, γheat and γvapor should be increased, and νPerlin should leads to an increase of the altitude of the clouds’ ceilings, while be slightly reduced compared to the stratocumulus setup. By in- creasing γ , the cumulus clouds can then be further transitioned increasing ϕrel results in a lower altitude of the clouds’ bases (Fig- heat ure 10, a, b). The pattern of cloud structure can be controlled by into the cumulonimbus shape. Please note, that the appearance of cumulonimbus clouds is also significantly influenced by the lapse changing νPerlin and pPerlin (Figure 10, c, d). Some examples of pho- torealistically rendered clouds generated with our framework are rate Γ and the inversion point z1 marking the change in the temper- shown in Figure 10 including photo comparisons. ature gradient. In particular, the temperature inversion at z1 acts

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. Stormscapes: Simulating Cloud Dynamics in the Now • 175:11 as an obstacle for the rising thermal, causing the characteristic flat Table 1. The table provides an overview of the lightweight parameter set anvil top of a cumulonimbus to form. used in the scenes presented in this paper. Moreover, resolution (R) and computation time (T) measured in seconds per frame are listed. A constant time step size of ∆t = 1 min is used. The background parameters defining 6.2 Complex Scenes the atmosphere are set to Γ = −6.5 K/km and z1 = 8 km. As shown in Figure 15, our framework is capable of simulating com- plex scenes, such as the characteristic high fog around Half Dome in Fig. Scene E γheat ϕrel γvapor νPerlin pPerlin RT 11 Fog 7→ Stratus 0.5 0.0 1.00 0.00 - - 128×48×128 0.04 Yosemite National Park and clouds forming over the Atlantic Ocean 11 Stratus 7→ Stratocu. 1.6 0.0 0.73 0.00 - - 128×48×128 0.04 moving towards the Irish coast rising up the mountains. Detailed 11 Stratocumulus 7→ Cu. 1.6 0.3 0.70 0.00 0.07 0.50 128×48×128 0.04 11 Cumulus 7→ Cumulonib. 2.2 1.5 0.54 0.14 0.15 0.75 128×48×128 0.04 height maps and satellite textures of these regions are used. For the 15 Fog around Half Dome 1.1 - 0.86 - - - 369×144×288 0.12 Half Dome scene, heat and vapor emission maps are set up as shown 15 Irish Coast Day 2.2 1.6 0.54 0.14 0.15 0.75 410×160×320 0.15 15 Irish Coast Night 2.3 1.6 0.54 0.16 0.15 0.75 410×160×320 0.15 in Figure 7. While vapor emission is only present in the valley, a 16 Rain over the Alps 1.7 0.3 0.65 0.0 0.07 0.50 348×62×256 0.17 13 K.-H. Instability 0.5 0.0 1.00 0.0 - - 128×32×16 0.02 small amount of heat is also emitted at its outside. A uniform wind 17 Low P. Supercell 15 0.0 0.70 0.00 - - 192×96×96 0.12 field is used to move the fog through the valley. 17 C. Supercell 15 0.0 0.70 0.00 - - 384×192×192 0.25 × × In the Irish coast scene, we employ different heat emission maps 17 High P. Supercell 15 0.0 0.80 0.00 - - 288 48 288 0.19 distinguishing between a day and a night scene. Since the sea has a larger heat capacity compared to the land part, during the day, the land warms up more quickly compared to the sea. During the night, the water keeps the heat from the day significantly longer compared to the land. This results in the emerging of a sea breeze during the day and a land breeze during the night. We set up the heat emission maps for the two scenes accordingly while vapor is mostly emitted from the sea part. Fig. 14. Real-time exploration of cloudy weather in the San Francisco Bay 6.3 Rain Area on May 21, 2020 at 12noon (left) and on October 11, 2019 at 12noon local time. We use in-time weather-data streamed to our framework to Figure 16 illustrates the simulation of rain. Rain clouds are formed as simulate realistic cloud formations. a consequence of cold air compressing multiple tiny water droplets together to larger rain drops. The transition of humid air, clouds, These rotating thunderstorms result in the formation of complex and water is expressed by Kessler’s scheme [1969] in our method. stormscapes. The literature usually considers three different types We illustrate the effect of rain in our simulation with the example of of supercells [Grant and Van Den Heever 2014]: next to classical a scene of a cumulonimbus cloud forming over the Alps (Figure 16, supercells, low and high precipitation supercells are studied. To un- left). In Figure 16 (right), we visualize rain as a color map that shows derstand their differences, we have to specifically consider the (ex- low amounts of rain in blue and high amounts of rain in orange. To ternal) wind relative to the storm itself. If high-speed (> 110 km/h), better visualize the effect, clouds have been removed from both the storm-relative are present in the upper layers, this leads to cloud base and the cumulonimbus cloud toward the camera. Heavy a separation of updraft and downdraft regions resulting in a low down pour can be observed at the right side of the cumulonimbus precipitation supercell. In contrast, classical supercells typically oc- cloud adding to the realism of the scene. cur in weather conditions with storm-relative wind speeds of about 70 to 110 km/h. Moreover, since they are devoid of precipitation, 6.4 Kelvin-Helmholtz Instability their mesoscale features are clearly visible. In environments with The Kelvin-Helmholtz instability [North et al. 2014] can be observed storm-relative wind speed below 70 km/h, a small separation of in several cases when a velocity difference across the interface be- updraft and downdraft regions usually results in high precipitation tween two fluids is present. In the context of clouds, it can sometimes supercells. be observed during sunrise or sunset when the lower part of the To simulate different types of supercells, we apply a rotationally clouds cools down and becomes significantly more dense compared symmetric layered wind profile modeling the rotating upstream to to the upper part. As a consequence, the air in the upper part moves a cumulonimbus formation. We then add strom-relative winds of faster resulting in the emergence of a pattern comparable to ocean varying speeds based on the specific supercell type. Our framework waves when wind is blowing over water. We can reproduce this allows for the dynamic simulation of the three types of large-scale instability as demonstrated in Figure 13 by applying a wind field cloud supercells as shown in Figure 17. Especially, classical super- characterized by greater velocities in upper simulation grid cells cells are popular footage among photographers and film makers compared to lower grid cells. The heat emitter parameter E is then showing close-up photos and time-lapse videos of their structure adjusted to a value that allows cloud condensation to produce a and temporal evolution. Inspired from such pieces of art, we present wave-like cloud pattern. visualisations of our simulations of different supercells in Figure 1.

6.5 Cloud Supercells 6.6 Weather Nowcasting Supercells form if mesocyclones (i.e. continuously rotating updrafts) To further showcase the capabilities of a physically accurate cloud are present, usually within clusters of cumulonimbus formations. simulation model, we coupled our framework with atmospheric

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. 175:12 • Hädrich, T. et al.

Fig. 15. Simulations of high fog around Half Dome in Yosemite National Park with two top-down (top, left and center), and one in-scene viewpoint (top, right), and clouds forming at the Irish coast (bottom). During the day, a sea breeze (middle) moves the clouds built up over the Atlantic Ocean to thecoastrisingup the mountains (left). During the night, the opposite effect can usually be observed. Clouds formed over the land (right) are moved to the seaasaresultof land breeze.

Fig. 16. Heavy rain over the Alps caused by a cumulonimbus cloud (left). The amount of rain is visualized using a color map (right) from blue (low amount)to orange (high amount). To better visualize the effect of rain, clouds have been removed from both the cloud base and the cumulonimbus cloudtowardthe camera in the right image. measurements of weather services to simulate cloud formation in that can be compared to weather conditions on a different date, real-time enabling weather nowcasting. We manually select a geo- e.g. October 11, 2019 at 12pm local time (right). To allow for an graphic location and query atmospheric conditions via temperature, interactive exploration of the scene in real-time, we use a volume humidity and wind maps as provided by a weather service.1 Tem- ray casting-based online renderer. Along with real-time simulations perature and humidity maps can directly be used in our framework for cloud dynamics, weather nowcasting can provide a more im- instead of noise maps (see Section 5.1). A wind map is a dynamic mersive experience for exploring urban landscapes. Furthermore, streamline plot visualizing real-time wind velocities projected on we argue that coupling real-time simulations with in-time observa- satellite imagery in 2D. We use a sequence of wind maps to approx- tions provides a new way of interacting with real world phenomena, imate a wind field for our simulation by tracking the motion of especially when used in virtual and augmented reality applications. streamlines with optical flow [Itseez 2015]. We then define awind field by interpolating the generated motion vectors across a regular 7 EVALUATION, DISCUSSION, AND LIMITATIONS lattice and use the wind field in our framework to sample wind In addition to the qualitative visual assessment in Fig. 10, we provide speeds at different altitudes by scaling the interpolated values with two quantitative evaluation strategies. The first is the 0D thermody- the function κ. This is illustrated in Figure 8. The wind velocities namics model illustrated in Fig. 5, which can be used to (1) confirm are used as an external wind field as described in Section 5.3. that our CFD simulations do in fact match the theoretical predic- In Figure 14 we show the result of weather nowcasting for the tions of cloud base and top, and (2) can also be used in an a priori San Francisco Bay Area on May 21, 2020 at 12pm local time (left) exploratory way to determine the set of parameters required to 1http://www.ventusky.com create a cloud with certain characteristics. The second evaluation

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. Stormscapes: Simulating Cloud Dynamics in the Now • 175:13

Fig. 17. Temporal evolution of different types of cloud supercells. Strong storm-relative winds (> 110 km/h) cause an interruption of the formation of the anvil resulting in a low precipitation supercell (top) while low (< 70 km/h) storm-relative winds result in a high precipitation supercell (bottom). Moderate wind speeds (70 to 110 km/h) lead to the classical supercell (middle). method for our modeling approach is to show cloud fraction pro- from common cloud types, such as cumulus or stratus, to more files for various cloud morphologies. Cloud fraction is a widely used complex patterns, such as stormscapes. Stormscapes are weather metric in meteorology and environmental sciences to demarcate phenomena that happen over a large range of altitudes, i.e. the whole different cloud types. As inspiration to model scenes for whichwe troposphere. To capture these phenomena, this requires a model to calculated cloud fraction profiles we used reconstructions from Li- simulate the fluid dynamics continuously over the whole domain, dar and infrared satellite observations [Cesana et al. 2019], as well instead of relying on spatial abstractions, such as layers. Moreover, as generated data by established simulations in meteorology [Shen introducing an explicit inversion point allows us to intuitively model et al. 2020]. Cloud fraction is defined as the percentage of grid cells the formation of cumulonimbus clouds, which is not possible with rendered as a cloud (qc > 0) in the whole grid space. We visualize existing methods. Simulating stormscapes is especially complicated the summed frequencies at different altitudes in Figure 18. There, we due to the high wind velocities, underlying cloud dynamics and is show the cloud fraction profiles for exemplary stratus, stratocumu- addressed in our method by explicitly modeling buoyancy. lus and scenes. Stratocumulus have a limited vertical Unlike Harris et al. [2003], we generalize the atmospheric temper- extent [Houze 1994], resulting in a narrower cloud fraction over ature profile for cases in which buoyancy vanishes or dramatically altitude compared to cumulus or stratus clouds [Cesana et al. 2019, reverses. In addition, our formulation of buoyancy does not depend Figure 16]. We simulate this phenomenon by lowering emitter heat on pressure as our derivation indicates that the impact of the pres- values E for the scene. Cumulus clouds occur sure field is negligible on parameters relevant for cloud formation: a over a wider range of altitudes compared to other cloud types, which layer on top of the given atmosphere merely compresses all under- was simulated by increasing the γheat parameter value. Figure 18 lying layers, and does not noticeably change the resulting buoyancy also depicts the temporal evolution of cloud fraction profiles of a important for cloud formation and dynamics. rising cumulonimbus cloud which is characterized by the emergence On the other hand, recent work in cloud modeling captures the of the characteristic anvil-like top of the cloud at simulation time formation of other cloud types, beyond the scope of this work, by t2 [Shen et al. 2020, Figure 3]. adopting a higher scale of abstraction [Vimont et al. 2020]. The results we show indicate that our method can simulate various 7.1 Discussion and Limitations plausible cloud morphologies while expressing accurately seminal Our focus was on devising a physically accurate model to enable the realistic simulation of water-based cloud dynamics. This ranges

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. 175:14 • Hädrich, T. et al. physical hypotheses of cloud formation. Furthermore, our simula- tions of cloud types can be quantitatively compared to data reported in meteorology based on cloud fraction profiles. While our model is able to capture the various water-based cloud types, we did not conclusively explore their variations, which are commonly described as cloud species. An example thereof is the cumulonimbus capillatus cloud species which is distinguished from the cumulonimbus incus species. The capillatus species exhibits a more rounded top of the cloud instead of the pronounced anvil shape of the incus species. Simulation results for the incus species are shown in Figure 12. Furthermore, our model does currently not allow simulating ice cloud formations, such as cirrus clouds, which are determined by mixing ratios of ice, and . In principle, the Kessler methodology adopted in our approach could be extended to also account for these additional quantities. The Fig. 18. Fraction profiles of stratus, stratocumulus, and cumulus (top), and specific mechanisms underlying ice cloud formation are still an of a developing cumulonimbus cloud simulated with our framework at time active topic of research in the environmental science community. points t0, t1, and t2 (bottom). Compared to cloud models used in climatology, e.g. Large Eddy Simulations (LES) [Cesana et al. 2019; Seeley et al. 2019] our method to climatology and to further investigate the dynamics of cloud does not represent the feedback of heat transfer between the ground morphologies. and air. For example, as large clouds rise into the upper troposphere they can shade and subsequently cool the ground surface which can ACKNOWLEDGEMENTS influence cloud dynamics in the lower troposphere. This work has been supported by KAUST (individual baseline fund- ing). We acknowledge the reviewers’ valuable comments.

8 CONCLUSION AND FUTURE WORK REFERENCES We have presented a novel framework for the physically accurate J. D. Anderson. 2003. Modern compressible flow with historical perspective (3rd ed.). McGraw Hill. simulation of clouds based on first-principles. In particular, we pro- B. Bitterli, S. Ravichandran, T. Müller, M. Wrenninge, J. Novák, S. Marschner, and W. posed novel formulations for computing buoyancy and air pressure Jarosz. 2018. A Radiative Transfer Framework for Non-Exponential Media. ACM that account for variations of atmospheric density and temperature Trans. Graph. 37, 6, Article Article 225 (Dec. 2018), 17 pages. J. F. Blinn. 1982. Light Reflection Functions for Simulation of Clouds and Dusty Surfaces. gradients. Using our approach, we can simulate several different SIGGRAPH Comput. Graph. 16, 3 (1982), 21–29. cloud types, their transitions, and complex cloud phenomena that A. Bouthors and F. Neyret. 2004. Modeling clouds shape. In Eurographics 2004 - Short we refer to as stormscapes. We introduce heat emitter, relative hu- Presentations, M. Alexa and E. Galin (Eds.). Eurographics Association. A. Bouthors, F. Neyret, and S. Lefebvre. 2006. Real-Time Realistic Illumination and midity on the ground, and Perlin noise function parameters as light- Shading of Stratiform Clouds. In Proceedings of the Second Eurographics Conference weight means for simulating cloud formations, while maintaining on Natural Phenomena (NPH’06). Eurographics Association, 41–50. A. Bouthors, F. Neyret, N. Max, E. Bruneton, and C. Crassin. 2008. Interactive Multiple interactive rates for rendering. Together this enables the intuitive Anisotropic Scattering in Clouds. In I3D (2008). 173–182. exploration of large-scale and realistic cloud formations. We have R. Bridson. 2008. Fluid Simulation for Computer Graphics. A K Peters, CRC Press. shown the capabilities of our model through numerous experiments R. Bridson and M. Müller. 2007. Fluid simulation: SIGGRAPH 2007 course notes. (2007), 1–81. of advanced and intricate cloud formations, including rare phenom- G. Cesana, A. D. Del Genio, and H. Chepfer. 2019. The Cumulus And Stratocumulus ena such as the Kelvin-Helmholtz instability and different types CloudSat-CALIPSO Dataset (CASCCAD). Earth Syst. Sci. Data 11 (2019), 1745–1764. of supercells. Furthermore, we have coupled our cloud model with D. Ebert, F. Musgrave, D. Peachey, K. Perlin, and S. Worley. 2002. Texturing and Modeling: A Procedural Approach (3rd ed.). Morgan Kaufmann Publishers Inc., San Francisco, underlying terrain and connected it to real-time weather services CA, USA. simulating realistic cloud formations in the now. Q. Cui, P. Sen, and T. Kim. 2018. Scalable Laplacian Eigenfluids. ACM Trans. Graph. 37, 4, Article 87 (2018), 12 pages. A framework for the physically accurate simulation of cloud Y. Dobashi, K. Kaneda, H. Yamashita, T. Okita, and T. Nishita. 2000. A Simple, Effi- dynamics opens multiple avenues for future work. For one, it would cient Method for Realistic Animation of Clouds. In Proceedings of the 27th Annual be interesting to extend our model to simulate clouds that form Conference on Computer Graphics and Interactive Techniques (SIGGRAPH ’00). 19–28. Y. Dobashi, K. Kusumoto, T. Nishita, and T. Yamamoto. 2008. Feedback Control of from ice instead of water. This would allow us to simulate an even Cumuliform Cloud Formation Based on Computational Fluid Dynamics. In ACM wider range of cloud types and their transitions. Furthermore, while SIGGRAPH 2008 Papers (SIGGRAPH ’08). Association for Computing Machinery, our model already simulates rain, extending it to other forms of Article Article 94, 8 pages. Y. Dobashi, Y. Shinzo, and T. Yamamoto. 2010. Modeling of Clouds from a Single precipitation, such as snow, sleet, or hail, would allow us to more Photograph. CGF 29, 7 (2010), 2083–2090. accurately simulate weather. Moreover, it seems promising to further R. P. M. Duarte and A. J. P. Gomes. 2017. Real-Time Simulation of Cumulus Clouds through SkewT/LogP Diagrams. Comput. Graph. 67, C (2017), 103–114. explore the two-way coupling of terrain and cloud formations or R. Fedkiw, J. Stam, and H. W. Jensen. 2001. Visual Simulation of Smoke. Proc. of ACM other weather phenomena. While we have shown the interaction SIGGRAPH (2001), 15–22. of clouds and realistic landscapes, the simulation of various terrain C. W. Ferreira Barbosa, Y. Dobashi, and T. Yamamoto. 2015. Adaptive Cloud Simulation Using Position Based Fluids. Comput. Animat. Virtual Worlds 26, 3–4 (2015), 367–375. types is likely to result in more realistic simulations of clouds. Finally, F. Ferstl, R. Ando, C. Wojtan, R. Westermann, and N. Thürey. 2016. Narrow Band FLIP it would be interesting to explore the connection of our model for Liquid Simulations. In Proceedings of the 37th Annual Conference of the European

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. Stormscapes: Simulating Cloud Dynamics in the Now • 175:15

Association for Computer Graphics (EG ’16). Eurographics Association, 225–232. Conference on Computer Graphics and Interactive Techniques (SIGGRAPH ’96). Asso- F. Ferstl, R. Westermann, and C. Dick. 2014. Large-Scale Liquid Simulation on Adaptive ciation for Computing Machinery, 379–386. Hexahedral Grids. TVCG 20, 10 (2014), 1405–1417. G. R. North, J. A. Pyle, and F. Zhang. 2014. Encyclopedia of Atmospheric Sciences. Number I. Garcia-Dorado, D. G. Aliaga, S. Bhalachandran, P. Schmid, and D. Niyogi. 2017. Fast v. 1-6. Elsevier Science. Weather Simulation for Inverse Procedural Design of 3D Urban Models. ACM Trans. J. Novák, I. Georgiev, J. Hanika, J. Křivánek, and W. Jarosz. 2018. Monte Carlo Methods Graph. 36, 2, Article Article 21 (2017), 19 pages. for Physically Based Volume Rendering. In ACM SIGGRAPH 2018 Courses (SIGGRAPH G. Y. Gardner. 1985. Visual Simulation of Clouds. In Proceedings of the 12th Annual ’18). Article Article 14, 1 pages. Conference on Computer Graphics and Interactive Techniques (SIGGRAPH ’85). Asso- D. Overby, Z. Melek, and J. Keyser. 2002. Interactive physically-based cloud simulation. ciation for Computing Machinery, 297–304. In 10th Pacific Conference on Computer Graphics and Applications, 2002. Proceedings. P. Goswami and F. Neyret. 2017. Real-Time Landscape-Size Convective Clouds Simula- 469–470. tion and Rendering. In Proceedings of the 13th Workshop on Virtual Reality Interactions H.-O. Peitgen and D. Saupe (Eds.). 1988. The Science of Fractal Images. Springer-Verlag, and Physical Simulations (VRIPHYS ’17). Eurographics Association, 1–8. Berlin, Heidelberg. L. D. Grant and S. C. Van Den Heever. 2014. Microphysical and dynamical characteristics K. Perlin. 1985. An Image Synthesizer. In Proceedings of the 12th Annual Conference of low-precipitation and classic supercells. Journal of the Atmospheric Sciences 71, 7 on Computer Graphics and Interactive Techniques (SIGGRAPH ’85). Association for (2014), 2604–2624. Computing Machinery, 287–296. J. Guo, Y. Chen, B. Hu, L.-Q. Yan, Y. Guo, and Y. Liu. 2019. Fractional Gaussian Fields M. Pharr, W. Jakob, and G. Humphreys. 2016. Physically Based Rendering: From Theory for Modeling and Rendering of Spatially-Correlated Media. ACM Trans. Graph. 38, to Implementation (3rd ed.). Morgan Kaufmann Publishers Inc. 4, Article Article 45 (July 2019), 13 pages. S. Sato, Y. Dobashi, T. Kim, and T. Nishita. 2018b. Example-Based Turbulence Style M. Gupta and S. G. Narasimhan. 2007. Legendre Fluids: A Unified Framework for Ana- Transfer. ACM Trans. Graph. 37, 4, Article 84 (2018), 9 pages. lytic Reduced Space Modeling and Rendering of Participating Media. In Symposium S. Sato, Y. Dobashi, and T. Nishita. 2018a. Editing Fluid Animation Using Flow Interpo- on Computer Animation (SCA ’07). Eurographics Association, 17–25. lation. ACM Trans. Graph. 37, 5, Article 173 (2018), 12 pages. M. J. Harris, W. V. Baxter, T. Scheuermann, and A. Lastra. 2003. Simulation of Cloud J. Schpok, J. Simons, D. S. Ebert, and C. Hansen. 2003. A Real-Time Cloud Modeling, Dynamics on Graphics Hardware. In ACM SIGGRAPH/EUROGRAPHICS Conference Rendering, and Animation System. In Symposium on Computer Animation (SCA ’03). on Graphics Hardware (HWWS ’03). Eurographics Association, 92–101. Eurographics Association, 160–166. M. J. Harris and A. Lastra. 2001. Real-Time Cloud Rendering. CGF 20, 3 (2001), 76–85. J. T. Seeley, N. Jeevanjee, W. Langhans, and D. M. Romps. 2019. Formation of Tropical R. A. Houze. 1994. Cloud Dynamics. Elsevier Science. Anvil Clouds by Slow Evaporation. Geophysical Research Letters 46, 1 (2019), 492– M. Ihmsen, J. Orthmann, B. Solenthaler, A. Kolb, and M. Teschner. 2014. SPH Fluids in 501. Computer Graphics. In Eurographics 2014 - State of the Art Reports. R. Setaluri, M. Aanjaneya, S. Bauer, and E. Sifakis. 2014. SPGrid: A Sparse Paged Grid T. Inglis, M.-L. Eckert, J. Gregson, and N. Thürey. 2017. Primal-Dual Optimization for Structure Applied to Adaptive Smoke Simulation. ACM Trans. Graph. 33, 6, Article Fluids. CGF 36, 8 (2017), 354–368. 205 (2014), 12 pages. ISO. 1975. Standard Atmosphere. Technical Report ISO 2533:1975. International Organi- Z. Shen, K. G. Pressel, Z. Tan, and T. Schneider. 2020. Statistically Steady State Large- zation for Standardization. Eddy Simulations Forced by an Idealized GCM: 1. Forcing Framework and Simu- Itseez. 2015. Open Source Computer Vision Library. https://github.com/itseez/opencv. lation Characteristics. Journal of Advances in Modeling Earth Systems 12, 2 (2020), A. D. Jones, P. Sen, and T. Kim. 2016. Compressing Fluid Subspaces. In Symposium on e2019MS001814. Computer Animation (SCA ’16). Eurographics Association, 77–84. J. Stam. 1999. Stable Fluids. Proc. of ACM SIGGRAPH (1999), 121–128. J. T. Kajiya and B. P. Von Herzen. 1984. Ray Tracing Volume Densities. SIGGRAPH J. Steinhoff and D. Underhill. 1994. Modification of the Euler equations for “vorticity Comput. Graph. 18, 3 (1984), 165–174. confinement”: Application to the computation of interacting vortex rings. Phys. M. Kass and G. Miller. 1990. Rapid, Stable Fluid Dynamics for Computer Graphics. Fluids 6, 8 (1994), 2738–2744. In Proceedings of the 17th Annual Conference on Computer Graphics and Interactive M. Stiver, A. Baker, A. Runions, and F. Samavati. 2010. Sketch Based Volumetric Techniques (SIGGRAPH ’90). Association for Computing Machinery, 49–57. Clouds. In Proceedings of the 10th International Conference on Smart Graphics (SG’10). E. Kessler. 1969. On the Distribution and Continuity of Water Substance in Atmospheric Springer-Verlag, 1–12. Circulations. American Meteorological Society, Boston, MA, 1–84. Y. Teng, D. I. W. Levin, and T. Kim. 2016. Eulerian Solid-Fluid Coupling. ACM Trans. B. Kim, V. C. Azevedo, M. Gross, and B. Solenthaler. 2020. Lagrangian Neural Style Graph. 35, 6, Article 200 (Nov. 2016), 8 pages. Transfer for Fluids. ACM Transaction on Graphics (SIGGRAPH) (2020). A. Treuille, A. Lewis, and Z. Popović. 2006. Model Reduction for Real-Time Fluids. B. Kim, V. C. Azevedo, N. Thürey, T. Kim, M. Gross, and B. Solenthaler. 2019. Deep ACM Trans. Graph. 25, 3 (2006), 826–834. Fluids: A Generative Network for Parameterized Fluid Simulations. CGF 38, 2 (2019), K. Um, X. Hu, and N. Thürey. 2018. Liquid Splash Modeling with Neural Networks. 59–70. CGF 37, 8 (2018), 171–182. D. Koschier, J. Bender, B. Solenthaler, and M. Teschner. 2019. Smoothed Particle Hy- B. Ummenhofer, L. Prantl, N. Thürey, and V. Koltun. 2020. Lagrangian Fluid Simulation drodynamics Techniques for the Physics Based Simulation of Fluids and Solids. In with Continuous Convolutions. In ICLR. Eurographics 2019 - Tutorials. The Eurographics Association. U. Vimont, J. Gain, M. Lastic, G. Cordonnier, B. Abiodun, and M.-C. Cani. 2020. Interac- P. K. Kundu, I. M. Cohen, and D. R. Dowling. 2012. Fluid Mechanics. Elsevier Science. tive Meso-scale Simulation of Skyscapes. Eurographics (2020). A. Lagae, S. Lefebvre, R. Cook, T. DeRose, G. Drettakis, D.S. Ebert, J.P. Lewis, K. Perlin, R. F. Voss. 1988. Fractals in Nature: From Characterization to Simulation. Springer-Verlag, and M. Zwicker. 2010. A Survey of Procedural Noise Functions. CGF 29, 8 (2010), Berlin, Heidelberg. 21–70 pages. 2579–2600. A. Webanck, Y. Cortial, E. Guérin, and E. Galin. 2018. Procedural Cloudscapes. CGF 37, M. Limpinsel, D. Kuo, and A. Vijh. 2018. SMARTS Modeling of Solar Spectra at Strato- 2 (2018), 431–442. spheric Altitude and Influence on Performance of Selected III-V Solar Cells. S. Wiewel, M. Becher, and N. Thürey. 2019. Latent Space Physics: Towards Learning F. Losasso, F. Gibou, and R. Fedkiw. 2004. Simulating Water and Smoke with an Octree the Temporal Evolution of Fluid Flow. CGF 38, 2 (2019), 71–82. Data Structure. In ACM SIGGRAPH 2004 Papers (SIGGRAPH ’04). Association for J. Wither, A. Bouthors, and M.-P. Cani. 2008. Rapid Sketch Modeling of Clouds. In Computing Machinery, 457–462. Proceedings of the Fifth Eurographics Conference on Sketch-Based Interfaces and W. Lu, N. Jin, and R. Fedkiw. 2016. Two-Way Coupling of Fluids to Reduced Deformable Modeling (SBM’08). Eurographics Association, 113–118. Bodies. In Symposium on Computer Animation (SCA ’16). Eurographics Association, Y. Xie, E. Franz, M. Chu, and N. Thürey. 2018. TempoGAN: A Temporally Coherent, 67–76. Volumetric GAN for Super-Resolution Fluid Flow. ACM Trans. Graph. 37, 4, Article A. McAdams, E. Sifakis, and J. Teran. 2010. A Parallel Multigrid Poisson Solver for 95 (2018), 15 pages. Fluids Simulation on Large Grids. In Symposium on Computer Animation (SCA ’10). M. K. Yau and R. R. Rogers. 1996. A Short Course in Cloud Physics. Elsevier Science. Eurographics Association, 65–74. C.-M. Yu and C.-M. Wang. 2011. An Effective Framework for Cloud Modeling, Rendering, B. Miller, I. Georgiev, and W. Jarosz. 2019. A Null-Scattering Path Integral Formulation and Morphing. J. Inf. Sci. Eng. 27 (05 2011), 891–913. of Light Transport. ACM Trans. Graph. 38, 4, Article Article 44 (July 2019), 13 pages. C. Yuan, X. Liang, S. Hao, Y. Qi, and Q. Zhao. 2014. Modelling Cumulus Cloud Shape R. Miyazaki, Y. Dobashi, and T. Nishita. 2002. Simulation of Cumuliform Clouds Based from a Single Image. CGF 33, 6 (2014), 288–297. on Computational Fluid Dynamics. In Eurographics. J. Zehnder, R. Narain, and B. Thomaszewski. 2018. An Advection-Reflection Solver R. Miyazaki, S. Yoshida, T. Nishita, and Y. Dobashi. 2001. A Method for Modeling Clouds for Detail-Preserving Fluid Simulation. ACM Trans. Graph. 37, 4, Article 85 (2018), Based on Atmospheric Fluid Dynamics. In PG. IEEE Computer Society, USA, 363. 8 pages. F. Neyret. 1997. Qualitative Simulation of Convective Cloud Formation and Evolution. X. Zhang, M. Li, and R. Bridson. 2016. Resolving Fluid Boundary Layers with Particle In Computer Animation and Simulation ’97, D. Thalmann and M. van de Panne (Eds.). Strength Exchange and Weak Adaptivity. ACM Trans. Graph. 35, 4, Article 76 (July Springer Vienna, Vienna, 113–124. 2016), 8 pages. T. Nishita, Y. Dobashi, and E. Nakamae. 1996. Display of Clouds Taking into Account Y. Zhu and R. Bridson. 2005. Animating Sand as a Fluid. ACM Trans. Graph. 24, 3 (2005), Multiple Anisotropic Scattering and Sky Light. In Proceedings of the 23rd Annual 965–972.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020. 175:16 • Hädrich, T. et al.

ALGORITHM 1: Numerical time integration procedure.

Input: 2.2 1.8 qv ← (qv (x, t0))x ∈Ω, qc ← (qc (x, t0))x ∈Ω, qr ← (qr (x, t0))x ∈Ω θ ← (θ (x, t0))x ∈Ω, u ← (u(x, t0))x ∈Ω, t ← t0 Procedure: ← ( ) u advect u, ∆t //advect velocity field E 훾heat u ← diffuse(u, ν, ∆t) //include viscosity as diffusion process ω ← ∇ × u //compute vorticity field f ω ← ϵ · ∆x ·(normalize(∇∥ω ∥) × ω) //vorticity confinement ← · u u + f ω ∆t //apply vorticity confinement force 0.5 0.0 T 0.0 1.0 0.0 1.0 b ← (0, 0, B) //compute buoyancy according to Eq. (15) 휙rel 훾vapor f ← getExternalForce(t) //compute external net force u ← u + (b + f )· ∆t //apply buoyancy and external force Fig. 21. Parameter space exploration varying the heat emitter value E and ∇p ← project(∇ · u, ∆t) //pressure projection relative humidity ϕrel (left), and scaling parameters γheat and γvapor (right). u ← u − ∇p · ∆t //pressure update For the non-varying values, parameter settings for cumulus clouds are used: E = . ϕ = . γ = . γ = . [θ, qv, qc, qr ] ← advect(θ, qv, qc, qr , u, ∆t) //advect quantities 2 2, rel 0 4, heat 1 7, and vapor 0 14. qvs ← getSaturationRatio(getAbsoluteTemperature(θ ), p∞) //see Eq. (16) and Eq. (28) A STANDARD ATMOSPHERE qv ← qv + min(qvs − qv, qc ) + Er qc ← qc − min(qvs − qv, qc ) − Ac − Kc Generally, atmospheric data are evaluated using the ‘International Standard qr ← qr + Ac + Kc − Er Atmosphere’ [ISO 1975] which is abbreviated as ISA. The temperature and Xv ← getMoleFraction(qv ) //see Eq. (9) pressure profile from 0 to 40 km altitude are plotted in Figure 19. Within the . Mth ← getAverageMolarMass(Xv ) //see Eq. (7) troposphere, i.e. below 11 km, the temperature reduces by 6 5 K per 1 km γth ← getIsentropicExponent(Xv MW/Mth) //see Eq. (11) altitude, the pressure approximately halves for every 5 km gained: th ← ( M ) cp getHeatCapacity γth, th //see Eq. (18) T∞(h) = T∞,0 − 0.0065h , (27) th θ ← θ + L/c · (− (q − q , q )) //see Eq. (9) 5.2561 p getMoleFraction min vs v c  h  t ← t + ∆t p∞(h) = p∞ 1 − 0.0065 . (28) 1 0 ,0 T Output: ∞,0 qv ← (qv (x, t1))x ∈Ω, qc ← (qc (x, t1))x ∈Ω, qr ← (qr (x, t1))x ∈Ω ISA Temperature ISA Pressure 10 10 θ ← (θ (x, t1))x ∈Ω, u ← (u(x, t1))x ∈Ω, t ← t1 8 8 m m 6

6 k k

n n i i

4 4 h h 2 2 0 0 0 100 200 300 0.0 0.2 0.4 0.6 0.8 1.0 T in K p in bar Fig. 19. Temperature and pressure in the troposphere taken from the ISA.

B POTENTIAL TEMPERATURE Adiabatic changes of temperature and air pressure can be taken into account within the concept of potential temperatures [Yau and Rogers 1996]. Assume, an air parcel is moved adiabatically (i.e. without a change of heat) from temperatureT (t0) and pressure p(t0) to pressure p(t1). The final temperature κ θ := T (t1) is given by the potential temperature θ = (p(t1)/p(t0)) T (t0) in which κ = Rd /cp is the ratio of the gas constant Rd = 287 J/(kg K) for dry air and the specific heat capacity cp .

C TIME INTEGRATION The integration procedure is summarized in Algorithm 1.

Fig. 20. Several examples of clouds and the parameters used for the emission D PARAMETER SPACE EXPLORATION of heat and vapor on the ground. A parameter space exploration is presented in Figures 20 and 21.

ACM Trans. Graph., Vol. 39, No. 6, Article 175. Publication date: December 2020.