OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
jd.py
Go to the documentation of this file.
1 def jd(i,j,k):
2 # converted from: jd.f, Written by Frederick S. Patt, GSC, November 4, 1992
3 # Liang Hong, 2017/6/21
4 # Liang Hong, 2019/11/6: made it python 3 compatible, all calculations are integer based
5 
6 # This function converts a calendar date to the corresponding Julian
7 # day starting at noon on the calendar date. The algorithm used is
8 # from Van Flandern and Pulkkinen, Ap. J. Supplement Series 41,
9 # November 1979, p. 400.
10 
11 # Arguments
12 #
13 # Name Type I/O Description
14 # ---- ---- --- -----------
15 # i I*4 I Year - e.g. 1970
16 # j I*4 I Month - (1-12)
17 # k I*4 I Day - (1-31)
18 # jd I*4 O Julian day
19 
20  import numpy as np
21  i = np.array(i)
22  j = np.array(j)
23  k = np.array(k)
24  jd = 367*i - 7*(i+(j+9)//12)//4 + 275*j//9 + k + 1721014
25  return jd
def jd(i, j, k)
Definition: jd.py:1