Example #1
0
    def test_iwv_multi(self):
        """Test multidimensional IWV calculation."""
        p = np.linspace(1000, 10, 10)
        T = 300 * np.ones(p.shape)
        z = np.linspace(0, 75000, 10)
        vmr = 0.1 * np.ones((5, *p.shape))

        iwv = atmosphere.iwv(vmr, p, T, z, axis=1)

        assert np.allclose(iwv, np.repeat(27.3551036, 5))
Example #2
0
    def test_iwv(self):
        """Test the IWV calculation."""
        p = np.linspace(1000, 10, 10)
        T = 300 * np.ones(p.shape)
        z = np.linspace(0, 75000, 10)
        vmr = 0.1 * np.ones(p.shape)

        iwv = atmosphere.iwv(vmr, p, T, z)

        assert np.allclose(iwv, 27.3551036)