tcheck if production rate vars are empty before using them - cosmo - front and backend for Markov-Chain Monte Carlo inversion of cosmogenic nuclide concentrations
(HTM) git clone git://src.adamsgaard.dk/cosmo
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit ad3acb3166b42f0aadb967638f8ba59b2827fce9
(DIR) parent 309bf370a7f522da7bdaa600b422d98830245296
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 1 Dec 2015 11:49:02 +0100
check if production rate vars are empty before using them
Diffstat:
M matlab/m_pakke2014maj11/gCosmoLong… | 43 ++++++++++++++++++++++++-------
1 file changed, 34 insertions(+), 9 deletions(-)
---
(DIR) diff --git a/matlab/m_pakke2014maj11/gCosmoLongsteps.m b/matlab/m_pakke2014maj11/gCosmoLongsteps.m
t@@ -105,8 +105,15 @@ c3 = 0.375;
%P10_top_spal=5.33e3; %atoms/kg/yr
%P10_top_nm=0.106e3; %atoms/kg/yr
P10_top_fm=0.093e3; %atoms/kg/yr
-P10_top_spal = fixed_stuff.be_prod_spall;
-P10_top_nm = fixed_stuff.be_prod_muons;
+
+if ~isempty(fixed_stuff.be_prod_spall) && ...
+ ~isempty(fixed_stuff.be_prod_muons)
+ P10_top_spal = fixed_stuff.be_prod_spall;
+ P10_top_nm = fixed_stuff.be_prod_muons;
+else
+ P10_top_spal=5.33e3; %atoms/kg/yr
+ P10_top_nm=0.106e3; %atoms/kg/yr
+end
%Reference values for Kasper
%P10_top_spal=5.33e3; %atoms/kg/yr
t@@ -143,8 +150,14 @@ P10_top_nm = fixed_stuff.be_prod_muons;
%P26_top_nm=0.7e3; %atoms/kg/yr
P26_top_fm=0.6e3; %atoms/kg/yr
-P26_top_spal = fixed_stuff.al_prod_spall;
-P26_top_nm = fixed_stuff.al_prod_muons;
+if ~isempty(fixed_stuff.al_prod_spall) && ...
+ ~isempty(fixed_stuff.al_prod_muons)
+ P26_top_spal = fixed_stuff.al_prod_spall;
+ P26_top_nm = fixed_stuff.al_prod_muons;
+else
+ P26_top_spal=31.1e3; %atoms/kg/yr
+ P26_top_nm=0.7e3; %atoms/kg/yr
+end
%Reference values for Kasper
%P26_top_spal=31.1e3; %atoms/kg/yr
t@@ -171,8 +184,14 @@ P26_top_nm = fixed_stuff.al_prod_muons;
%P21_top_nm=0.4e3; %atoms/kg/yr
P21_top_fm=0.35e3; %atoms/kg/yr
-P21_top_spal = fixed_stuff.ne_prod_spall;
-P21_top_nm = fixed_stuff.ne_prod_muons;
+if ~isempty(fixed_stuff.ne_prod_spall) && ...
+ ~isempty(fixed_stuff.ne_prod_muons)
+ P21_top_spal = fixed_stuff.ne_prod_spall;
+ P21_top_nm = fixed_stuff.ne_prod_muons;
+else
+ P21_top_spal=20.8e3; %atoms/kg/yr
+ P21_top_nm=0.4e3; %atoms/kg/yr
+end
% P21_spal = P21_top_spal*exp(-z*rho/Tau_spal);
% P21_nm = P21_top_nm*exp(-z*rho/Tau_nm);
t@@ -185,9 +204,15 @@ P21_top_nm = fixed_stuff.ne_prod_muons;
%P14_top_nm=2.3e3; %atoms/kg/yr
P14_top_fm=2.1e3; %atoms/kg/yr
-P14_top_spal = fixed_stuff.c_prod_spall;
-P14_top_nm = fixed_stuff.c_prod_muons;
-
+if ~isempty(fixed_stuff.c_prod_spall) && ...
+ ~isempty(fixed_stuff.c_prod_muons)
+ P14_top_spal = fixed_stuff.c_prod_spall;
+ P14_top_nm = fixed_stuff.c_prod_muons;
+else
+ P14_top_spal=14.6e3; %atoms/kg/yr
+ P14_top_nm=2.3e3; %atoms/kg/yr
+end
+
% P14_spal = P14_top_spal*exp(-z*rho/Tau_spal);
% P14_nm = P14_top_nm*exp(-z*rho/Tau_nm);
% P14_fm = P14_top_fm*exp(-z*rho/Tau_fm);