A method of performing chemical analysis is disclosed. The method includes the steps of forming carbide-derived carbon (CDC) material having a plurality of pore size, surface chemistry, and surface electrical properties. An array of the surface functionalized CDCs are used for atmospheric sampling, in which chemicals in the atmosphere are adsorbed on the CDCs. The adsorbed samples are desorbed later for analysis by a plurality of individual mass spectrometers.