Read data from a NetCDF file
        
        :parameter file_pattern: a file pattern to be globbed (:func:`glob.glob`) or a file list.
        :keyword kwargs: additional keywords to be passed to :meth:`altimetry.tools.nctools.nc.load` (eg. extracting a subset of the file)

def read(self,file_pattern,**kwargs):
        '''
        Read data from a NetCDF file
        
        :parameter file_pattern: a file pattern to be globbed (:func:`glob.glob`) or a file list.
        :keyword kwargs: additional keywords to be passed to :meth:`altimetry.tools.nctools.nc.load` (eg. extracting a subset of the file)
        ''' 
        
        #Setup file list
        if isinstance(file_pattern, str) : ls = glob.glob(file_pattern)
        elif isinstance(file_pattern,np.ndarray) :
            ls = file_pattern.tolist()
            file_pattern = file_pattern[0]
        
        if len(ls) == 0 :
            self.Error('File pattern not matched : ' + file_pattern)
                
        self.filelist = [os.path.basename(i) for i in ls]
        self.filelist_count = [0] * len(self.filelist)
        enum = list(enumerate(ls))
        enum = zip(*enum)
        
        self.fid_list = np.array(enum[0])
        self.dirname = os.path.dirname(os.path.abspath(file_pattern))
        
        self.par_list = np.array([])
        self.dim_list = np.array([])
        self._dimensions = OrderedDict({'_ndims':0})
         
        #Loop over data files
        #####################
        for i in np.arange(len(self.fid_list)) :
            
            #Read data file
            ###############
            filename = os.path.join(self.dirname,self.filelist[i])
            self.message(1, "Loading " + os.path.basename(filename))
            
            res = self.load(filename, **kwargs) #read() function is specific of each class
            #self.update_dataset(res) #update class with loaded data
            
            #self.check_variables()
        
        #self.update()

        return(res)