  Atomic gas in the diffuse interstellar medium (ISM) is organized in
filamentary structures. These structures usually host cold and dense molecular
clumps. The Galactic magnetic field is considered to play an important role in
the formation of these clumps. Our goal is to explore the role of the magnetic
field in the HI - H$_{2}$ transition process. We targeted a filamentary cloud
where gas transitions from atomic to molecular. This cloud is located at the
edges of an expanding structure, known as the North Celestial Pole Loop (NCPL).
We probed the magnetic field properties of the cloud with optical polarization
observations. We performed multi-wavelength spectroscopic observations of
different species in order to probe the gas phase properties of the cloud. We
identified two distinct sub-regions within the cloud. One of the regions hosts
purely atomic gas, while the other is dominated by molecular gas although most
of it is CO-dark. The estimated plane-of-the-sky magnetic field strength
between the two regions remains constant within uncertainties and lies in the
range 20 ~ 30$~\mu$G. The total magnetic field strength does not scale with
density which implies that gas is compressed along the field lines. We also
found that turbulence is sub-Alfv\'enic. The HI velocity gradients are in
general perpendicular to the mean magnetic field orientation, except for the
region close to the CO clump where they tend to become parallel. The latter is
likely related to gas undergoing gravitational infall. The magnetic field
morphology of the target cloud is parallel to the HI column density structure
of the cloud in the atomic region, while it tends to become perpendicular to
the HI structure in the molecular region. If this is verified in more cases it
has important consequences for the ISM magnetic field modeling with HI data.
