|
@@ 226-234 (lines=9) @@
|
| 223 |
|
assert_array_almost_equal(T_layer, T_truth, 5) |
| 224 |
|
|
| 225 |
|
|
| 226 |
|
def test_get_layer_with_bottom(): |
| 227 |
|
"""Tests get_layer functionality with bottom specified.""" |
| 228 |
|
p = np.arange(1000, 10, -100) * units.hPa |
| 229 |
|
T = np.linspace(25, -50, len(p)) * units.degC |
| 230 |
|
p_layer, T_layer = get_layer(p, T, bottom = 2 * units.km, depth = 3 * units.km) |
| 231 |
|
p_truth = np.array([]) |
| 232 |
|
T_truth = np.array([]) |
| 233 |
|
assert_array_almost_equal(p_layer, p_truth, 5) |
| 234 |
|
assert_array_almost_equal(T_layer, T_truth, 5) |
|
@@ 215-223 (lines=9) @@
|
| 212 |
|
assert_array_almost_equal(T_layer, T_truth, 5) |
| 213 |
|
|
| 214 |
|
|
| 215 |
|
def test_get_layer_no_interpolation(): |
| 216 |
|
"""Tests get_layer functionality with interpolation off.""" |
| 217 |
|
p = np.arange(1000, 10, -100) * units.hPa |
| 218 |
|
T = np.linspace(25, -50, len(p)) * units.degC |
| 219 |
|
p_layer, T_layer = get_layer(p, T, depth=150 * units.hPa, interpolate=False) |
| 220 |
|
p_truth = np.array([]) |
| 221 |
|
T_truth = np.array([]) |
| 222 |
|
assert_array_almost_equal(p_layer, p_truth, 5) |
| 223 |
|
assert_array_almost_equal(T_layer, T_truth, 5) |
| 224 |
|
|
| 225 |
|
|
| 226 |
|
def test_get_layer_with_bottom(): |