Of the "repentance" of God in the Book of Jonah, Tertullian says that it was not true "repentance," but rather a change of mind, entirely honorable on God's part, motivated by the change in the Ninevites' behavior. In other words, Tertullian, in the argument to which I've linked, makes of Jonah's divinely vouchsafed warning to the Ninevites a mere prediction of what will come to pass if the Ninevites do not change their ways. Tertullian, then, makes of the prophet--and seemingly even God Himself--an uncertain predictor of the future. In Tertullian, Jonah's warning ought to come with Yoda's caveat: "Always in motion is the future."
This is not the answer of the later Thomist tradition. Aquinas says of the "repentance" in Jonah:
God is said "to repent," metaphorically, inasmuch as He bears Himself after the manner of one who repents, by "changing His sentence, although He changes not His counsel."
So the inspired author speaks metaphorically here, says Aquinas. But why should that be?
One way for a Catholic to see that this must be metaphorical is to work backwards. The Church affirms Biblical inerrancy. But to speak of God "repenting" is to speak of an impossibility. Thus, the inspired author writes either in error or metaphorically. Given that the author is inspired by God, the author must be writing metaphorically rather than in error. (From the time of the Church Fathers, Tradition has always treated some statements in the Bible as metaphorical. Where the symptomatically modern heresy of Protestant Fundamentalism attempts to replace inerrancy with literalism, it ends up arguing against science in its reading of Genesis, and against sound metaphysics in its reading of passages like the one from Jonah we are considering.)
But since the inerrancy of Scripture does not preclude its not being literally true, I would like to suggest another possibility as well. God is radically Other. God the Father is not just a wise old being like Yoda. God is Being itself, immutable and impassible. To encounter God is to make contact with the ultimate "starfish alien": Someone impossible to fully comprehend. When we read the Old Testament, one way to think of it is as the "contact logs" of Israelites recording the interactions of their people with this profoundly alien Person. That the inspired author, in a civilization still painfully growing in its understanding of God toward the definitive revelation of God's nature in the Incarnation, is recording, with what we now understand as metaphor, what God's saving action in history looked like to our ancient Jewish forebears in faith. Jesus reveals to us that God is mercy and love. But beholding the terrors of nature, it is natural that human understanding of Him might begin with awe and trembling before supposed divine wrath. The truth of the Bible's rich metaphorical language is indeed inerrant, and can and should lead us to God. But we should be careful to think with the mind of the Church, lest we forget how radically Other God is, and how unfathomable the utmost depths of His immutable Mind.