Geomagnetic storms can cause serious effects on the power systems, as happened in 1989 with the Hydro-Quebec blackout or in 2003 with the destruction of several major mains transformers in South Africa. Magnetic storms are caused by solar activity and generate geomagnetically induced currents in the neutrals of the transformers of power transmission lines. These currents, which are practically DC currents, can cause saturation of transformer cores and cause irreparable damage or premature aging. The effect of geomagnetic storms on the grid in Spain could be similar to other countries of similar latitudes, such as South Africa, but has not been studied so far. Magnetic storms are more likely to appear in the maximum of solar activity or just after them. It is therefore of special interest to do the study and begin recording the effect of magnetic storms just before this maximum to take appropriate precautions.