Commit e32ff611 authored by brunner's avatar brunner
Browse files

No commit message

No commit message
parent 7c9c4182
......@@ -73,7 +73,7 @@ import glob
import shutil
import copy
import getopt
#import cPickle
import pickle
import numpy as np
#from string import join
......@@ -257,7 +257,7 @@ class CycleControl(dict):
filename = os.path.join(self['dir.restart'], 'randomseed_%s.pickle' % self['time.start'].strftime('%Y%m%d'))
f = open(filename, 'wb')
seed = np.random.get_state()
# cPickle.dump(seed, f, -1)
pickle.dump(seed, f, -1)
f.close()
logging.info("Saved the random seed generator values to file")
......@@ -271,7 +271,7 @@ class CycleControl(dict):
filename = os.path.join(self['dir.restart'], 'randomseed_%s.pickle' % self['da.restart.tstamp'].strftime('%Y%m%d'))
logging.info("Retrieved the random seed generator values of last cycle from file")
f = open(filename, 'rb')
# seed = cPickle.load(f)
seed = pickle.load(f)
np.random.set_state(seed)
f.close()
......
Markdown is supported
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