diff --git a/da/tools/initexit.py b/da/tools/initexit.py index ed02390848c30219c8b6d12189cf6c744768c993..5418ec1329b128139a0480353778f4fc716f9fdc 100755 --- a/da/tools/initexit.py +++ b/da/tools/initexit.py @@ -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()