We compute the full contribution of flavor and (or) Lorentz anomalies to the thermodynamic partition function. Apart from the Wess-Zumino consistency condition the Euclidean generating function must satisfy an extra requirement which we refer to as `consistency with the Euclidean vacuum. The latter requirement fixes all Chern-Simons terms that arise in a particular Kaluza-Klein reduction of the theory. The solution to both conditions may be encoded in a `thermal anomaly polynomial which we compute. Our construction fixes all the thermodynamic response parameters of a hydrodynamic theory associated with anomalies.