Ocean Inversion Project ======================= Instructions for using pkg/ptracers to compute tracer Green's functions for Gruber's ocean inversion project (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. Instructions for CFC-11 computations are in cvs co -r release1_50yr MITgcm_code cvs co -r release1_50yr MITgcm/verification/global_with_CFC11 MITgcm/verification/global_with_CFC11/README Notes and problems: =================== there is problem generating ECCO_MaskAreaBathy.nc on columbia works OK on nireas variable global_mean_conc in 0D output from mk_output.F is screwed up =============================================== First check that pkg/ptracers works OK by using salinity initial and boundary conditions =============================================== 1 ===> get MITgcm code from cvs repository cvs co -r checkpoint51n_branch MITgcm_code cvs co -r checkpoint51n_branch MITgcm/verification/testreport cvs co -r checkpoint51n_branch MITgcm/verification/global_with_exf 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 mkdir bin exe cd bin \cp ../verification/global_with_exf/code/* . \cp ../ocean_inversion_project/code/* . \rm ptracers_*.F PTRACERS_OPTIONS.h ../tools/genmake2 (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi ) (on columbia: ../tools/genmake2 -of linux_ia64_efc+mpi_altix ) make depend make -j 16 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. diff PTRACER01.0000000020.001.001.data S.0000000020.001.001.data diff PTRACER30.0000000020.001.001.data S.0000000020.001.001.data diff PTRtave30.0000000020.001.001.data Stave.0000000020.001.001.data diff PTRtave30.0000000020.001.001.data Stave.0000000020.001.001.data ========================================================== MPI instructions for carrying out a 3000-year quasi-stationary integration using the global_ocean.90x40x15 configuration. ========================================================== cd MITgcm/exe rm * cd ../bin rm * cp ../verification/global_with_exf/code/* . cp ../ocean_inversion_project/code/* . rm PTRACERS_OPTIONS.h cp CPP_EEOPTIONS.h_mpi CPP_EEOPTIONS.h cp SIZE.h_mpi SIZE.h ../tools/genmake2 (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi) 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 . cp data.stationary.1 data mpirun -np 24 dplace -s1 mitgcmuv < /dev/null > & ! errlog & (on orion: qsub job.orion) ========================================================== MPI instructions for carrying out time-dependent, 1765-2005, anthropogenic carbon perturbation tracer experiments using the global_ocean.90x40x15 configuration. ========================================================== cd MITgcm/exe rm * cd ../bin rm * cp ../verification/global_with_exf/code/* . cp ../ocean_inversion_project/code/* . cp CPP_EEOPTIONS.h_mpi CPP_EEOPTIONS.h cp SIZE.h_mpi SIZE.h ../tools/genmake2 (on orion: ../tools/genmake2 -of linux_ia64_efc+mpi) 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/* . cp data.1765-2005 data ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . ln -sf ../ocean_inversion_project/atm_co2/splco2_cis92a.dat . mpirun -np 24 dplace -s1 mitgcmuv < /dev/null > & ! errlog & (on orion: qsub job.orion.td) ========================================================== Instructions for carrying out time-dependent, 1765-2005, anthropogenic carbon perturbation tracer experiments using global_ocean.90x40x15 configuration and netcdf output. This assumes that the appropriate libnetcdf.a exists and that it be specified in the genmake2 option file. ========================================================== cd MITgcm/exe rm * cd ../bin rm * cp ../verification/global_with_exf/code/* . cp ../ocean_inversion_project/code/* . cp PTRACERS_OPTIONS.h.netcdf PTRACERS_OPTIONS.h cp ../ocean_inversion_project/write_netCDF/* . \rm mk_output.F ### need customized option file; example below is for nireas ../tools/genmake2 -of linux_ia32_g77_netcdf 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/* . cp data.1765-2005.1 data ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . ln -sf ../ocean_inversion_project/atm_co2/splco2_cis92a.dat . mitgcmuv > output .txt & ========================================================== Instructions for carrying out time-dependent, 1765-2005, anthropogenic carbon perturbation tracer experiments using the ecco1x1 configuration and netcdf output on columbia. This assumes that the appropriate libnetcdf.a exists and that it be specified in the genmake2 option file. It also assumes that surface forcing files are available in MITgcm/../iter69 ========================================================== cd MITgcm/exe \rm * cd ../bin \rm * \cp ../ocean_inversion_project/code_ecco1x1/* . \cp ../ocean_inversion_project/write_netCDF/* . \rm mk_output.F \cp SIZE.h.96 SIZE.h ../tools/genmake2 -of linux_ia64_efc+mpi_altix make depend make -j 16 cd ../exe \cp ../ocean_inversion_project/input_ecco1x1/* . ln -sf ../../iter69/* . ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . ln -sf ../ocean_inversion_project/atm_co2/splco2_cis92a.dat . qsub job01 ========================================================== Instructions for carrying out 3000-year quasi-stationary integration using the ecco1x1 configuration and netcdf output on columbia. This assumes that the appropriate libnetcdf.a exists and that it be specified in the genmake2 option file. It also assumes that surface forcing files are available in MITgcm/../iter69 ========================================================== cd MITgcm/exe \rm * cd ../bin \rm * \cp ../ocean_inversion_project/code_ecco1x1/* . \cp ../ocean_inversion_project/write_netCDF/* . \rm mk_output.F \cp SIZE.h.96 SIZE.h \cp PTRACERS_OPTIONS.h.stationary PTRACERS_OPTIONS.h ../tools/genmake2 -of linux_ia64_efc+mpi_altix make depend make -j 16 cd ../exe \cp ../ocean_inversion_project/input_ecco1x1/* . \ln -sf ../../iter69/* . \ln -sf ../ocean_inversion_project/region_mask/30reg_regionmask.bin . \ln -sf ../ocean_inversion_project/takahashi/taka02_montlhy.bin . qsub job01s ========================================================== Instructions for generating netcdf output files on columbia ========================================================== cd ocean_inversion_project/write_netCDF setenv F_UFMTENDIAN big (check that defaults in mk_output.F are appropriate) ifort -assume byterecl -W0 -WB mk_output.F write_nc_phys.F nc_util.F \ handle_errors.F write_nc_basisfnctns.F \ write_nc_diag_0D.F write_nc_diag_2D.F \ -I/u/menemenl/software/netcdf-3.5.0/include \ -L/u/menemenl/software/netcdf-3.5.0/lib -lnetcdf ./a.out ========================================================== Instructions for generating netcdf output files on orion ========================================================== cd ocean_inversion_project/write_netCDF setenv F_UFMTENDIAN big (check that defaults in mk_output.F are appropriate) efc -W0 -WB mk_output.F write_nc_phys.F nc_util.F \ handle_errors.F write_nc_basisfnctns.F \ write_nc_diag_0D.F write_nc_diag_2D.F \ -I/u2/dmenem/software/netcdf-3.5.0/include \ -L/u2/dmenem/software/netcdf-3.5.0/lib -lnetcdf ./a.out ====================================================== % 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) % check that tracer flux is 1e18 mols / year nb_seconds_per_year=31556880; lon=2:4:360; lat=-78:4:78; mask=readbin('hFacC.data',[90 40 15],1); tracer=zeros(90,40,30); sumtracer=zeros(30,1); for i=1:30, mydisp(i) fn=['PtrFlux' myint2str(i) '.0000000180.data']; tracer(:,:,i)=readbin(fn,[90 40],1); for j=1:length(lat) sumtracer(i) = sumtracer(i) + sum(tracer(:,j,i).*mask(:,j,1)) * ... nb_seconds_per_year* (4*1.113195e+05)^2 * cos(pi*lat(j)/180); end end plot(1:30,0*sumtracer,1:30,sumtracer-mmean(sumtracer))