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