Abstract. This investigation addresses the tsunami flooding in Lima and Callao caused by the massive 1746 earthquake (Mw 9.0) along the Peruvian coast. Numerical modelling of the tsunami flooding processes in the nearshore includes strong nonlinear numerical terms. In a comparative analysis of the calculation of the tsunami wave effect, two numerical codes are used, Tsunami-HySEA and TsunAWI, which both solve the shallow water (SW) equations but with different spatial approximations. The comparison primarily evaluates the flow velocity fields in flooded areas. The relative importance of the various parts of the SW equations is determined, focusing on the nonlinear terms. Particular attention is paid to the contribution of momentum advection, bottom friction, and volume conservation. The influence of the nonlinearity on the degree and volume of flooding, flow velocity and small-scale fluctuations is determined. The sensitivity of the solution with respect to the value of the bottom friction parameter is investigated as well.