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

Data attribute of Obs class now obsolete, code changes needed

parent 7a617550
......@@ -80,6 +80,8 @@ class Optimizer(object):
self.KG = np.zeros((self.nlag * self.nparams, self.nobs,), float)
def state_to_matrix(self, StateVector):
import numpy as np
allsites = [] # collect all obs for n=1,..,nlag
allobs = [] # collect all obs for n=1,..,nlag
allmdm = [] # collect all mdm for n=1,..,nlag
......@@ -99,16 +101,16 @@ class Optimizer(object):
if Samples != None:
self.rejection_threshold = Samples.rejection_threshold
allreject.extend(Samples.Data.getvalues('may_reject'))
alllocalize.extend(Samples.Data.getvalues('may_localize'))
allflags.extend(Samples.Data.getvalues('flag'))
allspecies.extend(Samples.Data.getvalues('species'))
allobs.extend(Samples.Data.getvalues('obs'))
allsites.extend(Samples.Data.getvalues('code'))
allmdm.extend(Samples.Data.getvalues('mdm'))
allids.extend(Samples.Data.getvalues('id'))
allreject.extend(Samples.getvalues('may_reject'))
alllocalize.extend(Samples.getvalues('may_localize'))
allflags.extend(Samples.getvalues('flag'))
allspecies.extend(Samples.getvalues('species'))
allobs.extend(Samples.getvalues('obs'))
allsites.extend(Samples.getvalues('code'))
allmdm.extend(Samples.getvalues('mdm'))
allids.extend(Samples.getvalues('id'))
simulatedensemble = Samples.Data.getvalues('simulated')
simulatedensemble = Samples.getvalues('simulated')
if allsimulated == None :
allsimulated = np.array(simulatedensemble)
......@@ -428,7 +430,7 @@ if __name__ == "__main__":
samples.add_simulations('/Users/peters/tmp/test_da/output/20050305/samples.000.nc')
nobs = len(samples.Data)
nobs = len(samples.datalist)
dims = (int(DaCycle['time.nlag']),
int(DaCycle['da.optimizer.nmembers']),
int(DaCycle.DaSystem['nparameters']),
......
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