diff --git a/da/stilt/obspack.py b/da/stilt/obspack.py index 5f4ce7c57952b375d8c9e34700aead2b890355af..6f803e8a2becf3118d4486a53edd565cc12267e5 100755 --- a/da/stilt/obspack.py +++ b/da/stilt/obspack.py @@ -338,7 +338,7 @@ class ObsPackObservations(Observations): - def add_model_data_mismatch(self, filename, filename_cofilter): + def add_model_data_mismatch(self, filename): """ Get the model-data mismatch values for this cycle. @@ -383,6 +383,7 @@ class ObsPackObservations(Observations): site_hourly = {} # option added to include only certain hours of the day (for e.g. PAL) IvdL site_foot = {} # option added to check for available footprints per observation site_incalt = {} # option to increase sampling altitude for sites specified in sites and weights file + co_filter = {} for key, value in sites_weights.iteritems(): 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 @@ -401,13 +402,16 @@ class ObsPackObservations(Observations): if 'site.incalt' in key: identifier, incalt = value.split(';') site_incalt[identifier.strip()] = (int(incalt)) + if 'co.filter' in key: + identifier_cofilter, cofilter = value.split(';') + co_filter[identifier_cofilter.strip()] = (str(cofilter)) #for obs in self.datalist: do_not_simulate=[] do_simulate=[] eventids=[] - for line in open(filename_cofilter): + for line in open(str(cofilter)): columns = line.split() if columns[0] == "eventid": pass