Skip to content

Commit 69fe545

Browse files
committed
update
1 parent 781d8f5 commit 69fe545

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pygrib/_pygrib.pyx

+6-6
Original file line numberDiff line numberDiff line change
@@ -871,16 +871,16 @@ cdef class gribmessage(object):
871871
inventory.append(levstring)
872872
elif self.valid_key('level'):
873873
inventory.append(':level %s' % self['level'])
874-
if self.valid_key('forecastTime'):
875-
ftime = repr(self['forecastTime'])
876-
inventory.append(':fcst time %s %s'% (ftime,self.fcstimeunits))
877-
elif self.valid_key('stepRange'):
874+
if self.valid_key('stepRange'):
878875
ftime = self['stepRange'] # computed key, uses stepUnits
879876
if self.valid_key('stepType') and self['stepType'] != 'instant':
880877
inventory.append(':fcst time %s %s (%s)'%\
881-
(ftime,self.fcstimeunits,self.stepType))
878+
(ftime,_ftimedict[self.stepUnits],self.stepType))
882879
else:
883-
inventory.append(':fcst time %s %s'% (ftime,self.fcstimeunits))
880+
inventory.append(':fcst time %s %s'% (ftime,_ftimedict[self.stepUnits]))
881+
elif self.valid_key('forecastTime'):
882+
ftime = repr(self['forecastTime'])
883+
inventory.append(':fcst time %s %s'% (ftime,self.fcstimeunits))
884884
if self.valid_key('dataDate') and self.valid_key('dataTime'):
885885
inventory.append(
886886
':from '+repr(self['dataDate'])+'%04i' % self['dataTime'])

0 commit comments

Comments
 (0)