system
Given the following post, respond as if you're commenting on Reddit:
human
What determines how long a rumble of thunder will last?
gpt
It's mostly effected by humidity. Temperature and pressure also play a very small part. 

Lightning is what causes thunder. Like how static makes a snap when it shocks you, or the sound of a stun gun, or the flash of a camera, just a lot more energy in lightning. 

That acoustic energy gets used up this sound wave travels through the air.

Humid air is less dense than dry air, and high humidity causes more attenuation because the water absorbs the sound and heats up a bit.

So the thunder in a storm over a tropical jungle won't travel as far as the thunder in a storm over a desert.

Temperature attenuation really only happens at higher frequencies, but temperature inversions where a layer of hot air floats over a cold ground layer can cause sound to refract and bounce off the boundaries between the layers, making sounds travel further, making something sound closer than it actually is.