--- MITgcm_contrib/ocean_inversion_project/README 2003/09/18 02:33:38 1.2 +++ MITgcm_contrib/ocean_inversion_project/README 2003/09/24 06:50:26 1.5 @@ -3,7 +3,14 @@ Instructions for using pkg/ptracers to compute tracer Green's functions for Gruber's ocean inversion project -(http://quercus.igpp.ucla.edu/OceanInversion/). +(see quercus.igpp.ucla.edu/OceanInversion/ for details). + +Preprocessed OceanInversion input files are available +under directories region_mask, takahashi, and +atm_co2 in this package. All netcdf input files +have been converted to binary format in order to avoid +having to link netcdf library with MITgcm code. See +respective README files in each directory for details. =============================================== @@ -22,15 +29,14 @@ cd MITgcm cvs co -d ocean_inversion_project MITgcm_contrib/ocean_inversion_project -3 ===> compile +3 ===> compile and link cd bin cp ../verification/global_with_exf/code/* . cp ../ocean_inversion_project/code/.genmakerc . cp ../ocean_inversion_project/code/* . - cp ../ocean_inversion_project/code/ptracers_forcing.F.test ptracers_forcing.F - cp ../ocean_inversion_project/code/ptracers_init.F.test ptracers_init.F - cp ../ocean_inversion_project/code/ptracers_read_mask.F.test ptracers_read_mask.F + rm ptracers_init.F ptracers_forcing_surf.F PTRACERS.h + rm ptracers_read_mask.F ptracers_read_takahashi.F ../tools/genmake make depend make @@ -38,82 +44,105 @@ 4 ===> execute cd ../exe - cp ../verification/global_with_exf/input/* . + cp ../verification/global_with_exf/input/eedata . + cp ../verification/global_with_exf/input/data.* . + cp ../verification/global_with_exf/input/POLY3.COEFFS . + ln -sf ../verification/global_with_exf/input/*.bin . cp ../ocean_inversion_project/input/* . - cp ../ocean_inversion_project/input/data.ptracers.test data.ptracers - mitgcmuv > output .txt + cp data.test data + cp data.ptracers.test data.ptracers + mitgcmuv > output.txt -5 ===> check that PTRACER output for tracer 1 and tracer 30 - ===> is identical to salinity output +5 ===> check that PTRACER output and salinity output are identical. diff PTRACER01.0000000020.001.001.data S.0000000020.001.001.data diff PTRACER30.0000000020.001.001.data S.0000000020.001.001.data -====================================================== -Second generate binary input files. netcdf files are not OK - -====================================================== -====================================================== -====================================================== -====================================================== - - cd MITgcm/bin +========================================================== +Instructions for carrying out a 3000-year quasi-stationary +integration using the global_ocean.90x40x15 configuration. +========================================================== + +1 ===> compile, link, and execute + + cd MITgcm/exe + rm * + cd ../bin + rm * 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 + cp ../ocean_inversion_project/code/.genmakerc . + cp ../ocean_inversion_project/code/* . ../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 - -===> 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 - -===================================== - + cp ../verification/global_with_exf/input/eedata . + cp ../verification/global_with_exf/input/data.* . + cp ../verification/global_with_exf/input/POLY3.COEFFS . + ln -sf ../verification/global_with_exf/input/*.bin . + cp ../ocean_inversion_project/input/* . + ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . + ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . + mitgcmuv > output .txt & -Global ocean experiment with ptracers -===================================== -===> set up and integrate 30-tracer computation +====================================================== - cd MITgcm/bin - cp ../verification/global_with_exf/code/* . - cp ../code/.genmakerc . - cp ../code/* . - ../tools/genmake - make depend - make - cd ../exe - cp ../verification/global_with_exf/input/* . - cp ../input/* . - mitgcmuv > output .txt - -===> look at output - - matlab - for i=1:30 - tr=readbin(['PTRACER' myint2str(i) ... - '.0000000020.001.001.data'],[90 40 15],1); - mypcolor(tr(:,:,2)'), colorbar, pause(1) +% some matlab code for looking at fort.10 debug files +load fort.10 +tak=zeros(90,40,12); +for n=1:length(fort) + m=fort(n,1); i=fort(n,2); j=fort(n,3); + if i>0&i<91&j>0&j<41, tak(i,j,m)=fort(n,4); end +end +lon=2:4:360; lat=-78:4:78; +clf, contourf(lon,lat,mean(tak(:,:,1),3)',-10:10) +caxis([-6 6]), colorbar, plotland + +% some matlab code for looking at PTRACER output files +salt=readbin('S.0000000020.001.001.data',[90 40 15],1); +tracer=zeros(90,40,15,30); +for i=1:30 + fn=['PTRACER' myint2str(i) '.0000000020.001.001.data']; + tracer(:,:,:,i)=readbin(fn,[90 40 15],1); + clf, mypcolor(tracer(:,:,1,i)'); pause(1) +end +tmp=sum(tracer,4); clf, mypcolor(tmp(:,:,1)') +mypcolor( + + +% 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]; +tracer=zeros(90,40,15,30); sumtracer1=zeros(30,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]; +tracer=zeros(90,40,15,30); sumtracer=zeros(30,1); +for i=1:30, mydisp(i) + fn=['PTRACER' myint2str(i) '.0000003600.001.001.data']; + tracer(:,:,:,i)=readbin(fn,[90 40 15],1); + for j=1:length(lat) + for k=1:length(thk) + sumtracer(i) = sumtracer(i) + sum(tracer(:,j,k,i)) * ... + thk(k) * (4*1.113195e+05)^2 * cos(pi*lat(j)/180); + end + end +end +plot(1:30,0*sumtracer,1:30,sumtracer)