  Semi-analytic galaxy formation models are widely used to gain insight into
the astrophysics of galaxy formation and in model testing, parameter space
searching and mock catalogue building. In this work we present a new model for
gas cooling in halos in semi-analytic models, which improves over previous
cooling models in several ways. Our new treatment explicitly includes the
evolution of the density profile of the hot gas driven by the growth of the
dark matter halo and by the dynamical adjustment of the gaseous corona as gas
cools down. The effect of the past cooling history on the current mass cooling
rate is calculated more accurately, by doing an integral over the past history.
The evolution of the hot gas angular momentum profile is explicitly followed,
leading to a self-consistent and more detailed calculation of the angular
momentum of the cooled down gas. This model predicts higher cooled down masses
than the cooling models previously used in GALFORM, closer to the predictions
of the cooling models in L-GALAXIES and MORGANA, even though those models are
formulated differently. It also predicts cooled down angular momenta that are
higher than in previous GALFORM cooling models, but generally lower than the
predictions of L-GALAXIES and MORGANA. When used in a full galaxy formation
model, this cooling model improves the predictions for early-type galaxy sizes
in GALFORM.
