The accuracy of in-orbit stellar refraction navigation is restricted by the global atmospheric spatiotemporal variations and the simplified stellar atmospheric refraction model. To address these issues, this article proposes a method for determining apparent height for stellar refraction navigation. The ERA5 global reanalysis dataset is employed to construct the global atmospheric refractive index field. Additionally, a refined layer ray-tracing algorithm is derived to calculate stellar refraction information. Furthermore, to determine stellar refracted paths within the three-dimensional atmosphere, an iterative algorithm is designed to acquire apparent heights in any observation direction. Simulation results show that the proposed method significantly enhances navigation performance.