Skip to content

Commit

Permalink
Fix jday computation
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Aug 29, 2024
1 parent 26f1bde commit 6289b1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pygac/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@ def get_sun_earth_distance_correction(self):
"""Get the julian day and the sun-earth distance correction."""
self.get_times()
# Shouldn't we use the start time from the header if available?
jday = self._times[0].timetuple().tm_yday
start_time = self._times_as_np_datetime64[0]
jday = (start_time - start_time.astype("datetime64[Y]")).astype("timedelta64[D]").astype(int) + 1
return calculate_sun_earth_distance_correction(jday)

def update_meta_data(self):
Expand Down

0 comments on commit 6289b1a

Please sign in to comment.