Context. Several types of inertial modes have been detected on the Sun. Properties of these inertial modes have been studied in the linear regime but have not been studied in nonlinear simulations of solar rotating convection. Comparing the nonlinear simulations, the linear theory, and the solar observations is important to better understand the differences between the models and the real Sun. Aims. We wish to detect and characterize the modes present in a nonlinear numerical simulation of solar convection, in particular to understand the amplitudes and lifetimes of the modes. Methods. We developed a code with a Yin-Yang grid to carry out fully-nonlinear numerical simulations of rotating convection in a spherical shell. The stratification is solar-like up to the top of the computational domain at 0.96 R . The simulations cover a duration of about 15 solar years, which is more than the observational length of the Solar Dynamics Observatory (SDO). Various large-scale modes at low frequencies (comparable to the solar rotation frequency) are extracted from the simulation. Their characteristics are compared to those from the linear model and to the observations. Results. Among other modes, both the equatorial Rossby modes and the columnar convective modes are seen in the simulation. The columnar convective modes, with north-south symmetric longitudinal velocity v φ , contain most of the large-scale velocity power outside the tangential cylinder and substantially contribute to the heat and angular momentum transport near the equator. Equatorial Rossby modes with no radial node (n = 0) are also found: They have the same spatial structures as the linear eigenfunctions. They are stochastically excited by convection and have the amplitudes of a few m s −1 and mode linewidths of about 20-30 nHz, which are comparable to those observed on the Sun. We also confirm the existence of the "mixed Rossby modes" between the equatorial Rossby modes with one radial node (n = 1) and the columnar convective modes with north-south antisymmetric v φ in our nonlinear simulation, as predicted by the linear eigenmode analysis. We also see the high-latitude mode with m = 1 in our nonlinear simulation but its amplitude is much weaker than that observed on the Sun.