synthetic_tides.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:pyGrav 作者: basileh 项目源码 文件源码
def gravityeffect(h0,s0,p0,tl,amp,phases):
    """
    purpose:  To compute the gravity effect due to each        
    tidal component.
    """
    dtor = np.pi/180
    R90 = np.pi/2       
    R360 = np.pi*2
    p0 = np.remainder(p0,R360)
    h0 = np.remainder(h0,R360)
    s0 = np.remainder(s0,R360)
    tl = np.remainder(tl,R360)
    arg=np.zeros(11)
    # argument                     component
    arg[0] = 2*tl - 2*s0          # M2
    arg[1] = 2*tl - 2*h0          # S2
    arg[2] = tl - R90             # K1
    arg[3] = tl - 2*s0 + R90      # O1
    arg[4] = 2*tl - 3*s0 + p0     # N2
    arg[5] = tl - 2*h0 + R90      # P1
    arg[6] = 2*tl                 # K2
    arg[7] = tl - 3*s0 + p0 +R90  # Q1
    arg[8] = 2*s0                 # Mf
    arg[9] = s0 - p0              # Mm
    arg[10] = 2*h0                # Ssa
    totaleffect=np.sum([amp[i]*np.cos(arg[i] - phases[i]*dtor) for i in range(len(arg))])
    return totaleffect
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号