-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_runscripts.sh
More file actions
35 lines (33 loc) · 1.1 KB
/
create_runscripts.sh
File metadata and controls
35 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
tile=$1
function copy_files_and_configure() {
rundir=attrici_03_era5_t${tile}_${var}${hour}_rechunked
mkdir $rundir
cp ../../../.pytensorrc $rundir/
cp ../../../run_estimation.py $rundir/
cp ../../../slurm.sh $rundir/
cp ../../../settings.py $rundir/
cp ../../../write_netcdf.py $rundir/
cp ../../../submit_write_netcdf.sh $rundir/
sed -i -e 's/hour = ""/hour = "'"${hour}"'"/' $rundir/settings.py
sed -i -e 's/variable = "tas"/variable = "'"${var}"'"/' $rundir/settings.py
sed -i -e 's/tile = "00009"/tile = "'"${tile}"'"/' $rundir/settings.py
sed -i -e 's/--job-name=runid_merge/--job-name='$rundir'/' $rundir/submit_write_netcdf.sh
sed -i -e 's/--job-name=attrici_run_estimation/--job-name='$rundir'/' $rundir/slurm.sh
mkdir /p/tmp/annabu/projects/attrici/log/$rundir
}
mkdir runscripts/attrici_automated_processing/${tile}
cd runscripts/attrici_automated_processing/${tile}
for var in tas tasrange tasskew sfcWind rsds hurs;
do
hour=""
copy_files_and_configure
done
for var in tas pr
# for var in pr;
do
for hour in 0 6 12 18;
do
copy_files_and_configure
done
done