Abstract. Drownings due to rip currents are a major threat to beach safety. In this study a high-resolution Boussinesq model with a modified wave-resolving Lagrangian tracking module has been applied to a 2 km long embayed beach, Dadonghai of Sanya, Hainan Island, with the purpose of studying rip current variability, real-time rip hazard identification, and the optimal swimmer escape strategies. The beach stage evolves periodically at the study site and plays an important role in the long-term modulation of the occurrence and strength of rip currents according to the modeling. A series of tests are designed and confirm that rip current strength is closely related to wave properties and tidal levels. Spectral analysis of output time series at specific points shows that the modeled rip currents fluctuate on the orders of 1 and 10 min, which suggests the effects of wave-group-forced infragravity (IG) and very-low-frequency (VLF) motions. Rip hazard levels are defined by combining rip strength and its duration. An attempt to use the GPU-accelerated FUNWAVE-TVD (Total Variation Diminishing version of the Fully Nonlinear Boussinesq Wave Model) embedded with the spectral wave model WAM6-GPU (GPU version of the third-generation spectral wave model WAM Cycle 6) exhibits its capability to evaluate rip hazard levels in real time. One of the differences of the present study from previous works is that the random, wave-resolving tracking of virtual swimmers is performed with 1 m resolution to study beach safety strategies. The results demonstrate that multiple factors contribute to the survival of swimmers caught in the rip currents, including surf-zone bathymetry, rip strength, fine-scale flow patterns, the bather's position, and swimming ability. For weak-to-moderate rip currents and longshore currents, swim onshore consistently seems to be the most successful strategy across all the scenarios in this study. Higher surf-zone exit rates along Dadonghai beach are not favorable for stay afloat action, which puts swimmers at a higher risk of being expelled to deeper water. The effects of wave randomness of incoming wave trains and assignment of wave-following coefficients on Lagrangian tracking are also discussed.