/[MITgcm]/MITgcm_contrib/ocean_inversion_project/README
ViewVC logotype

Contents of /MITgcm_contrib/ocean_inversion_project/README

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.21 - (show annotations) (download)
Thu Sep 30 23:45:07 2004 UTC (20 years, 9 months ago) by dimitri
Branch: MAIN
Changes since 1.20: +21 -2 lines
Modified Files:
 	ocean_inversion_project/README
 	ocean_inversion_project/region_mask/README

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 (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
15
16 ===============================================
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 CVSROOT=:pserver:cvsanon@mitgcm.org:/u/gcmpack
24 cvs login ( CVS password: cvsanon )
25 cvs co -r checkpoint51n_branch MITgcm_code
26 cvs co -r checkpoint51n_branch MITgcm/verification/testreport
27 cvs co -r checkpoint51n_branch MITgcm/verification/global_with_exf
28
29 2 ===> put MITgcm_contrib/ocean_inversion_project in MITgcm directory
30
31 cd MITgcm
32 cvs co -d ocean_inversion_project MITgcm_contrib/ocean_inversion_project
33
34 3 ===> compile and link
35
36 mkdir bin exe
37 cd bin
38 cp ../verification/global_with_exf/code/* .
39 cp ../ocean_inversion_project/code/* .
40 rm ptracers_*.F PTRACERS_OPTIONS.h
41 ../tools/genmake2
42 (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi)
43 make depend
44 make
45
46 4 ===> execute
47
48 cd ../exe
49 cp ../verification/global_with_exf/input/eedata .
50 cp ../verification/global_with_exf/input/data.* .
51 cp ../verification/global_with_exf/input/POLY3.COEFFS .
52 ln -sf ../verification/global_with_exf/input/*.bin .
53 cp ../ocean_inversion_project/input/* .
54 cp data.test data
55 cp data.ptracers.test data.ptracers
56 mitgcmuv > output.txt
57
58 5 ===> check that PTRACER output and salinity output are identical.
59
60 diff PTRACER01.0000000020.001.001.data S.0000000020.001.001.data
61 diff PTRACER30.0000000020.001.001.data S.0000000020.001.001.data
62 diff PTRtave30.0000000020.001.001.data Stave.0000000020.001.001.data
63 diff PTRtave30.0000000020.001.001.data Stave.0000000020.001.001.data
64
65
66 ==========================================================
67 MPI instructions for carrying out a 3000-year quasi-stationary
68 integration using the global_ocean.90x40x15 configuration.
69 ==========================================================
70
71 cd MITgcm/exe
72 rm *
73 cd ../bin
74 rm *
75 cp ../verification/global_with_exf/code/* .
76 cp ../ocean_inversion_project/code/* .
77 rm PTRACERS_OPTIONS.h
78 cp CPP_EEOPTIONS.h_mpi CPP_EEOPTIONS.h
79 cp SIZE.h_mpi SIZE.h
80 ../tools/genmake2
81 (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi)
82 make depend
83 make
84 cd ../exe
85 cp ../verification/global_with_exf/input/eedata .
86 cp ../verification/global_with_exf/input/data.* .
87 cp ../verification/global_with_exf/input/POLY3.COEFFS .
88 ln -sf ../verification/global_with_exf/input/*.bin .
89 cp ../ocean_inversion_project/input/* .
90 ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin .
91 ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin .
92 cp data.stationary.1 data
93 mpirun -np 24 dplace -s1 mitgcmuv < /dev/null > & ! errlog &
94 (on orion: qsub job.orion)
95
96 ==========================================================
97 MPI instructions for carrying out time-dependent, 1765-2005,
98 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 cp CPP_EEOPTIONS.h_mpi CPP_EEOPTIONS.h
109 cp SIZE.h_mpi SIZE.h
110 ../tools/genmake2
111 (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi)
112 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 mpirun -np 24 dplace -s1 mitgcmuv < /dev/null > & ! errlog &
125 (on orion: qsub job.orion.td)
126
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 \rm mk_output.F
145
146 ### need customized option file; example below is for nireas
147 ../tools/genmake2 -of linux_ia32_g77_netcdf
148
149 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 cp data.1765-2005.1 data
158 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
163
164 ======================================================
165
166 ==========================================================
167 Instructions for generating netcdf output files on orion
168 ==========================================================
169
170 cd ocean_inversion_project/write_netCDF
171 setenv F_UFMTENDIAN big
172
173 (check that defaults in mk_output.F are appropriate)
174
175 efc -W0 -WB mk_output.F write_nc_phys.F nc_util.F \
176 handle_errors.F write_nc_basisfnctns.F \
177 write_nc_diag_0D.F write_nc_diag_2D.F \
178 -I/u2/dmenem/software/netcdf-3.5.0/include \
179 -L/u2/dmenem/software/netcdf-3.5.0/lib -lnetcdf
180 a.out
181
182
183 ======================================================
184
185 % some matlab code for looking at fort.10 debug files
186 load fort.10
187 tak=zeros(90,40,12);
188 for n=1:length(fort)
189 m=fort(n,1); i=fort(n,2); j=fort(n,3);
190 if i>0&i<91&j>0&j<41, tak(i,j,m)=fort(n,4); end
191 end
192 lon=2:4:360; lat=-78:4:78;
193 clf, contourf(lon,lat,mean(tak(:,:,1),3)',-10:10)
194 caxis([-6 6]), colorbar, plotland
195
196 % some matlab code for looking at PTRACER output files
197 salt=readbin('S.0000000020.001.001.data',[90 40 15],1);
198 tracer=zeros(90,40,15,30);
199 for i=1:30
200 fn=['PTRACER' myint2str(i) '.0000000020.001.001.data'];
201 tracer(:,:,:,i)=readbin(fn,[90 40 15],1);
202 clf, mypcolor(tracer(:,:,1,i)'); pause(1)
203 end
204 tmp=sum(tracer,4); clf, mypcolor(tmp(:,:,1)')
205 mypcolor(
206
207
208 % some matlab code for checking that one year's worth of
209 % tracer uptake is approximately 1e18 mols.
210 lon=2:4:360; lat=-78:4:78;
211 thk=[50 70 100 140 190 240 290 340 390 440 490 540 590 640 690];
212 mask=readbin('hFacC.001.001.data',[90 40 15],1);
213 tracer=zeros(90,40,15,30); sumtracer=zeros(30,1);
214 for i=1:30, mydisp(i)
215 fn=['PTRACER' myint2str(i) '.0000001800.001.001.data'];
216 tracer(:,:,:,i)=readbin(fn,[90 40 15],1);
217 for j=1:length(lat)
218 for k=1:length(thk)
219 sumtracer(i) = sumtracer(i) + sum(tracer(:,j,k,i).*mask(:,j,k)) * ...
220 thk(k) * (4*1.113195e+05)^2 * cos(pi*lat(j)/180);
221 end
222 end
223 end
224 plot(1:30,0*sumtracer,1:30,sumtracer)
225
226
227 % check that tracer flux is 1e18 mols / year
228 nb_seconds_per_year=31556880;
229 lon=2:4:360; lat=-78:4:78;
230 mask=readbin('hFacC.data',[90 40 15],1);
231 tracer=zeros(90,40,30); sumtracer=zeros(30,1);
232 for i=1:30, mydisp(i)
233 fn=['PtrFlux' myint2str(i) '.0000000180.data'];
234 tracer(:,:,i)=readbin(fn,[90 40],1);
235 for j=1:length(lat)
236 sumtracer(i) = sumtracer(i) + sum(tracer(:,j,i).*mask(:,j,1)) * ...
237 nb_seconds_per_year* (4*1.113195e+05)^2 * cos(pi*lat(j)/180);
238 end
239 end
240 plot(1:30,0*sumtracer,1:30,sumtracer-mmean(sumtracer))

  ViewVC Help
Powered by ViewVC 1.1.22