On the configuration of the magnetotail near midnight during quiet and weakly disturbed periods: Magnetic field modeling