Exemple #1
0
def anderson(pressure):
    """
    Geotherm from :cite:`anderson1982earth`.

    Parameters
    ----------
    pressure : list of floats
        The list of pressures at which to evaluate the geotherm. :math:`[Pa]`

    Returns
    -------
    temperature : list of floats
        The list of temperatures for each of the pressures. :math:`[K]`
    """
    temperature = np.empty_like(pressure)
    for i in range(len(pressure)):
      depth = seismic.prem_model.depth(pressure[i])
      temperature[i] = tools.lookup_and_interpolate(table_anderson_depth, table_anderson_temperature, depth)
    return temperature
Exemple #2
0
def brown_shankland(pressure):
    """
    Geotherm from :cite:`Brown1981`. NOTE: Valid only above 270 km

    Parameters
    ----------
    pressure : list of floats
        The list of pressures at which to evaluate the geotherm. :math:`[Pa]`

    Returns
    -------
    temperature : list of floats
        The list of temperatures for each of the pressures. :math:`[K]`
    """
    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
Exemple #3
0
 def depth(self, pressure):
     radius = tools.lookup_and_interpolate(self.table_pressure[::-1], self.table_radius[::-1], pressure)
     return self.earth_radius - radius
Exemple #4
0
 def _lookup(self, depth, value_table):
     radius = self.earth_radius - depth
     return tools.lookup_and_interpolate(self.table_radius, value_table, radius)    
Exemple #5
0
 def depth(self, pressure):
     radius = tools.lookup_and_interpolate(self.table_pressure[::-1],
                                           self.table_radius[::-1],
                                           pressure)
     return self.earth_radius - radius
Exemple #6
0
 def _lookup(self, depth, value_table):
     radius = self.earth_radius - depth
     return tools.lookup_and_interpolate(self.table_radius, value_table,
                                         radius)