1 |
|
Example: Subtropical North Atlantic Subduction area |
2 |
|
=================================================== |
3 |
|
- with KPP & shortwave heating |
4 |
|
- no GMRedi |
5 |
|
- forward/adjoint run |
6 |
|
- optimization cost function |
7 |
|
|
8 |
|
#################### |
9 |
|
# Experiment no. 1 # |
10 |
|
#################### |
11 |
|
|
12 |
|
# Use air-sea fluxes as controls (standard case): |
13 |
|
|
14 |
|
#Compile code in bin/: |
15 |
|
cd bin |
16 |
|
cp ../verification/natl_box_adjoint/code/.genmakerc . |
17 |
|
cp ../verification/natl_box_adjoint/code/*.h . |
18 |
|
#Configure and compile the code: |
19 |
|
../tools/genmake -makefile |
20 |
|
make depend |
21 |
|
#Generate the adjoint code: |
22 |
|
cd ../adjoint |
23 |
|
make adtaf |
24 |
|
make adchange |
25 |
|
#Go back and compile the code: |
26 |
|
cd ../bin |
27 |
|
make |
28 |
|
|
29 |
|
#To run: |
30 |
|
cd ../exe |
31 |
|
cp ../verification/natl_box_adjoint/input/* . |
32 |
|
mitgcmuv >&! output.txt |
33 |
|
|
34 |
|
#I've changed the run setup: |
35 |
|
#We now perform gradient checks for the first for elements of |
36 |
|
#the heat flux part of the control vector (grdchkvarindex = 3). |
37 |
|
#To verify the results of the gradient check, type |
38 |
|
|
39 |
|
grep ph-grd output.txt |
40 |
|
|
41 |
|
#A reference output is in: |
42 |
|
grep ph-grd ../verification/natl_box_adjoint/results/output.txt |
43 |
|
|
44 |
|
Comments: |
45 |
|
- The input data is real*8. |
46 |
|
- gmredi turned off (until merge to c48) |
47 |
|
- 4 timesteps |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
#################### |
52 |
|
# Experiment no. 2 # |
53 |
|
#################### |
54 |
|
|
55 |
|
#Use bulk formulae and atmos. state controls |
56 |
|
#(only differnce to experiment 1 is in ECCO_CPPOPTIONS.h, |
57 |
|
#and runtime in data.grdchk): |
58 |
|
|
59 |
|
#Compile code in bin/: |
60 |
|
cd ../bin |
61 |
|
rm -rf *.o *.f *.p rii_files |
62 |
|
rm -rf *.F *.h *.c Makefile* |
63 |
|
cp ../verification/natl_box_adjoint/code_bulk/.genmakerc . |
64 |
|
cp ../verification/natl_box_adjoint/code_bulk/*.h . |
65 |
|
#Configure and compile the code: |
66 |
|
../tools/genmake -makefile |
67 |
|
make depend |
68 |
|
#Generate the adjoint code: |
69 |
|
cd ../adjoint |
70 |
|
make adtaf |
71 |
|
make adchange |
72 |
|
#Go back and compile the code: |
73 |
|
cd ../bin |
74 |
|
make |
75 |
|
|
76 |
|
#To run: |
77 |
|
cd ../exe |
78 |
|
cp ../verification/natl_box_adjoint/input_bulk/* . |
79 |
|
cp ../verification/natl_box_adjoint/input/PH_*.data . |
80 |
|
./mitgcmuv >&! output.txt |
81 |
|
|
82 |
|
#I've changed the run setup: |
83 |
|
#We now perform gradient checks for the first four elements of |
84 |
|
#the air temperture part of the control vector (grdchkvarindex = 7). |
85 |
|
#To verify the results of the gradient check, type |
86 |
|
|
87 |
|
grep ph-grd output.txt |
88 |
|
|
89 |
|
#A reference output is in: |
90 |
|
grep ph-grd ../verification/natl_box_adjoint/results_bulk/output.txt |
91 |
|
|
92 |
|
Comments: |
93 |
|
- The input data is real*8. |
94 |
|
- gmredi turned off (until merge to c48) |
95 |
|
- 4 timesteps |
96 |
|
|
97 |
|
|
98 |
|
#################### |
99 |
|
# Experiment no. 3 # |
100 |
|
#################### |
101 |
|
|
102 |
|
#Same as exp. 2, but with ALLOW_SEAICE defined: |
103 |
|
|
104 |
|
#Compile code in bin/: |
105 |
|
cd ../bin |
106 |
|
rm -rf *.o *.f *.p rii_files |
107 |
|
rm -rf *.F *.h *.c Makefile* |
108 |
|
cp ../verification/natl_box_adjoint/code_bulk/*.h . |
109 |
|
cp ../verification/natl_box_adjoint/code_seaice/.genmakerc . |
110 |
|
cp ../verification/natl_box_adjoint/code_seaice/CPP_OPTIONS.h . |
111 |
|
cp ../verification/natl_box_adjoint/code_seaice/ECCO_CPPOPTIONS.h . |
112 |
|
cp ../verification/natl_box_adjoint/code_seaice/SEAICE_OPTIONS.h . |
113 |
|
#Configure and compile the code: |
114 |
|
../tools/genmake -makefile |
115 |
|
make depend |
116 |
|
#Generate the adjoint code: |
117 |
|
cd ../adjoint |
118 |
|
mv makefile makefile.old |
119 |
|
cp ../verification/natl_box_adjoint/code_seaice/makefile . |
120 |
|
make adtaf |
121 |
|
make adchange |
122 |
|
rm -f makefile |
123 |
|
mv makefile.old makefile |
124 |
|
#Go back and compile the code: |
125 |
|
cd ../bin |
126 |
|
make |
127 |
|
#To run: |
128 |
|
cd ../exe |
129 |
|
cp ../verification/natl_box_adjoint/input_bulk/* . |
130 |
|
cp ../verification/natl_box_adjoint/input/PH_*.data . |
131 |
|
./mitgcmuv >&! output.txt |
132 |
|
|
133 |
|
#I've changed the run setup: |
134 |
|
#We now perform gradient checks for the first for elements of |
135 |
|
#the air temperture part of the control vector (grdchkvarindex = 7). |
136 |
|
#To verify the results of the gradient check, type |
137 |
|
|
138 |
|
grep ph-grd output.txt |
139 |
|
|
140 |
|
#A reference output is in: |
141 |
|
grep ph-grd ../verification/natl_box_adjoint/results_bulk/output.txt |
142 |
|
|
143 |
|
|
144 |
|
#################### |
145 |
|
# Experiment no. 4 # |
146 |
|
#################### |
147 |
|
|
148 |
|
#Same as exp. 3, but with useseaice = .true. |
149 |
|
|
150 |
|
#Compile code in bin/: |
151 |
|
cd ../bin |
152 |
|
rm -rf *.o *.f *.p rii_files |
153 |
|
rm -rf *.F *.h *.c Makefile* |
154 |
|
cp ../verification/natl_box_adjoint/code_bulk/*.h . |
155 |
|
cp ../verification/natl_box_adjoint/code_seaice/.genmakerc . |
156 |
|
cp ../verification/natl_box_adjoint/code_seaice/CPP_OPTIONS.h . |
157 |
|
cp ../verification/natl_box_adjoint/code_seaice/ECCO_CPPOPTIONS.h . |
158 |
|
cp ../verification/natl_box_adjoint/code_seaice/SEAICE_OPTIONS.h . |
159 |
|
#Configure and compile the code: |
160 |
|
../tools/genmake -makefile |
161 |
|
make depend |
162 |
|
#Generate the adjoint code: |
163 |
|
cd ../adjoint |
164 |
|
mv makefile makefile.old |
165 |
|
cp ../verification/natl_box_adjoint/code_seaice/makefile . |
166 |
|
make adtaf |
167 |
|
make adchange |
168 |
|
rm -f makefile |
169 |
|
mv makefile.old makefile |
170 |
|
#Go back and compile the code: |
171 |
|
cd ../bin |
172 |
|
make |
173 |
|
#To run: |
174 |
|
cd ../exe |
175 |
|
cp ../verification/natl_box_adjoint/input_bulk/* . |
176 |
|
cp ../verification/natl_box_adjoint/input_seaice/data.seaice . |
177 |
|
cp ../verification/natl_box_adjoint/input_seaice/data.pkg . |
178 |
|
cp ../verification/natl_box_adjoint/input/PH_*.data . |
179 |
|
./mitgcmuv >&! output.txt |
180 |
|
|
181 |
|
#I've changed the run setup: |
182 |
|
#We now perform gradient checks for the first for elements of |
183 |
|
#the air temperture part of the control vector (grdchkvarindex = 7). |
184 |
|
#To verify the results of the gradient check, type |
185 |
|
|
186 |
|
grep ph-grd output.txt |
187 |
|
|
188 |
|
#A reference output is in: |
189 |
|
grep ph-grd ../verification/natl_box_adjoint/results_bulk/output.txt |
190 |
|
|
191 |
|
|
192 |
|
#################### |
193 |
|
# Experiment no. 5 # |
194 |
|
#################### |
195 |
|
|
196 |
|
#Use pkg/seaice bulk formulae and atmos. state controls |
197 |
|
#(this experiment is in the Labrador Sea rather than the |
198 |
|
#North Atlantic subduction region): |
199 |
|
|
200 |
|
#Compile code in bin/: |
201 |
|
cd bin |
202 |
|
rm -rf *.o *.f *.p rii_files |
203 |
|
rm -rf *.F *.h *.c Makefile* |
204 |
|
cp ../verification/natl_box_adjoint/code_seaice/*.h . |
205 |
|
cp ../verification/natl_box_adjoint/code_seaice/.genmakerc . |
206 |
|
#Configure and compile the code: |
207 |
|
../tools/genmake -makefile |
208 |
|
make depend |
209 |
|
#Generate the adjoint code: |
210 |
|
cd ../adjoint |
211 |
|
mv makefile makefile.old |
212 |
|
cp ../verification/natl_box_adjoint/code_seaice/makefile . |
213 |
|
make adtaf |
214 |
|
make adchange |
215 |
|
rm -f makefile |
216 |
|
mv makefile.old makefile |
217 |
|
#Go back and compile the code: |
218 |
|
cd ../bin |
219 |
|
make |
220 |
|
#To run: |
221 |
|
cd ../exe |
222 |
|
cp ../verification/natl_box_adjoint/input_seaice/* . |
223 |
|
cp ../verification/natl_box_adjoint/input/PH_*.data . |
224 |
|
./mitgcmuv >&! output.txt |
225 |
|
#Gradient check: |
226 |
|
grep ph-grd output.txt |
227 |
|
|
228 |
|
#A reference output is in: |
229 |
|
grep ph-grd ../verification/natl_box_adjoint/results_seaice/output.txt |