Drying of grains and beans for storage is historically done in the sun. Grains are dried in all kinds of indoor or other drying apparatus. Historically, some grains such as corn are allowed to dry on the cob, beans and other berry grains are dried whole, such that they can be preserved for seed crop. However, whole grains tend to preserve a lot of moisture and fat content. De-hulling grain berries for storage and separating components like germ can enhance the storage life term. For this reason, white rice is preferred by many for long term storage; the oils in brown rice tend to rancidify more quickly. Drying can be done in bins and it can be done under cover and with the benefit of heat from various sources. Grain storage silos themselves are big controlled drying storage units, and are ventilated and heated by solar or other means. Think of a silo as a big thermal tube that gets air moving vertically up through it from the bottom.
Desired moisture content levels for dried grains are below 15% for any period. In long term storage and for preservation of seed stock we want those moisture levels down to 10% or below. This can take a couple weeks and if you are in a humid climate you might have a hard time getting there. Air flow and temperature are important factors here. Once a good low moisture content is achieved, however, we want to get that grain into stable 60-65°F temperatures immediately for long term storage. From here, maintaining those levels of moisture and temperature are key. Our desert experience suggests that low humidity is more important than temperature, at least for very low-fat grains and beans.
Air flow remains important to the long term storage of grains in normal atmosphere. This is why burlap and canvas bags were often used for their storage. Folks buying grains specifically packaged for long term storage don’t need to worry about this until the packages are opened. In general, packages are removed from dry storage areas upon opening for use in the household.