--- MITgcm_contrib/ocean_inversion_project/README 2003/09/17 21:45:51 1.1 +++ MITgcm_contrib/ocean_inversion_project/README 2003/09/27 07:45:51 1.8 @@ -3,75 +3,158 @@ 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. -To run a pkg/ptracers test case using salt initial and boundary conditions: - - - cd MITgcm/bin +=============================================== +First check that pkg/ptracers works OK by using +salinity initial and boundary conditions +=============================================== + +1 ===> get MITgcm code from cvs repository + + CVSROOT=:pserver:cvsanon@mitgcm.org:/u/u0/gcmpack + cvs login ( CVS password: cvsanon ) + cvs co MITgcm + +2 ===> put MITgcm_contrib/ocean_inversion_project in MITgcm directory + + cd MITgcm + cvs co -d ocean_inversion_project MITgcm_contrib/ocean_inversion_project + +3 ===> compile and link + + cd 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 + cp ../ocean_inversion_project/code/.genmakerc . + cp ../ocean_inversion_project/code/* . + rm ptracers_*.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 - - diff PTRACER30.0000000020.001.001.data PTRACER01.0000000020.001.001.data - 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 - -===================================== +4 ===> execute + cd ../exe + 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 data.test data + cp data.ptracers.test data.ptracers + mitgcmuv > output.txt + +5 ===> check that PTRACER output and salinity output are identical. -Global ocean experiment with ptracers -===================================== + diff PTRACER01.0000000020.001.001.data S.0000000020.001.001.data + diff PTRACER30.0000000020.001.001.data S.0000000020.001.001.data -===> set up and integrate 30-tracer computation - 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 ../ocean_inversion_project/code/.genmakerc . + cp ../ocean_inversion_project/code/* . + ../tools/genmake + make depend + make + cd ../exe + 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 & + + +========================================================== +MPI 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 ../ocean_inversion_project/code/.genmakerc . + cp ../ocean_inversion_project/code/* . + cp CPP_EEOPTIONS.h_mpi CPP_EEOPTIONS.h + cp SIZE.h_mpi SIZE.h ../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) + 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 . + mpirun -np 36 dplace -s1 -c25-60 mitgcmuv < /dev/null > & ! errlog & + + +====================================================== + +% 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]; +mask=readbin('hFacC.001.001.data',[90 40 15],1); +tracer=zeros(90,40,15,30); sumtracer=zeros(30,1); +for i=1:30, mydisp(i) + fn=['PTRACER' myint2str(i) '.0000001800.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).*mask(:,j,k)) * ... + thk(k) * (4*1.113195e+05)^2 * cos(pi*lat(j)/180); + end end - +end +plot(1:30,0*sumtracer,1:30,sumtracer)