Underwater TRN (Underwater Terrain Referenced Navigation) estimates an underwater vehicle state by measuring a distance between the vehicle and undersea terrain, and comparing it with the known terrain database. TRN belongs to absolute navigation methods, which are used to compensate a drift error of dead reckoning measurements such as IMU (Inertial Measurement Unit) or DVL (Doppler Velocity Log). However, underwater TRN is different to other absolute methods such as USBL (Ultra-Short Baseline) and LBL (Long Baseline), because TRN is independent of the external environment. As a magnetic-field-based navigation, TRN is a kind of geophysical navigation. This paper develops an EKF (Extended Kalman Filter) formulation for underwater TRN. A filter propagation part is composed by an inertial navigation system, and a filter update is executed with echo-sounder measurement. For large-initial-error cases, an adaptive EKF approach is also presented, to keep the filter be stable. At the end, simulation studies are given to verify the performance of the proposed TRN filter. With simplified sensor and terrain database models, the simulation results show that the underwater TRN could support conventional underwater navigation methods.