本文整理匯總了Python中gnome.environment.Waves.comp_whitecap_fraction方法的典型用法代碼示例。如果您正苦於以下問題:Python Waves.comp_whitecap_fraction方法的具體用法?Python Waves.comp_whitecap_fraction怎麽用?Python Waves.comp_whitecap_fraction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gnome.environment.Waves
的用法示例。
在下文中一共展示了Waves.comp_whitecap_fraction方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_whitecap_fraction
# 需要導入模塊: from gnome.environment import Waves [as 別名]
# 或者: from gnome.environment.Waves import comp_whitecap_fraction [as 別名]
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