Commit fa8726cd authored by brunner's avatar brunner
Browse files

No commit message

No commit message
parent f5d50b22
......@@ -114,7 +114,7 @@ class ObservationOperator(object):
l = ofile.createVariable('lambda', np.float32, ('nensembles','nparam'),fill_value=-999.99)
co2 = np.empty(shape=(self.forecast_nmembers,self.nparams))
for m in range(0,20):
for m in range(0,self.forecast_nmembers):
co2[m,:] = members[m].param_values
l[:] = co2
ofile.close()
......
......@@ -149,9 +149,7 @@ class StateVector(object):
self.nlag = int(dacycle['time.nlag'])
self.nmembers = int(dacycle['da.optimizer.nmembers'])
# self.nparams = int(dacycle.dasystem['nparameters'])
self.nparams = 181
#self.nparams = 198
self.nparameters = int(dacycle['nparameters'])
self.nobs = 0
self.obs_to_assimilate = () # empty containter to hold observations to assimilate later on
......@@ -164,7 +162,6 @@ class StateVector(object):
for n in range(self.nlag):
self.ensemble_members[n] = []
# This specifies the file to read with the gridded mask at 1x1 degrees. Each gridbox holds a number that specifies the parametermember
# that maps onto it. From this map, a dictionary is created that allows a reverse look-up so that we can map parameters to a grid.
......@@ -181,8 +178,7 @@ class StateVector(object):
# Create a dictionary for state <-> gridded map conversions
# nparams = 198
nparams = 181
nparams = self.nparameters
self.griddict = {}
for pft in range(1,18):
for r in range(1, 11):
......@@ -291,7 +287,7 @@ class StateVector(object):
self.ensemble_members[lag].append(newmember)
# Create members 1:nmembers and add to ensemble_members list
for member in range(1, self.nmembers+1):
for member in range(1, self.nmembers):
# rands = np.random.uniform(low=-1., high=1., size=self.nparams-1)
# rands_bg = np.random.uniform(low=-0.05, high=0.05, size=1)
# rands = np.random.randn(self.nparams-1)
......
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