/[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.6 by dimitri, Thu Sep 25 03:01:59 2003 UTC revision 1.7 by dimitri, Fri Sep 26 20:01:41 2003 UTC
# Line 115  mypcolor( Line 115  mypcolor(
115  % tracer uptake is approximately 1e18 mols.  % tracer uptake is approximately 1e18 mols.
116  lon=2:4:360; lat=-78:4:78;  lon=2:4:360; lat=-78:4:78;
117  thk=[50 70 100 140 190 240 290 340 390 440 490 540 590 640 690];  thk=[50 70 100 140 190 240 290 340 390 440 490 540 590 640 690];
118  tracer=zeros(90,40,15,30); sumtracer1=zeros(30,1);  mask=readbin('hFacC.001.001.data',[90 40 15],1);
 for i=1:30, mydisp(i)  
  fn=['PTRACER' myint2str(i) '.0000000180.001.001.data'];  
  tracer(:,:,:,i)=readbin(fn,[90 40 15],1);  
  for x=1:length(lon)  
   for y=1:length(lat)  
    for z=1:length(thk)  
     sumtracer1(i) = sumtracer1(i) + tracer(x,y,z,i) * ...  
                     thk(z) * (4*1.113195e+05)^2 * cos(pi*lat(y)/180);  
    end  
   end  
  end  
 end  
   
 % some matlab code for checking that one year's worth of  
 % tracer uptake is approximately 1e18 mols.  
 lon=2:4:360; lat=-78:4:78;  
 thk=[50 70 100 140 190 240 290 340 390 440 490 540 590 640 690];  
119  tracer=zeros(90,40,15,30); sumtracer=zeros(30,1);  tracer=zeros(90,40,15,30); sumtracer=zeros(30,1);
120  for i=1:30, mydisp(i)  for i=1:30, mydisp(i)
121   fn=['PTRACER' myint2str(i) '.0000003600.001.001.data'];   fn=['PTRACER' myint2str(i) '.0000001800.001.001.data'];
122   tracer(:,:,:,i)=readbin(fn,[90 40 15],1);   tracer(:,:,:,i)=readbin(fn,[90 40 15],1);
123   for j=1:length(lat)   for j=1:length(lat)
124    for k=1:length(thk)    for k=1:length(thk)
125     sumtracer(i) = sumtracer(i) + sum(tracer(:,j,k,i)) * ...     sumtracer(i) = sumtracer(i) + sum(tracer(:,j,k,i).*mask(:,j,k)) * ...
126                    thk(k) * (4*1.113195e+05)^2 * cos(pi*lat(j)/180);                    thk(k) * (4*1.113195e+05)^2 * cos(pi*lat(j)/180);
127    end    end
128   end   end

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22