Skip to content

Commit

Permalink
Simplify jday computation
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Aug 29, 2024
1 parent 806fec3 commit aeab152
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pygac/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,7 @@ 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?
start_time = self._times_as_np_datetime64[0]
jday = (start_time - start_time.astype("datetime64[Y]")).astype("timedelta64[D]").astype(int) + 1
jday = self._times[0].timetuple().tm_yday
return calculate_sun_earth_distance_correction(jday)

def update_meta_data(self):
Expand Down

0 comments on commit aeab152

Please sign in to comment.