示例#1
0
    def test_vmr_rh_consistency(self):
        """Check the consistency of VMR and RH calculaion.

        Converting VMR into relative humidity and back to asure that both
        functions yield consistent results.
        """
        rh = atmosphere.relative_humidity(0.025, 1013e2, 300)
        vmr = atmosphere.vmr(rh, 1013e2, 300)

        assert np.allclose(vmr, 0.025)
示例#2
0
    def test_vmr(self):
        """Test the VMR calculation."""
        vmr = atmosphere.vmr(0.75, 1013e2, 300)

        assert np.allclose(vmr, 0.0261853)