Autonomous marine vehicles (AMVs) are typically deployed for long periods of time in the ocean to monitor different physical, chemical, and biological processes. Given their limited energy budgets, it makes sense to consider motion plans that leverage the dynamics of the surrounding flow field so as to minimize energy usage for these vehicles. In this letter, we present a graph-search-based method to compute energy optimal paths for AMVs in 2-D time-varying flows. The novelty of the proposed algorithm lies in the use of an adaptive discretization scheme to construct the search graph. We demonstrate the proposed algorithm by computing optimal energy paths using an analytical time-varying flow model and using time-varying ocean flow data provided by the Regional Ocean Model System. We compare the output paths with those computed via an optimal control formulation and numerically demonstrate that the proposed method can overcome problems inherent in existing fixed discretization schemes.