We present a linear stability analysis of an oscillating granular layer, tr
eating it as an isothermal incompressible fluid with zero surface tension,
which undergoes periodic collisions with and separations from an oscillatin
g plate. Because the viscosity of the granular layer is unknown, we use the
experimental value of the critical acceleration for the transition from a
flat to patterned layer as input for the theory, and use the analysis to ca
lculate the granular viscosity and the wavelength of the most unstable mode
. The wavelength compares favorably with the experimental pattern wavelengt
h. Further, we find that the wavelengths are controlled by the viscosity of
the granular layer. [S1063-651X(99)11112-7].