  Atmospheric escape is crucial to understand the evolution of planets in and
out of the Solar system and to interpret atmospheric observations. While
hydrodynamic escape simulations have been actively developed incorporating
detailed processes such as UV heating, chemical reactions, and radiative
cooling, the radiative cooling by molecules has been treated as emission from
selected lines or rotational/vibrational bands to reduce its numerical cost.
However, ad hoc selections of radiative lines would risk estimating inaccurate
cooling rates because important lines or wavelengths for atmospheric cooling
depend on emitting conditions such as temperature and optical thickness. In
this study, we apply the correlated-k distribution (CKD) method to cooling rate
calculations for H$_2$-dominant transonic atmospheres containing H$_2$O or CO
as radiative species, to investigate its numerical performance and the
importance of considering all lines of the molecules. Our simulations
demonstrate that the sum of weak lines, which provides only 1 % of the line
emission energy in total at optically thin conditions, can become the primary
source of radiative cooling in optically thick regions, especially for
H$_2$O-containing atmospheres. Also, in our hydrodynamic simulations, the CKD
method with a wavelength resolution of 1000 is found to be effective, allowing
the calculation of escape rate and temperature profiles with acceptable
numerical cost. Our results show the importance of treating all radiative lines
and the usefulness of the CKD method in hydrodynamic escape simulations. It is
particularly practical for heavy-element-enriched atmospheres considered in
small exoplanets, including super-Earths, without any prior selections for
effective lines.
