  The goal of this paper is to determine the respective importance of solid
state vs. gas phase reactions for the formation of dimethyl ether. This is done
by a detailed analysis of the excitation properties of the ground state and the
torsionally excited states, v11=1 and v15=1, toward the high-mass star-forming
region G327.3-0.6. With the Atacama Pathfinder EXperiment 12 m submillimeter
telescope, we performed a spectral line survey. The observed spectrum is
modeled assuming local thermal equilibrium. CH3OCH3 has been detected in the
ground state, and in the torsionally excited states v11=1 and v15=1, for which
lines have been detected here for the first time. The emission is modeled with
an isothermal source structure as well as with a non-uniform spherical
structure. For non-uniform source models one abundance jump for dimethyl ether
is sufficient to fit the emission, but two components are needed for the
isothermal models. This suggests that dimethyl ether is present in an extended
region of the envelope and traces a non-uniform density and temperature
structure. Both types of models furthermore suggest that most dimethyl ether is
present in gas that is warmer than 100 K, but a smaller fraction of 5%-28% is
present at temperatures between 70 and 100 K. The dimethyl ether present in
this cooler gas is likely formed in the solid state, while gas phase formation
probably is dominant above 100 K. Finally, the v11=1 and v15=1 torsionally
excited states are easily excited under the density and temperature conditions
in G327.3-0.6 and will thus very likely be detectable in other hot cores as
well.
