The discontinuity of the latent heat term could occur in the thermodynamic equation in the transition area between the unsaturated and saturated air where the latent heat is released associated with the condensation in the saturated air whereas the latent heat is not released in the unsaturated air. To fix the discontinuity, the condensation probability function (q/q(s))(k) (q and q(s) are specific humidity and saturated specific humidity respectively, k = 9) is introduced into the thermodynamic framework with (q/q(s))(k)q(s). The generalized moist potential vorticity (GMPV) is thus defined and its tendency equation is derived. The analysis shows that in a frictionless and moist adiabatic flow, the GMPV can be generated in the unsaturated air only and its generation rate is determined by the environmental moisture and its gradient.