Skip to content

Commit

Permalink
Add addition object purge @doutriaux1 @danlipsa
Browse files Browse the repository at this point in the history
  • Loading branch information
durack1 committed Aug 25, 2017
1 parent 09de5a9 commit 3ee05df
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions make_newVsOldDiffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def initVCS(x,levs1,levs2,split):
t2 = Ez.get(legend="local")
t3 = Ez.get(legend="local")

return iso1,iso2,title,t1,t2,t3
del(Ez) ; # Purge EzTemplate object

return iso1,iso2,title,t1,t2,t3,tmpl


#%% Create input file list
Expand Down Expand Up @@ -199,7 +201,7 @@ def initVCS(x,levs1,levs2,split):
#print 'old:',varNameRead.ljust(9),s2.getTime().asComponentTime()
s2 = f2(varNameRead,slice(m,m+1))
diff = s2-s1
iso1,iso2,title,t1,t2,t3 = initVCS(x,levs1,levs2,split)
iso1,iso2,title,t1,t2,t3,tmpl = initVCS(x,levs1,levs2,split)
title.string = '%i-%.2i' % (y,m+1)
x.plot(title,bg=bg)
x.plot(s1,t1,iso1,bg=bg); #,ratio="autot"); #,vtk_backend_grid=g)
Expand Down Expand Up @@ -242,6 +244,7 @@ def initVCS(x,levs1,levs2,split):
vcs.removeobject(t1)
vcs.removeobject(t2)
vcs.removeobject(t3)
vcs.removeobject(tmpl)
endTime = time.time()
timeStr = 'Time: %06.3f secs;' % (endTime-startTime)
memStr = 'Max mem: %05.3f GB' % (np.float32(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)/1.e6)
Expand All @@ -259,6 +262,7 @@ def initVCS(x,levs1,levs2,split):
#f1.close()
f2.close()
gc.collect() ; # Attempt to force a memory flush
x.backend.renWin = None ; # @danlipsa fix UV-CDAT/vcs#237
x.close()
f1.close()
outMP4File = os.path.join('pngs',''.join(['AMIPBCS_newVsOld_',varNameRead,'.mp4']))
Expand All @@ -277,4 +281,4 @@ def initVCS(x,levs1,levs2,split):
diff = [New(t,y,x)-Old(t,y,x)]
max = abs(diff(y,x))
rms = sum(diff(t,y,x)^2)/n(t)
'''
'''

0 comments on commit 3ee05df

Please sign in to comment.