.
The prayer of 'signs' (ayaat) is obligatory when any of the following signs occur:
1. Solar eclipse.
2. Lunar eclipse.
3. Earthquake.
4. Any natural occurrence which normally creates fear in the common people, like black, red or yellow storm, cyclone and things like that.
There are two methods of reciting Namaz-e Ayaat
Method 1:
Prayer of signs is 2 rak’ats; every rak’at has 5 ruku’ (total 10 ruku’).
Prepare niyyah and recite Takbiratul-ihram, then perform each unit as follows:
1. Recite Sura al-Hamd, then any other Sura and go to ruku.
2. Rise from ruku, recite Sura al-Hamd and one Sura and go to ruku.
3. Rise from ruku, recite Sura al-Hamd and one Sura and go to ruku.
4. Rise from ruku, recite Sura al-Hamd and one Sura and go to ruku.
5. Rise from ruku, recite Sura al-Hamd and one Sura and go to ruku 5.
6. Rise from ruku, and complete the unit as normal.
Repeat 1-6 above for the second unit, and complete the prayer.
It is mustahab to recite qunut before every second ruku’. For this purpose count all ten ruku’ together, Thus you will recite qunut before the 2nd and 4th (in the first unit), and before the 6th, the 8th and the 10th ruku’ (in the 2nd unit).
Method 2:
Prayer of signs is 2 rak’ats; every rak’at has 5 ruku’ (total 10 ruku’).
Prepare niyyah and recite Takbiratul-ihram, then perform each unit as follows:
1. Recite Sura al-Hamd, then recite only part of a Sura and go to ruku.
2. Rise from ruku, recite a part continuation of the Sura and go to ruku.
3. Rise from ruku, recite a part continuation of the Sura and go to ruku.
4. Rise from ruku, recite a part continuation of the Sura and go to ruku.
5. Rise from ruku, recite complete the Sura and go to ruku 5.
6. Rise from ruku, and complete the unit as normal.
Repeat 1-6 above for the second unit, and complete the prayer.
Thus you would have recite only one al-Hamd and only one complete Surah in each unit.
Excerpt from 'Elements of Islamic Studies':
In solar and lunar eclipses, the time of the 'prayer of signs' is from beginning of the eclipse till it is completely cleared.
In other causes like earthquake it must be prayed soon after the cause subsides. But it is always ada even if prayed many days after its occurrence.