Minimizing energy consumption in buildings is one of the priorities of the European Union energy strategy. The European legislation has defined a legal framework to determine the energy qualification of a building that is used by each of the member states to define its own energy qualification procedure. This paper presents a methodology to evaluate the effect of climate conditions in the energy qualification procedure. It evaluates the effectiveness of the qualification in representing the yearly energy demand and \CO2 emissions. Moreover, it determines the effects of improvements in different parameters of the procedure (e.g., the construction materials of the enclosure, thermal installations, etc.) in order to improve qualifications. It has been applied to the Spanish legislation using a series of simulations of a typical domestic building, with climatic data from different zones of the Spanish territory. The most significant results are the similarity in the energy certification values obtained in all scenarios and the lack of concordance between the energy rating scale, energy consumption, and \CO2 emissions. [ABSTRACT FROM PUBLISHER]