| 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 -r checkpoint51n_branch 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/* . | 
| 37 | 
  cp ../code/* . | 
  rm ptracers_*.F PTRACERS_OPTIONS.h | 
| 38 | 
  cp ../code/ptracers_forcing.F.test ptracers_forcing.F | 
  ../tools/genmake2 | 
| 39 | 
  cp ../code/ptracers_init.F.test ptracers_init.F | 
    (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi) | 
 | 
  cp ../code/ptracers_read_mask.F.test ptracers_read_mask.F | 
  | 
 | 
  ../tools/genmake | 
  | 
| 40 | 
  make depend | 
  make depend | 
| 41 | 
  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 | 
  | 
 | 
  | 
  | 
 | 
  diff PTRACER30.0000000020.001.001.data PTRACER01.0000000020.001.001.data | 
  | 
 | 
  diff PTRACER30.0000000020.001.001.data S.0000000020.001.001.data | 
  | 
| 42 | 
  | 
  | 
| 43 | 
 ===> examine interpolation output for 30-region mask | 
 4 ===> execute | 
| 44 | 
  | 
  | 
| 45 | 
  matlab | 
  cd ../exe | 
| 46 | 
  mask=zeros(94,44,30); | 
  cp ../verification/global_with_exf/input/eedata . | 
| 47 | 
  load fort.10 | 
  cp ../verification/global_with_exf/input/data.* . | 
| 48 | 
  for i=1:length(fort) | 
  cp ../verification/global_with_exf/input/POLY3.COEFFS . | 
| 49 | 
   mask(fort(i,2)+2,fort(i,3)+2,fort(i,1))=fort(i,4); | 
  ln -sf ../verification/global_with_exf/input/*.bin . | 
| 50 | 
  end  | 
  cp ../ocean_inversion_project/input/* . | 
| 51 | 
  for i=1:30 | 
  cp data.test data | 
| 52 | 
   mypcolor(mask(3:92,3:42,i)'); | 
  cp data.ptracers.test data.ptracers | 
| 53 | 
   colorbar,title(i),pause | 
  mitgcmuv > output.txt | 
| 54 | 
  end | 
    | 
| 55 | 
  mypcolor(sum(mask,3)'); colorbar | 
 5 ===> check that PTRACER output and salinity output are identical. | 
| 56 | 
  | 
  | 
| 57 | 
 ===================================== | 
  diff PTRACER01.0000000020.001.001.data S.0000000020.001.001.data | 
| 58 | 
  | 
  diff PTRACER30.0000000020.001.001.data S.0000000020.001.001.data | 
| 59 | 
  | 
  diff PTRtave30.0000000020.001.001.data Stave.0000000020.001.001.data | 
| 60 | 
  | 
  diff PTRtave30.0000000020.001.001.data Stave.0000000020.001.001.data | 
| 61 | 
  | 
  | 
| 62 | 
  | 
  | 
| 63 | 
 Global ocean experiment with ptracers | 
 ========================================================== | 
| 64 | 
 ===================================== | 
 MPI instructions for carrying out a 3000-year quasi-stationary | 
| 65 | 
  | 
 integration using the global_ocean.90x40x15 configuration. | 
| 66 | 
  | 
 ========================================================== | 
| 67 | 
  | 
  | 
| 68 | 
  | 
  cd MITgcm/exe | 
| 69 | 
  | 
  rm * | 
| 70 | 
  | 
  cd ../bin | 
| 71 | 
  | 
  rm * | 
| 72 | 
  | 
  cp ../verification/global_with_exf/code/* . | 
| 73 | 
  | 
  cp ../ocean_inversion_project/code/* . | 
| 74 | 
  | 
  rm PTRACERS_OPTIONS.h | 
| 75 | 
  | 
  cp CPP_EEOPTIONS.h_mpi CPP_EEOPTIONS.h | 
| 76 | 
  | 
  cp SIZE.h_mpi SIZE.h | 
| 77 | 
  | 
  ../tools/genmake2 | 
| 78 | 
  | 
    (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi) | 
| 79 | 
  | 
  make depend | 
| 80 | 
  | 
  make | 
| 81 | 
  | 
  cd ../exe | 
| 82 | 
  | 
  cp ../verification/global_with_exf/input/eedata . | 
| 83 | 
  | 
  cp ../verification/global_with_exf/input/data.* . | 
| 84 | 
  | 
  cp ../verification/global_with_exf/input/POLY3.COEFFS . | 
| 85 | 
  | 
  ln -sf ../verification/global_with_exf/input/*.bin . | 
| 86 | 
  | 
  cp ../ocean_inversion_project/input/* . | 
| 87 | 
  | 
  ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . | 
| 88 | 
  | 
  ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . | 
| 89 | 
  | 
  cp data.stationary.1 data | 
| 90 | 
  | 
  mpirun -np 24 dplace -s1 mitgcmuv < /dev/null > & ! errlog & | 
| 91 | 
  | 
  | 
| 92 | 
  | 
  | 
| 93 | 
  | 
 ========================================================== | 
| 94 | 
  | 
 Instructions for carrying out time-dependent, 1765-2005, | 
| 95 | 
  | 
 anthropogenic carbon perturbation tracer experiments using | 
| 96 | 
  | 
 the global_ocean.90x40x15 configuration. | 
| 97 | 
  | 
 ========================================================== | 
| 98 | 
  | 
  | 
| 99 | 
  | 
  cd MITgcm/exe | 
| 100 | 
  | 
  rm * | 
| 101 | 
  | 
  cd ../bin | 
| 102 | 
  | 
  rm * | 
| 103 | 
  | 
  cp ../verification/global_with_exf/code/* . | 
| 104 | 
  | 
  cp ../ocean_inversion_project/code/* . | 
| 105 | 
  | 
  ../tools/genmake2 | 
| 106 | 
  | 
    (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi) | 
| 107 | 
  | 
  make depend | 
| 108 | 
  | 
  make | 
| 109 | 
  | 
  cd ../exe | 
| 110 | 
  | 
  cp ../verification/global_with_exf/input/eedata . | 
| 111 | 
  | 
  cp ../verification/global_with_exf/input/data.* . | 
| 112 | 
  | 
  cp ../verification/global_with_exf/input/POLY3.COEFFS . | 
| 113 | 
  | 
  ln -sf ../verification/global_with_exf/input/*.bin . | 
| 114 | 
  | 
  cp ../ocean_inversion_project/input/* . | 
| 115 | 
  | 
  cp data.1765-2005 data | 
| 116 | 
  | 
  ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . | 
| 117 | 
  | 
  ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . | 
| 118 | 
  | 
  ln -sf ../ocean_inversion_project/atm_co2/splco2_cis92a.dat . | 
| 119 | 
  | 
  mitgcmuv > output .txt & | 
| 120 | 
  | 
  | 
| 121 | 
  | 
  | 
| 122 | 
  | 
 ========================================================== | 
| 123 | 
  | 
 Instructions for carrying out time-dependent, 1765-2005, | 
| 124 | 
  | 
 anthropogenic carbon perturbation tracer experiments using | 
| 125 | 
  | 
 global_ocean.90x40x15 configuration and netcdf output. | 
| 126 | 
  | 
 This assumes that the appropriate libnetcdf.a exists | 
| 127 | 
  | 
 and that it be specified in the genmake2 option file. | 
| 128 | 
  | 
 ========================================================== | 
| 129 | 
  | 
  | 
| 130 | 
  | 
  cd MITgcm/exe | 
| 131 | 
  | 
  rm * | 
| 132 | 
  | 
  cd ../bin | 
| 133 | 
  | 
  rm * | 
| 134 | 
  | 
  cp ../verification/global_with_exf/code/* . | 
| 135 | 
  | 
  cp ../ocean_inversion_project/code/* . | 
| 136 | 
  | 
  cp PTRACERS_OPTIONS.h.netcdf PTRACERS_OPTIONS.h | 
| 137 | 
  | 
  cp ../ocean_inversion_project/write_netCDF/*  . | 
| 138 | 
  | 
  | 
| 139 | 
 ===> set up and integrate 30-tracer computation | 
 ### need customized option file; example below is for nireas | 
| 140 | 
  | 
  ../tools/genmake2 -of linux_ia32_g77_netcdf | 
| 141 | 
  | 
  | 
 | 
  cd MITgcm/bin | 
  | 
 | 
  cp ../verification/global_with_exf/code/* . | 
  | 
 | 
  cp ../code/.genmakerc . | 
  | 
 | 
  cp ../code/* . | 
  | 
 | 
  ../tools/genmake | 
  | 
| 142 | 
  make depend | 
  make depend | 
| 143 | 
  make | 
  make | 
| 144 | 
  cd ../exe | 
  cd ../exe | 
| 145 | 
  cp ../verification/global_with_exf/input/* . | 
  cp ../verification/global_with_exf/input/eedata . | 
| 146 | 
  cp ../input/* . | 
  cp ../verification/global_with_exf/input/data.* . | 
| 147 | 
  mitgcmuv > output .txt | 
  cp ../verification/global_with_exf/input/POLY3.COEFFS . | 
| 148 | 
  | 
  ln -sf ../verification/global_with_exf/input/*.bin . | 
| 149 | 
 ===> look at output | 
  cp ../ocean_inversion_project/input/* . | 
| 150 | 
  | 
  cp data.1765-2005.1 data | 
| 151 | 
  matlab | 
  ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . | 
| 152 | 
  for i=1:30 | 
  ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . | 
| 153 | 
   tr=readbin(['PTRACER' myint2str(i) ... | 
  ln -sf ../ocean_inversion_project/atm_co2/splco2_cis92a.dat . | 
| 154 | 
               '.0000000020.001.001.data'],[90 40 15],1); | 
  mitgcmuv > output .txt & | 
| 155 | 
   mypcolor(tr(:,:,2)'), colorbar, pause(1) | 
  | 
| 156 | 
  | 
  | 
| 157 | 
  | 
 ====================================================== | 
| 158 | 
  | 
  | 
| 159 | 
  | 
 % some matlab code for looking at fort.10 debug files | 
| 160 | 
  | 
 load fort.10 | 
| 161 | 
  | 
 tak=zeros(90,40,12); | 
| 162 | 
  | 
 for n=1:length(fort) | 
| 163 | 
  | 
  m=fort(n,1); i=fort(n,2); j=fort(n,3); | 
| 164 | 
  | 
  if i>0&i<91&j>0&j<41, tak(i,j,m)=fort(n,4); end | 
| 165 | 
  | 
 end | 
| 166 | 
  | 
 lon=2:4:360; lat=-78:4:78; | 
| 167 | 
  | 
 clf, contourf(lon,lat,mean(tak(:,:,1),3)',-10:10) | 
| 168 | 
  | 
 caxis([-6 6]), colorbar, plotland | 
| 169 | 
  | 
  | 
| 170 | 
  | 
 % some matlab code for looking at PTRACER output files | 
| 171 | 
  | 
 salt=readbin('S.0000000020.001.001.data',[90 40 15],1); | 
| 172 | 
  | 
 tracer=zeros(90,40,15,30); | 
| 173 | 
  | 
 for i=1:30 | 
| 174 | 
  | 
  fn=['PTRACER' myint2str(i) '.0000000020.001.001.data']; | 
| 175 | 
  | 
  tracer(:,:,:,i)=readbin(fn,[90 40 15],1); | 
| 176 | 
  | 
  clf, mypcolor(tracer(:,:,1,i)'); pause(1) | 
| 177 | 
  | 
 end | 
| 178 | 
  | 
 tmp=sum(tracer,4); clf, mypcolor(tmp(:,:,1)') | 
| 179 | 
  | 
 mypcolor( | 
| 180 | 
  | 
  | 
| 181 | 
  | 
  | 
| 182 | 
  | 
 % some matlab code for checking that one year's worth of | 
| 183 | 
  | 
 % tracer uptake is approximately 1e18 mols. | 
| 184 | 
  | 
 lon=2:4:360; lat=-78:4:78; | 
| 185 | 
  | 
 thk=[50 70 100 140 190 240 290 340 390 440 490 540 590 640 690]; | 
| 186 | 
  | 
 mask=readbin('hFacC.001.001.data',[90 40 15],1); | 
| 187 | 
  | 
 tracer=zeros(90,40,15,30); sumtracer=zeros(30,1); | 
| 188 | 
  | 
 for i=1:30, mydisp(i) | 
| 189 | 
  | 
  fn=['PTRACER' myint2str(i) '.0000001800.001.001.data']; | 
| 190 | 
  | 
  tracer(:,:,:,i)=readbin(fn,[90 40 15],1); | 
| 191 | 
  | 
  for j=1:length(lat) | 
| 192 | 
  | 
   for k=1:length(thk) | 
| 193 | 
  | 
    sumtracer(i) = sumtracer(i) + sum(tracer(:,j,k,i).*mask(:,j,k)) * ... | 
| 194 | 
  | 
                   thk(k) * (4*1.113195e+05)^2 * cos(pi*lat(j)/180); | 
| 195 | 
  | 
   end | 
| 196 | 
  end | 
  end | 
| 197 | 
  | 
 end | 
| 198 | 
  | 
 plot(1:30,0*sumtracer,1:30,sumtracer) |