# Modeling of Geophysical Flows through GPUFOW
## 5 Discussion  
The physical-mathematical model included in GPFLOW provides a satisfactory description of the behavior of debris and lava flows. The variable emissivity introduced in the thermal model for lavas brings the numerical model closer to the physical phenomenon, improving the accuracy and reliability of the results. The newly introduced windchill factor can be particularly useful in nowcasting scenarios when the associated environmental factors are important. Indeed, simulations performed with a constant emissivity can deviate up to 18% in length from the simulations run with the variable emissivity (Figure 1) and up to 10% if cooling by atmospheric convection is also considered (Figure 2).  
The geometric bias correction with the \(\alpha\) parameter is fundamental to simulate debris flows, even in synthetic cases, such as a perfectly flat DSM (Figure 3), allowing us to obtain a circular emplacement instead of a square one, using a correction of 0 (i.e., no correction) or 1. This kind of correction has been proven to be particularly important for lava flow simulations, especially when the flows emplace over small slopes. Indeed, the bias correction allowed us to obtain the best fit between the simulated and real lava flow fields when it emplaced in the upper part of Valle del Bove, which has an average slope of 9.7\({}^{\circ}\). Conversely, it overestimated the values for higher slopes, e.g., between 2000 and 2500 m a.s.l., where the DSM had an average slope of 28.5\({}^{\circ}\) (Figure 5a,b). Increasing the DSM resolution from 10 to 5 m provided better results (fitness improvement from 75% to 77%), but with an unjustified increase in computational cost. This is consistent with the results discussed in [PERSON] et al. [49].  
The structure of the input/output parameters introduced several benefits, with improved usability, reduced storage for simulation results, and the possibility to integrate additional features such as barriers (see Appendix A for details). All of these effects are particularly beneficial when running a large number of simulations, for example, during the creation of long-term hazard maps, where the impact of computational times and storage requirements scale with the number of simulations (in the order of hundreds of thousands).  
Finally, the GPU implementation increased the execution efficiency and further speeded up the simulations, with the 2006 debris flow and the three days of the 2018 eruption performed in 2 and 3 s, respectively. From Figure 6, it is evident that, at each given resolution,  
Figure 6: Average time (in ms) needed for a full iteration for a single cell. Simulations were run using the CPU and GPU versions of GPUFLOW at different resolutions (5, 10, and 20 m).  
the average CPU runtimes were essentially constant (independent of the growing number of active cells during the simulation), while the average GPU runtime steadily decreased. This indicates that, while the CPU was _saturated_ (all computational resources were fully in-use during the simulation), the GPU was not, even with hundreds of thousands of active cells. This was expected since millions of work-items are needed to saturate modern GPUs. It also can be noted that even though the CPU was always saturated, an improvement in average computational runtimes was observed at higher resolution. This may be explained by the different density in actually active cells within the active region at different resolutions.  
The main limitation of GPUs compared to CPUs is the fixed, limited amount of RAM. This can be worked around using a multi-GPU code [50], but on modern GPUs, this has never actually been an issue in practical applications, since GPUFLOW is normally operated at moderately low resolutions (5 m or 10 m), and even an automaton with 1 m cells spanning the 12 km \(\times\) 8 km area of the central edifice of Mt Etna fit in less than 4 GB of RAM.