Public Member Functions | |
LSDCosmoData () | |
the default constructor. This doesn't do anything. | |
LSDCosmoData (string path, string file_prefix) | |
This constructor requires a filename The file format is: sample_name nuclide latitude longitude concentration uncertainty standard the sample name cannot have a space the nuclide name must be Be10 or Al26 lat and long are in decimal degrees concetration is in atoms per gram uncertainty is the AMS error in atoms per gram standard is the laboratory standardisation. The options can be found in the code of this function; the numbers come from Balco et al's (2009) CRONUS calculator. More... | |
void | initiate_default_parameters () |
This initiates some default parameters These parameters will be overwritten by any parameters supplied by the parameter file. More... | |
void | load_cosmogenic_data (string filename, string filetype) |
THis function loads the crn data rom either a csv or text file. More... | |
void | load_DEM_and_shielding_filenames_csv (string filename) |
This function load a csv file containing names of DEMs and (possibly) sheilding rasters or shielding parameters The file should have one DEM name per row. Each row can have between 1 and 4 elements. The elements are: [0] = DEM_filename [1] = Snow_shield_raster_name OR const_snow_shield in g/cm^2 [2] = Self_shield_raster_name OR const_self_shield in g/cm^2 [3] = Toposhield_raster_name If elements are missing, they are considered null arguments. More... | |
void | load_parameters (string filename) |
This loads parameters for the comsogenic calculations it uses the parse_files frinction in LSDStatsTools, so the format is the paramterer name, followed by ":", followed by a space and then the parameter value. More... | |
void | load_soil_info (string filename) |
This loads information about any soil samples The file contains several columns: sampleID,sample_top_depth,sample_bottom_depth,density The file prefix needs to be the same as the other files, and should have the extension _CRNSoilInfo.csv The top depths and sample thicknesses need to be in cm The densities need to be in kg/m^3. More... | |
void | check_files (string crn_fname, string Rasters_fname, string parameters_fname, string soil_fname) |
This checks on the filenames to see if the files exist. More... | |
vector< string > | get_DEM_fnames () |
this gets the names of the DEMs to be used in the analysis only returns the DEM, not snow shielding, topo shielding, etc rasters More... | |
vector< string > | get_Snow_fnames () |
this gets the names of the snow shielding rasters More... | |
vector< string > | get_Self_fnames () |
this gets the names of the self shielding rasters More... | |
void | check_parameter_values () |
This function checks to make sure parameter values are valid for the cosmo data. More... | |
void | check_rasters () |
this function checks the existence and georeferencing of the rasters outlined in the file list More... | |
vector< string > | spawn_clipped_basins (string DEM_fname, int basin_padding_px) |
void | BasinSpawnerMaster (string path, string prefix, int padding_pixels) |
This dirves the spawning of basins. More... | |
void | RunShielding (string path, string prefix) |
This calculates topographic shielding for basins listed in the _CRNRasters.csv file Shielding rasters are printed to the same folder as the DEM. More... | |
LSDRaster | calculate_production_raster (LSDRaster &Elevation_Data, string path_to_atmospheric_data) |
This function calculates and then returns a production raster. More... | |
void | convert_to_UTM (int UTM_zone) |
this function calculates the UTM coordinates of all the sample points for a given UTM zone. More... | |
void | convert_to_UTM (LSDRaster &Raster) |
this function calculates the UTM coordinates of all the sample points for a given UTM zone. It determines the UTM zone from a raster More... | |
void | basic_cosmogenic_analysis (string DEM_prefix) |
This function calculates the CRN erosion rate from the data stored within the data elements of the object This analysis does not calculate snow shielding or landsliding. More... | |
void | full_shielding_cosmogenic_analysis (vector< string > Raster_names, vector< double > CRN_params) |
This function computes erosion rates and uncertainties for a given DEM. It is wrapped by a function that goes through the list of DEM, providing this function with the raster names and the parameters for the model run. More... | |
void | full_shielding_cosmogenic_analysis_nested (vector< string > Raster_names, vector< double > CRN_params, LSDRaster &known_eff_erosion) |
This function computes erosion rates and uncertainties for a given DEM. It is wrapped by a function that goes through the list of DEM, providing this function with the raster names and the parameters for the model run . This version can take a raster with known erosion rates that can be used for nesting of basins. More... | |
void | full_shielding_cosmogenic_analysis_for_spawned (vector< string > Raster_names, vector< double > CRN_params) |
This function computes erosion rates and uncertainties for a given DEM. It is wrapped by a function that goes through the list of DEM, providing this function with the raster names and the parameters for the model run. This version is for spawned rasters Because this is spawned, each raster only corresponds to one sample, which the function finds from the sample name corresponding to the last string in the raster name after the _ character. More... | |
void | Soil_sample_calculator (vector< string > Raster_names, vector< double > CRN_params) |
This function computes erosion rates and uncertainties for a given det of soil data,. More... | |
vector< double > | full_CRN_erosion_analysis_point (double Nuclide_conc, string Nuclide, double Nuclide_conc_err, double prod_uncert_factor, string Muon_scaling, double snow_eff_depth, double self_eff_depth, double topo_shield, double production) |
This function wraps the erosion rate calculator, and returns both the erosion rate as well as the uncertainties. More... | |
double | predict_CRN_erosion_point (double Nuclide_conc, string Nuclide, double prod_uncert_factor, string Muon_scaling, double &production_uncertainty, double &average_production, bool is_production_uncertainty_plus_on, bool is_production_uncertainty_minus_on, double snow_eff_depth, double self_eff_depth, double topo_shield, double production) |
this uses Newton Raphson iteration to retrieve the erosion rate from a basin given a nuclide concentration More... | |
double | predict_mean_CRN_conc_point (double eff_erosion_rate, string Nuclide, double prod_uncert_factor, string Muon_scaling, double &production_uncertainty, bool is_production_uncertainty_plus_on, bool is_production_uncertainty_minus_on, double snow_eff_depth, double self_eff_depth, double topo_shield, double production) |
this predicts the mean concentration of a nuclide for a point location. It does a full analyitical solution to account for snow and self sheilding More... | |
void | calculate_erosion_rates (int method_flag) |
This function wraps the cosmogenic rate calculators. Looks throught the vecvecs listing file locations and then finds valid CRN data, and runs the erosion rate routine for these data. More... | |
void | calculate_nested_erosion_rates () |
This function wraps the cosmogenic rate calculators. THis one is used with nested basins. Looks throught the vecvecs listing file locations and then finds valid CRN data, and runs the erosion rate routine for these data. It assumes that any known erosion rates will have the same name as the base DEM with the extension _ERKnown. More... | |
void | full_shielding_raster_printer (vector< string > Raster_names, vector< double > CRN_params) |
This function prints sevear rasters to file: 1) Pixel-by-pixel production scaling 2) Pixel-by-pixel combined scaling (production plus combined shielding) 3) Pixel-by-pixel combined shielding 4) The cosmo concetration coming from each pixel at the proscribed erosion rate. More... | |
void | point_measurements (vector< int > valid_samples, vector< double > snow_thickness, vector< double > self_thickness, vector< double > toposhield, vector< double > production_scaling, string muon_scaling) |
This function uses the COSMOCALC functions of LSDParticles to calculate the erosion rates from point measurements using pre-calculated vectors of shielding and scaling data. More... | |
void | full_shielding_CRN_concentration_predictor (vector< string > Raster_names, vector< double > CRN_params, LSDRaster &known_eff_erosion) |
This function calculates the concentration of a CRN (either 10Be or 26Al) given an erosion rate supplied by and erosion rate raster (in g/cm^2/yr) More... | |
void | print_data_to_screen () |
this function prints the data held in the the data members to screen. Is used for bug checking. Note the function does not print the standardised values, only raw values. More... | |
void | print_renamed_cosmo_data (string path, string prefix) |
This prints the cosmo data to a new file. More... | |
void | print_renamed_parameter_data (string path, string prefix) |
This prints the parameter data to a new file. More... | |
void | print_file_structures_to_screen () |
this prints the file structure data to screen it is a list of the DEMs, snow shielding rasters, self shelding rasters and topo shielding rasters used in the analysis the later three rasters can be NULL values, and the snow and self shielding rasters can be replaced by single values More... | |
void | print_all_data_parameters_and_filestructures (string outfilename) |
this prints all the data, parameters and file structures to screen It is used to keep a record of CRN erosion rate computations so analyses can be reproduced More... | |
void | print_simple_results_to_screen (double rho) |
Prints the simple results to the screen The 'simple' is because it only looks at external, muon, and production uncertainties. More... | |
void | print_results () |
This prints the results to a csv file and to a file for passing to CRONUS The columns in the CSV file are: sample_name nuclide latitude longitude concentration (atms/g) concentration_uncert (atoms/g) erosion rate g_percm2_peryr erosion rate AMS_uncert g_percm2_peryr muon_uncert g_percm2_peryr production_uncert g_percm2_peryr total_uncert g_percm2_peryr AvgProdScaling dimensionless AverageTopoShielding dimensionless AverageSelfShielding dimensionless AverageSnowShielding dimensionless AverageCombinedScaling dimensionless (this is averaged production scaling times toposhielding) outlet_latitude OutletPressure hPa OutletEffPressure hPa (pressure needed to get basin averaged production scaling) centroid_latitude CentroidPressure hPa CentroidEffPressure (pressure needed to get basin averaged production scaling) ErosionRate_in_cmperkyr (to check against cosmocalc, assumes 2650 kg/m^2) ErosionRate_COSMOCALC_in_g_percm2_peryr (assumes 2650 kg/m^2): The erosion rate you would get if you took production weighted scaling and used cosmocalc. ErosionRate_COSMOCALC_cmperkyr (assumes 2650 kg/m^2): The erosion rate you would get if you took production weighted scaling and used cosmocalc. More... | |
void | print_rasters () |
This function prints several rasters to file: 1) Pixel-by-pixel production scaling 2) Pixel-by-pixel combined scaling (production plus combined shielding) 3) Pixel-by-pixel combined shielding 4) The cosmo concetration coming from each pixel at the proscribed erosion rate. More... | |
void | print_scaling_and_shielding_complete_rasters () |
This prints scaling, shielding production and other rasters for entire DEMs. It only prints topo, snow and self shielding if those rasters exists. That is, it does not calculate toposhielding automatically. The printed rasters are: extension _PRES the atmospheric pressure in hPa, determined from the NCEP atmospheric pressure compilation following Balco et al 2008 extension _PROD the production scaling, based on stone/lal extension _CSHIELD the combined sheilding, that is the combination of snow, self and topographic shielding. Snow and self shielding are approximated with spallation only production extension _CSCALE the product of the combined shielding and production for each pixel. More... | |
void | print_basins_to_for_checking () |
This prints the basins to a raster, along with the stream order raster so that users can check if their basins are in the correct place THis prints out a raster for each raster supplied in the CRNRaster data file that contains the basins, a file with a key to the basins, and a stream order raster to help in refining the location of the data. More... | |
Protected Attributes | |
int | N_samples |
the number of samples | |
string | path |
the path to the cosmo data. Also used to print results | |
string | param_name |
the prefix of the parameter files | |
vector< string > | sample_name |
A vector of the sample names. | |
vector< int > | soil_sample_index |
A vector with the indices into the valid samples that have soil data. | |
vector< int > | has_soil_data_index |
vector< double > | soil_top_effective_depth |
vector< double > | soil_effective_thickness |
vector< double > | latitude |
a vector holding the latitude of the samples | |
vector< double > | longitude |
a vector holding the longitude of the samples | |
vector< double > | UTM_easting |
a vector holding the UTM of the samples | |
vector< double > | UTM_northing |
a vector holding the UTM northing of the samples | |
vector< string > | nuclide |
the nuclide. Only options are Be10 and 26Al. | |
vector< string > | standardisation |
a string holding the standardisation | |
vector< double > | Concentration |
a vector holding the concetration, in atoms per gram, of the sample | |
vector< double > | Concentration_uncertainty |
a vector holding the AMS uncertainty of the sample, in atoms per gram | |
vector< double > | Concentration_unstandardised |
vector< double > | Concentration_uncertainty_unstandardised |
vector< vector< double > > | erosion_rate_results |
a vector of vectors holding the results of the cosmogenic analysis | |
map< string, double > | standards_Be10 |
a standardisation map for Be10 | |
map< string, double > | standards_Al26 |
a standardisation map for Al26 | |
vector< vector< string > > | DEM_names_vecvec |
vector< vector< double > > | snow_self_topo_shielding_params |
float | min_slope |
The minimum slope for the fill function. | |
int | source_threshold |
The number of pixels for a channel. | |
int | search_radius_nodes |
The number of pixels over which to search for a channel. | |
int | threshold_stream_order |
The minimum stream order to be considered a channel for cosmo sampling. | |
int | theta_step |
The azimuth step for topographic shielding calculations. | |
int | phi_step |
The inclination step for topographic sheilding calculations. | |
double | prod_uncert_factor |
string | Muon_scaling |
The muon production scaling. Options are "Braucher", "Granger" and "Schaller". | |
string | path_to_atmospheric_data |
vector< string > | boundary_conditions |
The boundary conditions for the flow info object. | |
bool | write_TopoShield_raster |
Write toposheild rasters if they don't exist. | |
bool | write_basin_index_raster |
Write a LSDIndexRaster with the basins. | |
bool | write_full_scaling_rasters |
Write the shielding and scaling rasters. | |
map< string, map< int, double > > | MapOfProdAndScaling |
vector< double > | MBS |
The Basin Relief. | |
|
inline |
This constructor requires a filename The file format is: sample_name nuclide latitude longitude concentration uncertainty standard the sample name cannot have a space the nuclide name must be Be10 or Al26 lat and long are in decimal degrees concetration is in atoms per gram uncertainty is the AMS error in atoms per gram standard is the laboratory standardisation. The options can be found in the code of this function; the numbers come from Balco et al's (2009) CRONUS calculator.
filename | the string of the file within which the cosmo data is stored. This INCLUDES PATH AND EXTENSION. |
ftype | the type of file, options are csv and txt. If not one of these options the code assumes txt |
void LSDCosmoData::basic_cosmogenic_analysis | ( | string | DEM_prefix | ) |
This function calculates the CRN erosion rate from the data stored within the data elements of the object This analysis does not calculate snow shielding or landsliding.
DEM_prefix | a string holding the prefix of the DEM (without the bil) NOTE the DEM must be in bil format. |
void LSDCosmoData::BasinSpawnerMaster | ( | string | path, |
string | prefix, | ||
int | padding_pixels | ||
) |
This dirves the spawning of basins.
path | This is a string containing the path to the data files (needs / at the end) |
prefix | the prefix of the data files |
padding_pixels | the number of pixels with which to pad the basins |
void LSDCosmoData::calculate_erosion_rates | ( | int | method_flag | ) |
This function wraps the cosmogenic rate calculators. Looks throught the vecvecs listing file locations and then finds valid CRN data, and runs the erosion rate routine for these data.
method_flag | an int that sets the method default: use snow and self shielding method_flag == 0, basic analysis (snow and self set to 0, calculate toposhield) method_flag == 1, snow and self sheilding, can load toposhield if provided |
void LSDCosmoData::calculate_nested_erosion_rates | ( | ) |
This function wraps the cosmogenic rate calculators. THis one is used with nested basins. Looks throught the vecvecs listing file locations and then finds valid CRN data, and runs the erosion rate routine for these data. It assumes that any known erosion rates will have the same name as the base DEM with the extension _ERKnown.
LSDRaster LSDCosmoData::calculate_production_raster | ( | LSDRaster & | Elevation_Data, |
string | path_to_atmospheric_data | ||
) |
This function calculates and then returns a production raster.
Elevation_data | a raster holding the elevations |
path_to_atmospheric_data | a string that holds the path of the atmospheric data |
void LSDCosmoData::check_files | ( | string | crn_fname, |
string | Rasters_fname, | ||
string | parameters_fname, | ||
string | soil_fname | ||
) |
This checks on the filenames to see if the files exist.
crn_fname | a string with the name (including path) of the CRN file |
Rasters_fname | a string with the name (including path) of the Rasters file |
parameters_fname | a string with the name (including path) of the parameters file |
soil_fname | a string with the name (including path) of the soil file |
void LSDCosmoData::check_parameter_values | ( | ) |
This function checks to make sure parameter values are valid for the cosmo data.
void LSDCosmoData::check_rasters | ( | ) |
this function checks the existence and georeferencing of the rasters outlined in the file list
void LSDCosmoData::convert_to_UTM | ( | int | UTM_zone | ) |
this function calculates the UTM coordinates of all the sample points for a given UTM zone.
UTM_zone | the UTM zone |
void LSDCosmoData::convert_to_UTM | ( | LSDRaster & | Raster | ) |
this function calculates the UTM coordinates of all the sample points for a given UTM zone. It determines the UTM zone from a raster
Raster | the LSDRaster from which the UTM zone is determined |
vector< double > LSDCosmoData::full_CRN_erosion_analysis_point | ( | double | Nuclide_conc, |
string | Nuclide, | ||
double | Nuclide_conc_err, | ||
double | prod_uncert_factor, | ||
string | Muon_scaling, | ||
double | snow_eff_depth, | ||
double | self_eff_depth, | ||
double | topo_shield, | ||
double | production | ||
) |
This function wraps the erosion rate calculator, and returns both the erosion rate as well as the uncertainties.
Nuclide_conc | Concetration of the nuclide |
Nuclide | a string denoting the name of the nuclide (at the moment options are 10Be and 26Al) |
Nuclide_conc_err | The instrument error in the nuclide concentration |
prod_uncert_fracton | This is a fraction of the total uncertainty for the production rates. It is a lumped parameter that can be used for just production, or for snow, topo and porduction uncertainty |
Muon_scaling | string that gives the muon scaling scheme options are Schaller, Granger and Braucher |
snow_eff_depth | the effective depth (in g/cm^2) of snow |
self_eff_depth | the effective depth (in g/cm^2) of self shielding |
topo_shield | the topographic shielding at this point |
production | the production rate of the nuclude at this point |
void LSDCosmoData::full_shielding_cosmogenic_analysis | ( | vector< string > | Raster_names, |
vector< double > | CRN_params | ||
) |
This function computes erosion rates and uncertainties for a given DEM. It is wrapped by a function that goes through the list of DEM, providing this function with the raster names and the parameters for the model run.
Raster_names | a vector of strings with 4 elements: [0] = DEM_filename [1] = Snow_shield_raster_name OR const_snow_shield in g/cm^2 [2] = Self_shield_raster_name OR const_self_shield in g/cm^2 [3] = Toposhield_raster_name It there is no DEM then this is set to "NULL" |
CRN_params | this contains the single shielding depths for snow and self shielding if the rasters are not supplied. |
void LSDCosmoData::full_shielding_cosmogenic_analysis_for_spawned | ( | vector< string > | Raster_names, |
vector< double > | CRN_params | ||
) |
This function computes erosion rates and uncertainties for a given DEM. It is wrapped by a function that goes through the list of DEM, providing this function with the raster names and the parameters for the model run. This version is for spawned rasters Because this is spawned, each raster only corresponds to one sample, which the function finds from the sample name corresponding to the last string in the raster name after the _
character.
Raster_names | a vector of strings with 4 elements: [0] = DEM_filename [1] = Snow_shield_raster_name OR const_snow_shield in g/cm^2 [2] = Self_shield_raster_name OR const_self_shield in g/cm^2 [3] = Toposhield_raster_name It there is no DEM then this is set to "NULL" |
CRN_params | this contains the single shielding depths for snow and self shielding if the rasters are not supplied. |
void LSDCosmoData::full_shielding_cosmogenic_analysis_nested | ( | vector< string > | Raster_names, |
vector< double > | CRN_params, | ||
LSDRaster & | known_eff_erosion | ||
) |
This function computes erosion rates and uncertainties for a given DEM. It is wrapped by a function that goes through the list of DEM, providing this function with the raster names and the parameters for the model run . This version can take a raster with known erosion rates that can be used for nesting of basins.
Raster_names | a vector of strings with 4 elements: [0] = DEM_filename [1] = Snow_shield_raster_name OR const_snow_shield in g/cm^2 [2] = Self_shield_raster_name OR const_self_shield in g/cm^2 [3] = Toposhield_raster_name It there is no DEM then this is set to "NULL" |
CRN_params | this contains the single shielding depths for snow and self shielding if the rasters are not supplied. |
known_eff_erosion | an LSDRaster with known erosion rates in g/cm^2/yr |
void LSDCosmoData::full_shielding_CRN_concentration_predictor | ( | vector< string > | Raster_names, |
vector< double > | CRN_params, | ||
LSDRaster & | known_eff_erosion | ||
) |
This function calculates the concentration of a CRN (either 10Be or 26Al) given an erosion rate supplied by and erosion rate raster (in g/cm^2/yr)
Raster_names | a vector of strings with 4 elements: [0] = DEM_filename [1] = Snow_shield_raster_name OR const_snow_shield in g/cm^2 [2] = Self_shield_raster_name OR const_self_shield in g/cm^2 [3] = Toposhield_raster_name It there is no DEM then this is set to "NULL" |
CRN_params | this contains the single shielding depths for snow and self shielding if the rasters are not supplied. |
known_eff_erosion | an LSDRaster with known erosion rates in g/cm^2/yr |
void LSDCosmoData::full_shielding_raster_printer | ( | vector< string > | Raster_names, |
vector< double > | CRN_params | ||
) |
This function prints sevear rasters to file: 1) Pixel-by-pixel production scaling 2) Pixel-by-pixel combined scaling (production plus combined shielding) 3) Pixel-by-pixel combined shielding 4) The cosmo concetration coming from each pixel at the proscribed erosion rate.
Raster_names | a vector containing the names of DEM, snow, self and toposhield rasters |
CRN_params | a vector of parameter values |
vector< string > LSDCosmoData::get_DEM_fnames | ( | ) |
this gets the names of the DEMs to be used in the analysis only returns the DEM, not snow shielding, topo shielding, etc rasters
vector< string > LSDCosmoData::get_Self_fnames | ( | ) |
this gets the names of the self shielding rasters
returns only snow shielding names. If name does not exist, returns NULL.
vector< string > LSDCosmoData::get_Snow_fnames | ( | ) |
this gets the names of the snow shielding rasters
returns only snow shielding names. If name does not exist, returns NULL.
void LSDCosmoData::initiate_default_parameters | ( | ) |
This initiates some default parameters These parameters will be overwritten by any parameters supplied by the parameter file.
void LSDCosmoData::load_cosmogenic_data | ( | string | filename, |
string | filetype | ||
) |
THis function loads the crn data rom either a csv or text file.
filename | the name of the file |
filetype | this is either csv or txt |
void LSDCosmoData::load_DEM_and_shielding_filenames_csv | ( | string | filename | ) |
This function load a csv file containing names of DEMs and (possibly) sheilding rasters or shielding parameters The file should have one DEM name per row. Each row can have between 1 and 4 elements. The elements are: [0] = DEM_filename [1] = Snow_shield_raster_name OR const_snow_shield in g/cm^2 [2] = Self_shield_raster_name OR const_self_shield in g/cm^2 [3] = Toposhield_raster_name If elements are missing, they are considered null arguments.
filename | the name of the csv file |
void LSDCosmoData::load_parameters | ( | string | filename | ) |
This loads parameters for the comsogenic calculations it uses the parse_files frinction in LSDStatsTools, so the format is the paramterer name, followed by ":", followed by a space and then the parameter value.
filename | a string of the full filename |
void LSDCosmoData::load_soil_info | ( | string | filename | ) |
This loads information about any soil samples The file contains several columns: sampleID,sample_top_depth,sample_bottom_depth,density The file prefix needs to be the same as the other files, and should have the extension _CRNSoilInfo.csv The top depths and sample thicknesses need to be in cm The densities need to be in kg/m^3.
filename | a string of the full filename |
void LSDCosmoData::point_measurements | ( | vector< int > | valid_samples, |
vector< double > | snow_thickness, | ||
vector< double > | self_thickness, | ||
vector< double > | toposhield, | ||
vector< double > | production_scaling, | ||
string | muon_scaling | ||
) |
This function uses the COSMOCALC functions of LSDParticles to calculate the erosion rates from point measurements using pre-calculated vectors of shielding and scaling data.
valid_samples | a vector continaing the indices into the samples you want to use |
snow_thickness | a vector of snow thickness in g/cm^2 (or any surface shielding) that is the same size as valid_samples |
self_thickness | the self thickness in g/cm^2. For soil samples this can be the thickness of the sample. Same size as valid_samples |
toposhield | a vecor with the local topographic shielding |
production_scaling | a vector with the production scaling |
muon_scaling | a string with a valid scaling scheme name |
double LSDCosmoData::predict_CRN_erosion_point | ( | double | Nuclide_conc, |
string | Nuclide, | ||
double | prod_uncert_factor, | ||
string | Muon_scaling, | ||
double & | production_uncertainty, | ||
double & | average_production, | ||
bool | is_production_uncertainty_plus_on, | ||
bool | is_production_uncertainty_minus_on, | ||
double | snow_eff_depth, | ||
double | self_eff_depth, | ||
double | topo_shield, | ||
double | production | ||
) |
this uses Newton Raphson iteration to retrieve the erosion rate from a basin given a nuclide concentration
eff_erosion | rate The erosion rate in g/cm^2/yr |
Nuclide | a string with the nuclide name. At the moment the options are: Be10 Al26 These are case sensitive |
prod_uncert_factor | production uncertainty factor is a multiplier that sets the production certainty. If it is 1.1, there is 10% production rate uncertainty, or if it is 0.9 there is -10% unvertainty. The reason why it is implemented like this is that this allows gaussian error propigation. |
Muon_scaling | a string that gives the muon scaling scheme. options are Schaller, Braucher and Granger |
production_uncertainty | this gives the uncertainty in the production rates based on the production_uncert_factor; it is used in gaussian error propigation. The parameter is replaced within the function. |
average_production | This gives the production rate average for the basin. It can be used for uncertainty analyis: if the scaling is changed the change in this production rate can be used to construct the gaussian error propigation terms |
is_production_uncertainty_plus_on | a boolean that is true if the production rate uncertainty (+) is switched on |
is_production_uncertainty_minus_on | a boolean that is true if the production rate uncertainty (-) is switched on. If the + switch is true this parameter defauts to false. |
double LSDCosmoData::predict_mean_CRN_conc_point | ( | double | eff_erosion_rate, |
string | Nuclide, | ||
double | prod_uncert_factor, | ||
string | Muon_scaling, | ||
double & | production_uncertainty, | ||
bool | is_production_uncertainty_plus_on, | ||
bool | is_production_uncertainty_minus_on, | ||
double | snow_eff_depth, | ||
double | self_eff_depth, | ||
double | topo_shield, | ||
double | production | ||
) |
this predicts the mean concentration of a nuclide for a point location. It does a full analyitical solution to account for snow and self sheilding
eff_erosion | rate The erosion rate in g/cm^2/yr |
Nuclide | a string with the nuclide name. At the moment the options are: Be10 Al26 These are case sensitive |
prod_uncert_factor | production uncertainty factor is a multiplier that sets the production certainty. If it is 1.1, there is 10% production rate uncertainty, or if it is 0.9 there is -10% unvertainty. The reason why it is implemented like this is that this allows gaussian error propigation. |
Muon_scaling | a string that gives the muon scaling scheme. options are Schaller, Braucher and Granger |
data_from_outlet_only | boolean that is true of you want concentration calculated from the outlet only. |
production_uncertainty | this gives the uncertainty in the production rates based on the production_uncert_factor; it is used in gaussian error propigation. The parameter is replaced within the function. |
is_production_uncertainty_plus_on | a boolean that is true if the production rate uncertainty (+) is switched on |
is_production_uncertainty_minus_on | a boolean that is true if the production rate uncertainty (-) is switched on. If the + switch is true this parameter defauts to false. |
snow_eff_depth | the effective depth (in g/cm^2) of snow |
self_eff_depth | the effective depth (in g/cm^2) of self shielding |
topo_shield | the topographic shielding at this point |
production | the production rate of the nuclude at this point |
void LSDCosmoData::print_all_data_parameters_and_filestructures | ( | string | outfilename | ) |
this prints all the data, parameters and file structures to screen It is used to keep a record of CRN erosion rate computations so analyses can be reproduced
outfilename | the name of the outfile including full path |
void LSDCosmoData::print_basins_to_for_checking | ( | ) |
This prints the basins to a raster, along with the stream order raster so that users can check if their basins are in the correct place THis prints out a raster for each raster supplied in the CRNRaster data file that contains the basins, a file with a key to the basins, and a stream order raster to help in refining the location of the data.
void LSDCosmoData::print_data_to_screen | ( | ) |
this function prints the data held in the the data members to screen. Is used for bug checking. Note the function does not print the standardised values, only raw values.
void LSDCosmoData::print_file_structures_to_screen | ( | ) |
this prints the file structure data to screen it is a list of the DEMs, snow shielding rasters, self shelding rasters and topo shielding rasters used in the analysis the later three rasters can be NULL values, and the snow and self shielding rasters can be replaced by single values
void LSDCosmoData::print_rasters | ( | ) |
This function prints several rasters to file: 1) Pixel-by-pixel production scaling 2) Pixel-by-pixel combined scaling (production plus combined shielding) 3) Pixel-by-pixel combined shielding 4) The cosmo concetration coming from each pixel at the proscribed erosion rate.
void LSDCosmoData::print_renamed_cosmo_data | ( | string | path, |
string | prefix | ||
) |
This prints the cosmo data to a new file.
path | is the pathname. Needs a "/" at the end |
prefix | the name of the file before _CRNData.csv |
void LSDCosmoData::print_renamed_parameter_data | ( | string | path, |
string | prefix | ||
) |
This prints the parameter data to a new file.
path | is the pathname. Needs a "/" at the end |
prefix | the name of the file before _CRNData.csv |
void LSDCosmoData::print_results | ( | ) |
This prints the results to a csv file and to a file for passing to CRONUS The columns in the CSV file are: sample_name nuclide latitude longitude concentration (atms/g) concentration_uncert (atoms/g) erosion rate g_percm2_peryr erosion rate AMS_uncert g_percm2_peryr muon_uncert g_percm2_peryr production_uncert g_percm2_peryr total_uncert g_percm2_peryr AvgProdScaling dimensionless AverageTopoShielding dimensionless AverageSelfShielding dimensionless AverageSnowShielding dimensionless AverageCombinedScaling dimensionless (this is averaged production scaling times toposhielding) outlet_latitude OutletPressure hPa OutletEffPressure hPa (pressure needed to get basin averaged production scaling) centroid_latitude CentroidPressure hPa CentroidEffPressure (pressure needed to get basin averaged production scaling) ErosionRate_in_cmperkyr (to check against cosmocalc, assumes 2650 kg/m^2) ErosionRate_COSMOCALC_in_g_percm2_peryr (assumes 2650 kg/m^2): The erosion rate you would get if you took production weighted scaling and used cosmocalc. ErosionRate_COSMOCALC_cmperkyr (assumes 2650 kg/m^2): The erosion rate you would get if you took production weighted scaling and used cosmocalc.
void LSDCosmoData::print_scaling_and_shielding_complete_rasters | ( | ) |
This prints scaling, shielding production and other rasters for entire DEMs. It only prints topo, snow and self shielding if those rasters exists. That is, it does not calculate toposhielding automatically. The printed rasters are: extension _PRES the atmospheric pressure in hPa, determined from the NCEP atmospheric pressure compilation following Balco et al 2008 extension _PROD the production scaling, based on stone/lal extension _CSHIELD the combined sheilding, that is the combination of snow, self and topographic shielding. Snow and self shielding are approximated with spallation only production extension _CSCALE the product of the combined shielding and production for each pixel.
void LSDCosmoData::print_simple_results_to_screen | ( | double | rho | ) |
Prints the simple results to the screen The 'simple' is because it only looks at external, muon, and production uncertainties.
rho | the rock denisty in kg/m^3 |
void LSDCosmoData::RunShielding | ( | string | path, |
string | prefix | ||
) |
This calculates topographic shielding for basins listed in the _CRNRasters.csv file Shielding rasters are printed to the same folder as the DEM.
path | This is a string containing the path to the data files (needs / at the end) |
prefix | the prefix of the data files |
void LSDCosmoData::Soil_sample_calculator | ( | vector< string > | Raster_names, |
vector< double > | CRN_params | ||
) |
This function computes erosion rates and uncertainties for a given det of soil data,.
Raster_names | a vector of strings with 4 elements: [0] = DEM_filename [1] = Snow_shield_raster_name OR const_snow_shield in g/cm^2 [2] = Self_shield_raster_name OR const_self_shield in g/cm^2 [3] = Toposhield_raster_name It there is no DEM then this is set to "NULL" |
CRN_params | this contains the single shielding depths for snow and self shielding if the rasters are not supplied. |
vector< string > LSDCosmoData::spawn_clipped_basins | ( | string | DEM_fname, |
int | basin_padding_px | ||
) |
This function takes a DEM and then spawns dems that are clipped to the basin boundaries, with padding to incorporate surrounding high topography and CRN samples that might lie outside the basin due to GPS errors
DEM_fname | the name of the DEM with FULL PATH but excluding extension |
basin_padding_px | the number of pixels that should be padded from the basin |
|
protected |
a vector holding the AMS uncertainty of the sample, in atoms per gram this is for data before standardisation
|
protected |
a vector holding the concetration, in atoms per gram, of the sample this is for data before standardisation
|
protected |
a string vecvec for holding the DEM names involved in the analysis elements are [0] = DEM name [1] = snow_shield raster [2] = self shield raster [3] = topo shield raster When there is no raster, this is "NULL"
|
protected |
this is an index that points from a sample to an entry in the soil vectors
|
protected |
This contains data with all sorts of scaling parameters for calculation of erosion rates using other calculators
|
protected |
the atmospheric data is in the folder with the driver_functions, but can be changed if necessary.
|
protected |
an uncertainty parameter which was superceded by the new error analyses but I have been too lazy to remove it. Does nothing
|
protected |
A vector holding the parameters for snow and self shielding if it is a single value.
|
protected |
The thickness (in g/cm^2) of a soil sample This vector is indexed into the other vectors with valid_soil_samples
|
protected |
The top depth (in soil, in g/cm^2) of a soil sample This vector is indexed into the other vectors with valid_soil_samples