@@ -871,16 +871,16 @@ cdef class gribmessage(object):
871
871
inventory.append(levstring)
872
872
elif self .valid_key(' level' ):
873
873
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' ):
878
875
ftime = self [' stepRange' ] # computed key, uses stepUnits
879
876
if self .valid_key(' stepType' ) and self [' stepType' ] != ' instant' :
880
877
inventory.append(' :fcst time %s %s (%s )' % \
881
- (ftime,self .fcstimeunits ,self .stepType))
878
+ (ftime,_ftimedict[ self .stepUnits] ,self .stepType))
882
879
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))
884
884
if self .valid_key(' dataDate' ) and self .valid_key(' dataTime' ):
885
885
inventory.append(
886
886
' :from ' + repr (self [' dataDate' ])+ ' %04i ' % self [' dataTime' ])
0 commit comments