{'fraction_non_alphanumeric': 0.028470548674550244, 'fraction_numerical': 0.011657232528162304, 'mean_word_length': 5.283098591549296, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Generative Modeling of High-resolution Global Precipitation Forecasts

Forecasting global precipitation patterns and, in particular, extreme precipitation events is of critical importance to preparing for and adapting to climate change. Making accurate high-resolution precipitation forecasts using traditional physical models remains a major challenge in operational weather forecasting as they incur substantial computational costs and struggle to achieve sufficient forecast skill. Recently, deep-learning-based models have shown great promise in closing the gap with numerical weather prediction (NWP) models in terms of precipitation forecast skill, opening up exciting new avenues for precipitation modeling. However, it is challenging for these deep learning models to fully resolve the fine-scale structures of precipitation phenomena and adequately characterize the extremes of the long-tailed precipitation distribution. In this work, we present several improvements to the architecture and training process of a current state-of-the art deep learning precipitation model (FourCastNet) using a novel generative adversarial network (GAN) to better capture fine scales and extremes. Our improvements achieve superior performance in capturing the extreme percentiles of global precipitation, while comparable to state-of-the-art NWP models in terms of forecast skill at 1--2 day lead times. Together, these improvements set a new state-of-the-art in global precipitation forecasting.


Introduction
Precipitation is a fundamental climate phenomenon with major impact on crucial infrastructure such as food, water, energy, transportation, and health systems [7]. On timescales relevant to weather prediction, making accurate forecasts of precipitation and extreme events is critical to the planning and management of these systems, along with disaster preparedness for extreme precipitation events, which are greatly amplified by climate change [18]. Unfortunately, extreme precipitation remains one of the most challenging atmospheric phenomena to forecast accurately, due to high spatiotemporal variability and the myriad of complex multi-scale, multi-phase processes that govern its behavior [2,20,22].
State-of-the-art NWP models, such as the Integrated Forecast System 1 (IFS), produce operational forecasts by combining physics-based PDE solvers with assimilated observations from a variety of sources. The complexity of moisture physics requires many parameterizations in these models for processes like turbulent mixing, convection, subgrid clouds and microphysics [1], and such parameterizations can lead to large biases in NWP precipitation forecasts [11]. As a result, global precipitation forecasts generally achieve inadequate forecast skill [22] and, hence, there has been an increasing interest in fully data-driven solutions, primarily using deep learning, in recent years.
Data-driven models can be orders of magnitude faster with the potential to learn complex parameterizations between input and output function spaces directly from data, reducing model bias. With such models, major advances have been made in the area of precipitation "nowcasting", where forecasts are made over limited spatial regions with lead times on the order of minutes to hours. Deep learning models trained directly on radar and/or satellite observations now outperform traditional methods for nowcasting [17,10,3]. However, until recently, there has been limited progress for models predicting precipitation at larger spatiotemporal scales (e.g., over the full globe up to days in advance), mainly due to computational limitations on resolution [16]. FourCastNet [14] is the first deep-learning-based global weather model running at ∼30km scale, which outperforms IFS in terms of precipitation forecast skill up to ∼2 day lead times and is the current state-of-the-art. However, despite using a dedicated network just for precipitation due to its unique challenges, FourCastNet predictions still lack fine-scale details (see Figure 1) and thus underestimate the extreme percentiles of the precipitation distribution.
In this work, we aim to overcome some of these limitations using generative models to advance the state-of-the-art in deep learning-based precipitation forecasts. In particular, our contributions are as follows: (i) we apply a state-of-the-art generative adversarial network [8] that integrates multi-scale semantic structure and style information, allowing us to synthesize physically realistic fine-scale precipitation features; (ii) we show that capturing fine-scale phenomena leads to improved predictions of extreme precipitation while also preserving forecast skill, attaining comparable skill at 1-2 lead day times with respect to IFS.

Dataset
We replicate the data preparation pipeline of the original FourCastNet precipitation model [14], relying on the European Center for Medium-Range Weather Forecasting (ECMWF) global reanalysis dataset ERA5 [6], which combines archived atmospheric observations with physical model outputs. Following FourCastNet's time steps of length 6 hours, we model the 6hr accumulated total precipitation T P (this also makes for easier comparisons against IFS, which archives T P forecasts in 6 hourly accumulations as well). A sample snapshot of T P , in log-normalized units for easy visualization of fine-scale details, is shown in the bottom-right inset of Figure 1. We use the years 1979-2015 and 2016-2017 as training and validation sets, respectively, and set aside 2018 as a test set. We refer the reader to the original FourCastNet paper [14] for further details on the dataset.

Model
Given the success of adversarial learning for high-resolution precipitation models in localized regions [17,12,15], we explore the utility of conditional generative adversarial networks (cGANs) for modeling T P over the entire globe using prognostic atmospheric variables as conditional input for operational diagnosis. In particular, we adopt the TSIT architecture [8] for our task, due to its success in varied image tasks and ability to flexibly condition intermediate features at a variety of scales in the generator. TSIT's generator G employs symmetric downsampling and upsampling paths, fusing features from the downsampling path via feature-wise adaptive denormalization, and uses multi-scale patch-based discriminators [21] for adversarial training. We take a constant latitude embedding channel and the 20 atmospheric variables output by FourCastNet (corresponding to various different prognostic variables such as wind velocities, total column water vapor and temperature at different pressure levels) as input to the network, as shown in Figure 2. Randomness is injected at intermediate scales via elementwise additive noise, and we can thus generate "zero-shot" ensembles for probabilistic forecasting given a single input, which we explore in Appendix A. We refer the reader to [8] for additional details on the TSIT architecture, and list hyperparameters in Appendix A, together with the particulars of our setup. In this work, we focus on three model versions for demonstrating the impact of the adversarial training: (i) FourCastNet: the precipitation baseline model from [14], Figure 1: Visualization of precipitation forecasts at 18hr forecast lead time, comparing fine-scale features between FourCastNet, our L 1 -only model, our adversarial+L 1 model, and the ground truth ERA5 over South America. We observe that the adversarially trained model shows finer-scale structures and matches the ground truth more accurately.

Results
We observe that, qualitatively, the adversarial training procedure clearly improves the perceptual realism and fine-scale detail represented in precipitation forecasts, as presented in the visualizations in Figure 1 which compares T P from the 2018 test set over South America at 18hr lead time. We confirm these results quantitatively by computing a 1D power spectrum of the T P forecasts along the East-West direction, again at 18hr lead time, averaged over several initial conditions in the test set 2 . The results are plotted in Figure 3a, where we find that that the adversarial learning framework effectively matches the the ground truth spectrum, specifically at higher wavenumbers (and hence finer spatial scales), outperforming all other models. Beyond assessing fine scales, the general task of identifying metrics for evaluating precipitation forecast quality is itself a challenge [20,13]. For example, Anomaly Correlation Coefficient (ACC) is widely used to assess forecast skill, but it is biased towards larger scales, so smoothing functions can artificially inflate this metric (we illustrate this with simple gaussian blur in Appendix B). Furthermore, ACC is generally insensitive to extremes which is a key quantity to capture in fields such as precipitation. While our model is comparable to the IFS in terms of ACC on 1-2 day lead times (see Appendix B), we emphasize here the model's ability to more faithfully capture the extreme T P values that are of interest to weather and climate stakeholders. We plot the extreme percentiles of our forecasts, again at 18hr lead time, in Figure  3b, binning logarithmically to emphasize the tail of the distribution [4] and averaging over the 2018 test set. Clearly, the model better replicates the long tail of the T P distribution, nearly matching the ground truth percentiles within the variability over initial conditions in the test set, and outperforms IFS in this regard as well. We show additional results on the T P distribution in Appendix B.

Conclusions
Deep-learning-based models like FourCastNet show great promise in data-driven forecasting of precipitation (T P ), but exhibit smooth features and underestimate extreme events. In this work, we demonstrate the ability of GAN-based models to resolve small-scale details and synthesize physically realistic extreme values in the tail of the T P distribution, outperforming IFS (a leading NWP model) on both counts while retaining competitive forecast skill in terms of ACC. Our model sets a new stateof-the-art in global T P forecasting, and can be complementary to existing localized, short-timescale, high-resolution precipitation models which require initial or boundary conditions from NWP (or similar) models as input.

Appendices A Additional training details and probabilistic inference A.1 Hyperparameters & architecture details
The L 1 -only and adversarial+L 1 models both use a modified version of the architecture described in [8]. We list hyperparameters in Table 1, and refer the reader to [8] for further details on the hyperparameters.
During training of the adversarial+L 1 model, a fixed latitude-embedding channel is appended to the 20 prognostic input variables used in [14] and passed to the input stream at full-resolution (720px × 1440px). The entry point (layer k = 0) to the input stream is a standard convolutional residual layer [5] with 64 output channels (pictured in the upper right of Figure 2). Next, these intermediate features are downsampled to 512px × 1024px using nearest neighbor interpolation and passed to the next residual layer of similar design, doubling the number of output channels to 128. Starting here, The generator mirrors the input stream, but travels in the opposite direction, from global to local representations. First, we downsample the 21 input fields to the same spatial dimensions as the final representation from the input stream. Then, a fully-connected layer takes in the downsampled input and returns the starting set of 1024 features (lower left of Figure 2), matching the full dimensions of the corresponding input stream features. These features then pass through the first of eight featureadaptive denomoralization (FADE) layers, integrating multi-scale semantic information from the input stream at the corresponding points in the generator.
To further promote diversity in the generator's outputs, the noise stream draws random gaussian noise which it adaptively scales in a feature-specific, multi-scale manner. This noise is added to the input stream's features prior to synthesis with the current output representation in each FADE layer. The generator's intermediate features are then upsampled before passing on to the next layer. Once the generator reaches the penultimate resolution of 512px × 1024px by 64 channels, it upsamples to the full resolution, applies Leaky ReLU with negative slope of 0.2, passes the features through a final convolutional layer for single-channel output, and applies the ReLU activation function to enforce precipitation non-negativity.
The multi-scale discriminator consists of four separate discriminators, each processing the same input features at a different spatial scale. One discriminator operates at full-resolution, while the others process inputs which are downsampled by progressive factors of 2 along the spatial dimensions. Each discriminator takes as input the real or predicted T P field, along with the input atmospheric variables fed to the generator (which get concatenated along the channel dimension) for improved training stability. Each discriminator's output is a 2D grid of predictions classifying patches of the input as real or fake. This"patchGAN" approach helps the model focus more on local texture and fine-scale details [21].
In addition to the adversarial loss term using the discriminators' outputs, a feature-matching loss [19] term is used to improve training stability for the generator. We refer the reader to [8,21] for further specifics on the FADE and multi-scale patch-based discriminator architectures. The architecture of the L 1 -only model resembles that of adversarial+L 1 as pictured in Figure 2, but with the noise stream and multi-scale discriminator components removed.

A.2 Probabilistic ensemble forecasts
Through the injection of adaptive randomness by the noise stream, outputs from the adversarial+L 1 model are non-deterministic. Hence, we can output a number of repeated predictions and form a probabilistic ensemble forecast for a single timepoint, as depicted in Figure 4, even if we use a single control forecast for the other atmospheric variables input to the generator.
An alternate method for attaining multi-modal predictions, first introduced in the TSIT paper [8], is a variational auto-encoder (VAE) approach in which the bottom level of the generator is a latent space given by an auxiliary encoder and shaped by an additional KL-divergence loss. In preliminary tests we found that this was unable to attain sufficient variability in predictions, and instead opted for directly perturbing the generator synthesis pipeline with our additive noise stream. However, further investigation is needed to determine the optimal method for multi-modal predictions in this application.
We present an example ensemble forecast in Figure 4, plotting mean and standard deviation per gridbox over n = 100 ensemble members. Qualitatively, we observe highest variance over challenging locations like coastlines and mountainous regions, which aligns with our expectations as such areas exhibit high spatiotemporal variability and sharp, fine-scale features for T P . In future work we hope to quantitatively assess the quality of such ensemble forecasts, as rapid probabilistic forecasting from such a model would be a major step forward. Figure 4: Through the introduction of randomness in the form of added noise between the input stream and generator, probabilistic forecasts are created by repeated inference runs with the same inputs, leading to an ensemble of unique outputs. We can then use the mean of this set of stochastic outputs as a final ensemble prediction for a given timepoint (left panel), and analyze the ensemble's standard error field to quantify forecast uncertainty at particular geographic locations (right panel).

B Additional metrics and analysis
In Figure 5, we plot the fractional contribution [9,13] of binned precipitation rates at 18hr lead time to the total precipitation in each gridbox over all initial conditions in 2018. This assesses how much of the total precipitation comes from light versus heavy precipitation, and we find that our GAN model achieves the best agreement with the ground truth in general. Notably, the IFS model exhibits more drizzle bias [2] for rates between 0.1-10 mm/6hrs, though we find that both IFS and our model overestimate the central mode of the fractional distribution at ∼5 mm/6hrs. Finally, in Figure 6, we demonstrate tradeoffs between global metrics like ACC and quantifying extreme events. To do so, we conduct a simple experiment-we add gaussian blurring to the total precipitation outputs after inference and re-compute two metrics: ACC and extreme percentiles. While smoothing predictably leads to worse performance in capturing extremes, we observe that it does lead to higher ACC values. This could possibly be because ACC is a global metric and smoothing can help correct highly localized errors-this can inflate the quality of the forecast if we only focus on global behaviour. Hence, identifying the right metrics to characterize precipitations is very important. We leave evaluating our forecasts with a comprehensive set of diagnostic tools that focus on different aspects of modeling precipitation to future work. Figure 6: Applying a small amount of gaussian blurring (σ = 1.5) to the outputs from the adversarial+L 1 model leads to increased ACC over the entire forecast sequence as compared to the unaltered outputs (upper left panel). At the same time, the ability to capture extremes is degraded, as shown in the lower left panel. ACC and percentiles are averaged over 178 initial conditions, as in Figure 3, with variability over ACC additionally included for IFS.