You just pull that from the atmosphere.
Compress to store [potential] energy, take the heat generated during compression and use it, decompress at time of need and let the [hot?] atmosphere supply energy to the decompressing gas.
I wouldn’t call it a closed loop, but maybe a lack of deficit.