Commit 51e9facd authored by brunner's avatar brunner
Browse files

No commit message

No commit message
parent 572578b8
......@@ -187,6 +187,7 @@ class StateVector(object):
sel = np.nonzero(self.gridmap.flat == r)
if len(sel[0]) > 0:
self.griddict[r] = sel
# pavle: sel sorts out regions by PFT
logging.debug("A dictionary to map grids to states and vice versa was created")
......@@ -485,6 +486,7 @@ class StateVector(object):
logging.debug('Successfully wrote data from ensemble member %d to file (%s) ' % (mem.membernumber, filename))
def grid2vector(self, griddata=None, method='avg'):
# not used --pavle
"""
Map gridded data onto a vector of length (nparams,)
......@@ -516,7 +518,7 @@ class StateVector(object):
result = np.zeros((self.nparams,), float)
for k, v in self.griddict.items():
#print k,k-1,result.shape, v
# print(k,k-1,result.shape, v)
if method == "avg":
result[k - 1] = griddata.take(v).mean()
elif method == "sum" :
......
......@@ -39,10 +39,10 @@ def ensemble_smoother_pipeline(dacycle, platform, dasystem, samples, statevector
logging.info(header + "Initializing current cycle" + footer)
start_job(dacycle, dasystem, platform, statevector, samples, obsoperator)
# prepare_state(dacycle, statevector)
# sample_state(dacycle, samples, statevector, obsoperator)
prepare_state(dacycle, statevector)
sample_state(dacycle, samples, statevector, obsoperator)
# invert(dacycle, statevector, optimizer)
invert(dacycle, statevector, optimizer)
advance(dacycle, samples, statevector, obsoperator)
......
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