append a variable from a given data structure to the existing dataset.
        
        :parameter optional file:
        :parameter name: variable name
        :parameter value: data
        
        :keyword start: broadcast the data to a portion of the dataset. starting index.
        :keyword counts: broadcast the data to a portion of the dataset. number of counts.
        :keyword stride: broadcast the data to a portion of the dataset. stepping along dimension.

def push(self,*args,**kwargs):#file,varName,value,**kwargs):
        '''
        append a variable from a given data structure to the existing dataset.
        
        :parameter optional file:
        :parameter name: variable name
        :parameter value: data
        
        :keyword start: broadcast the data to a portion of the dataset. starting index.
        :keyword counts: broadcast the data to a portion of the dataset. number of counts.
        :keyword stride: broadcast the data to a portion of the dataset. stepping along dimension.
        
        '''
        
        reload = False
        
        #Get arguments
        largs=list(args)
        if os.path.exists(largs[0]) :
            file = largs.pop(0)
            self._filename = file
            reload = True
        name = largs.pop(0)
        value = largs.pop(0)
        
        #Get keywords
        start = kwargs.get('start',None)
        counts = kwargs.get('counts',None)
        stride = kwargs.get('stride',None)
        
        
        file = self._filename
        
        if self.verbose == 1 : self.message(1, 'Writing data into file {0}'.format(os.path.basename(file)))
        elif self.verbose > 1 : self.message(2, 'Writing data into file {0}'.format(file))
        ncf=ncfile(file, 'a', format='NETCDF4', clobber=False)
     
        #Get list of recorded parameters:
        par_list = ncf.variables.keys()
        
        #Check if variable exists
        if 'sla' not in par_list : createVariable = True
        else : createVariable = False
        
        
        if not createVariable :
            var=ncf.variables[name]
            
            #Get dimensions
            fileDims=OrderedDict({'_ndims':len(var.dimensions)})
            [fileDims.update({str(d):len(ncf.dimensions[d])}) for d in var.dimensions]
            
            if start is None : start = [0 for sh in var.shape]
            else : start = start[::-1]
            if counts is None : counts = [sh for sh in var.shape]
            else : counts = counts[::-1]
            if stride is None : stride = [1 for sh in var.shape]
            else : stride = stride[::-1]
            
            #Transpose before write
            value=np.transpose(value)
            strides=var[:].strides
            
            #Construct indices (cf.http://docs.scipy.org/doc/numpy-1.5.x/reference/arrays.indexing.html)
            ind=()
            for i in np.arange(len(start)) : ind+=(slice(start[i],start[i]+counts[i],strides[i]),)
            
            #Push data into file
            try : var[ind]=value[:]
            except ValueError : self.Error('Input variable {0} {1} cannot be broadcasted into {2}'.format(name,value.shape,os.path.basename(file)))
            
            #Check if variable is in agreement with dimensions
#            dimStr=self._dimensions #Get dimensions  
            
            ncf.close()
            
            
        else :
            self.Error('This option is not yet implemented')