## 2 Materials and Methods
### Implementation of the Proposed Methodology
This model uses the Saint-Venant equations to simulate the water flow in canals and rivers and incorporates different relationships related to mass and momentum, namely the Continuity Equation, Momentum Equation, and Manning's formula. In HEC-RAS, the diffuse wave approximation of the Saint-Venant equations is used to simplify the calculation in 2D simulations. The equations are solved in two dimensions, considering both the variation of the flow along the watercourse and transversally. To define the flood area, the DEM (Digital Elevation Model) of the study area to be analyzed along with GeoJSON files of the watercourse affecting the area and the buildings were used. The entry and exit conditions were then set using data from the meteorological stations, particularly flow data. In this regard, Earth Observation data provided valuable and detailed information about the study area. Although direct validation with historical \begin{table}
\begin{tabular}{c c} \hline \hline
**Data** & **Source** \\ \hline VIIRS Nighttime Lights (VNL) & [[https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/viirs/](https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/viirs/)]([https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/viirs/](https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/viirs/)), (accessed on 15 February 2025) [42] \\ CAMS Global Emission Inventories & [[https://ads.atmosphere.copernicus.eu/datasets/cams-global-emission-inventories?tab=overview](https://ads.atmosphere.copernicus.eu/datasets/cams-global-emission-inventories?tab=overview)]([https://ads.atmosphere.copernicus.eu/datasets/cams-global-emission-inventories?tab=overview](https://ads.atmosphere.copernicus.eu/datasets/cams-global-emission-inventories?tab=overview)), (accessed on 15 February 2025) [43] \\ Tinitaly DEM & [[https://tinitaly.pi.ingv.it/](https://tinitaly.pi.ingv.it/)]([https://tinitaly.pi.ingv.it/](https://tinitaly.pi.ingv.it/)), (accessed on 15 February 2025) [45; 46] \\ Light sources positions & Rover GNSS Sanding T5 [47] \\ Precipitation data & [[https://open-meteo.com/en/docs/historical-weather-api](https://open-meteo.com/en/docs/historical-weather-api)]([https://open-meteo.com/en/docs/historical-weather-api](https://open-meteo.com/en/docs/historical-weather-api)), (accessed on 15 February 2025) [48] \\ Urban Atlas & //land.copernicus.eu/en/products/urban-atlas/urban-atlas-2018, (accessed on 15 February 2025) [49] \\ Points cloud from drone equipped with & Survey with DJI Matrice 350 RTK drone [44] equipped with a LiDAR sensor \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Data sources. data has not been conducted at this stage, the HEC-RAS model is widely recognized in the scientific community for its ability to simulate flood phenomena with high accuracy. In addition, the consistency of the results obtained with the morphology and hydrographic network of the study area confirms the robustness of the simulations. In a digital twin, it is not enough to have only a static representation of the physical world (in this case, the configuration of the city's urban layout). For this reason, data relating to the concentration of CO\({}_{2}\) were collected from the sensors. These data were acquired using a microcontroller, the ESP32, equipped with Wi-Fi and Bluetooth connections (Figure 2) and a Sen63C sensor (Sensirion), which measures pollutants such as temperature, relative humidity, atmospheric particulate matter, and carbon dioxide at different points in the city, taking two measurements per day. Figure 2 shows the microcontroller, which has been integrated with a CO\({}_{2}\) concentration sensor, a central component of the technology used in this study, which, thanks to a Wi-Fi module, sends the measured data to the server via a network connection. Once received, the data are stored in the centralized database, using a data management system that can guarantee scalability and integrity of the information.