Abstract:Reliable time-series is the basic ingredient when analysing climatic changes. However, the errors in real data are frequently of the same order as the signal being sought. Therefore, the available long-term monthly series of Spanish minimum and maximum temperatures have been compiled from the late 19th century on, in order to compile a high-quality data set. The series are organized into climatically homogeneous regional groups and, in each group, the detection and adjustment is based on relative homogeneity and an analysis of the stationarity of the whole set of temperature-difference series. These series are scanned with moving t, Alexandersson, and Mann-Kendall tests. The detected inhomogeneities are adjusted by weighted averages of the regional series. The method is iterative and advances in steps of detection, adjustment, and actualization. Individual inhomogeneous data are discarded and gaps are filled by similar weighted multiple means.For the analysis of the temperature evolution in the Iberian Peninsula, each region is finally represented by one local series and the regional average. The urban effect on minimum temperatures is adjusted by an empirical method, and for Madrid also by a correction derived from new homogenized data. Generally, rigorous homogeneity cannot be achieved because the initial data quality is deficient in many cases and metadata are sparse. Nevertheless, the data homogeneity and quality has been considerably enhanced: the total error margin in a series is of the order of 0.3°C-0.4°C, under consideration of a worst-case error accumulation. On the other hand, the number of inhomogeneities is considerable and their average amplitude is of the order of 1°C reflecting the much larger error margin in the raw data. The homogenized dataset compiled constitutes an important basis for the subsequent detection of thermal changes in Spain in the last 130 years, on a clearly higher confidence level than before.