Drying and gas or vapor contact with solids