Abstract. Coastal regions have experienced significant environmental changes and increased vulnerability to floods caused by the combined effect of multiple flood drivers such as storm surge, heavy rainfall, and river discharge, i.e., compound floods. Hence, for a sustainable development of coastal cities, it is necessary to understand the spatiotemporal dynamics and future trends of compound flood hazard. While the statistical dependence between flood drivers, i.e., rainfall and storm surges, has been extensively studied, the sensitivity of the inundated areas to the relative timing of driver’s individual peaks is less understood and location dependent. To fill this gap, here we propose a framework combining a statistical dependence model for compound event definition and a hydrodynamic model to assess inundation maps of compound flooding from storm surge and rainfall during typhoon season in Shanghai. First, we determine the severity of the joint design event, i.e., peak surge and precipitation, based on the copula model. Second, we use the Same Frequency Amplification (SFA) method to transform the design event values in hourly timeseries so that they represent boundary conditions to force hydrodynamic models. Third, we assess the sensitivity of inundation maps to the time lag between storm surge peak and rainfall. Finally, we define flood zones based on the primary flood driver and we delineate flood zones under the worst compound flood scenario. The study highlights that the temporal delay between storm surge and rainfall plays a pivotal role in shaping the dynamics of flooding events. More specifically, the worst conditions in terms of cumulative inundation depth occur when rainfall precedes the storm surge peak. At the same time, the results show that in Shanghai surge is the primary flood driver. High storm surge at the eastern part of the city (Wusongkou tidal gauge) propagate upstream in the Huangpu River resulting in fluvial flooding in Shanghai city center and several surrounding districts. This calls for a better fluvial flooding control system hinging on the backwater effect during high surge in the upper and middle Huangpu River and in the newly added urbanized areas to ensure flood resilience. The proposed framework is useful to evaluate and predict flood hazard in coastal cities, and the results can provide guidance for urban disaster prevention and mitigation.