/[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.4 - (show annotations) (download)
Wed Sep 24 04:52:38 2003 UTC (21 years, 9 months ago) by dimitri
Branch: MAIN
Changes since 1.3: +10 -6 lines
o Mods and bug fixes to pkg/cal, pkg/exf, etc. needed for computation
  of tracer Green's fucntions for ocean inversion project.

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/u0/gcmpack
24 cvs login ( CVS password: cvsanon )
25 cvs co MITgcm
26
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 3 ===> compile and link
33
34 cd bin
35 cp ../verification/global_with_exf/code/* .
36 cp ../ocean_inversion_project/code/.genmakerc .
37 cp ../ocean_inversion_project/code/* .
38 rm ptracers_init.F ptracers_forcing_surf.F PTRACERS.h
39 rm ptracers_read_mask.F ptracers_read_takahashi.F
40 ../tools/genmake
41 make depend
42 make
43
44 4 ===> execute
45
46 cd ../exe
47 cp ../verification/global_with_exf/input/eedata .
48 cp ../verification/global_with_exf/input/data.* .
49 cp ../verification/global_with_exf/input/POLY3.COEFFS .
50 ln -sf ../verification/global_with_exf/input/*.bin .
51 cp ../ocean_inversion_project/input/* .
52 cp data.test data
53 cp data.ptracers.test data.ptracers
54 mitgcmuv > output.txt
55
56 5 ===> check that PTRACER output and salinity output
57 ===> are identical.
58
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
62
63 ==========================================================
64 Instructions for carrying out a 3000-year quasi-stationary
65 integration using the global_ocean.90x40x15 configuration.
66 ==========================================================
67
68 1 ===> compile, link, and execute
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/.genmakerc .
76 cp ../ocean_inversion_project/code/* .
77 ../tools/genmake
78 make depend
79 make
80 cd ../exe
81 cp ../verification/global_with_exf/input/eedata .
82 cp ../verification/global_with_exf/input/data.* .
83 cp ../verification/global_with_exf/input/POLY3.COEFFS .
84 ln -sf ../verification/global_with_exf/input/*.bin .
85 cp ../ocean_inversion_project/input/* .
86 ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin .
87 ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin .
88 mitgcmuv > output .txt &
89
90
91 ======================================================
92
93 % some matlab code for looking at fort.10 debug files
94 load fort.10
95 tak=zeros(90,40,12);
96 for n=1:length(fort)
97 m=fort(n,1); i=fort(n,2); j=fort(n,3);
98 if i>0&i<91&j>0&j<41, tak(i,j,m)=fort(n,4); end
99 end
100 lon=2:4:360; lat=-78:4:78;
101 clf, contourf(lon,lat,mean(tak(:,:,1),3)',-10:10)
102 caxis([-6 6]), colorbar, plotland
103
104 % some matlab code for looking at PTRACER output files
105 salt=readbin('S.0000000020.001.001.data',[90 40 15],1);
106 tracer=zeros(90,40,15,30);
107 for i=1:30
108 fn=['PTRACER' myint2str(i) '.0000000020.001.001.data'];
109 tracer(:,:,:,i)=readbin(fn,[90 40 15],1);
110 clf, mypcolor(tracer(:,:,1,i)'); pause(1)
111 end
112 tmp=sum(tracer,4); clf, mypcolor(tmp(:,:,1)')
113 mypcolor(
114
115
116 % some matlab code for checking that one year's worth of
117 % tracer uptake is approximately 1e18 mols.
118 lon=2:4:360; lat=-78:4:78;
119 thk=[50 70 100 140 190 240 290 340 390 440 490 540 590 640 690];
120 tracer=zeros(90,40,15,30); sumtracer1=zeros(30,1);
121 for i=1:30, mydisp(i)
122 fn=['PTRACER' myint2str(i) '.0000000180.001.001.data'];
123 tracer(:,:,:,i)=readbin(fn,[90 40 15],1);
124 for x=1:length(lon)
125 for y=1:length(lat)
126 for z=1:length(thk)
127 sumtracer1(i) = sumtracer1(i) + tracer(x,y,z,i) * ...
128 thk(z) * (4*1.113195e+05)^2 * cos(pi*lat(y)/180);
129 end
130 end
131 end
132 end
133
134 % some matlab code for checking that one year's worth of
135 % tracer uptake is approximately 1e18 mols.
136 lon=2:4:360; lat=-78:4:78;
137 thk=[50 70 100 140 190 240 290 340 390 440 490 540 590 640 690];
138 tracer=zeros(90,40,15,30); sumtracer=zeros(30,1);
139 for i=1:30, mydisp(i)
140 fn=['PTRACER' myint2str(i) '.0000003600.001.001.data'];
141 tracer(:,:,:,i)=readbin(fn,[90 40 15],1);
142 for j=1:length(lat)
143 for k=1:length(thk)
144 sumtracer(i) = sumtracer(i) + sum(tracer(:,j,k,i)) * ...
145 thk(k) * (4*1.113195e+05)^2 * cos(pi*lat(j)/180);
146 end
147 end
148 end
149 plot(1:30,0*sumtracer,1:30,sumtracer)

  ViewVC Help
Powered by ViewVC 1.1.22