!Sample program using sample routine CAMBsub_slowroll.f90 !compile with power_slowroll.f90 !The program demonstrates how to generate tensor and scalar spectra !corretly normalized, normalize the total spectrum to COBE, and !and how to use different range of l to generate the two spectra !AML 30/3/01. program Tester use ModelData use CAMBinterface implicit none integer l,Maxl real*8 Maxk type(CAMBparams) P Maxl=1500 Maxk=3000 call Initialize('spherbes.dat',Maxl,Maxk) P%Om_baryon = .045 P%Om_cdm = 0.355 P%Om_lambda = 0.6 P%Om_nu = 0.0 P%Hubble_0=65 P%T_CMB=2.726 P%Y_He=0.24 P%Num_Nu_massless=3.04 P%Num_Nu_massive=0 P%Scalar_initial_condition=initial_adiabatic P%RECFAST_recombination =.true. P%Reionization = .false. !This example uses only one pair of slow roll parameters. !These will give an exactly scale invariant scalar spectrum P%epsilon=0.01 P%delta=0.02 !Always call ZeroCls before starting a new model call ZeroCls !Get tensor spectrum first so that COBEnormalize is set up with the larger of the two l ranges when it is called P%Out_scalar = .false. P%Out_tensor = .true. !tensors only important at low l for the temperature anisotropy !Save time by only generating to l=400 P%Max_l=400 P%Max_k=800 call GetCls(P) P%Out_scalar = .true. P%Out_tensor = .false. P%Max_l=1500 P%Max_k=3000 call GetCls(P) !Now have tensor and scalar spectra in correct ratio. Normalize to COBE: call COBEnormalize do l=2,1500 !print out scalar and tensor temperature, then sum write(*,'(1I5,3E15.5)') l, clts(l,1),cltt(l,1),cltt(l,1)+clts(l,1) end do end program Tester