diff --git a/scripts/prep_osse.py b/scripts/prep_osse.py index e7ac7ed48fc434cae2c233c3d932692d6134b249..cf59038f80bc196fc2d43956232d4a78dba6fccc 100755 --- a/scripts/prep_osse.py +++ b/scripts/prep_osse.py @@ -1,4 +1,3 @@ - import os, sys, shutil import datetime as dt from config.cfg import exp, cluster @@ -7,23 +6,22 @@ import prepare_namelist # archive configuration os.makedirs(cluster.archivedir(), exist_ok=True) -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/clusters.py', cluster.archivedir()+'/clusters.py') +shutil.copy(cluster.scriptsdir+'/../config/cfg.py', cluster.archivedir()+'/cfg.py') for iens in range(1, exp.n_ens+1): print('preparing ens', iens) - #input_prof=$USERDIR"/wrf_sounding/data/wrf/ens/from_uwyo/06610_2008073000_uwyo."$(printf "%.3d" $IENS)".wrfprof" - input_prof=cluster.userdir+"/wrf_sounding/data/wrf/ens/LMU+shear/raso.raso."+str(iens).zfill(3)+".wrfprof" + input_prof = (cluster.input_profile).replace('<iens>', str(iens).zfill(3)) rundir = cluster.wrf_rundir(iens) os.makedirs(rundir, exist_ok=True) - copy_contents(cluster.srcdir, rundir) + link_contents(cluster.srcdir, rundir) print('linking ideal and wrf.exe:') symlink(cluster.ideal, rundir+'/ideal.exe') symlink(cluster.wrfexe, rundir+'/wrf.exe') 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') print('finished.')