Skip to content
Snippets Groups Projects
Commit 93162e16 authored by Lukas Kugler's avatar Lukas Kugler
Browse files

link instead copy

parent b6048f6b
Branches
Tags
No related merge requests found
import os, sys, shutil import os, sys, shutil
import datetime as dt import datetime as dt
from config.cfg import exp, cluster from config.cfg import exp, cluster
...@@ -7,23 +6,22 @@ import prepare_namelist ...@@ -7,23 +6,22 @@ import prepare_namelist
# archive configuration # archive configuration
os.makedirs(cluster.archivedir(), exist_ok=True) os.makedirs(cluster.archivedir(), exist_ok=True)
shutil.copy(cluster.scriptsdir+'/config/clusters.py', cluster.archivedir()+'/clusters.py') shutil.copy(cluster.scriptsdir+'/../config/clusters.py', cluster.archivedir()+'/clusters.py')
shutil.copy(cluster.scriptsdir+'/config/cfg.py', cluster.archivedir()+'/cfg.py') shutil.copy(cluster.scriptsdir+'/../config/cfg.py', cluster.archivedir()+'/cfg.py')
for iens in range(1, exp.n_ens+1): for iens in range(1, exp.n_ens+1):
print('preparing ens', iens) print('preparing ens', iens)
#input_prof=$USERDIR"/wrf_sounding/data/wrf/ens/from_uwyo/06610_2008073000_uwyo."$(printf "%.3d" $IENS)".wrfprof" input_prof = (cluster.input_profile).replace('<iens>', str(iens).zfill(3))
input_prof=cluster.userdir+"/wrf_sounding/data/wrf/ens/LMU+shear/raso.raso."+str(iens).zfill(3)+".wrfprof"
rundir = cluster.wrf_rundir(iens) rundir = cluster.wrf_rundir(iens)
os.makedirs(rundir, exist_ok=True) os.makedirs(rundir, exist_ok=True)
copy_contents(cluster.srcdir, rundir) link_contents(cluster.srcdir, rundir)
print('linking ideal and wrf.exe:') print('linking ideal and wrf.exe:')
symlink(cluster.ideal, rundir+'/ideal.exe') symlink(cluster.ideal, rundir+'/ideal.exe')
symlink(cluster.wrfexe, rundir+'/wrf.exe') symlink(cluster.wrfexe, rundir+'/wrf.exe')
prepare_namelist.run(cluster, iens, begin=dt.datetime(2008, 7, 30, 6, 0), prepare_namelist.run(cluster, iens, begin=dt.datetime(2008, 7, 30, 6, 0),
end=dt.datetime(2008, 7, 30, 6, 30)) end=dt.datetime(2008, 7, 30, 6, 30)) # not necessary
symlink(input_prof, rundir+'/input_sounding') symlink(input_prof, rundir+'/input_sounding')
print('finished.') print('finished.')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment