Abstract:Persistent heavy precipitation and extreme rainstorms that occur frequently in summer are prone to cause urban flooding, resulting in the loss of people's lives and property. Timely and effective prediction of water level in flood-prone urban areas and release of accurate prediction information is the key to reduce the harm of urban flooding. Traditional prediction methods are limited by data accuracy, model simplicity and real-time problems, which are difficult to meet the needs of modern urban complex environment. In this paper, a new urban rain and flood prediction model based on Transformer is proposed. Utilizing the good performance of transformer on the time series prediction task, and innovatively incorporating the Geospatial-aware Attention Module to better capture the spatial heterogeneity and geographic features of urban flooding, and enhancing the model's ability to learn the spatial features of the city's topography and other spatial features, the model is combined with the precipitation data from June to August in Nanchang City for the year of 2024, and is used to predict the flooding in the city of Nanchang. The experiments are carried out by combining the precipitation data of June-August and the water level data of the urban flood monitoring station in Nanchang 2024, and the results show that the method proposed in this paper performs better in the urban flood prediction task compared with the original transformer model, and the model still maintains a better prediction efficiency, with the root-mean-square error reduced by 0.0006 compared with the original model, and the coefficient of determination improved by 0.071 compared with the original model, which indicates that the geo-aware attention module proposed in this paper can effectively capture spatial heterogeneity and geographic features of the urban flooding. geo-aware attention module can effectively improve the performance of the time-series model in the urban flood prediction task.