Commented out error bar variable until a better upperlimit can be set.
Changed upper limits of magnetic coordinates to something reasonable. Added 9999 as a fill value for magnetic coordinates that should be NaN.