Aims. While the search for molecular gas in distant galaxies is based on the detection of submillimeter CO rotational lines, the current CO surveys of nearby galaxies are restricted to the millimeter CO lines. The submillimeter CO lines are formed in warm and dense molecular gas and are therefore sensitive to the physical conditions whereas the CO (J = 1 → 0) line is a tracer of the total molecular gas mass. In order to be able to compare the properties of molecular gas in nearby and distant galaxies, we have observed C and CO submillimeter lines (including the 12 CO(6−5) and 12 CO(7−6) lines) in a sample of nearby galaxies using the Caltech Submillimeter Observatory (CSO). Methods. We have obtained a complete view of the CO cooling curve (also called CO spectral energy distribution) by combining the submillimeter CSO data with previous observations found in the literature. We made use of Large Velocity Gradient (LVG) models to analyse the observed CO cooling curve, predict CO line intensities from J = 1 → 0 to J = 15 → 14 in the studied galaxies, and derive the physical properties of the warm and dense molecular gas : the kinetic temperature (T K ); the gas density (n(H 2 )); the CO column density divided by the line width N( 12 CO)/∆v. The predictions for the line intensities and for the total CO cooling power, obtained from LVG modelling have been compared with predictions from Photo Dissociation Regions (PDR) models. Results. We show how the CO SED varies according to the galaxy star forming activity. For active nuclei, the peak is located near the 12 CO(6−5) or 12 CO(7−6) rotational lines, while, for normal nuclei, most of the energy is carried by the 12 CO(4−3) and 12 CO(5−4) lines. Whatever the spectral type of the nucleus, the observed C cooling rate is lower than the observed CO cooling rate (by a factor of 4). The CO cooling curve of nearby starburst galaxies (e.g. NGC 253) has a quite similar shape to the CO cooling curve of distant galaxies. Therefore, the CO cooling curves are useful diagnostics for the star forming activity in distant objects.