The response of the earth's magnetosphere to the variation of the solar wind parameters and Interplanetary magnetic field (IMF) has been stud}ed by using a high-resolution, three-dimension magnetohydrodynamic (MHD) simulation when the WIND data of velocity Vx, plasma density, dynamic pressure, By and Bz every 1 minute were used as input. Large electrojet and magnetic storm which occurred on October 21 and 22 are reproduced in the simulation (fig. 1). We have studied the energy transfer and tail reconnect ion in association with geomagnetic storms.