示例#1
0
def test_whitecap_fraction(U):
    """
    Fraction whitcapping -- doesn't really check values
    but should catch gross errors!
    """
    w = Waves(test_wind_5, default_water)

    print "testing for U:", U

    f = w.comp_whitecap_fraction(U)

    assert f >= 0.0
    assert f <= 1.0

    if U == 4.0:
        # assert round(f, 8) == round(0.05 / 3.85, 8)
        assert round(f, 8) == round(0.05 / 3.85 / 2, 8)  # included the .5 factor from ADIOS2
示例#2
0
def test_whitecap_fraction(U):
    """
    Fraction whitcapping -- doesn't really check values
    but should catch gross errors!
    """
    w = Waves(test_wind_5, default_water)

    print "testing for U:", U

    f = w.comp_whitecap_fraction(U)

    assert f >= 0.0
    assert f <= 1.0

    if U == 4.0:
        #assert round(f, 8) == round(0.05 / 3.85, 8)
        assert round(f, 8) == round(0.05 / 3.85 / 2,
                                    8)  # included the .5 factor from ADIOS2