In this paper, Morlet wavelet is applied to analyze the character of cosmic ray intensity of Apatity station (latitude: 67.56°N, longitude: 33.4°E, Russia) and Oulu station (latitude: 65.05°N, longitude: 25.47°E, Finland) respectively during quiet period of geomagnetic field and before geomagnetic storms from 1998 to 2002. Fourteen examples are selected including two examples of quiet period and 12 examples before geomagnetic storms. The level of major storms selected in this paper is that index Dst is less than -100 nT. By Morlet wavelet transform, cosmic ray intensity of different condition shows different variety. Results show that 24 h periodicity exists and is distinct during quiet time, and usually minimum value of cosmic ray intensity appears around about 0200 local time and maximum value appears around about 1400 local time; Twelve examples before geomagnetic storms period show that variety of 24 h periodicity all change. Some minish, some disappear, and some have anomalous 24 h periodicity, and these varieties differ from that of quiet time. These characters before geomagnetic storms may provide a sign that can be used to forecast the coming of geomagnetic storms of coming of geomagnetic storms.