Example #1
0
def test_get_emulsification_wind_with_wave_height2():
    wind = constant_wind(10., 0)
    water = Water()
    water.wave_height = 2.0
    w = Waves(wind, water)

    print w.get_value(start_time)

    print w.get_emulsification_wind(start_time)
    # input wave height should not have overwhelmed wind speed
    assert w.get_emulsification_wind(start_time) == 10.0
Example #2
0
def test_get_emulsification_wind_with_wave_height():
    wind = constant_wind(3., 0)
    water = Water()
    water.wave_height = 2.0
    w = Waves(wind, water)

    print w.get_value(start_time)

    print w.get_emulsification_wind(start_time)
    # input wave height should hav overwhelmed
    assert w.get_emulsification_wind(start_time) > 3.0
Example #3
0
def test_call_no_fetch_or_height():
    "fully developed seas"
    w = Waves(test_wind_5, default_water)

    H, T, Wf, De = w.get_value(start_time)

    print H, T, Wf, De

    print "Need to check reasonable numbers"
Example #4
0
def test_call_fetch():

    water = copy(default_water)
    water.fetch = 1e4  # 10km
    w = Waves(test_wind_5, water)

    H, T, Wf, De = w.get_value(start_time)

    print H, T, Wf, De

    print "Need to check reasonable numbers"
Example #5
0
def test_call_height():
    """ call with specified wave height """

    water = copy(default_water)
    water.wave_height = 1.0
    w = Waves(test_wind_5, water)

    H, T, Wf, De = w.get_value(start_time)

    print H, T, Wf, De

    assert H == 1.0
Example #6
0
def test_call_height():
    """ call with specified wave height """

    water = copy(default_water)
    water.wave_height = 1.0
    w = Waves(test_wind_5, water)

    H, T, Wf, De = w.get_value(None, start_time)

    print H, T, Wf, De

    assert H == .707	# returns root mean square wave height