Commit 6307662f authored by Peters, Wouter's avatar Peters, Wouter
Browse files

minor changes needed for SF6 obspacks

parent c8153d1b
......@@ -300,7 +300,7 @@ class ObsPackObservations(Observation):
SiteInfo = {}
SiteMove = {}
for key, value in SitesWeights.iteritems():
if 'co2_' in key:
if 'co2_' in key or 'sf6' in key: # to be fixed later, do not yet know how to parse valid keys from rc-files yet.... WP
sitename, sitecategory = key, value
sitename = sitename.strip()
sitecategory = sitecategory.split()[0].strip().lower()
......@@ -350,14 +350,14 @@ class ObsPackObservations(Observation):
logging.debug("Added Model Data Mismatch to all samples ")
def write_obs_to_file(self):
def write_obs_to_file(self,filenam="oldstyle"):
Write selected information contained in the Observation object to a file.
import as io
outfile = os.path.join(self.DaCycle['dir.output'], '' % self.DaCycle['time.sample.stamp'])
outfile = os.path.join(self.DaCycle['dir.output'], '' % (self.DaCycle['time.sample.stamp'], filenam))
f = io.CT_CDF(outfile, method='create')
logging.debug('Creating new Sample output file for postprocessing (%s)' % outfile)
......@@ -387,7 +387,7 @@ class ObsPackObservations(Observation):
savedict['comment'] = "Unique index number within this dataset ranging from 0 to UNLIMITED."
data = [[d.year, d.month,, d.hour, d.minute, d.second] for d in self.getvalues('xdate') ]
data = [[d.year, d.month,, d.hour, d.minute, d.second] for d in self.getvalues('xdate')]
savedict = io.std_savedict.copy()
savedict['dtype'] = "int"
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