[cig-commits] [commit] inversion, master, validate_MT_params: Added warning and fixed broken line in previous commit (952f3b0)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Dec 12 18:29:13 PST 2014
Repository : https://github.com/geodynamics/burnman
On branches: inversion,master,validate_MT_params
Link : https://github.com/geodynamics/burnman/compare/80c2a295c42dfdb38f83f6c1334bf7d8f97a8463...409647ff05dfad6a686198cac1481bd46b5e2e62
>---------------------------------------------------------------
commit 952f3b0cf235e70f1780b53e6e094e8fe14cb753
Author: I <kmanunterborn at gmail.com>
Date: Fri Dec 12 16:05:46 2014 -0800
Added warning and fixed broken line in previous commit
Added depth warning for B&S81 and fixed a tab (spaces) error
>---------------------------------------------------------------
952f3b0cf235e70f1780b53e6e094e8fe14cb753
burnman/geotherm.py | 2 ++
burnman/seismic.py | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/burnman/geotherm.py b/burnman/geotherm.py
index 9e3c418..4fbc96f 100644
--- a/burnman/geotherm.py
+++ b/burnman/geotherm.py
@@ -25,6 +25,8 @@ def brown_shankland(pressure):
temperature = np.empty_like(pressure)
for i in range(len(pressure)):
depth = seismic.prem_model.depth(pressure[i])
+ if depth < min(table_brown_depth):
+ raise ValueError, "depth smaller than range Brown & Shankland, 1981"
temperature[i] = tools.lookup_and_interpolate(table_brown_depth, table_brown_temperature, depth)
return temperature
diff --git a/burnman/seismic.py b/burnman/seismic.py
index 4eacdbe..3775d6f 100644
--- a/burnman/seismic.py
+++ b/burnman/seismic.py
@@ -230,7 +230,7 @@ class SeismicRadiusTable(Seismic1DModel):
def depth(self, pressure):
if pressure > max(self.table_pressure) or pressure < min(self.table_pressure) :
raise ValueError, "Pressure outside range of PREM"
- radius = np.interp(pressure, self.table_pressure[::-1], self.table_radius[::-1] )
+ radius = np.interp(pressure, self.table_pressure[::-1], self.table_radius[::-1] )
return self.earth_radius - radius
def _lookup(self, depth, value_table):
More information about the CIG-COMMITS
mailing list