Identification of the different magnetic field contributions during a geomagnetic storm in magnetospheric and ground observations