Skip to content
Snippets Groups Projects
Commit 99fd4eea authored by lkugler's avatar lkugler
Browse files

small fix

parent 51871c03
No related branches found
No related tags found
No related merge requests found
import os, glob import os, glob, shutil
from config.cfg import exp, cluster from config.cfg import exp, cluster
from utils import try_remove from utils import try_remove
...@@ -10,7 +10,7 @@ from utils import try_remove ...@@ -10,7 +10,7 @@ from utils import try_remove
""" """
keep_last_init_wrfrst = True keep_last_init_wrfrst = True
print('removing files for exp', exp) print('removing files for exp', exp.expname)
# 1) wrfrst # 1) wrfrst
inits = reversed(sorted(glob.glob(cluster.archivedir+'/20??-??-??_??:??'))) inits = reversed(sorted(glob.glob(cluster.archivedir+'/20??-??-??_??:??')))
...@@ -27,9 +27,8 @@ for k, init in enumerate(inits): ...@@ -27,9 +27,8 @@ for k, init in enumerate(inits):
try_remove(f) try_remove(f)
# 2) run_DART/exp # 2) run_DART/exp
os.removedirs(cluster.dartrundir) shutil.rmtree(cluster.dartrundir, ignore_errors=True)
# 3) run_WRF/exp # 3) run_WRF/exp
for iens in range(1, exp.n_ens+1): shutil.rmtree(cluster.wrf_rundir_base+'/'+exp.expname, ignore_errors=True)
os.removedirs(cluster.wrf_rundir(iens)) print(cluster.wrf_rundir_base+'/'+exp.expname, 'removed.')
print(cluster.wrf_rundir(iens), 'removed.')
...@@ -3,7 +3,7 @@ import numpy as np ...@@ -3,7 +3,7 @@ import numpy as np
import pandas as pd import pandas as pd
from config.cfg import exp, cluster from config.cfg import exp, cluster
from utils import symlink, copy, sed_inplace, append_file, mkdir, try_remove from dartwrf.utils import symlink, copy, sed_inplace, append_file, mkdir, try_remove
def plot_box(m, lat, lon, label="", **kwargs): def plot_box(m, lat, lon, label="", **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment