当前位置: 首页>>代码示例>>Python>>正文


Python Waves.compute_H方法代码示例

本文整理汇总了Python中gnome.environment.Waves.compute_H方法的典型用法代码示例。如果您正苦于以下问题:Python Waves.compute_H方法的具体用法?Python Waves.compute_H怎么用?Python Waves.compute_H使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gnome.environment.Waves的用法示例。


在下文中一共展示了Waves.compute_H方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_compute_H_fetch_huge

# 需要导入模块: from gnome.environment import Waves [as 别名]
# 或者: from gnome.environment.Waves import compute_H [as 别名]
def test_compute_H_fetch_huge():
    """
    With a huge fetch, should be same as fetch-unlimited
    """
    water = copy(default_water)
    water.fetch = 1e100  # 10km
    w = Waves(test_wind_5, water)
    H_f = w.compute_H(5)  # five m/s wind
    w.fetch = None
    H_nf = w.compute_H(5)

    assert H_f == H_nf
开发者ID:satcomlabs,项目名称:PyGnome,代码行数:14,代码来源:test_waves.py

示例2: test_compute_H

# 需要导入模块: from gnome.environment import Waves [as 别名]
# 或者: from gnome.environment.Waves import compute_H [as 别名]
def test_compute_H():
    """can it compute a wave height at all?

       fetch unlimited
    """
    w = Waves(test_wind_5, default_water)
    H = w.compute_H(5)  # five m/s wind

    print H
开发者ID:liuy0813,项目名称:PyGnome,代码行数:11,代码来源:test_waves.py

示例3: test_pseudo_wind

# 需要导入模块: from gnome.environment import Waves [as 别名]
# 或者: from gnome.environment.Waves import compute_H [as 别名]
def test_pseudo_wind(U):
    """
    should reverse the wave height computation
    at least for fetch-unlimited
    """
    w = Waves(test_wind_5, default_water)

    print "testing for U:", U
    # 0.707 compensates for RMS wave height
    assert round(w.pseudo_wind(w.compute_H(U) / 0.707), 5) == round(U, 8)
开发者ID:liuy0813,项目名称:PyGnome,代码行数:12,代码来源:test_waves.py

示例4: test_compute_H_fetch

# 需要导入模块: from gnome.environment import Waves [as 别名]
# 或者: from gnome.environment.Waves import compute_H [as 别名]
def test_compute_H_fetch():
    """can it compute a wave height at all?

       fetch limited case
    """
    water = copy(default_water)
    water.fetch = 10000  # 10km
    w = Waves(test_wind_5, water)  # 10km
    H = w.compute_H(5)  # five m/s wind

    print H
开发者ID:satcomlabs,项目名称:PyGnome,代码行数:13,代码来源:test_waves.py


注:本文中的gnome.environment.Waves.compute_H方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。