The precision of numerical calculation of high density ratio or high pressure ratio problems such as underwater explosion is so far comparably low at present. An effective method to solve such problems is suggested. A program was written with this method. It catches the interface of the multi-medium fluid with level-set and deals with the interface with the modified ghost fluid method. Some Riemann problems and problems about shock wave impacting the interface of the liquid and air have been calculated with this program. The result fits the theory well. Underwater explosion of TNT calculated by this program was finally analysed. The results proved to be consistent with those calculated by similar explosion rules.