  The H II region W40 harbors a small group of young, hot stars behind roughly
9 magnitudes of visual extinction. We have detected gaseous carbon monoxide
(CO) and diatomic carbon (C_2) in absorption toward the star W40 IRS 1a. The
2-0 R0, R1, and R2 lines of 12CO at 2.3 micron were measured using the CSHELL
on the NASA IR Telescope Facility (with upper limits placed on R3, R4, and R5)
yielding an N_CO of (1.1 +/- 0.2) x 10^18 cm^-2. Excitation analysis indicates
T_kin > 7 K. The Phillips system of C_2 transitions near 8775 Ang. was measured
using the Kitt Peak 4-m telescope and echelle spectrometer. Radiative pumping
models indicate a total C_2 column density of (7.0 +/- 0.4) x 10^14 cm^-2, two
excitation temperatures (39 and 126 K), and a total gas density of n ~ 250
cm^-3. The CO ice band at 4.7 micron was not detected, placing an upper limit
on the CO depletion of delta < 1 %. We postulate that the sightline has
multiple translucent components and is associated with the W40 molecular cloud.
Our data for W40 IRS 1a, coupled with other sightlines, shows that the ratio of
CO/C_2 increases from diffuse through translucent environs. Finally, we show
that the hydrogen to dust ratio seems to remain constant from diffuse to dense
environments, while the CO to dust ratio apparently does not.
