This work concerns the comparative study of the diurnal variation of the critical frequency of the F2 layer (foF2) between experimental data from the Dakar station and those of the IRI 2016 model through its URSI. The comparison was conducted during solar cycles 21 and 22, across different phases, and on various days of geomagnetic shock activity. The results indicate that during solar minimum, the graphs of the experimental data generally exhibit the signature of vertical drift, whereas the IRI model presents a plateau profile indicative of the absence of an electrojet. During this phase, the highest deviation percentages were typically observed around sunrise. The results also demonstrate that at the Dakar station, the increasing phase was characterized by a pre-reversal of the electric field on different shock days. Regardless of the duration of the shock, the decreasing phase was marked by the complete absence of an electrojet, as observed in both sets of data. The quantitative study reveals that at solar maximum, our results exhibit a strong correlation between the experimental data and the IRI model. Throughout all phases, predictions were accurate during the daytime and exhibited high values around sunrise.