For most modern data centres, it is of high value to select practical methods for improving energy efficiency and reducing energy waste. IT-equipment and cooling systems are the two most significant energy consumers in data centres, thus the energy efficiency of any data centre mainly relies on the energy efficiency of its computational and cooling systems. Existing techniques of optimising the energy usage of both these systems have to be compared. However, such experiments cannot be conducted in real plants as they may harm the electronic equipment. This paper proposes a modelling toolbox which enables building models of data centres of any scale and configuration with relative ease. The toolbox is implemented as a set of building blocks which model individual components of a typical data centre, such as processors, local fans, servers, units of cooling systems, it provides methods of adjusting the internal parameters of the building blocks, as well as contains constructors utilising the building blocks for building models of data centre systems of different levels from server to the server room. The data centre model is meant to accurate estimating the energy consumption as well as the evolution of the temperature of all computational nodes and the air temperature inside the data centre. The constructed model capable of substitute for the real data centre at examining the performance of different energy-saving strategies in dynamic mode: the model provides information about data centre operating states at each time point (as model outputs) and takes values of adjustable parameters as the control signals from system implementing energy-saving algorithm (as model inputs). For Module 1 of the SICS ICE data centre located in Luleå, Sweden, the model was constructed from the building blocks. After adjusting the internal parameters of the building blocks, the model demonstrated the behaviour quite close to real data from the SICS ICE data centre. Therefore the model is applicable to use as a substitute for the real data centre. Some examples of using the model for testing energy-saving strategies are presented at the end of the paper.