function [T,nt] = get_time(fname);
% function T = get_time(fname);
%
% This function is used to get the time variable out of ROMS netcdf files.
%
%       fname = the (string) name of the ROMS file
%       T = the time output in USGS days.
%       nt = the time output in matlab datenum days
%
%           Aaron Bever    29 July, 2009
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if(nargin==0)
    fname = evalin('base','fname')
end


T = nc_varget(fname,'ocean_time');
T = T ./ (3600*24) + 2440000;
nt = datenum(gregorian(T));