Commit e32ff611 authored by brunner's avatar brunner
Browse files

No commit message

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