OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
jday.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <stdint.h>
3 
4 int32_t jday(int16_t i, int16_t j, int16_t k) {
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  // Written by Frederick S. Patt, GSC, November 4, 1992
12 
13  return 367 * i - 7 * (i + (j + 9) / 12) / 4 + 275 * j / 9 + k + 1721014;
14 }
int j
Definition: decode_rs.h:73
int i
Definition: decode_rs.h:71
int32_t jday(int16_t i, int16_t j, int16_t k)
Definition: jday.c:4
int k
Definition: decode_rs.h:73