Commit 479b2024 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

removed FillValue attributes, added longer filenames for originals

parent bff3ed87
......@@ -114,7 +114,7 @@ class ObsPackObservations(Observation):
for n in range(len(dates)):
self.Data.append( MixingRatioSample(ids[n],dates[n],site,obs[n],0.0,0.0,0.0,0.0,flags[n],alts[n],lats[n],lons[n],evn[n],species,strategy,0.0, ncfile) )
self.Data.append( MixingRatioSample(ids[n],dates[n],site,obs[n],0.0,0.0,0.0,0.0,flags[n],alts[n],lats[n],lons[n],evn[n],species,strategy,0.0, infile) )
msg = "Added %d observations from file (%s) to the Data list" % (len(dates),ncfile,) ; logging.debug(msg)
......@@ -150,7 +150,7 @@ class ObsPackObservations(Observation):
index = obs_ids.index(id)
#print id,val,val.shape
status = self.Data[index].simulated = val*1e6 # to umol/mol
status = self.Data[index].simulated = val # in mol/mol
else:
......@@ -207,7 +207,6 @@ class ObsPackObservations(Observation):
savedict['dims'] = dimid+dimcalcomp
savedict['values'] = data
savedict['missing_value'] = -9
savedict['_FillValue'] = -9
savedict['comment'] = "Calendar date components as integers. Times and dates are UTC."
savedict['order'] = "year, month, day, hour, minute, second"
status = f.AddData(savedict)
......@@ -220,7 +219,6 @@ class ObsPackObservations(Observation):
savedict['dims'] = dimid
savedict['values'] = data.tolist()
savedict['missing_value'] = -999.9
savedict['_FillValue'] = -999.9
status = f.AddData(savedict)
data = self.Data.getvalues('lon')
......@@ -231,7 +229,6 @@ class ObsPackObservations(Observation):
savedict['dims'] = dimid
savedict['values'] = data.tolist()
savedict['missing_value'] = -999.9
savedict['_FillValue'] = -999.9
status = f.AddData(savedict)
data = self.Data.getvalues('height')
......@@ -242,7 +239,6 @@ class ObsPackObservations(Observation):
savedict['dims'] = dimid
savedict['values'] = data.tolist()
savedict['missing_value'] = -999.9
savedict['_FillValue'] = -999.9
status = f.AddData(savedict)
data = self.Data.getvalues('samplingstrategy')
......@@ -254,7 +250,6 @@ class ObsPackObservations(Observation):
savedict['dims'] = dimid
savedict['values'] = data.tolist()
savedict['missing_value'] = -9
savedict['_FillValue'] = -9
status = f.AddData(savedict)
data = self.Data.getvalues('evn')
......@@ -265,8 +260,7 @@ class ObsPackObservations(Observation):
savedict['units'] = "NOAA database identifier"
savedict['dims'] = dimid+dim200char
savedict['values'] = data
savedict['missing_value'] = '-'
savedict['_FillValue'] = '-'
savedict['missing_value'] = '!'
status = f.AddData(savedict)
status = f.close()
......@@ -339,7 +333,7 @@ class ObsPackObservations(Observation):
obs.mdm = 1000.0 # default is very high model-data-mismatch, until explicitly set by script
species, site, method, lab, nr = obs.fromfile.split('_')
species, site, method, lab, nr = os.path.split(obs.fromfile)[-1].split('_')
identifier = "%s_%02d_%s"%(site,int(lab),method,)
......@@ -403,7 +397,6 @@ class ObsPackObservations(Observation):
savedict['dims'] = dimid+dimcalcomp
savedict['values'] = data
savedict['missing_value'] = -9
savedict['_FillValue'] = -9
savedict['comment'] = "Calendar date components as integers. Times and dates are UTC."
savedict['order'] = "year, month, day, hour, minute, second"
status = f.AddData(savedict)
......@@ -451,8 +444,7 @@ class ObsPackObservations(Observation):
savedict['dtype'] = "char"
savedict['dims'] = dimid+dim200char
savedict['values'] = data
savedict['missing_value'] = '-'
savedict['_FillValue'] = '-'
savedict['missing_value'] = '!'
dummy = f.AddData(savedict)
status = f.close()
......
Supports Markdown
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