Skip to content

Commit

Permalink
Update _grib2io.py (#125)
Browse files Browse the repository at this point in the history
gridlengthXDirection is rounded to thousandth so if nlons is greater than 1000, this lead to a bad lons axis
  • Loading branch information
alcoat authored Jan 19, 2024
1 parent f75c701 commit 6ea1633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grib2io/_grib2io.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ def grid(self, unrotate=True):
else:
nlons = self.nx
dlon = self.gridlengthXDirection
lons = np.arange(lon1,lon2+dlon,dlon)
lons = np.linspace(lon1,lon2,nlons)
# Compute Gaussian lats (north to south)
lats = gaussian_latitudes(nlats)
if lat1 < lat2: # reverse them if necessary
Expand Down

0 comments on commit 6ea1633

Please sign in to comment.