As the sigma-p coordinate under hydrostatic approximation can be interpreted as the mass coordinate with out the hydrostatic approximation, we propose a method that upgrades a hydrostatic model to a nonhydrostatic model with relatively less effort. The method adds to the primitive equations the extra terms omitted by the hydrostatic approximation and two prognostic equations for vertical speed w and nonhydrostatic part pressure p'. With properly formulated governing equations, at each time step, the dynamic part of the model is first integrated as that for the original hydrostatic model and then nonhydrostatic contributions are added as corrections to the hydrostatic solutions. In applying physical parameterizations after the dynamic part integration, all physics packages of the original hydrostatic model can be directly used in the nonhydrostatic model, since the upgraded nonhydrostatic model shares the same vertical coordinates with the original hydrostatic model. In this way, the majority codes of the nonhydrostatic model come from the original hydrostatic model. The extra codes are only needed for the calculation additional to the primitive equations. In order to handle sound waves, we use smaller time steps in the nonhydrostatic part dynamic time integration with a split-explicit scheme for horizontal momentum and temperature and a semi-implicit scheme for w and p'. Simulations of 2-dimensional mountain waves and density flows associated with a cold bubble have been used to test the method. The idealized case tests demonstrate that the proposed method realistically simulates the nonhydrostatic effects on different atmospheric circulations that are revealed in the oretical solutions and simulations from other nonhydrostatic models. This method can be used in upgrading any global or mesoscale models from a hydrostatic to nonhydrostatic model.