Upper ocean thermohaline structure in the California Current System is investigated using sustained observations from autonomous underwater gliders and a numerical state estimate. Both observations and the state estimate show layers distinguished by the temperature and salinity variability along isopycnals (i.e., spice variance). Mesoscale and submesoscale spice variance is largest in the remnant mixed layer, decreases to a minimum below the pycnocline near 26.3 kg m(-3), and then increases again near 26.6 kg m(-3). Layers of high (low) meso-and submesoscale spice variance are found on isopycnals where large-scale spice gradients are large (small), consistent with stirring of large-scale gradients to produce smaller scale thermohaline structure. Passive tracer adjoint calculations in the state estimate are used to investigate possible mechanisms for the formation of the layers of spice variance. Layers of high spice variance are found to have distinct origins and to be associated with named water masses; high spice variance water in the remnant mixed layer has northerly origin and is identified as Pacific Subarctic water, while the water in the deeper high spice variance layer has southerly origin and is identified as Equatorial Pacific water. The layer of low spice variance near 26.3 kg m(-3) lies between the named water masses and does not have a clear origin. Both effective horizontal diffusivity, kappa(h), and effective diapycnal diffusivity, kappa(v), are elevated relative to the diffusion coefficients set in the numerical simulation, but changes in kappa(h) and kappa(v) with depth are not sufficient to explain the observed layering of thermohaline structure.