  The physical connection between thermal convection in the solar interior and
the solar wind remains unclear due to their significant scale separation. Using
an extended version of the three-dimensional radiative magnetohydrodynamic code
RAMENS, we perform the first comprehensive simulation of the solar wind
formation, starting from the wave excitation and the small-scale dynamo below
the photosphere. The simulation satisfies various observational constraints as
a slow solar wind emanating from the coronal hole boundary. The magnetic energy
is persistently released in the simulated corona, showing a hot upward flow at
the interface between open and closed fields. To evaluate the energetic
contributions from Alfv\'en wave and interchange reconnection, we develop a new
method to quantify the cross-field energy transport in the simulated
atmosphere. The measured energy transport from closed coronal loops to open
field accounts for approximately half of the total. These findings suggest a
significant role of the supergranular-scale interchange reconnection in solar
wind formation.
