-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbatch-clone.sh
executable file
·80 lines (66 loc) · 2.91 KB
/
batch-clone.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
FARRAY=( "RoS-F2010CICEROF-ne0wus30x32-301-control" )
IARRAY=( "RoS-ICLM45-ne0wus30x32-301_19961225_0060" )
# FARRAY=( "RoS-F2010CICEROF-ne0wus30x32-101-plus1K" \
# "RoS-F2010CICEROF-ne0wus30x32-101-plus2K" \
# "RoS-F2010CICEROF-ne0wus30x32-101-plus3K" \
# "RoS-F2010CICEROF-ne0wus30x32-101-plus4K" \
# "RoS-F2010CICEROF-ne0wus30x32-101-PI" )
#
# IARRAY=( "RoS-ICLM45-ne0wus30x32-201_19961225_0060_2019" \
# "RoS-ICLM45-ne0wus30x32-201_19961225_0060_2044" \
# "RoS-ICLM45-ne0wus30x32-201_19961225_0060_2064" \
# "RoS-ICLM45-ne0wus30x32-201_19961225_0060_2081" \
# "RoS-ICLM45-ne0wus30x32-201_19961225_0060_1921" )
# FARRAY=( "RoS-F2010C5-ne0conus30x8-101-plus1K" \
# "RoS-F2010C5-ne0conus30x8-101-plus2K" \
# "RoS-F2010C5-ne0conus30x8-101-plus3K" \
# "RoS-F2010C5-ne0conus30x8-101-plus4K" \
# "RoS-F2010C5-ne0conus30x8-101-PI" )
#
# IARRAY=( "RoS-ICLM45-ne0conus30x8-101_19961225_0036_2019" \
# "RoS-ICLM45-ne0conus30x8-101_19961225_0036_2044" \
# "RoS-ICLM45-ne0conus30x8-101_19961225_0036_2064" \
# "RoS-ICLM45-ne0conus30x8-101_19961225_0036_2081" \
# "RoS-ICLM45-ne0conus30x8-101_19961225_0036_1921" )
# FARRAY=( "RoS-F2010C5-ne0conus30x8-006-control" \
# "RoS-F2010C5-ne0conus30x8-006-plus1K" \
# "RoS-F2010C5-ne0conus30x8-006-plus2K" \
# "RoS-F2010C5-ne0conus30x8-006-plus3K" \
# "RoS-F2010C5-ne0conus30x8-006-plus4K" \
# "RoS-F2010C5-ne0conus30x8-006-PI" )
#
# IARRAY=( "RoS-ICLM45-ne0conus30x8-006_19960113_0012" \
# "RoS-ICLM45-ne0conus30x8-006_19960113_0012_2019" \
# "RoS-ICLM45-ne0conus30x8-006_19960113_0012_2044" \
# "RoS-ICLM45-ne0conus30x8-006_19960113_0012_2064" \
# "RoS-ICLM45-ne0conus30x8-006_19960113_0012_2081" \
# "RoS-ICLM45-ne0conus30x8-006_19960113_0012_1921" )
#MASTERCASENAME=RoS-F2010C5-ne0conus30x8-101-control
MASTERCASENAME=RoS-F2010CICEROF-ne0wus30x32-101-control
E3SMPATH=/global/homes/c/czarzyck/E3SM-20220616/
BETACAST=/global/homes/c/czarzyck/betacast/
PATHTOCASE=~/F-compsets
for i in $(seq 0 $(( ${#FARRAY[@]} - 1 )))
do
echo "----"
echo ${FARRAY[$i]}" <----> "${IARRAY[$i]}
CASENAME=${FARRAY[$i]}
cd ${E3SMPATH}/cime/scripts
./create_clone --case ${PATHTOCASE}/${CASENAME} --clone ${PATHTOCASE}/${MASTERCASENAME} --keepexe
cd ${PATHTOCASE}/${CASENAME}
./case.setup --silent
./case.build --silent
echo "now doing land stuff"
LANDSPINUPDIR=${IARRAY[$i]}
cd ~/scratch/e3sm_scratch/cori-knl/${CASENAME}/run
mkdir landstart
cd landstart
cp -v ~/scratch/e3sm_scratch/cori-knl/${LANDSPINUPDIR}/run/*.elm.r.*.nc /global/homes/c/czarzyck/m2637/betacast/elm-inic/1997wus
cp -v ~/scratch/e3sm_scratch/cori-knl/${LANDSPINUPDIR}/run/*.mosart.r.*.nc /global/homes/c/czarzyck/m2637/betacast/elm-inic/1997wus
cp -v ~/scratch/e3sm_scratch/cori-knl/${LANDSPINUPDIR}/run/*.elm.r.*.nc .
cp -v ~/scratch/e3sm_scratch/cori-knl/${LANDSPINUPDIR}/run/*.mosart.r.*.nc .
rename -v ${LANDSPINUPDIR} ${CASENAME} *nc
cd ${BETACAST}
echo "****** DONE!"
done