The original question was "how is war weariness calculated", not what causes it. My personal impression is that some factor is allocated to each of the causes mentioned, and then (as with so many calculations in Civ4) account is taken of such things as whether the date is odd or even, the phase of the moon, and quite possibly the astrological positon of Mars. Finally, the computer obviously understands that the game is essentially a contest between itself and the human player and therefore delivers every conceivable disadvantage to the player at every opportunity. Not so much artificial intelligence as electronic hatred.