  We compute the singular support and the characteristic cycle of a rank 1
sheaf on a smooth variety in codimension 2 using ramification theory, when the
ramification of the sheaf is clean. We develop a general theory, called the
partially logarithmic ramification theory, and define an algebraic cycle on a
logarithmic cotangent bundle with partial logarithmic poles along the boundary.
We prove that the inverse image of the support of the cycle and the pull-back
of the cycle to the cotangent bundle are equal to the singular support and the
characteristic cycle, respectively, outside a closed subset of the variety of
codimension greater than 2 under a mild assumption.
