Skip to content

Commit

Permalink
Fix azimuth encoding
Browse files Browse the repository at this point in the history
Azimuth values are now in [-180, 180], so set offset to 0.0 in
order to prevent integer overflow.
  • Loading branch information
sfinkens committed Jul 17, 2020
1 parent ef204b7 commit 817a82e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygac/gac_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def avhrrGAC_io(satellite_name, xutcs, startdate, enddate, starttime, endtime,
g4.attrs["dataset_name"] = np.string_('Solar azimuth angle')
g4.attrs["units"] = np.string_('Deg')
g4.attrs["gain"] = np.float32(0.01)
g4.attrs["offset"] = np.float32(180.0)
g4.attrs["offset"] = np.float32(0.0)
g4.attrs["missingdata"] = np.int32(MISSING_DATA)
g4.attrs["nodata"] = np.int32(MISSING_DATA)
g4.attrs["starttime"] = np.string_(starttime[0:6])
Expand All @@ -532,7 +532,7 @@ def avhrrGAC_io(satellite_name, xutcs, startdate, enddate, starttime, endtime,
g5.attrs["dataset_name"] = np.string_('Satellite azimuth angle')
g5.attrs["units"] = np.string_('Deg')
g5.attrs["gain"] = np.float32(0.01)
g5.attrs["offset"] = np.float32(180.0)
g5.attrs["offset"] = np.float32(0.0)
g5.attrs["missingdata"] = np.int32(MISSING_DATA)
g5.attrs["nodata"] = np.int32(MISSING_DATA)
g5.attrs["starttime"] = np.string_(starttime[0:6])
Expand Down

0 comments on commit 817a82e

Please sign in to comment.