Commit e2ce206c authored by GROUAZEL's avatar GROUAZEL

fix for different version of products WV

parent c189b230
......@@ -125,7 +125,11 @@ class SpectrumReaderSat(AbstractSpectrumReader):
# oswWindDirection:long_name = "SAR Wind direction (meteorological convention=clockwise direction from where the wind comes respect to North)"
dirwind = ncf.variables['oswWindDirection'][:][0][0] # note: oswWindDirection exactly equal to oiswWindDirection
if self.filepath is None:
datedt = datetime.datetime.strptime(ncf.getattr('firstMeasurementTime'),'%Y-%m-%dT%H:%M:%S.%fZ')
try:
datedt = datetime.datetime.strptime(ncf.getncattr('firstMeasurementTime'),'%Y-%m-%dT%H:%M:%S.%fZ')
except:
datedt = datetime.datetime.strptime(ncf.getncattr('firstMeasurementTime'),'%Y-%m-%dT%H:%M:%SZ')
else:
datedt = datetime.datetime.strptime(os.path.basename(self.filepath).split('-')[4],'%Y%m%dt%H%M%S')
if datedt < datetime.datetime(2018,3,13) : # date of convention change with IPF 2.90
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment