PROGRAM Evolve_LinearPk USE cosmo USE growth ! A program for evolving the linear power spectrum from one redshift to another ! August 24, 2008: E.Komatsu IMPLICIT none double precision :: linear_pk,k_ov_h,g,zin,zout,scalefactor character(len=128) :: infile,outfile integer :: i,n external g ! input power spectrum data infile='wmap5baosn_max_likelihood_matterpower.dat' n=896 ! # of lines in the file zin=0d0 ! redshift of the data in the file ! Specify three cosmological parameters ! The data type has been defined in MODULE cosmo. ode0=0.723d0 om0=0.277d0 w=-1d0 CALL setup_growth ! tabulate the growth factor ! output power spectrum data outfile='evolved_linearpk.txt' print*,'output redshift?' read*,zout ! compute the power ratio scalefactor=(g(zout)/g(zin)*(1d0+zin)/(1d0+zout))**2d0 print*,'omega matter=',om0 print*,'omega de=',ode0 print*,'w=',w print*,'input redshift=',zin print*,'output redshift=',zout print*,'P(k,out)/P(k,in)=',scalefactor open(1,file=infile,status='old') open(2,file=outfile,status='unknown') do i=1,n read(1,*)k_ov_h,linear_pk write(2,'(2E16.5)')k_ov_h,linear_pk*scalefactor enddo close(1) close(2) END PROGRAM Evolve_LinearPk