This class contains parameters used in cosmogenic nuclide calculations It sits seperately from the particle object since it applies to an entire environment and not just an individual particle. Seperating the object in this way reduces memory redundancy. More...
#include <LSDCRNParameters.hpp>
Public Member Functions | |
LSDCRNParameters () | |
The default constructor. It is the only possible constructor. | |
void | load_parameters_for_atmospheric_scaling (string path_to_params) |
function for loading parameters that allow pressure calculation from elevation More... | |
void | set_CRONUS_data_maps () |
This function sets a numer of parameters that are used to replicate the CRONUS calculator. More... | |
vector< double > | get_Stone_Pref () |
vector< double > | calculate_muon_production_CRONUS (double z, double h) |
This function wraps the CRONUS muon production function It returns a vector with elements Muon_production[0] = 10Be fast Muon_production[1] = 26Al fast Muon_production[2] = 10Be neg Muon_production[3] = 26Al neg. More... | |
void | P_mu_total (double z, double h) |
calculates the production rate of Al-26 or Be-10 by muons This uses the scheme in Heisinger and others (2002, 2 papers). The vertically traveling muon flux is scaled to the site elevation using energy-dependent attenuation lengths from Boezio et al. (2000). See the hard-copy documentation for detailed citations and a full discussion of the calculation. Note that some constants are internal to the function. The only ones that get passed from upstream are the ones that a) are nuclide-specific, or b) actually have quoted uncertainties in Heisinger's papers. The fraction of muons that are negative is internal; so is the energy-dependence exponent alpha. Original Written by Greg Balco – UW Cosmogenic Nuclide Lab balcs March, 2006 Part of the CRONUS-Earth online calculators: @u.w ashin gton .eduhttp://hess.ess.washington.edu/math More... | |
void | P_mu_total_return_nuclides (double z, double h, double &Be10_total_mu, double &Al26_total_mu) |
A wrapper for the P_mu_total function that replaces total production for 10Be and 26Al due to muons. More... | |
double | Rv0 (double z) |
this subfunction returns the stopping rate of vertically traveling muons as a function of depth z at sea level and high latitude. Modified from Greg Balco's CRONUS calculator More... | |
double | LZ (double z) |
this subfunction returns the effective atmospheric attenuation length for muons of range Z Original by Greg Balco as part of the CRONUS calculator More... | |
double | integrate_muon_flux (double z, double H, double tolerance) |
subroutine for integrating the muon flux uses simplsons rule, keeps refining nodes until a tolerance is reached. More... | |
void | set_Granger_parameters () |
This resets the F, Gamma and P0 values so that they conform to Granger and Smith 2000 scaling. Adopted from from Vermeesh 2007. More... | |
void | set_Schaller_parameters () |
This resets the F, Gamma and P0 values so that they conform to Schaller (2009) scaling. Adopted from from Vermeesh 2007. More... | |
void | set_Braucher_parameters () |
This resets the F, Gamma and P0 values so that they conform to Braucher et al (2009) scaling. Adopted from from Vermeesh 2007, From version 2.0 of cosmocalc. More... | |
void | set_newCRONUS_parameters () |
This resets the F, Gamma and P0 values For 10Be, these correspond to new production curves provided by Shasta Marerro. More... | |
void | set_CRONUS_stone_parameters () |
this resets the production and decay coefficients of 10Be and 26Al to mimic the parameters for stone scaling in CRONUS calculator IMPORTANT the F and Gamma numbers are not changed so you will need to set granger or schaller parameters beforehand. ALSO this is no longer necessary due to changes in Vermeesch's reported values which now correspond to the CRONUS values More... | |
void | set_Neutron_only_parameters () |
This sets the F values to use neutron only production. More... | |
vector< double > | set_P0_CRONUS_uncertainty_plus () |
This function resets the P0 using the error from the CRONUS calculator. It allows one to test the uncertainty in the calculated erosion rates. this version adds to the production. More... | |
vector< double > | set_P0_CRONUS_uncertainty_minus () |
This function resets the P0 using the error from the CRONUS calculator. It allows one to test the uncertainty in the calculated erosion rates. this version adds to the production. More... | |
vector< double > | get_uncertainty_scaling_pair (int pair) |
void | set_scaling (double scaling, double topo_shield, double snow_shield) |
This sets the internal scaling for the particle. It includes topographic shielding, snow shielding and scaling from latitude and other factors. More... | |
void | set_neutron_scaling (double scaling, double topo_shield, double snow_shield) |
This sets the internal scaling for the particle. It includes topographic shielding, snow shielding and scaling from latitude and other factors. It is for use with neutron only calculations. More... | |
double | stone2000sp (double lat, double P, double Fsp) |
This gets the Lifton Scaling Modified from Greg Balco's code: http://hess.ess.washington.edu/math. More... | |
void | scale_F_values (double single_scaling) |
this function takes a single scaling factor for elevation scaling, self shielding, snow shielding, and latitude scaling and produces scaling factors for each production mechamism. the scaling follows the approach of vermeesch 2008 it uses a 'virtual' shielding depth to calculate the updated scaling factors More... | |
void | scale_F_values (double single_scaling, vector< bool > nuclides_for_scaling) |
this function takes a single scaling factor for elevation scaling, self shielding, snow shielding, and latitude scaling and produces scaling factors for each production mechamism. the scaling follows the approach of vermeesch 2008 it uses a 'virtual' shielding depth to calculate the updated scaling factors More... | |
void | print_F_values_to_screen (vector< bool > nuclides_for_scaling) |
Prints F calues to screen for bug checking. More... | |
void | print_parameters_to_screen (vector< bool > nuclides_for_scaling) |
Prints parameters to screen for bug checking. More... | |
void | update_10Be_decay (double new_decay) |
this changes the 10Be decay. It is here because 10Be decay rates reported in the literature have changed More... | |
void | update_10Be_P0 (double new_P0) |
this changes the 10Be P0 value. It is here because 10Be decay rates reported in the literature have changed More... | |
double | NCEPatm_2 (double site_lat, double site_lon, double site_elev) |
This calcualtes the atmospheric pressure given latidude, longitude and elevation. More... | |
double | get_spallation_attenuation_length (bool use_CRONUS) |
This gets the attenuation depth in g/cm^2 You tell it if you want the CRONUS values. More... | |
vector< double > | get_decay_coefficients (bool use_CRONUS) |
This gets the decay coefficnets for both 10Be and 26Al You tell it if you want the CRONUS values. More... | |
void | get_CRONUS_P_mu_vectors (double pressure, double sample_effective_depth, vector< double > &z_mu, vector< double > &P_mu_z_10Be, vector< double > &P_mu_z_26Al) |
This function calculates the CRONUS version of the mu production vector. More... | |
void | integrate_muon_flux_for_erosion (double E, vector< double > z_mu, vector< double > P_mu_10Be, vector< double > P_mu_26Al, double &Be10_mu_N, double &Al26_mu_N) |
subroutine for integrating the muon flux for a given erosion rate uses simplsons rule, keeps refining nodes until a tolerance is reached. Note this is a little different from the CRONUS calculator since CRONUS uses trapezoid rule and this uses Simpson's rule so this function is a little bit more accurate. More... | |
void | integrate_nonTD_spallation_flux_for_erosion (double E, double thick_SF, double P_sp_10Be, double P_sp_26Al, double &Be10_sp_N, double &Al26_sp_N) |
this function calculates the total atoms from spallation for a given erosion rate that replicates the CRONUS calculator More... | |
vector< double > | CRONUS_get_muon_uncertainty_params (double pressure) |
THis gets parameters for uncertainty analysis for muogenic production. It is part of the CRONUS calculator replication. More... | |
vector< double > | CRONUS_get_uncert_production_ratios (string scaling_name) |
Gets the uncertanty of spallation and muon production as a ratio of the total production used in error propagation for the CRONUS calculator. More... | |
void | print_parameters_to_file (string fname, string muon_scaling) |
this Prints the parameters to a file that is used for testing and reconstruction of results More... | |
void | Print_10Beproduction_csv (string filename, string path_to_atmospheric_data) |
this Prints the prodcution rates for muons for various schemes to a csv file The parameter file contains a column for effective depth, and then columns for the production of muons from different production schemes More... | |
Friends | |
class | LSDCRNParticle |
This is a friend class so that it can be called from the particle. | |
This class contains parameters used in cosmogenic nuclide calculations It sits seperately from the particle object since it applies to an entire environment and not just an individual particle. Seperating the object in this way reduces memory redundancy.
vector< double > LSDCRNParameters::calculate_muon_production_CRONUS | ( | double | z, |
double | h | ||
) |
This function wraps the CRONUS muon production function It returns a vector with elements Muon_production[0] = 10Be fast Muon_production[1] = 26Al fast Muon_production[2] = 10Be neg Muon_production[3] = 26Al neg.
z | depth below the surface z (g/cm2) |
h | atmospheric pressure (hPa) |
vector< double > LSDCRNParameters::CRONUS_get_muon_uncertainty_params | ( | double | pressure | ) |
THis gets parameters for uncertainty analysis for muogenic production. It is part of the CRONUS calculator replication.
pressure | the atmospheric pressure in HPa |
vector< double > LSDCRNParameters::CRONUS_get_uncert_production_ratios | ( | string | scaling_name | ) |
Gets the uncertanty of spallation and muon production as a ratio of the total production used in error propagation for the CRONUS calculator.
scaling_name | a string containing the scaling scheme you want choices are: St for Stone scaling Li for Lifton scaling De for Deselits scaling Du for Dunai scaling Lm for Lal magnetic scaling |
void LSDCRNParameters::get_CRONUS_P_mu_vectors | ( | double | pressure, |
double | sample_effective_depth, | ||
vector< double > & | z_mu, | ||
vector< double > & | P_mu_z_10Be, | ||
vector< double > & | P_mu_z_26Al | ||
) |
This function calculates the CRONUS version of the mu production vector.
pressure | takes atmospheric pressure in HPa |
effective_depth | and the effective depth in g/cm^2 |
z_mu | a vector<double> that is replaced in the function with the muon production depths |
P_mu_z_10Be | a vector<double> that is replaced in the function with muon production at the depths in z_mu. This one for 10Be. |
P_mu_z_10Be | a vector<double> that is replaced in the function with muon production at the depths in z_mu. This one for 26Al. |
vector< double > LSDCRNParameters::get_decay_coefficients | ( | bool | use_CRONUS | ) |
This gets the decay coefficnets for both 10Be and 26Al You tell it if you want the CRONUS values.
use_CRONUS | a bool that allows you to select the CRONUS value |
double LSDCRNParameters::get_spallation_attenuation_length | ( | bool | use_CRONUS | ) |
This gets the attenuation depth in g/cm^2 You tell it if you want the CRONUS values.
use_CRONUS | a bool that allows you to select the CRONUS value |
vector< double > LSDCRNParameters::get_Stone_Pref | ( | ) |
This | function returns the stone production prescalings for 10Be and 26Al |
vector< double > LSDCRNParameters::get_uncertainty_scaling_pair | ( | int | pair | ) |
this gets difference in the fraction of spallation for different paris of muon production schemes key for pairs: 0 Braucher-Schaller 1 Braucher-Granger 2 Braucher-Neutron Only 3 Schaller-Granger 4 Schaller-Neutron Only 5 Granger-Neutron Only
pair | key for the pair (see key above) |
double LSDCRNParameters::integrate_muon_flux | ( | double | z, |
double | H, | ||
double | tolerance | ||
) |
subroutine for integrating the muon flux uses simplsons rule, keeps refining nodes until a tolerance is reached.
z | the depth of the sample in g/cm^2 |
H | the atmospheric depth in g/cm^2 |
the | tolerance; successive refined meshes must exceed this tolerance in order for the iteration to be sucessfull |
void LSDCRNParameters::integrate_muon_flux_for_erosion | ( | double | E, |
vector< double > | z_mu, | ||
vector< double > | P_mu_10Be, | ||
vector< double > | P_mu_26Al, | ||
double & | Be10_mu_N, | ||
double & | Al26_mu_N | ||
) |
subroutine for integrating the muon flux for a given erosion rate uses simplsons rule, keeps refining nodes until a tolerance is reached. Note this is a little different from the CRONUS calculator since CRONUS uses trapezoid rule and this uses Simpson's rule so this function is a little bit more accurate.
E | the target erosion rate |
z_mu | a vector of effective depths over which to integrate. comes from the get_CRONUS_P_mu_vectors |
P_mu_z_10Be | a vector<double> that is muon production at the depths in z_mu. This one for 10Be. |
P_mu_z_10Be | a vector<double> that is muon production at the depths in z_mu. This one for 26Al. |
Be10_mu_N | atoms producted of 10Be. Is replaced in the function. |
Al26_mu_N | atoms produced of 26Al. Is replaced in the function |
void LSDCRNParameters::integrate_nonTD_spallation_flux_for_erosion | ( | double | E, |
double | thick_SF, | ||
double | P_sp_10Be, | ||
double | P_sp_26Al, | ||
double & | Be10_sp_N, | ||
double & | Al26_sp_N | ||
) |
this function calculates the total atoms from spallation for a given erosion rate that replicates the CRONUS calculator
E | the erosion rate in g/cm^2/yr |
thick_SF | the thickness scaling factor (between 0 and 1) |
P_sp_10Be | The production rate of 10Be. Includes shielding corrections |
P_sp_26Al | The production rate of 26Al. Includes shielding corrections |
Be10_sp_N | The number of atoms from spallation of Be10 replaced within this function |
Al26_sp_N | The number of atoms from spallation of Al26 replaced within this function |
void LSDCRNParameters::load_parameters_for_atmospheric_scaling | ( | string | path_to_params | ) |
function for loading parameters that allow pressure calculation from elevation
double LSDCRNParameters::LZ | ( | double | z | ) |
this subfunction returns the effective atmospheric attenuation length for muons of range Z Original by Greg Balco as part of the CRONUS calculator
z | is the depth in g/cm^2 |
double LSDCRNParameters::NCEPatm_2 | ( | double | site_lat, |
double | site_lon, | ||
double | site_elev | ||
) |
This calcualtes the atmospheric pressure given latidude, longitude and elevation.
site_lat: latitude (DD). Southern hemisphere is negative.
Looks up surface pressure and 1000 mb temp from NCEP reanalysis and calculates site atmospheric pressures using these as inputs to the standard atmosphere equation. Also: This function is OK but not great for Antarctica. Use antatm.m instead. Remember: it is always better to estimate the average pressure at your site using a pressure-altitude relation obtained from nearby station data.
Original m code Written by Greg Balco – UW Cosmogenic Nuclide Lab
site_lat | latitude (DD). Southern hemisphere is negative. |
site_lon | longitude (DD). Western hemisphere is negative. Tries to deal with 0-360 longitudes gracefully. |
site_elv | elevation (m). |
void LSDCRNParameters::P_mu_total | ( | double | z, |
double | h | ||
) |
calculates the production rate of Al-26 or Be-10 by muons This uses the scheme in Heisinger and others (2002, 2 papers). The vertically traveling muon flux is scaled to the site elevation using energy-dependent attenuation lengths from Boezio et al. (2000). See the hard-copy documentation for detailed citations and a full discussion of the calculation. Note that some constants are internal to the function. The only ones that get passed from upstream are the ones that a) are nuclide-specific, or b) actually have quoted uncertainties in Heisinger's papers. The fraction of muons that are negative is internal; so is the energy-dependence exponent alpha. Original Written by Greg Balco – UW Cosmogenic Nuclide Lab balcs March, 2006 Part of the CRONUS-Earth online calculators: @u.w ashin gton .eduhttp://hess.ess.washington.edu/math
z | depth below the surface z (g/cm2) |
h | atmospheric pressure (hPa) |
void LSDCRNParameters::P_mu_total_return_nuclides | ( | double | z, |
double | h, | ||
double & | Be10_total_mu, | ||
double & | Al26_total_mu | ||
) |
A wrapper for the P_mu_total function that replaces total production for 10Be and 26Al due to muons.
z | depth below the surface z (g/cm2) |
h | atmospheric pressure (hPa) |
Be10_total_mu | the total muon production for 10Be. This is replaced by the function. |
26Al_total_mu | the total muon production for 26Al. This is replaced by the function. |
void LSDCRNParameters::Print_10Beproduction_csv | ( | string | filename, |
string | path_to_atmospheric_data | ||
) |
this Prints the prodcution rates for muons for various schemes to a csv file The parameter file contains a column for effective depth, and then columns for the production of muons from different production schemes
fname | the filename with full file path |
path_to_atmospheric_data | the path to the folder containing atmospheric data |
void LSDCRNParameters::print_F_values_to_screen | ( | vector< bool > | nuclides_for_scaling | ) |
Prints F calues to screen for bug checking.
nuclides_for_scaling | this is a vector of bool telling the code which nuclides to calculate. The values are: nuclides_for_scaling[0] = true: calculate 10Be nuclides_for_scaling[1] = true: calculate 26Al nuclides_for_scaling[2] = true: calculate 36Cl nuclides_for_scaling[3] = true: calculate 14C |
void LSDCRNParameters::print_parameters_to_file | ( | string | fname, |
string | muon_scaling | ||
) |
this Prints the parameters to a file that is used for testing and reconstruction of results
fname | the filename with full file path |
muon_scaling | the scaling scheme, either Granger, Schaller or Braucher the default is Braucher |
void LSDCRNParameters::print_parameters_to_screen | ( | vector< bool > | nuclides_for_scaling | ) |
Prints parameters to screen for bug checking.
nuclides_for_scaling | this is a vector of bool telling the code which nuclides to calculate. The values are: nuclides_for_scaling[0] = true: calculate 10Be nuclides_for_scaling[1] = true: calculate 26Al nuclides_for_scaling[2] = true: calculate 36Cl nuclides_for_scaling[3] = true: calculate 14C |
double LSDCRNParameters::Rv0 | ( | double | z | ) |
this subfunction returns the stopping rate of vertically traveling muons as a function of depth z at sea level and high latitude. Modified from Greg Balco's CRONUS calculator
z | is the depth below the surface in g/cm^2 |
void LSDCRNParameters::scale_F_values | ( | double | single_scaling | ) |
this function takes a single scaling factor for elevation scaling, self shielding, snow shielding, and latitude scaling and produces scaling factors for each production mechamism. the scaling follows the approach of vermeesch 2008 it uses a 'virtual' shielding depth to calculate the updated scaling factors
single_scaling | a lumped scaling factor |
void LSDCRNParameters::scale_F_values | ( | double | single_scaling, |
vector< bool > | nuclides_for_scaling | ||
) |
this function takes a single scaling factor for elevation scaling, self shielding, snow shielding, and latitude scaling and produces scaling factors for each production mechamism. the scaling follows the approach of vermeesch 2008 it uses a 'virtual' shielding depth to calculate the updated scaling factors
single_scaling | a lumped scaling factor |
nuclides_for_scaling | this is a vector of bool telling the code which nuclides to calculate. The values are: nuclides_for_scaling[0] = true: calculate 10Be nuclides_for_scaling[1] = true: calculate 26Al nuclides_for_scaling[2] = true: calculate 36Cl nuclides_for_scaling[3] = true: calculate 14C |
void LSDCRNParameters::set_Braucher_parameters | ( | ) |
This resets the F, Gamma and P0 values so that they conform to Braucher et al (2009) scaling. Adopted from from Vermeesh 2007, From version 2.0 of cosmocalc.
void LSDCRNParameters::set_CRONUS_data_maps | ( | ) |
This function sets a numer of parameters that are used to replicate the CRONUS calculator.
the original parameters are derived from the make_al_be_consts_v22 Written by Greg Balco – Berkeley Geochronology Center balcs – @u.w ashin gton .edubalcs February, 2008 Part of the CRONUS-Earth online calculators: @bgc .orghttp://hess.ess.washington.edu/math
void LSDCRNParameters::set_CRONUS_stone_parameters | ( | ) |
this resets the production and decay coefficients of 10Be and 26Al to mimic the parameters for stone scaling in CRONUS calculator IMPORTANT the F and Gamma numbers are not changed so you will need to set granger or schaller parameters beforehand. ALSO this is no longer necessary due to changes in Vermeesch's reported values which now correspond to the CRONUS values
void LSDCRNParameters::set_Granger_parameters | ( | ) |
This resets the F, Gamma and P0 values so that they conform to Granger and Smith 2000 scaling. Adopted from from Vermeesh 2007.
void LSDCRNParameters::set_Neutron_only_parameters | ( | ) |
This sets the F values to use neutron only production.
F0 == 1, all other F values == 0
void LSDCRNParameters::set_neutron_scaling | ( | double | scaling, |
double | topo_shield, | ||
double | snow_shield | ||
) |
This sets the internal scaling for the particle. It includes topographic shielding, snow shielding and scaling from latitude and other factors. It is for use with neutron only calculations.
scaling | the lat-magnetic scaling |
topo_shield | the topograpgic shielding |
snow_shield | shielding from snow |
void LSDCRNParameters::set_newCRONUS_parameters | ( | ) |
This resets the F, Gamma and P0 values For 10Be, these correspond to new production curves provided by Shasta Marerro.
Braucher et al (2009) scaling. Adopted from from Vermeesh 2007, From version 2.0 of cosmocalc
vector< double > LSDCRNParameters::set_P0_CRONUS_uncertainty_minus | ( | ) |
This function resets the P0 using the error from the CRONUS calculator. It allows one to test the uncertainty in the calculated erosion rates. this version adds to the production.
vector< double > LSDCRNParameters::set_P0_CRONUS_uncertainty_plus | ( | ) |
This function resets the P0 using the error from the CRONUS calculator. It allows one to test the uncertainty in the calculated erosion rates. this version adds to the production.
void LSDCRNParameters::set_scaling | ( | double | scaling, |
double | topo_shield, | ||
double | snow_shield | ||
) |
This sets the internal scaling for the particle. It includes topographic shielding, snow shielding and scaling from latitude and other factors.
scaling | the lat-magnetic scaling |
topo_shield | the topograpgic shielding |
snow_shield | shielding from snow |
void LSDCRNParameters::set_Schaller_parameters | ( | ) |
This resets the F, Gamma and P0 values so that they conform to Schaller (2009) scaling. Adopted from from Vermeesh 2007.
double LSDCRNParameters::stone2000sp | ( | double | lat, |
double | P, | ||
double | Fsp | ||
) |
This gets the Lifton Scaling Modified from Greg Balco's code: http://hess.ess.washington.edu/math.
latitude | in decimal degrees |
pressure | in hPa |
fsp | is the fraction (between 0 and 1) of production at sea level and high latitude due to spallation (as opposed to muons). This argument is optional and defaults to 0.978, which is the value used by Stone (2000) for Be-10. The corresponding value for Al-26 is 0.974. Note that using 0.844 for Be-10 and 0.826 for Al-26 will closely reproduce the Lal, 1991 scaling factors as long as the standard atmosphere is used to convert sample elevation to atmospheric pressure. Also note that this function will yield the scaling factor for spallation only when fsp=1, and that for muons only when fsp=0. |
|
inline |
this changes the 10Be decay. It is here because 10Be decay rates reported in the literature have changed
|
inline |
this changes the 10Be P0 value. It is here because 10Be decay rates reported in the literature have changed