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

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

  ViewVC Help
Powered by ViewVC 1.1.22