I imagine you have purchased coffee beans and casually used them over time. You may have noticed that the quality in the cup isn't quite as good at the end as it was in the beginning when you cut that package open and experienced the aroma permeating from within. There are few things better than the experience of cracking open a fresh bag of coffee.
The complex gases, largely consisting of carbon dioxide, are fleeting. However, they contribute significantly to the experience of drinking a cup of coffee. It is best to learn how to preserve them. What would coffee be if it didn't also provide you with a pleasant aroma?
If you bought your beans from a local roaster, then this experience is tripled in magnitude. The coffee emits soothing scents that tear your eyes due to the strength of permeation and weakness from what it makes you in this experience. Then you laugh. A full spectrum of emotion and love surrounds you in this moment.
People ask, "Why does this happen only once?"
"How can I store my coffee so it is this fresh every time?"
You can't.
The reason your nose detects these pleasantries is because they are not in the beans any longer. Coffee outgases. Once the beans are done roasting, the gases begin to leave the beans. Once they are ground for brewing, this process accelerates exponentially.
Only one factor can slow down outgassing. Freezing slams on the brakes when gases are thinking about leaving the inside of the bean. Freezing is a good option for long term storage. However, one thing I have noticed after talking to people is that we fail to realize there are so many other variables that can affect the coffee in the process of freezing.
One factor is the container or package itself. What else is in the freezer? Freezer-burned ice cream? Leftovers? An air-tight container is critical to freezing coffee in order to prevent foreign smells from being absorbed by the coffee.
Another factor is condensation. Removing the coffee from the freezer will inevitably cause condensation to form on the inside of whatever storage container you choose. Condensation is the Coffee Aficionado's enemy. The moisture will accelerate the coffee's process of going stale.
I recommend storing coffee in an air-tight container at room temperature if you expect to use it up within two weeks. Coffee's flavor is best if used within two weeks of roasting. If you are keeping your coffee longer, then keep it in the freezer until you are ready to use it. Do not take the coffee in and out of the freezer multiple times. This will have the opposite effect you are hoping for and cause it to lose its flavor sooner.
The tragedy of the emotional spectrum and inevitable degassing can be managed but not wholly prevented. There is so much love and joy and laughter when you excitedly rip open that coffee package to brew your first cup. Once the aromas are gone, they are gone, but having a good quality cup of coffee is still possible if you learn how to freeze.