Commit 97abc5e3 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

more verbose output about assimilated values

parent ecbeb310
......@@ -340,7 +340,7 @@ class Optimizer(object):
savedict['dims'] = dimstate+dimobs
savedict['values'] = data.tolist()
savedict['comment'] = 'Kalman gain matrix of all obs and state vector elements'
dummy = f.AddData(savedict)
#dummy = f.AddData(savedict)
dummy = f.close()
msg = 'Diagnostics file closed ' ; logging.debug(msg)
......@@ -359,7 +359,7 @@ class Optimizer(object):
# Screen for flagged observations (for instance site not found, or no sample written from model)
if self.flags[n] != 0:
msg = 'Skipping observation %d because of flag value %d'%(n,self.flags[n]) ; logging.debug(msg)
msg = 'Skipping observation (%s,%s) because of flag value %d'%(self.sitecode[n],self.obs_ids[n],self.flags[n]) ; logging.debug(msg)
continue
......@@ -370,7 +370,7 @@ class Optimizer(object):
if self.may_reject[n]:
threshold = self.rejection_threshold*np.sqrt(self.R[n,n])
if np.abs(res) > threshold:
msg = 'Rejecting observation %d because residual (%f) exceeds threshold (%f)'%(n,res,threshold) ; logging.debug(msg)
msg = 'Rejecting observation (%s,%s) because residual (%f) exceeds threshold (%f)'%(self.sitecode[n],self.obs_ids[n],res,threshold) ; logging.debug(msg)
self.flags[n] = 2
continue
......@@ -381,9 +381,9 @@ class Optimizer(object):
if self.may_localize[n]:
dummy = self.Localize(n)
msg = 'Localized observation %d'%(n,) ; logging.debug(msg)
msg = 'Localized observation %s'%(self.obs_ids[n],) ; logging.debug(msg)
else:
msg = 'Not allowed to Localize observation %d'%(n,) ; logging.debug(msg)
msg = 'Not allowed to Localize observation %s'%(self.obs_ids[n],) ; logging.debug(msg)
alpha = np.double(1.0)/(np.double(1.0)+np.sqrt( (self.R[n,n])/self.HPHR[n,n] ) )
......
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