Nonadiabatic calculations have been performed for the g, h, i, and j states of H2, HD, and D2, yielding the lowest rovibrational levels (v, lV =0, 1,2, 3). Born-Oppenheimer potential-energy curves were taken from literature. Irregularly shaped rotational and vibrational couplings were significantly reduced by an appropriate electronic basis transformation.In the diabatic electronic basis introduced here the rotational matrix elements were fixed to their united-atom-limit values, and the vibrational matrix elements were adjusted to reproduce experimental data. Apart from the hydrogen h X~s tate v=2 and 3 series that we suspect are misassigned, we obtained agreement with experiment down to a wave number for all calculated energy levels. Calculated branching ratios for radiative decay, which are very sensitive to the excited-state electronic composition, are found to agree with experimental data [following paper, Phys. Rev. A 44, 4171 (1991)].The confusion in the nomenclature of the adiabatic electronic 'X+ states is addressed.PACS number(s): 33.10.Lb