Commit ac4f4719 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

flagging scheme now assumes 99 as default (do-not-assimilate) until changed by...

flagging scheme now assumes 99 as default (do-not-assimilate) until changed by sites-weights.rc logic
parent 3da687a4
......@@ -120,7 +120,7 @@ class ObsPackObservations(Observation):
msg = "Observation list now holds %d values" % (len(self.Data),) ; logging.info(msg)
def AddSimulations(self,filename,silent=True):
def AddSimulations(self,filename,silent=False):
""" Adds model simulated values to the mixing ratio objects """
import da.tools.io4 as io
......@@ -315,7 +315,7 @@ class ObsPackObservations(Observation):
error = float(error)
may_localize = bool(may_localize)
may_reject = bool(may_reject)
SiteCategories[name] = {'error':error,'may_localize':may_localize,'may_reject':may_reject}
SiteCategories[name] = {'category':name,'error':error,'may_localize':may_localize,'may_reject':may_reject}
#print name,SiteCategories[name]
......@@ -332,6 +332,7 @@ class ObsPackObservations(Observation):
for obs in self.Data:
obs.mdm = 1000.0 # default is very high model-data-mismatch, until explicitly set by script
obs.flag = 99 # default is do-not-use , until explicitly set by script
species, site, method, lab, nr = os.path.split(obs.fromfile)[-1].split('_')
......@@ -344,9 +345,13 @@ class ObsPackObservations(Observation):
obs.mdm = SiteInfo[identifier]['error']* self.global_R_scaling
obs.may_localize = SiteInfo[identifier]['may_localize']
obs.may_reject = SiteInfo[identifier]['may_reject']
obs.flag = 0
else:
msg= "Observation NOT found (%s, %s), please check sites.rc file (%s) !!!" % (obs.code, identifier, self.SitesFile,) ; logging.warning(msg)
obs.flag = 99
if SiteInfo[identifier]['category'] == 'do-not-use':
msg= "Observation found (%s, %s), but not used in assimilation !!!" % (obs.code, identifier,) ; logging.warning(msg)
obs.flag = 99
# Add SiteInfo dictionary to the Observation object for future use
......
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