def mattime2datetime(self, mattime, debug=False): """ Description: ---------- Output the time (yyyy-mm-dd, hh:mm:ss) corresponding to a given matlab time Inputs: ------ - mattime = matlab time (floats) """ time = mattime_to_datetime(mattime, debug=debug) print time[0]
keyCount += 1 except KeyError: if debug: print key, " is missing !" continue if keyCount == 0: print "---Vertical variables are missing---" else: self._3D = True #No time period define else: # get time and adjust it to matlab datenum self.julianTime = data.variables['time'].data self.matlabTime = self.julianTime[:] + 678942.0 #-Append message to History field start = mattime_to_datetime(self.matlabTime[0]) end = mattime_to_datetime(self.matlabTime[-1]) text = 'Full temporal domain from ' + str(start) +\ ' to ' + str(start) self._History.append(text) #Add time dimension to grid variables grid.ntime = self.julianTime.shape[0] #Check if bounding box has been defined if grid._ax == []: if debug: print 'Linking variables...' #loading hori data keyCount = 0 for key, aliaS in zip(kwl2D, al2D):
keyCount +=1 except KeyError: if debug: print key, " is missing !" continue if keyCount==0: print "---Vertical variables are missing---" else: self._3D = True #No time period define else: # get time and adjust it to matlab datenum self.julianTime = data.variables['time'].data self.matlabTime = self.julianTime[:] + 678942.0 #-Append message to History field start = mattime_to_datetime(self.matlabTime[0]) end = mattime_to_datetime(self.matlabTime[-1]) text = 'Full temporal domain from ' + str(start) +\ ' to ' + str(start) self._History.append(text) #Add time dimension to grid variables grid.ntime = self.julianTime.shape[0] #Check if bounding box has been defined if grid._ax==[]: if debug: print 'Linking variables...' #loading hori data keyCount = 0 for key, aliaS in zip(kwl2D, al2D):