  We show that in the presence of a harmonically varying magnetic field the
fundamental or $f$-mode in a stratified layer is altered in such a way that it
fans out in the diagnostic $k\omega$ diagram, but with mode power also within
the fan. In our simulations, the surface is defined by a temperature and
density jump in a piecewise isothermal layer. Unlike our previous work (Singh
et al. 2014) where a uniform magnetic field was considered, we employ here a
nonuniform magnetic field together with hydromagnetic turbulence at length
scales much smaller than those of the magnetic fields. The expansion of the
$f$-mode is stronger for fields confined to the layer below the surface. In
some of those cases, the $k\omega$ diagram also reveals a new class of low
frequency vertical stripes at multiples of twice the horizontal wavenumber of
the background magnetic field. We argue that the study of the $f$-mode
expansion might be a new and sensitive tool to determining subsurface magnetic
fields with longitudinal periodicity.
