1 |
heimbach |
1.2 |
#Experiment 1: Adjoint sensitivity using ALLOW_PASSIVE_TRACER and tr1 |
2 |
|
|
############ |
3 |
heimbach |
1.1 |
|
4 |
heimbach |
1.2 |
# generate and compile code |
5 |
heimbach |
1.1 |
cd bin |
6 |
|
|
ln -s ../verification/carbon/code/.genmakerc . |
7 |
heimbach |
1.2 |
ln -s ../verification/carbon/code/*.[Fh] . |
8 |
|
|
../tools/genmake -makefile |
9 |
|
|
cd ../adjoint |
10 |
|
|
make adtaf |
11 |
|
|
make adchange |
12 |
|
|
cd ../bin |
13 |
|
|
make |
14 |
heimbach |
1.1 |
|
15 |
heimbach |
1.2 |
# run code |
16 |
|
|
cd ../exe |
17 |
|
|
ln -s ../verification/carbon/input/* . |
18 |
|
|
./mitgcmuv >&! output.txt |
19 |
|
|
|
20 |
|
|
# grep for grdchk output |
21 |
|
|
grep 'ph-grd 3' output.txt |
22 |
|
|
|
23 |
|
|
#Experiment 2: same as Exp. 1, but using ALLOW_PTRACERS and ptracers |
24 |
|
|
############ |
25 |
|
|
|
26 |
|
|
# generate and compile code |
27 |
|
|
cd bin |
28 |
|
|
ln -s ../verification/carbon/code_ptracers/.genmakerc . |
29 |
|
|
ln -s ../verification/carbon/code_ptracers/*.[Fh] . |
30 |
heimbach |
1.1 |
../tools/genmake -makefile |
31 |
heimbach |
1.2 |
cd ../adjoint |
32 |
|
|
mv makefile makefile.orig |
33 |
|
|
cp ../verification/carbon/code_ptracers/makefile.ptracers makefile |
34 |
|
|
make adtaf |
35 |
|
|
make adchange |
36 |
|
|
mv makefile.orig makefile |
37 |
|
|
cd ../bin |
38 |
|
|
make |
39 |
|
|
|
40 |
|
|
# run code |
41 |
|
|
cd ../exe |
42 |
|
|
ln -s ../verification/carbon/input_ptracers/* . |
43 |
|
|
ln -s ../verification/carbon/input/*.bin . |
44 |
|
|
./mitgcmuv >&! output.txt |
45 |
|
|
|
46 |
|
|
# grep for grdchk output |
47 |
|
|
grep 'ph-grd 3' output.txt |
48 |
heimbach |
1.1 |
|
49 |
heimbach |
1.2 |
#Experiment 3: same as Exp. 2, but using ALLOW_TANGENTLINEAR_RUN |
50 |
|
|
############ |
51 |
|
|
|
52 |
|
|
# generate and compile code |
53 |
|
|
cd bin |
54 |
|
|
ln -s ../verification/carbon/code_ptracers/.genmakerc . |
55 |
|
|
ln -s ../verification/carbon/code_ptracers/CPP_OPTIONS.h.TLM CPP_OPTIONS.h |
56 |
|
|
ln -s ../verification/carbon/code_ptracers/*.[Fh] . |
57 |
|
|
../tools/genmake -makefile |
58 |
heimbach |
1.1 |
cd ../adjoint |
59 |
heimbach |
1.2 |
mv makefile makefile.orig |
60 |
|
|
cp ../verification/carbon/code_ptracers/makefile.ptracers makefile |
61 |
|
|
make adtaf |
62 |
heimbach |
1.1 |
make adchange |
63 |
heimbach |
1.2 |
mv makefile.orig makefile |
64 |
heimbach |
1.1 |
cd ../bin |
65 |
|
|
make |
66 |
|
|
|
67 |
heimbach |
1.2 |
# run code |
68 |
|
|
cd ../exe |
69 |
|
|
ln -s ../verification/carbon/input_ptracers/* . |
70 |
|
|
ln -s ../verification/carbon/input/*.bin . |
71 |
|
|
./mitgcmuv >&! output.txt |
72 |
|
|
|
73 |
|
|
# grep for grdchk output |
74 |
|
|
grep 'ph-grd 3' output.txt |