re: The main field is generated by electrical currents in the core-mantle boundary
But you are partly correct: the total field strength of the magnetosphere varies by up to 20 percent due to solar wind, which distorts the field lines and deposits charged particles into the van Allen belts.
