Esempio n. 1
0
 def test_dpres_plevel_float32_msg_99(self):
     result_dp = dpres_plevel(pressure_levels_asfloat32,
                              pressure_surface_2d_msg_asfloat32,
                              msg_py=-99)
     nt.assert_array_equal(expected_dp_psfc_2d_msg_99, result_dp.values)
Esempio n. 2
0
 def test_dpres_plevel_float32_msg_nan(self):
     result_dp = dpres_plevel(pressure_levels_asfloat32,
                              pressure_surface_2d_nan_asfloat32)
     asd = np.sum(result_dp.values != expected_dp_psfc_2d_msg_nan)
     nt.assert_array_almost_equal(expected_dp_psfc_2d_msg_nan,
                                  result_dp.values)
Esempio n. 3
0
 def test_dpres_plevel_float32(self):
     result_dp = dpres_plevel(pressure_levels_asfloat32,
                              pressure_surface_2d_asfloat32)
     nt.assert_array_equal(expected_dp_psfc_2d, result_dp.values)
Esempio n. 4
0
 def test_dpres_plevel_float32(self):
     plev_asfloat32 = pressure_levels.astype(np.float32)
     result_dp = dpres_plevel(plev_asfloat32, pressure_surface_scalar)
     nt.assert_array_equal(expected_dp_psfc_scalar, result_dp.values)
Esempio n. 5
0
 def test_dpres_plevel_float64_msg_nan(self):
     result_dp = dpres_plevel(pressure_levels, pressure_surface_2d_nan)
     nt.assert_array_equal(expected_dp_psfc_2d_msg_nan, result_dp.values)
Esempio n. 6
0
 def test_dpres_plevel_float64(self):
     result_dp = dpres_plevel(pressure_levels, pressure_surface_scalar)
     nt.assert_array_equal(expected_dp_psfc_scalar, result_dp.values)