Created
March 1, 2017 17:34
-
-
Save jklymak/dbf3776ba6d23a607f36acad96cae16d to your computer and use it in GitHub Desktop.
Cleanup mitgcm data on server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
TODO = 'LWRegrid2full01U10' | |
Root = '../results/'+TODO+'/_Model/input/' | |
print(Root) | |
dd = glob.glob(Root+'S.*') | |
print(dd) | |
for d in dd: | |
print(d) | |
os.remove(d) | |
try: | |
os.remove(Root+'pickup.ckptB.data') | |
os.remove(Root+'pickup.ckptB.meta') | |
os.remove(Root+'pickup.ckptA.data') | |
os.remove(Root+'pickup.ckptA.meta') | |
except: | |
pass | |
todos=['PH','W','KLeps','KLviscAr','Eta','pickup'] | |
dt = 5 | |
tokeep = [0,14400,14580,14760,28800,29520,30240,36000,56160,56880,57600] | |
for todo in todos: | |
dd = glob.glob(Root+todo+'.*') | |
for d in dd: | |
# get the iteration: | |
it = int(d[-10:-5]) | |
if it in tokeep: | |
print('skipping '+d) | |
else: | |
print(d) | |
os.remove(d) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment