OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
get_ut1.py
Go to the documentation of this file.
1 def get_ut1(iyr,idy,strUTCpole):
2  # Program to get UT1-UTC from utcpole.dat file
3  # input: iyr, idy, strUTCpole (Earth motion file, 'utcpole.dat')
4  # output: ut1utc = UT1-UTC(s)
5  # Ported from get_ut1.pro by Fred Patt
6  # Liang Hong, 2/25/2020
7  # Liang Hong, 3/24/2020, array calculation
8 
9  from hawknav.jd import jd
10  import numpy as np
11 
12  mjd = jd(iyr,1,idy) - 2400000
13 
14  # line: MJD x(arc sec) x error y(arc sec) y error UT1-UTC(s) UT error qual
15  utcpole = np.loadtxt(strUTCpole,skiprows=2, usecols=[0,5])
16 
17  # readf,ulun,ijd,xn,xe,yn,ye,ut1utc,ute
18  #ut1utc = utcpole[np.where(utcpole[:,0]==mjd),1]
19  tmpind = np.where(np.in1d(utcpole[:,0], mjd))[0]
20  ut1utc = utcpole[tmpind,1]
21 
22  return ut1utc
Definition: jd.py:1
def get_ut1(iyr, idy, strUTCpole)
Definition: get_ut1.py:1