We propose a new method for estimating nonstationary spatial-temporal covariance functions by representing a spatial-temporal process as a linear combination of a stationary spatialtemporal process and some local basis functions in space with temporal-dependent coefficients. By incorporating a large number of local basis functions with various scales at various locations, the resulting model is flexible to represent a wide variety of nonstationary spatial-temporal features. We consider the sample covariances as the response and formulate the covariance function estimation as a constrained least squares problem. This allows us to select appropriate basis functions and estimate the parameters simultaneously. Some numerical examples are given to show the effectiveness of the proposed method.