1 |
dimitri |
1.1 |
Ocean Inversion Project |
2 |
|
|
======================= |
3 |
|
|
|
4 |
|
|
Instructions for using pkg/ptracers to compute tracer |
5 |
|
|
Green's functions for Gruber's ocean inversion project |
6 |
dimitri |
1.3 |
(see quercus.igpp.ucla.edu/OceanInversion/ for details). |
7 |
|
|
|
8 |
|
|
Preprocessed OceanInversion input files are available |
9 |
|
|
under directories region_mask, takahashi, and |
10 |
|
|
atm_co2 in this package. All netcdf input files |
11 |
|
|
have been converted to binary format in order to avoid |
12 |
|
|
having to link netcdf library with MITgcm code. See |
13 |
|
|
respective README files in each directory for details. |
14 |
dimitri |
1.1 |
|
15 |
dimitri |
1.30 |
Instructions for CFC-11 computations are in |
16 |
dimitri |
1.31 |
cvs co -r release1_50yr MITgcm_code |
17 |
|
|
cvs co -r release1_50yr MITgcm/verification/global_with_CFC11 |
18 |
dimitri |
1.30 |
MITgcm/verification/global_with_CFC11/README |
19 |
|
|
|
20 |
dimitri |
1.1 |
|
21 |
dimitri |
1.27 |
Notes and problems: |
22 |
|
|
=================== |
23 |
|
|
|
24 |
|
|
there is problem generating ECCO_MaskAreaBathy.nc on columbia |
25 |
|
|
works OK on nireas |
26 |
|
|
|
27 |
|
|
variable global_mean_conc in 0D output from mk_output.F is |
28 |
|
|
screwed up |
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
dimitri |
1.2 |
=============================================== |
33 |
|
|
First check that pkg/ptracers works OK by using |
34 |
|
|
salinity initial and boundary conditions |
35 |
|
|
=============================================== |
36 |
|
|
|
37 |
|
|
1 ===> get MITgcm code from cvs repository |
38 |
|
|
|
39 |
dimitri |
1.21 |
cvs co -r checkpoint51n_branch MITgcm_code |
40 |
|
|
cvs co -r checkpoint51n_branch MITgcm/verification/testreport |
41 |
|
|
cvs co -r checkpoint51n_branch MITgcm/verification/global_with_exf |
42 |
dimitri |
1.2 |
|
43 |
|
|
2 ===> put MITgcm_contrib/ocean_inversion_project in MITgcm directory |
44 |
|
|
|
45 |
|
|
cd MITgcm |
46 |
|
|
cvs co -d ocean_inversion_project MITgcm_contrib/ocean_inversion_project |
47 |
|
|
|
48 |
dimitri |
1.3 |
3 ===> compile and link |
49 |
dimitri |
1.2 |
|
50 |
dimitri |
1.21 |
mkdir bin exe |
51 |
dimitri |
1.2 |
cd bin |
52 |
dimitri |
1.22 |
\cp ../verification/global_with_exf/code/* . |
53 |
|
|
\cp ../ocean_inversion_project/code/* . |
54 |
|
|
\rm ptracers_*.F PTRACERS_OPTIONS.h |
55 |
dimitri |
1.11 |
../tools/genmake2 |
56 |
dimitri |
1.22 |
(on orion: ../tools/genmake2 -of linux_ia64_efc+mpi ) |
57 |
|
|
(on columbia: ../tools/genmake2 -of linux_ia64_efc+mpi_altix ) |
58 |
dimitri |
1.2 |
make depend |
59 |
dimitri |
1.22 |
make -j 16 |
60 |
dimitri |
1.2 |
|
61 |
|
|
4 ===> execute |
62 |
|
|
|
63 |
|
|
cd ../exe |
64 |
dimitri |
1.22 |
\cp ../verification/global_with_exf/input/eedata . |
65 |
|
|
\cp ../verification/global_with_exf/input/data.* . |
66 |
|
|
\cp ../verification/global_with_exf/input/POLY3.COEFFS . |
67 |
|
|
\ln -sf ../verification/global_with_exf/input/*.bin . |
68 |
|
|
\cp ../ocean_inversion_project/input/* . |
69 |
|
|
\cp data.test data |
70 |
|
|
\cp data.ptracers.test data.ptracers |
71 |
|
|
./mitgcmuv >! output.txt |
72 |
|
|
|
73 |
dimitri |
1.5 |
5 ===> check that PTRACER output and salinity output are identical. |
74 |
dimitri |
1.2 |
|
75 |
|
|
diff PTRACER01.0000000020.001.001.data S.0000000020.001.001.data |
76 |
|
|
diff PTRACER30.0000000020.001.001.data S.0000000020.001.001.data |
77 |
dimitri |
1.14 |
diff PTRtave30.0000000020.001.001.data Stave.0000000020.001.001.data |
78 |
|
|
diff PTRtave30.0000000020.001.001.data Stave.0000000020.001.001.data |
79 |
dimitri |
1.3 |
|
80 |
dimitri |
1.1 |
|
81 |
dimitri |
1.8 |
========================================================== |
82 |
|
|
MPI instructions for carrying out a 3000-year quasi-stationary |
83 |
|
|
integration using the global_ocean.90x40x15 configuration. |
84 |
|
|
========================================================== |
85 |
|
|
|
86 |
|
|
cd MITgcm/exe |
87 |
|
|
rm * |
88 |
|
|
cd ../bin |
89 |
|
|
rm * |
90 |
|
|
cp ../verification/global_with_exf/code/* . |
91 |
|
|
cp ../ocean_inversion_project/code/* . |
92 |
dimitri |
1.12 |
rm PTRACERS_OPTIONS.h |
93 |
dimitri |
1.8 |
cp CPP_EEOPTIONS.h_mpi CPP_EEOPTIONS.h |
94 |
|
|
cp SIZE.h_mpi SIZE.h |
95 |
dimitri |
1.11 |
../tools/genmake2 |
96 |
|
|
(on orion: ../tools/genmake2 -of linux_ia64_efc+mpi) |
97 |
dimitri |
1.8 |
make depend |
98 |
|
|
make |
99 |
|
|
cd ../exe |
100 |
|
|
cp ../verification/global_with_exf/input/eedata . |
101 |
|
|
cp ../verification/global_with_exf/input/data.* . |
102 |
|
|
cp ../verification/global_with_exf/input/POLY3.COEFFS . |
103 |
|
|
ln -sf ../verification/global_with_exf/input/*.bin . |
104 |
|
|
cp ../ocean_inversion_project/input/* . |
105 |
|
|
ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . |
106 |
|
|
ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . |
107 |
dimitri |
1.17 |
cp data.stationary.1 data |
108 |
|
|
mpirun -np 24 dplace -s1 mitgcmuv < /dev/null > & ! errlog & |
109 |
dimitri |
1.19 |
(on orion: qsub job.orion) |
110 |
dimitri |
1.12 |
|
111 |
dimitri |
1.22 |
|
112 |
dimitri |
1.12 |
========================================================== |
113 |
dimitri |
1.19 |
MPI instructions for carrying out time-dependent, 1765-2005, |
114 |
dimitri |
1.12 |
anthropogenic carbon perturbation tracer experiments using |
115 |
|
|
the global_ocean.90x40x15 configuration. |
116 |
|
|
========================================================== |
117 |
|
|
|
118 |
|
|
cd MITgcm/exe |
119 |
|
|
rm * |
120 |
|
|
cd ../bin |
121 |
|
|
rm * |
122 |
|
|
cp ../verification/global_with_exf/code/* . |
123 |
|
|
cp ../ocean_inversion_project/code/* . |
124 |
dimitri |
1.19 |
cp CPP_EEOPTIONS.h_mpi CPP_EEOPTIONS.h |
125 |
|
|
cp SIZE.h_mpi SIZE.h |
126 |
dimitri |
1.12 |
../tools/genmake2 |
127 |
|
|
(on orion: ../tools/genmake2 -of linux_ia64_efc+mpi) |
128 |
dimitri |
1.13 |
make depend |
129 |
|
|
make |
130 |
|
|
cd ../exe |
131 |
|
|
cp ../verification/global_with_exf/input/eedata . |
132 |
|
|
cp ../verification/global_with_exf/input/data.* . |
133 |
|
|
cp ../verification/global_with_exf/input/POLY3.COEFFS . |
134 |
|
|
ln -sf ../verification/global_with_exf/input/*.bin . |
135 |
|
|
cp ../ocean_inversion_project/input/* . |
136 |
|
|
cp data.1765-2005 data |
137 |
|
|
ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . |
138 |
|
|
ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . |
139 |
|
|
ln -sf ../ocean_inversion_project/atm_co2/splco2_cis92a.dat . |
140 |
dimitri |
1.19 |
mpirun -np 24 dplace -s1 mitgcmuv < /dev/null > & ! errlog & |
141 |
|
|
(on orion: qsub job.orion.td) |
142 |
dimitri |
1.13 |
|
143 |
|
|
|
144 |
|
|
========================================================== |
145 |
|
|
Instructions for carrying out time-dependent, 1765-2005, |
146 |
|
|
anthropogenic carbon perturbation tracer experiments using |
147 |
|
|
global_ocean.90x40x15 configuration and netcdf output. |
148 |
|
|
This assumes that the appropriate libnetcdf.a exists |
149 |
|
|
and that it be specified in the genmake2 option file. |
150 |
|
|
========================================================== |
151 |
|
|
|
152 |
|
|
cd MITgcm/exe |
153 |
|
|
rm * |
154 |
|
|
cd ../bin |
155 |
|
|
rm * |
156 |
|
|
cp ../verification/global_with_exf/code/* . |
157 |
|
|
cp ../ocean_inversion_project/code/* . |
158 |
|
|
cp PTRACERS_OPTIONS.h.netcdf PTRACERS_OPTIONS.h |
159 |
|
|
cp ../ocean_inversion_project/write_netCDF/* . |
160 |
dimitri |
1.20 |
\rm mk_output.F |
161 |
dimitri |
1.13 |
|
162 |
|
|
### need customized option file; example below is for nireas |
163 |
|
|
../tools/genmake2 -of linux_ia32_g77_netcdf |
164 |
|
|
|
165 |
dimitri |
1.12 |
make depend |
166 |
|
|
make |
167 |
|
|
cd ../exe |
168 |
|
|
cp ../verification/global_with_exf/input/eedata . |
169 |
|
|
cp ../verification/global_with_exf/input/data.* . |
170 |
|
|
cp ../verification/global_with_exf/input/POLY3.COEFFS . |
171 |
|
|
ln -sf ../verification/global_with_exf/input/*.bin . |
172 |
|
|
cp ../ocean_inversion_project/input/* . |
173 |
dimitri |
1.18 |
cp data.1765-2005.1 data |
174 |
dimitri |
1.12 |
ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . |
175 |
|
|
ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . |
176 |
|
|
ln -sf ../ocean_inversion_project/atm_co2/splco2_cis92a.dat . |
177 |
|
|
mitgcmuv > output .txt & |
178 |
dimitri |
1.19 |
|
179 |
|
|
|
180 |
dimitri |
1.22 |
========================================================== |
181 |
|
|
Instructions for carrying out time-dependent, 1765-2005, |
182 |
|
|
anthropogenic carbon perturbation tracer experiments using |
183 |
|
|
the ecco1x1 configuration and netcdf output on columbia. |
184 |
|
|
This assumes that the appropriate libnetcdf.a exists |
185 |
|
|
and that it be specified in the genmake2 option file. |
186 |
|
|
It also assumes that surface forcing files are available |
187 |
dimitri |
1.28 |
in MITgcm/../iter69 |
188 |
dimitri |
1.22 |
========================================================== |
189 |
|
|
|
190 |
|
|
cd MITgcm/exe |
191 |
|
|
\rm * |
192 |
|
|
cd ../bin |
193 |
|
|
\rm * |
194 |
|
|
\cp ../ocean_inversion_project/code_ecco1x1/* . |
195 |
|
|
\cp ../ocean_inversion_project/write_netCDF/* . |
196 |
|
|
\rm mk_output.F |
197 |
dimitri |
1.24 |
\cp SIZE.h.96 SIZE.h |
198 |
dimitri |
1.22 |
../tools/genmake2 -of linux_ia64_efc+mpi_altix |
199 |
|
|
make depend |
200 |
|
|
make -j 16 |
201 |
|
|
cd ../exe |
202 |
|
|
\cp ../ocean_inversion_project/input_ecco1x1/* . |
203 |
dimitri |
1.23 |
ln -sf ../../iter69/* . |
204 |
dimitri |
1.22 |
ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . |
205 |
|
|
ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . |
206 |
|
|
ln -sf ../ocean_inversion_project/atm_co2/splco2_cis92a.dat . |
207 |
|
|
qsub job01 |
208 |
|
|
|
209 |
dimitri |
1.19 |
|
210 |
|
|
========================================================== |
211 |
dimitri |
1.28 |
Instructions for carrying out 3000-year quasi-stationary |
212 |
|
|
integration using the ecco1x1 configuration and netcdf |
213 |
|
|
output on columbia. |
214 |
|
|
This assumes that the appropriate libnetcdf.a exists |
215 |
|
|
and that it be specified in the genmake2 option file. |
216 |
|
|
It also assumes that surface forcing files are available |
217 |
|
|
in MITgcm/../iter69 |
218 |
|
|
========================================================== |
219 |
|
|
|
220 |
|
|
cd MITgcm/exe |
221 |
|
|
\rm * |
222 |
|
|
cd ../bin |
223 |
|
|
\rm * |
224 |
|
|
\cp ../ocean_inversion_project/code_ecco1x1/* . |
225 |
|
|
\cp ../ocean_inversion_project/write_netCDF/* . |
226 |
|
|
\rm mk_output.F |
227 |
|
|
\cp SIZE.h.96 SIZE.h |
228 |
|
|
\cp PTRACERS_OPTIONS.h.stationary PTRACERS_OPTIONS.h |
229 |
|
|
../tools/genmake2 -of linux_ia64_efc+mpi_altix |
230 |
|
|
make depend |
231 |
|
|
make -j 16 |
232 |
|
|
cd ../exe |
233 |
|
|
\cp ../ocean_inversion_project/input_ecco1x1/* . |
234 |
|
|
\ln -sf ../../iter69/* . |
235 |
|
|
\ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . |
236 |
|
|
\ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . |
237 |
|
|
qsub job01s |
238 |
|
|
|
239 |
|
|
|
240 |
|
|
========================================================== |
241 |
dimitri |
1.25 |
Instructions for generating netcdf output files on columbia |
242 |
|
|
========================================================== |
243 |
|
|
|
244 |
|
|
cd ocean_inversion_project/write_netCDF |
245 |
|
|
setenv F_UFMTENDIAN big |
246 |
|
|
|
247 |
|
|
(check that defaults in mk_output.F are appropriate) |
248 |
|
|
|
249 |
dimitri |
1.29 |
ifort -assume byterecl -W0 -WB mk_output.F write_nc_phys.F nc_util.F \ |
250 |
dimitri |
1.25 |
handle_errors.F write_nc_basisfnctns.F \ |
251 |
|
|
write_nc_diag_0D.F write_nc_diag_2D.F \ |
252 |
|
|
-I/u/menemenl/software/netcdf-3.5.0/include \ |
253 |
|
|
-L/u/menemenl/software/netcdf-3.5.0/lib -lnetcdf |
254 |
dimitri |
1.26 |
./a.out |
255 |
dimitri |
1.25 |
|
256 |
|
|
|
257 |
|
|
========================================================== |
258 |
dimitri |
1.19 |
Instructions for generating netcdf output files on orion |
259 |
|
|
========================================================== |
260 |
|
|
|
261 |
|
|
cd ocean_inversion_project/write_netCDF |
262 |
|
|
setenv F_UFMTENDIAN big |
263 |
|
|
|
264 |
|
|
(check that defaults in mk_output.F are appropriate) |
265 |
|
|
|
266 |
|
|
efc -W0 -WB mk_output.F write_nc_phys.F nc_util.F \ |
267 |
|
|
handle_errors.F write_nc_basisfnctns.F \ |
268 |
|
|
write_nc_diag_0D.F write_nc_diag_2D.F \ |
269 |
|
|
-I/u2/dmenem/software/netcdf-3.5.0/include \ |
270 |
|
|
-L/u2/dmenem/software/netcdf-3.5.0/lib -lnetcdf |
271 |
dimitri |
1.26 |
./a.out |
272 |
dimitri |
1.8 |
|
273 |
|
|
|
274 |
dimitri |
1.3 |
====================================================== |
275 |
dimitri |
1.1 |
|
276 |
dimitri |
1.3 |
% some matlab code for looking at fort.10 debug files |
277 |
|
|
load fort.10 |
278 |
|
|
tak=zeros(90,40,12); |
279 |
|
|
for n=1:length(fort) |
280 |
|
|
m=fort(n,1); i=fort(n,2); j=fort(n,3); |
281 |
|
|
if i>0&i<91&j>0&j<41, tak(i,j,m)=fort(n,4); end |
282 |
|
|
end |
283 |
|
|
lon=2:4:360; lat=-78:4:78; |
284 |
|
|
clf, contourf(lon,lat,mean(tak(:,:,1),3)',-10:10) |
285 |
|
|
caxis([-6 6]), colorbar, plotland |
286 |
|
|
|
287 |
|
|
% some matlab code for looking at PTRACER output files |
288 |
dimitri |
1.4 |
salt=readbin('S.0000000020.001.001.data',[90 40 15],1); |
289 |
dimitri |
1.3 |
tracer=zeros(90,40,15,30); |
290 |
|
|
for i=1:30 |
291 |
|
|
fn=['PTRACER' myint2str(i) '.0000000020.001.001.data']; |
292 |
|
|
tracer(:,:,:,i)=readbin(fn,[90 40 15],1); |
293 |
|
|
clf, mypcolor(tracer(:,:,1,i)'); pause(1) |
294 |
|
|
end |
295 |
|
|
tmp=sum(tracer,4); clf, mypcolor(tmp(:,:,1)') |
296 |
dimitri |
1.4 |
mypcolor( |
297 |
|
|
|
298 |
dimitri |
1.3 |
|
299 |
|
|
% some matlab code for checking that one year's worth of |
300 |
|
|
% tracer uptake is approximately 1e18 mols. |
301 |
|
|
lon=2:4:360; lat=-78:4:78; |
302 |
|
|
thk=[50 70 100 140 190 240 290 340 390 440 490 540 590 640 690]; |
303 |
dimitri |
1.7 |
mask=readbin('hFacC.001.001.data',[90 40 15],1); |
304 |
dimitri |
1.3 |
tracer=zeros(90,40,15,30); sumtracer=zeros(30,1); |
305 |
|
|
for i=1:30, mydisp(i) |
306 |
dimitri |
1.7 |
fn=['PTRACER' myint2str(i) '.0000001800.001.001.data']; |
307 |
dimitri |
1.3 |
tracer(:,:,:,i)=readbin(fn,[90 40 15],1); |
308 |
|
|
for j=1:length(lat) |
309 |
|
|
for k=1:length(thk) |
310 |
dimitri |
1.7 |
sumtracer(i) = sumtracer(i) + sum(tracer(:,j,k,i).*mask(:,j,k)) * ... |
311 |
dimitri |
1.3 |
thk(k) * (4*1.113195e+05)^2 * cos(pi*lat(j)/180); |
312 |
|
|
end |
313 |
dimitri |
1.1 |
end |
314 |
dimitri |
1.3 |
end |
315 |
dimitri |
1.4 |
plot(1:30,0*sumtracer,1:30,sumtracer) |
316 |
dimitri |
1.21 |
|
317 |
|
|
|
318 |
|
|
% check that tracer flux is 1e18 mols / year |
319 |
|
|
nb_seconds_per_year=31556880; |
320 |
|
|
lon=2:4:360; lat=-78:4:78; |
321 |
|
|
mask=readbin('hFacC.data',[90 40 15],1); |
322 |
|
|
tracer=zeros(90,40,30); sumtracer=zeros(30,1); |
323 |
|
|
for i=1:30, mydisp(i) |
324 |
|
|
fn=['PtrFlux' myint2str(i) '.0000000180.data']; |
325 |
|
|
tracer(:,:,i)=readbin(fn,[90 40],1); |
326 |
|
|
for j=1:length(lat) |
327 |
|
|
sumtracer(i) = sumtracer(i) + sum(tracer(:,j,i).*mask(:,j,1)) * ... |
328 |
|
|
nb_seconds_per_year* (4*1.113195e+05)^2 * cos(pi*lat(j)/180); |
329 |
|
|
end |
330 |
|
|
end |
331 |
|
|
plot(1:30,0*sumtracer,1:30,sumtracer-mmean(sumtracer)) |