def calc_P(elev, seaLevelPressure=101325):
    """
    Compute surface pressure at a particular altitude given a sea level pressure

    elev: meters
    seaLevelPressure: pa
    """
    g = 9.80665
    T0 = 288.15
    L = -0.0065
    M = 0.0289644
    R = 8.3144598
    value = seaLevelPressure * (T0 / (T0 + L * elev)) ** (g * M / (R * L))
    return value
