Skip to content
Snippets Groups Projects
Commit 1b05ec5d authored by ivar's avatar ivar
Browse files

added code in serial_least_squares to make surface sites do not update BC, and...

added code in serial_least_squares to make surface sites do not update BC, and aircraft sites do not update fluxes
parent 59b8abe1
No related branches found
No related tags found
No related merge requests found
......@@ -110,18 +110,6 @@ class CO2Optimizer(Optimizer):
continue
# Screen for outliers greather than 3x model-data mismatch, only apply if obs may be rejected
#res = self.obs[n] - self.Hx[n]
#if self.may_reject[n]:
# threshold = self.rejection_threshold * np.sqrt(self.R[n])
# if np.abs(res) > threshold:
# logging.debug('Rejecting observation (%s,%i) because residual (%f) exceeds threshold (%f)' % (self.sitecode[n], self.obs_ids[n], res, threshold))
# self.flags[n] = 2
# continue
logging.debug('Proceeding to assimilate observation %s, %i' % (self.sitecode[n], self.obs_ids[n]))
PHt = 1. / (self.nmembers - 1) * np.dot(self.X_prime, self.HX_prime[n, :])
......@@ -129,6 +117,12 @@ class CO2Optimizer(Optimizer):
self.KG[:] = PHt / self.HPHR[n]
if 'surface' in self.sitecode[n]:
self.KG[-1]==0.
if 'aircraft' in self.sitecode[n]:
self.KG[:-1]==0.
if self.may_localize[n]:
logging.debug('Trying to localize observation %s, %i' % (self.sitecode[n], self.obs_ids[n]))
self.localize(n)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment