  The magnetised iron calorimeter (ICAL) detector proposed at the India-based
Neutrino Observatory will be a 51 kton detector made up of 151 layers of 56 mm
thick soft iron with 40 mm air gap in between where the RPCs, the active
detectors, will be placed. The main goal of ICAL is to make precision
measurements of the neutrino oscillation parameters using the atmospheric
neutrinos as source. The charged current interactions of the atmospheric muon
neutrinos and anti-neutrinos in the detector produce charged muons. The
magnetic field, with a maximum value of $\sim$ 1.5 T in the central region of
ICAL, is a critical component since it will be used to distinguish the charges
and determine the momentum and direction of these muons. It is difficult to
measure the magnetic field inside the iron. The existing methods can only
estimate the internal field and hence will be prone to error. This paper
presents the first simulations study of the effect of errors in the measurement
of the magnetic field in ICAL on its physics potential, especially the neutrino
mass ordering and precision measurement of oscillation parameters in the 2--3
sector. The study is a GEANT4-based analysis, using measurements of the
magnetic field at the prototype ICAL detector. We find that there is only a
small effect on the determination of the mass ordering. While local
fluctuations in the magnetic field measurement are well-tolerated, calibration
errors must remain well within 5\% to retain good precision determination of
the parameters $\sin^2\theta_{23}$ and $\Delta m^2_{32}$.
