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

Diff of /MITgcm_contrib/ocean_inversion_project/README

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

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

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.22