For the day of judgment will be revealed in the fire which will precede the face of the judge, burning the face of the world, enveloping the wicked and cleansing the just. A psalm says of this: fire goes before him, and burns up his adversaries round about (Ps 96:3). But the day of the Lord which occurs at death will be revealed in the fire of purgatory, by which the elect will be cleansed, if any require cleansing: Job can be interpreted as referring to this fire: when he has tried me, I shall come forth as gold (Job 23:10). Finally, the day of the Lord, which is the day of tribulation permitted by God's judgment, will be revealed in the fire of tribulation: for gold is tested in the fire, and acceptable men in the furnace of humiliation (Sir 2:5).
[St. Thomas Aquinas, Commentary on the Letters of Saint Paul to the Corinthians, Larcher, Mortensen, and Keating, trs., The Aquinas Institution for the Study of Sacred Doctrine (Lander, WY: 2012) pp 61-62. This is from the commentary on I Corinthians.]