program main_light_cones use lc_helper use hdf5_wrapper !use HDF5_Utils_Module !The main program for generating lightcones !ux_obs,uy_obs,uz_obs:these are the unit vectors that define the direction of the line of sight of the lightcone ! theta_open: the opening angle of the light cone implicit none !simulation box inputs real :: lbox !box size of the simulation integer :: nsub_vols ! number of subvolumes the boxsize ! Survey inputs real :: l_survey ! comoving distance of the survey ! observational inputs integer :: n_obs ! number of observers real :: x_obs,y_obs,z_obs,ux_obs,uy_obs,uz_obs,theta_open ! replications variables integer :: n_rep_a,n_rep_t !number of replications to be done logical :: log_rep !logical to confirm replications integer :: rep_count !variable to count the replications real, allocatable, dimension(:) :: x_i,y_i,z_i,x_new,y_new,z_new ! adress of folders character(*), parameter :: direct1='/home/ggranda/galform_out/v2.6.0/aquarius_trees/micro-surfs-velociraptor/surfs-midi/iz200/' ! directory of the folder that contains all the subvolumes character(*), parameter :: direct2='/mnt/su3ctm/ggranda/cp_test2/' ! directory containing the replications character(5), parameter :: redshift='iz200' ! translation variable logical :: log_translation ! computaion variables integer :: i,j,k,l,rank,dims(1) character(3) :: temp_rep,temp_subv logical :: readonly ! lightcone select real :: ra1,ra2 real :: decl1,decl2 real :: dc1,dc2 character(*), parameter :: direct_out='/mnt/su3ctm/ggranda/lightcones/lightcones.hdf5' logical :: log_lightcone !###########################HArdcode################################### n_obs=1 l_survey= 100.0 ! the volume of the surey uin Mpc^3 lbox= 100.0 ! the box size of the simulation in Mpc nsub_vols=64 log_rep=.false. ! log to decide copying or not readonly=.false. ! log to decide readonly log_translation=.true. log_lightcone = .false. ra1=-2.836 ra2=2.860 decl1=-2.836 decl2=2.836 dc1=10.0 dc2=2000.0 !#################### CODE #################################################### n_rep_a=(nint(l_survey/lbox+1)) !n_rep_a: number of replications per axis n_rep_t=int((2*n_rep_a+1)**3.0) !n_rep_t: total number of replications !call system('ls '// direct1) n_rep_t=2 ! just to test code if (log_rep) then call replications(n_rep_t,direct1,direct2) endif rep_count=1 if (log_translation) then call replications_translation(n_rep_a,nsub_vols,lbox,direct2) endif if (log_lightcone) then call light_cone_select1(n_rep_a,nsub_vols,ra1,ra2,decl1,decl2,dc1,dc2,direct2,direct_out) endif end program main_light_cones