Main Code
ASLOTH main program
- program asloth
- Use
config
,defined_types
,eps_wrapper
,tree_memory_arrays_passable
,numerical_parameters
,resolution_parameters
,to_file
,input_files
,check_flags
,utility
,volume_fractions
,feedback_routines
(node_feedback()
),bubble_tree
(start_btree()
),tree_reader
,tree_initialization
,star_formation
,read_yields
,metal_functions
,populations
,sf_routines
,crit_masses
(set_mcrit()
),cosmic_time
(set_cosmic_time()
)- Call to
set_default_config()
,read_config()
,check_compiler_flags()
,init_outputs()
,set_cosmic_time()
,set_mcrit()
,read_tree()
,make_eps_tree()
,init_stellar_populations()
,assign_yields()
,output_pop()
,start_btree()
,init_tree()
,print_bar()
,real_to_string3()
,mem_report()
,clean_tree()
,get_fracs()
,node_feedback()
,sf_step()
,add_parent_to_tree()
,add_to_sfr()
,add_to_feedback_volumes()
,add_to_base_mdf()
,add_to_base_mstariisurv()
,write_files_reali()
,outputs_satellites()
,write_mw_properties()
,write_files()
,close_outputs()
Configuration
config
Quick access
- Variables
- Routines
Needed modules
input_files
: List of input filesrandom_object
: This is an object oriented version of the ran3 algorithm from numerical recipes Before using a rng type object it needs to be initialized by calling rng%init(seed) where seed is an integer seed Afterwards rng%get_ran() will return a random real in the range [0,1)
Variables
- config/config_file [character,protected]
e.g. param_template.nml
- config/cubic_box [logical,protected]
- config/nthreads [integer,protected]
Subroutines and functions
Type definitions
defined_types
Quick access
- Types
- Routines
add_baryons()
,del_high_mass()
,make_stars_high_mass()
,print_all_props()
,set_baryons()
Needed modules
metals
(n_elements()
): main module for handling metalsutility
: General purpose utility functions
Types
- type defined_types/treenode
class for storing information of each halo at each time
- Type fields
% base [treenode,pointer] :: which halo will this one be at at the the lowest redshift
% child [treenode,pointer/optional/default=>null()]
% desc_id [integer] :: descendent id
% firstpopiisf [logical,optional/default=.true.]
% highstars [stars_highmass,pointer/optional/default=>]
% highstars_first [stars_highmass,pointer/optional/default=>]
% highstars_last [stars_highmass,pointer/optional/default=>]
% i_checked [logical] :: has this halo already been checked for stochastic feedback?
% i_enr [logical,optional/default=.false.] :: is this halo enriched?
% i_ion [logical,optional/default=.false.] :: is the halo affected by ionising radiation
% i_mcrit [logical,optional/default=.false.] :: is the halo above the critical mass?
% i_sf [logical,optional/default=.false.] :: this flag controls whether the SF_step subroutine is called
% i_sub [logical,optional/default=.false.] :: is this a subhalo?
% id [integer] :: halo id
% igm_z (*) [real,allocatable] :: ambient metallicity
% jlevel [integer] :: which time-step is the halo at
% l_ion [real] :: ionising radiation emission rate [Photons/second]
% llstars [stars_highmass,pointer/optional/default=>]
% llstars_first [stars_highmass,pointer/optional/default=>]
% llstars_last [stars_highmass,pointer/optional/default=>]
% lp_id [integer] :: last progenitor depthfirst id
% m_cold [real] :: cold gas mass [M_sun]
% m_filter [real,optional/default=0]
% m_hot [real] :: hot gas mass [M_sun]
% m_metals (,) [real,allocatable]
% m_out [real] :: outflow mass [M_sun]
% m_peak [real] :: peak mass [Msun]
% m_peak_filter [real,optional/default=0]
% m_starii [real] :: stellar mass Pop II [M_sun]
% m_starii_surv [real,optional/default=0.0] :: Msun
% m_stariii [real] :: stellar mass Pop III [M_sun]
% mhalo [real] :: mass of halo
% nchild [integer] :: number of child nodes
% null [node_arrays,pointer]
% num_popiiprogenitor [integer,optional/default=0] :: how many Pop II forming progenitors
% parent [treenode,pointer/optional/default=>null()]
% pop [integer]
% r_en [real,optional/default=0] :: enrichment radius [physical Mpc]
% r_ion [real,optional/default=0] :: ionised radius [physical Mpc]
% sibling [treenode,pointer/optional/default=>null()]
% this_array [node_arrays,pointer/optional/default=>]
% x (3) [real] :: position
- type defined_types/node_arrays
- Type fields
% mdf_array (,) [real,allocatable]
- type defined_types/stars_highmass
- Type fields
% bin_id [integer,optional/default=0] :: which bin it belongs, should be consistent with IMF arrays
% next [stars_highmass,pointer/optional/default=>]
% null [stars_highmass,pointer]
% num [integer,optional/default=0]
% pop [integer,optional/default=0] :: PopII (2) or PopIII (3) stars
% prev [stars_highmass,pointer/optional/default=>]
% timeborn [real,optional/default=0.0] :: in order to know when the stars die
% z (*) [real,allocatable] :: Zgas [Z/Zsun] when the star is born. Related with SN yields.
Subroutines and functions
- function defined_types/make_stars_high_mass(n, i, timeborn, zgas, pop)
- Parameters
n [integer,in]
i [integer,in]
timeborn [real,in]
zgas (*) [real,in]
pop [integer,in]
- Return
res [stars_highmass]
- subroutine defined_types/del_high_mass(this)
- Parameters
this [stars_highmass,inout]
- subroutine defined_types/set_baryons(this, other)
copies baryonic properties from one halo to another (overwrites)
- Parameters
this [real]
other [real]
- subroutine defined_types/add_baryons(this, other)
adds baryonic properties of one halo to another
- Parameters
this [real]
other [real]
Tree Reader
tree_reader
Quick access
- Routines
Needed modules
input_files
: List of input filestree_memory_arrays
: This module is use for managing the memory of the merger treetree_memory_arrays_passable
: This module is used to reference the merger treeutility
: General purpose utility functions
Subroutines and functions
- subroutine tree_reader/read_tree(count, read_mass)
- Parameters
count [integer,out] :: reading tree
read_mass [real,out]
- Called from
- Call to
Tree initialization
tree_initialization
Description
prepares tree for running asloth
Quick access
- Routines
Subroutines and functions
- subroutine tree_initialization/init_tree(count, n_jcurrent)
- Parameters
count [integer,in]
n_jcurrent (nlev_max) [integer,out]
- Use
defined_types
,numerical_parameters
,tree_memory_arrays_passable
,utility
,crit_masses
,cosmic_time
,resolution_parameters
,metalmix_dz
,filter_module
,trace_mdf
,metals
- Called from
- Call to
print_bar()
,mem_report()
,read_lookups()
,filter_virial_masses()
,init_mdf()
- subroutine tree_initialization/filter_virial_masses()
- Use
defined_types
,numerical_parameters
,tree_memory_arrays_passable
,filter_module
- Called from
- Call to
compute_savgol_coeff()
,print_bar()
,savgol_filter()
,savgol_free()
- subroutine tree_initialization/set_tree_params()
- Use
power_spectrum_parameters
,modified_merger_tree
,numerical_parameters
,input_files
,time_parameters
- Called from
numerical and resolution parameters
numerical parameters
Quick access
- Variables
a_radiation
,ab_mag_norm
,ab_norm
,alpha_b
,alpha_ion
,alpha_outflow
,ang2m
,atomic_mass_helium
,atomic_mass_hydrogen
,bt_delta
,bt_max
,bt_min
,btnbin
,btnpad
,c_cgs
,c_hii
,c_light
,c_light_angstroms
,c_light_cm
,clump
,cm32m3
,crit_freq
,deca
,delta200
,deltaeds
,e_51
,em_rdisk_half_scale_o2
,eps3
,eps4
,eps6
,epsm
,epsr
,erg2j
,escape_fraction
,etaii
,etaiii
,ev2erg
,ev2j
,f_escii
,f_esciii
,fx_peak_nfw
,g
,g_cgs
,g_gyrkms3
,g_mpcgyr
,g_mpcgyr2
,g_si
,gpi
,gyr2s
,gyr2yr
,h0100
,h0100pgyr
,h_planck
,h_planck_erg
,hecto
,hubble
,hubble_cgs
,imf_max
,imf_min
,iso_fac
,j2erg
,k_boltzmann
,k_boltzmann_erg
,khorizon
,kilo
,kind99
,km2m
,kms2mpcgyr
,kom
,kpc2cm
,kstrc_1
,kstrc_2
,l_ab0
,l_box
,ln10
,ln2
,log4
,log_lsun_erg
,logang2m
,logc_light
,logc_light_angstroms
,logdeca
,logev2erg
,loggyr2s
,loghecto
,logj2erg
,logk_boltzmann
,logkilo
,logl_ab0
,loglsun
,loglsun_bc
,logm2cm
,logmega
,logmpc2asat10pc
,logpc2m
,logpi
,lograd2as
,long_bn
,lsun
,lsun40_bc
,lsun_bc
,lsun_erg
,lw_mode
,m2cm
,m32cm3
,m8crit
,m_atomic
,m_atomic_g
,m_be
,m_cha_out
,m_electron
,mean_mol
,mega
,mend
,milli
,mp_cgs
,mpc2asat10pc
,mpc2cm
,mpc2m
,mpc_cgs
,mpckm2gyr
,mres
,msolar
,msolar_1030kg
,msolar_g
,mstart
,msun_cgs
,msun_mpc3_cgs
,mu_primordial
,myr2s
,n_b_cgs
,n_cloud_default
,n_cold_default
,n_h_cgs
,n_ionii
,n_ioniii
,n_spec
,nextoutputid
,nlev
,nlev_max
,nstarmassbinii
,nstarmassbiniii
,omega_b
,omega_l
,omega_m
,pc2cm
,pc2m
,pi
,pi4
,pio2
,pio4
,pisq
,popii_slope
,rad2as
,rad2degrees
,rdisk_half_scale
,rho_b_ast
,rho_b_cgs
,rho_crit_cgs
,rho_m_cgs
,rhocrit
,right_angle_degrees
,semi_circle_degrees
,sigma_8
,sigma_t
,sigma_thomson
,slope
,sqrt2
,sqrt2opi
,sqrt2pi
,sqrtatomic_mass_hydrogen
,sqrtdelta200
,sqrtg
,sqrtg_si
,sqrtk_boltzmann
,sqrtm_atomic
,sqrtmpc2m
,sqrtmsolar
,sqrtpi
,sqrtrhocrit
,stdout_bn
,surf_dens_norm_half
,t_crit
,t_ion
,t_univ
,tree_mass
,v_com
,v_enrich_popiii
,v_out
,vbc
,x_hydrogen
,x_hydrogen_solar
,xh
,y_helium
,y_helium_solar
,year_cgs
,yhe
,z_crit
,z_metals
,z_metals_solar
Variables
- numerical_parameters/a_radiation [real,parameter=7.565743419463647e-16]
- numerical_parameters/ab_mag_norm [real,parameter=48.6]
- numerical_parameters/ab_norm [real,parameter=3.6307805477e-20]
- numerical_parameters/alpha_b [real,parameter=2.6e-13]
- numerical_parameters/alpha_ion [real,parameter=2.6e-13]
- numerical_parameters/alpha_outflow [real]
- numerical_parameters/ang2m [real,parameter=1e-10]
- numerical_parameters/atomic_mass_helium [real,parameter=4.002602]
- numerical_parameters/atomic_mass_hydrogen [real,parameter=1.00794]
- numerical_parameters/bt_delta [real,optional/default=0.1]
- numerical_parameters/bt_max [real,optional/default=log10(4.e17)]
- numerical_parameters/bt_min [real,optional/default=log10(4.e15)]
- numerical_parameters/btnbin [integer,optional/default=10]
- numerical_parameters/btnpad [integer,optional/default=2]
- numerical_parameters/c_cgs [real,parameter=29980000000.0]
- numerical_parameters/c_hii [real,parameter=3]
- numerical_parameters/c_light [real,parameter=299792458.0]
- numerical_parameters/c_light_angstroms [real,parameter=2.99792458e+18]
- numerical_parameters/c_light_cm [real,parameter=29979245800.0]
- numerical_parameters/clump [real,parameter=4.0]
- numerical_parameters/cm32m3 [real,parameter=1e-06]
- numerical_parameters/crit_freq [real,parameter=3.969127815104263e-18]
- numerical_parameters/deca [real,parameter=10.0]
- numerical_parameters/delta200 [real,parameter=200.0]
- numerical_parameters/deltaeds [real,parameter=177.65287922076283]
- numerical_parameters/e_51 [real,parameter=1.2]
- numerical_parameters/em_rdisk_half_scale_o2 [real,parameter=0.432067481]
- numerical_parameters/eps3 [real,parameter=0.001]
- numerical_parameters/eps4 [real,parameter=0.0001]
- numerical_parameters/eps6 [real,parameter=1e-06]
- numerical_parameters/epsm [real,parameter=0.0001]
- numerical_parameters/epsr [real,parameter=1e-06]
- numerical_parameters/erg2j [real,parameter=1e-07]
- numerical_parameters/escape_fraction [real]
- numerical_parameters/etaii [real]
- numerical_parameters/etaiii [real]
- numerical_parameters/ev2erg [real,parameter=1.60217733e-12]
- numerical_parameters/ev2j [real,parameter=1.60217733e-19]
- numerical_parameters/f_escii [real]
- numerical_parameters/f_esciii [real]
- numerical_parameters/fx_peak_nfw [real,parameter=0.2162165956]
- numerical_parameters/g [real,parameter=4.301307710181788e-09]
- numerical_parameters/g_cgs [real,parameter=6.674e-08]
- numerical_parameters/g_gyrkms3 [real,parameter=4.205785220992724e-06]
- numerical_parameters/g_mpcgyr [real,parameter=4.398999721935946e-12]
- numerical_parameters/g_mpcgyr2 [real,parameter=4.498910530810333e-15]
- numerical_parameters/g_si [real,parameter=6.67259e-11]
- numerical_parameters/gpi [real,parameter=1.3212863952890194e-05]
- numerical_parameters/gyr2s [real,parameter=3.15576e+16]
- numerical_parameters/gyr2yr [real,parameter=1000000000.0]
- numerical_parameters/h0100 [real,parameter=100.0]
- numerical_parameters/h0100pgyr [real,parameter=0.10227121653079844]
- numerical_parameters/h_planck [real,parameter=6.6260755e-34]
- numerical_parameters/h_planck_erg [real,parameter=6.6260755e-27]
- numerical_parameters/hecto [real,parameter=100.0]
- numerical_parameters/hubble [real,parameter=0.6774]
- numerical_parameters/hubble_cgs [real,parameter=2.1952879411478756e-18]
- numerical_parameters/imf_max [real]
- numerical_parameters/imf_min [real]
- numerical_parameters/iso_fac [real,parameter=1.085736204755322]
- numerical_parameters/j2erg [real,parameter=10000000.0]
- numerical_parameters/k_boltzmann [real,parameter=1.3806503e-23]
- numerical_parameters/k_boltzmann_erg [real,parameter=1.3806503e-16]
- numerical_parameters/khorizon [real,parameter=0.00033356409519815205]
- numerical_parameters/kilo [real,parameter=1000.0]
- numerical_parameters/kind99 [integer,parameter=selected_real_kind(p,r=99)]
- numerical_parameters/km2m [real,parameter=1000.0]
- numerical_parameters/kms2mpcgyr [real,parameter=0.0010227121653079844]
- numerical_parameters/kom [real,parameter=2.9434011554855882e-21]
- numerical_parameters/kpc2cm [real,parameter=3.0856775807e+21]
- numerical_parameters/kstrc_1 [real,parameter=0.6251543028]
- numerical_parameters/kstrc_2 [real,parameter=1.191648617]
- numerical_parameters/l_ab0 [real,parameter=43442114331434.14]
- numerical_parameters/l_box [real]
(linear box size)
- numerical_parameters/ln10 [real,parameter=2.302585093]
- numerical_parameters/ln2 [real,parameter=0.6931471806]
- numerical_parameters/log4 [real,parameter=0.602059991]
- numerical_parameters/log_lsun_erg [real,parameter=33.5848963]
- numerical_parameters/logang2m [real,parameter=-10.0]
- numerical_parameters/logc_light [real,parameter=8.4768207]
- numerical_parameters/logc_light_angstroms [real,parameter=18.476820699999998]
- numerical_parameters/logdeca [real,parameter=1.0]
- numerical_parameters/logev2erg [real,parameter=-11.7952894176]
- numerical_parameters/loggyr2s [real,parameter=16.499103967]
- numerical_parameters/loghecto [real,parameter=2.0]
- numerical_parameters/logj2erg [real,parameter=7.0]
- numerical_parameters/logk_boltzmann [real,parameter=-22.859916308]
- numerical_parameters/logkilo [real,parameter=3.0]
- numerical_parameters/logl_ab0 [real,parameter=13.637910954000002]
- numerical_parameters/loglsun [real,parameter=26.5848963]
- numerical_parameters/loglsun_bc [real,parameter=26.5868122]
- numerical_parameters/logm2cm [real,parameter=2.0]
- numerical_parameters/logmega [real,parameter=6.0]
- numerical_parameters/logmpc2asat10pc [real,parameter=10.31442513287]
- numerical_parameters/logpc2m [real,parameter=16.489350545]
- numerical_parameters/logpi [real,parameter=0.497149873]
- numerical_parameters/lograd2as [real,parameter=5.31442513287]
- numerical_parameters/long_bn [integer,parameter=selected_int_kind(16)]
- numerical_parameters/lsun [real,parameter=3.845e+26]
- numerical_parameters/lsun40_bc [real,parameter=3.862e-07]
- numerical_parameters/lsun_bc [real,parameter=3.862e+26]
- numerical_parameters/lsun_erg [real,parameter=3.8450000000000004e+33]
- numerical_parameters/lw_mode [integer]
- numerical_parameters/m2cm [real,parameter=100.0]
- numerical_parameters/m32cm3 [real,parameter=1000000.0]
- numerical_parameters/m8crit [real,parameter=595167835572453.2]
- numerical_parameters/m_atomic [real,parameter=1.66053873e-27]
- numerical_parameters/m_atomic_g [real,parameter=1.66053873e-24]
- numerical_parameters/m_be [real,parameter=1000.0]
- numerical_parameters/m_cha_out [real]
- numerical_parameters/m_electron [real,parameter=9.10938188e-31]
- numerical_parameters/mean_mol [real,parameter=1.2281617489023304]
- numerical_parameters/mega [real,parameter=1000000.0]
- numerical_parameters/mend [real,parameter=2.0]
, Mcutoff !, MLongLive
- numerical_parameters/milli [real,parameter=0.001]
- numerical_parameters/mp_cgs [real,parameter=1.673e-24]
- numerical_parameters/mpc2asat10pc [real,parameter=20626480624.64262]
- numerical_parameters/mpc2cm [real,parameter=3.0856775807e+24]
- numerical_parameters/mpc2m [real,parameter=3.0856775807e+22]
- numerical_parameters/mpc_cgs [real,parameter=3.0857e+24]
- numerical_parameters/mpckm2gyr [real,parameter=977.79222143002]
- numerical_parameters/mres [real,parameter=500000.0]
- numerical_parameters/msolar [real,parameter=1.9891e+30]
- numerical_parameters/msolar_1030kg [real,parameter=1.9890999999999999]
- numerical_parameters/msolar_g [real,parameter=1.9891e+33]
- numerical_parameters/mstart [real,parameter=-2.0]
- numerical_parameters/msun_cgs [real,parameter=1.989e+33]
- numerical_parameters/msun_mpc3_cgs [real,parameter=6.769766377778569e-41]
- numerical_parameters/mu_primordial [real,parameter=0.5847493469151946]
- numerical_parameters/myr2s [real,parameter=31557600000000.0]
- numerical_parameters/n_b_cgs [real,parameter=2.038744909036926e-07]
- numerical_parameters/n_cloud_default [real,parameter=1000]
! dense, and diffuse density in the cold phase
- numerical_parameters/n_cold_default [real,parameter=100.0]
- numerical_parameters/n_h_cgs [real,parameter=1.5337477950684792e-07]
- numerical_parameters/n_ionii [real,parameter=4000.0]
- numerical_parameters/n_ioniii [real,parameter=90000.0]
- numerical_parameters/n_spec [real,parameter=0.9667]
- numerical_parameters/nextoutputid [integer]
- numerical_parameters/nlev [integer]
- numerical_parameters/nlev_max [integer,parameter=400]
- numerical_parameters/nstarmassbinii [integer,parameter=64]
- numerical_parameters/nstarmassbiniii [integer,parameter=64]
- numerical_parameters/omega_b [real,parameter=0.0486]
- numerical_parameters/omega_l [real,parameter=0.6911]
- numerical_parameters/omega_m [real,parameter=0.3089]
- numerical_parameters/pc2cm [real,parameter=3.0856775807e+18]
- numerical_parameters/pc2m [real,parameter=3.0856775807e+16]
- numerical_parameters/pi [real,parameter=3.1415926536]
- numerical_parameters/pi4 [real,parameter=12.5663706144]
- numerical_parameters/pio2 [real,parameter=1.5707963268]
- numerical_parameters/pio4 [real,parameter=0.7853981634]
- numerical_parameters/pisq [real,parameter=9.86960440115349]
- numerical_parameters/popii_slope [real,parameter=2.3]
- numerical_parameters/rad2as [real,parameter=206264.80624642622]
- numerical_parameters/rad2degrees [real,parameter=57.29577951289617]
- numerical_parameters/rdisk_half_scale [real,parameter=1.67834699]
- numerical_parameters/rho_b_ast [real,parameter=6187863374.547873]
- numerical_parameters/rho_b_cgs [real,parameter=4.189038942330162e-31]
- numerical_parameters/rho_crit_cgs [real,parameter=8.619421692037372e-30]
- numerical_parameters/rho_m_cgs [real,parameter=2.6625393606703443e-30]
- numerical_parameters/rhocrit [real,parameter=277511434571.3454]
- numerical_parameters/right_angle_degrees [real,parameter=90.0]
- numerical_parameters/semi_circle_degrees [real,parameter=180.0]
- numerical_parameters/sigma_8 [real,parameter=0.8159]
- numerical_parameters/sigma_t [real,parameter=6.65e-25]
- numerical_parameters/sigma_thomson [real,parameter=6.65245854e-29]
- numerical_parameters/slope [real]
- numerical_parameters/sqrt2 [real,parameter=1.4142135624]
- numerical_parameters/sqrt2opi [real,parameter=0.7978845608]
- numerical_parameters/sqrt2pi [real,parameter=2.5066282746]
- numerical_parameters/sqrtatomic_mass_hydrogen [real,parameter=1.00396215]
- numerical_parameters/sqrtdelta200 [real,parameter=14.142135623]
- numerical_parameters/sqrtg [real,parameter=6.558435567945511e-05]
- numerical_parameters/sqrtg_si [real,parameter=8.16859228998e-06]
- numerical_parameters/sqrtk_boltzmann [real,parameter=3.715710295489e-12]
- numerical_parameters/sqrtm_atomic [real,parameter=4.07497083425e-14]
- numerical_parameters/sqrtmpc2m [real,parameter=175660968365.0]
- numerical_parameters/sqrtmsolar [real,parameter=1410354565300000.0]
- numerical_parameters/sqrtpi [real,parameter=1.7724538509]
- numerical_parameters/sqrtrhocrit [real,parameter=526793.5407696816]
- numerical_parameters/stdout_bn [integer,parameter=10]
- numerical_parameters/surf_dens_norm_half [real,parameter=0.0297114]
- numerical_parameters/t_crit [real,parameter=2200.0]
- numerical_parameters/t_ion [real,parameter=10000.0]
- numerical_parameters/t_univ [real,parameter=4.3549644e+17]
- numerical_parameters/tree_mass [real]
- numerical_parameters/v_com [real]
- numerical_parameters/v_enrich_popiii [real,parameter=11000000.0]
- numerical_parameters/v_out [real,parameter=11000000.0]
- numerical_parameters/vbc [real]
- numerical_parameters/x_hydrogen [real,parameter=0.778]
- numerical_parameters/x_hydrogen_solar [real,parameter=0.7381]
- numerical_parameters/xh [real,parameter=0.7523]
- numerical_parameters/y_helium [real,parameter=0.222]
- numerical_parameters/y_helium_solar [real,parameter=0.2485]
- numerical_parameters/year_cgs [real,parameter=31560000.0]
- numerical_parameters/yhe [real,parameter=0.2477]
- numerical_parameters/z_crit [real,parameter=-5.0]
- numerical_parameters/z_metals [real,parameter=5.36e-10]
- numerical_parameters/z_metals_solar [real,parameter=0.0134]
resolution parameters
Quick access
- Variables
m_ccsn_max
,m_ccsn_min
,m_ion
,m_pisn_max
,m_pisn_min
,m_survive
,zmax
,zmin
Variables
- resolution_parameters/m_ccsn_max [real,parameter=40]
Mass range for CCSNe
- resolution_parameters/m_ccsn_min [real,parameter=10]
- resolution_parameters/m_ion [real,parameter=5]
Stellar mass above which we account for ionizing radition
- resolution_parameters/m_pisn_max [real,parameter=260]
Mass range for PISNe
- resolution_parameters/m_pisn_min [real,parameter=140]
- resolution_parameters/m_survive [real,parameter=0.81]
Stellar mass with lifetime 13.8Gyr.
- resolution_parameters/zmax [real,parameter=35.0]
- resolution_parameters/zmin [real,parameter=0.0]
Precomputed time-dependent quantities
crit_masses
Quick access
- Variables
- Routines
get_atomic_cooling_mass()
,get_crit_mass()
,get_m_vir()
,get_mcrit_schauer()
,get_mcrit_stacy()
,get_t_vir()
,set_mcrit()
Needed modules
Variables
Subroutines and functions
- subroutine crit_masses/set_mcrit()
- Called from
- Call to
- function crit_masses/get_crit_mass(z)
Determines critical mass for star formation at current redshift
- Parameters
z [real,in] :: redshift
- Return
get_crit_mass [real]
- Called from
- Call to
get_mcrit_schauer()
,get_mcrit_stacy()
,get_atomic_cooling_mass()
- function crit_masses/get_mcrit_stacy(z)
Modified to also check Jeans Mass calculated with modified speed of sound See Stacy et al. 2011
- Parameters
z [real,in] :: redshift
- Return
get_mcrit_stacy [real]
- Called from
- Call to
- function crit_masses/get_mcrit_schauer(z)
based on Schauer+21, MNRAS, Volume 507, Issue 2, pp.1775-1787 Critical mass for halo collapse with LW feedback and baryonic streaming
- Parameters
z [real,in] :: redshift
- Return
get_mcrit_schauer [real]
- Called from
- function crit_masses/get_atomic_cooling_mass(z)
the atomic cooling mass is the virial mass of 10^4 K
- Parameters
z [real,in] :: redshift
- Return
get_atomic_cooling_mass [real]
- Called from
- Call to
- function crit_masses/get_m_vir(z, t)
function determines the halo mass corresponding to a virial temperature we use the definition of Hummel et al 2012
- Parameters
z [real,in] :: redshift
t [real,in] :: virial temperature
- Return
get_m_vir [real]
- Called from
cosmic_time
Quick access
- Variables
- Routines
cosmic_dt()
,distribute_cosmic_time()
,dtdz()
,read_scale_file()
,set_cosmic_time()
Needed modules
input_files
(scale_file()
): List of input files
Variables
Subroutines and functions
- subroutine cosmic_time/set_cosmic_time()
subroutine to set redshift steps and compute expansion factors and cosmic time
- Called from
- Call to
- subroutine cosmic_time/distribute_cosmic_time()
subroutine to distribute redshift steps (either linearly or logarithmically)
- Called from
- subroutine cosmic_time/read_scale_file()
subroutine to read the redshift steps from scale file
- Called from
- function cosmic_time/dtdz(a)
Subroutine to calculate absolute value of dt/dz in seconds for density field normalized at reference epoch a0=1.
Notation:
- Parameters
a [real,in] ::
expansion factor rel to a0=1
Uses
- Return
res [real]
- Use
- Called from
- function cosmic_time/cosmic_dt(z1, z2)
determines the time in seconds between redshift z1 and z2
- Parameters
z1 [real,in]
z2 [real,in]
- Return
res [real]
- Called from
- Call to
EPS wrapper
eps_wrapper
Description
module to interface with the Parkinson et al. 2008 tree generation routines
Quick access
- Routines
Needed modules
power_spectrum_parameters
: Variables used to hold properties of the power spectrummake_tree_module
tree_memory_arrays
: This module is use for managing the memory of the merger treetree_memory_arrays_passable
: This module is used to reference the merger treetree_routines
: % A set of subroutines and functions for manipulating and utilizing the merger trees.modified_merger_tree
tree_initialization
(set_tree_params()
): prepares tree for running asloth
Subroutines and functions
- subroutine eps_wrapper/make_eps_tree()
- Called from
- Call to
set_tree_params()
,memory()
,make_tree()
,walk_tree()
Chemistry
chemistry
Quick access
- Variables
- Routines
ch21()
,ch22()
,cl4()
,cl64()
,fh2_crit()
,h2_cooling_rate()
,h2_form_rate()
,ph4()
,t_hot2cold()
Needed modules
Variables
- chemistry/abhe [real,parameter=y_helium/x_hydrogen/4.0]
- chemistry/x_ion [real,parameter=0.0002]
residual ionization fraction
Subroutines and functions
- function chemistry/t_hot2cold(n, t, z)
- Parameters
n [real,in]
t [real,in]
z [real,in]
- Return
res [real]
- Called from
- Call to
- function chemistry/h2_form_rate(n, t, z)
- Parameters
n [real,in]
t [real,in]
z [real,in]
- Return
res [real]
- Called from
- Call to
- function chemistry/fh2_crit(n, t, z)
- Parameters
n [real,in]
t [real,in]
z [real,in]
- Return
res [real]
- Called from
- Call to
- function chemistry/h2_cooling_rate(n, t)
- Parameters
n [real,in]
t [real,in]
- Return
res [real]
- Called from
- Call to
- function chemistry/ch22(temp)
- Parameters
temp [real,in]
- Return
res [real]
- Called from
- function chemistry/ch21(temp)
- Parameters
temp [real,in]
- Return
res [real]
- Called from
- function chemistry/ph4(z)
- Parameters
z [real,in]
- Return
res [real]
- Called from
- function chemistry/cl64(temp)
- Parameters
temp [real,in]
- Return
res [real]
- Called from
- function chemistry/cl4(temp)
- Parameters
temp [real,in]
- Return
res [real]
- Called from
Input files
Description
List of input files
Quick access
- Variables
lines_lt_popii
,lines_mmetals_popii
,lines_qion_popii
,mtree_file
,output_string
,pkinfile_dummy
,popii_lt_file
,popii_mmetals_file
,popii_qion_file
,popii_yields_file
,popiii_yields_file
,scale_file
,tree_file
,tree_name
,tree_path
Variables
- input_files/lines_lt_popii [integer]
- input_files/lines_mmetals_popii [integer,parameter=27]
- input_files/lines_qion_popii [integer]
- input_files/mtree_file [character,parameter='tree_files/mass_estimates_lx13.dat']
- input_files/output_string [character]
- input_files/pkinfile_dummy [character,parameter='data/kvector_z1.txt']
is later passed on to pkinfile
- input_files/popii_lt_file [character]
- input_files/popii_mmetals_file [character,parameter='data/kobayashi2006_z1e-3_mmetal.txt']
- input_files/popii_qion_file [character]
- input_files/popii_yields_file [character,parameter='data/kobayashi2006_z1e-3.txt']
- input_files/popiii_yields_file [character,parameter='data/yields_isotopes_sum_tr.dat']
- input_files/scale_file [character]
- input_files/tree_file [character]
- input_files/tree_name [character]
- input_files/tree_path [character]
Memory modules
Tree_memory_arrays
Description
This module is use for managing the memory of the merger tree
Quick access
- Variables
Needed modules
Variables
Tree_memory_arrays_passable
Description
This module is used to reference the merger tree
Quick access
- Variables
- Routines
Needed modules
Variables
- tree_memory_arrays_passable/number_of_nodes [integer]
Subroutines and functions
Star formation
SF_routines
Quick access
- Routines
add_hmstars()
,add_to_base_mstariisurv()
,coldgasbindingenergy_cold()
,coldgasbindingenergy_hot()
,coldgasbindingenergy_nfw()
,coldgasbindingenergy_stellar()
,dm_concen()
,get_n_ion()
,hms_feedback()
,hotgasbindingenergy_disk()
,hotgasbindingenergy_hot()
,hotgasbindingenergy_nfw()
,imfsampling()
,nfw_const()
,rm_hmstars()
,snedrivenoutflow()
,survivingstarlist()
,timescaledetermination()
,writellstarstofileanddel()
Needed modules
random_object
: This is an object oriented version of the ran3 algorithm from numerical recipes Before using a rng type object it needs to be initialized by calling rng%init(seed) where seed is an integer seed Afterwards rng%get_ran() will return a random real in the range [0,1)utility
: General purpose utility functionsmetal_functions
: Helper functions for handling metals and computing abundances and metallicitiesmetals
: main module for handling metalspopulations
: This module contains the type for storing IMFs, and the properties of the stellar populations
Subroutines and functions
- subroutine sf_routines/add_hmstars(p_node, ii, timeborn, num_, zgas, pop)
- Parameters
p_node [treenode,inout]
ii [integer,in]
timeborn [real,in]
num [integer,in]
zgas (n_elements) [real,in]
pop [integer,in]
- Called from
- subroutine sf_routines/rm_hmstars(p_node, highstar)
- Parameters
p_node [treenode,inout]
highstar [stars_highmass,inout,pointer]
- Called from
- function sf_routines/get_n_ion(p_node, t_current, del_t)
This routine calculates the total number of ionizing photons emitted during this time-step
- subroutine sf_routines/hms_feedback(p_node, t_current, totalmetalejectathisstep, totalsneenergythisstep, m_heat, rel_del_t)
This routine calculates the cold gas mass that will be heated/ blown out from the halo and the explosion energy/ ejecta from SNe.
- Parameters
p_node [treenode,inout] :: the halo
t_current [real,in] :: beginnng of the sub-step
totalmetalejectathisstep (n_elements) [real,inout] :: metals produced in this time-step
totalsneenergythisstep [real,out] :: Msun cm^2 s^-2
m_heat [real,out] :: mass that will trasfer from cold to hot in this time-step
rel_del_t [real,in] :: time-step
- Called from
- Call to
- subroutine sf_routines/add_to_base_mstariisurv(this_node)
Inherit M_star_II_surv to the base node at the final redshift
- subroutine sf_routines/survivingstarlist(p_node, num, ii, z, timeborn, pop)
Non-standard routine if users are interested in stellar information of survival stars in satellites
- Parameters
p_node [treenode,inout] :: the halo
num [integer,in] :: number of stars in this IMF mass bin
ii [integer,in] :: index of the IMF mass bin
z (n_elements) [real,in] :: metallicity of the star
timeborn [real,in] :: time of star formation
pop [integer,in] :: stellar population
- Called from
- subroutine sf_routines/writellstarstofileanddel(p_node)
- subroutine sf_routines/imfsampling(p_node, totalmassnewstars, m_star_form, t_current, this_rng, zgas, pop)
This routine samples individual stars from the IMF and store massive stars in the list.
- Parameters
p_node [treenode,inout] :: the halo
totalmassnewstars [real,inout] :: total mass of newly formed stars
m_star_form [real,in] :: estimated total stellar mass based on cold gas mass and star formation efficiency
t_current [real,in] :: the time in the beginning of the time-step
this_rng [rng,inout] :: random number generator
zgas (n_elements) [real,in] :: gas metallicity
pop [population,in] :: stellar population
- Use
- Called from
- Call to
get_mdf_bin()
,poisson()
,add_hmstars()
,survivingstarlist()
,add_to_node_mdf()
- subroutine sf_routines/dm_concen(m_halo, z, dm_concentration)
This routine determins the concentration of the NFW profile. We adopt the fitting curve by Correa et al. 2015 (doi:10.1093/mnras/stv1363) Planck cosmology (appendix B) Note that the fitting functions are valid for z=0-10 based on private conversation
- Parameters
m_halo [real,in] :: virial mass of the halo
z [real,in] :: current redshift
dm_concentration [real,out] :: (arbitrary) constant value, reference from Fig. 7 in Correa et al. 2015 for haloes > 10^5 Msun
- Called from
- subroutine sf_routines/timescaledetermination(p_node, v_dyn, t_dyn, ncold, n_hot, coldgas_tff, r_vir_current, dm_concentration, t_vir, t_cool)
This routines determines all the relative timescales that we need. Note that the time scales we eventually use are dimensionless.
- Parameters
p_node [treenode,inout] :: This also includes “dead” stars
v_dyn [real,inout] :: s; dynamical time of the halo center
t_dyn [real,inout] :: dynamical timescale of central part of the halo
ncold [real,inout] :: number density of cold gas
n_hot [real,inout] :: number density of hot gas
coldgas_tff [real,inout] :: free fall time of cold gas
r_vir_current [real,in] :: the current virial raius of the halo
dm_concentration [real,in] :: dark matter halo concentration
t_vir [real,in] :: virial temperature of the halo
t_cool [real,inout] :: cooling time of hot gas
- Called from
- Call to
- function sf_routines/nfw_const(r_s, r_vir_current)
- Parameters
r_s [real,in]
r_vir_current [real,in]
- Return
a [real]
- Called from
- function sf_routines/hotgasbindingenergy_nfw(r_s, r_vir_current, m_hot, m_peak)
- Parameters
r_s [real,in]
r_vir_current [real,in]
m_hot [real,in]
m_peak [real,in]
- Return
be_hot_nfw [real]
- Called from
- Call to
- function sf_routines/hotgasbindingenergy_disk(r_s, r_vir_current, m_hot, m_disk)
- Parameters
r_s [real,in]
r_vir_current [real,in]
m_hot [real,in]
m_disk [real,in]
- Return
be_hot_disk [real]
- Called from
- function sf_routines/hotgasbindingenergy_hot(r_vir_current, m_hot)
- Parameters
r_vir_current [real,in]
m_hot [real,in]
- Return
be_hot_hot [real]
- Called from
- function sf_routines/coldgasbindingenergy_nfw(r_s, r_vir_current, m_cold, m_peak)
- Parameters
r_s [real,in]
r_vir_current [real,in]
m_cold [real,in]
m_peak [real,in]
- Return
be_cold_nfw [real]
- Called from
- Call to
- function sf_routines/coldgasbindingenergy_stellar(r_s, m_cold, m_stellar)
- Parameters
r_s [real,in]
m_cold [real,in]
m_stellar [real,in]
- Return
be_cold_stellar [real]
- Called from
- function sf_routines/coldgasbindingenergy_hot(r_s, r_vir_current, m_cold, m_hot)
- Parameters
r_s [real,in]
r_vir_current [real,in]
m_cold [real,in]
m_hot [real,in]
- Return
be_cold_hot [real]
- Called from
- function sf_routines/coldgasbindingenergy_cold(r_s, m_cold)
- Parameters
r_s [real,in]
m_cold [real,in]
- Return
be_cold_cold [real]
- Called from
- subroutine sf_routines/snedrivenoutflow(p_node, r_vir_current, dm_concentration, totalsneenergythisstep, del_m_hot, totalmassnewstars, m_out_hot, m_out_cold)
This routines determines the binding energy of hot gas and cold gas. It then compare the SNe energy and the binding energy to determine how much gas SNe will blow out of the halo.
- Parameters
p_node [treenode,inout] :: the halo
r_vir_current [real,in] :: current virial radius of the halo
dm_concentration [real,in] :: dark matter halo’s concentration
totalsneenergythisstep [real,inout] :: sum of SNe energy that occur in this time-step
del_m_hot [real,in] :: smoothly accreted hot gas in this time-step
totalmassnewstars [real,in] :: total newly formed stellar mass in this time-step
m_out_hot [real,inout] :: hot gas mass that ends up in outflow in this time-step
m_out_cold [real,inout] :: cold gas mass that ends up in outflow in this time-step
- Called from
- Call to
hotgasbindingenergy_nfw()
,hotgasbindingenergy_disk()
,hotgasbindingenergy_hot()
,coldgasbindingenergy_nfw()
,coldgasbindingenergy_stellar()
,coldgasbindingenergy_hot()
,coldgasbindingenergy_cold()
Star_formation
Quick access
- Routines
add_parent_to_tree()
,dt_adaptive()
,m_star_dot()
,prepare_node()
,sf_step()
Needed modules
bubble_tree
: This module containes routines for adding feedback of haloes to the tracing system and for testing whether a halo or a specific point in space is affected by the feedbackmetal_functions
: Helper functions for handling metals and computing abundances and metallicitiesrandom_object
: This is an object oriented version of the ran3 algorithm from numerical recipes Before using a rng type object it needs to be initialized by calling rng%init(seed) where seed is an integer seed Afterwards rng%get_ran() will return a random real in the range [0,1)input_files
: List of input filesutility
(iunit_list()
): General purpose utility functionsigm_z
: utility routine for inheriting the IGM metallicity accross time
Subroutines and functions
- subroutine star_formation/prepare_node(p_node, m_star_max, is_ion)
- Parameters
p_node [treenode,inout] :: parent node
m_star_max [real,out]
is_ion [logical,out] :: set from most massive child
- Called from
- Call to
- subroutine star_formation/sf_step(node)
- Parameters
node [treenode,inout,target]
- Called from
- Call to
prepare_node()
,rvir_mpc()
,dm_concen()
,get_t_vir()
,check_m_metals()
,get_metallicity()
,calc_dz()
,metalpoor()
,timescaledetermination()
,dt_adaptive()
,m_star_dot()
,imfsampling()
,get_n_ion()
,hms_feedback()
,snedrivenoutflow()
,assert()
,v_plow_ad()
,r_ion_ad()
,writellstarstofileanddel()
- subroutine star_formation/add_parent_to_tree(node)
- Parameters
node [treenode,inout]
- Called from
- Call to
- function star_formation/dt_adaptive(p_node, coldgas_tff, t_dyn, del_m_hot, del_t, t_step, pop_now)
timestep in sec
- Parameters
p_node [treenode,in]
coldgas_tff [real,in]
t_dyn [real,in]
del_m_hot [real,in]
del_t [real,in]
t_step [real,in]
pop_now [integer,in]
- Return
dt_adaptive [real]
- Called from
- Call to
- function star_formation/m_star_dot(m_cold, coldgas_tff, pop_now)
star formation rate in this substep (Msun/s)
- Parameters
m_cold [real,in]
coldgas_tff [real,in]
pop_now [integer,in]
- Return
m_star_dot [real]
- Use
- Called from
Stellar feedback
feedback_routines
Quick access
Needed modules
bubble_tree
: This module containes routines for adding feedback of haloes to the tracing system and for testing whether a halo or a specific point in space is affected by the feedback
Subroutines and functions
- subroutine feedback_routines/node_feedback(this_node)
- Parameters
this_node [treenode,target]
- Called from
- Call to
self_enrichment()
,statistical_feedback()
,bubble_check()
,ion_check()
- subroutine feedback_routines/self_enrichment(node)
This routine computes feedback exactly as the bubble-tree in the case that there is only self-enrichment
- Parameters
node [treenode]
- Called from
snowplow
Quick access
- Routines
Needed modules
Subroutines and functions
- function snowplow/v_plow_ad(m, z, r, r_v)
- Parameters
m [real,in]
z [real,in]
r [real,in]
r_v [real,in]
- Return
v [real]
- Called from
- function snowplow/r_ion_ad(nion, r_old, z, del_t, mhalo)
- Parameters
nion [real,in]
r_old [real,in]
z [real,in]
del_t [real,in]
mhalo [real,in]
- Return
r_new [real]
- Called from
- Call to
Feedback tracing
feedback_arrays
Quick access
- Variables
- Routines
Needed modules
Variables
Subroutines and functions
- subroutine feedback_arrays/add_to_feedback_volumes(node)
volume_fractions
Quick access
- Routines
Needed modules
bubble_tree
: This module containes routines for adding feedback of haloes to the tracing system and for testing whether a halo or a specific point in space is affected by the feedbackinput_files
: List of input filesutility
(iunit_list()
): General purpose utility functions
Subroutines and functions
- subroutine volume_fractions/get_fracs(jlevel)
- Parameters
jlevel [integer,in]
- Use
- Called from
- Call to
Outputs
to_file
Quick access
- Types
- Routines
add_timestamp()
,close_outputs()
,init_outputs()
,outputs_satellites()
,write_file()
,write_files()
,write_files_reali()
,write_mw_properties()
Needed modules
input_files
: List of input filesutility
: General purpose utility functionsconverters
: Module for converting numerical values to strings
Types
Variables
Subroutines and functions
- subroutine to_file/init_outputs()
- Called from
- Call to
- subroutine to_file/write_file(fs, var_name, ncoll)
- Parameters
fs [file_specs]
var_name [character]
ncoll [integer] :: loop writes one line
- Called from
- subroutine to_file/outputs_satellites(count)
- Parameters
count [integer]
- Use
- Called from
- Call to
- subroutine to_file/write_files_reali()
- Use
tree_memory_arrays_passable
,input_files
,metal_functions
,trace_mdf
- Called from
- Call to
- subroutine to_file/write_files(output)
- Parameters
output [file_specs,inout]
- Called from
- Call to
- subroutine to_file/add_timestamp(output_path)
- Parameters
output_path [character,inout]
- Called from
- Call to
- subroutine to_file/write_mw_properties()
- Use
- Called from