Skip to content

Commit

Permalink
3rd attempt to fix failing windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jswhit committed Jul 2, 2024
1 parent 23874cd commit 155a0f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pygrib/_pygrib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ cdef class gribmessage(object):
else:
missval = 1.e30
if self.expand_reduced:
lonsperlat = self['pl']
lonsperlat = self['pl'].astype(np.int64)
nx = lonsperlat.max()
datarr = redtoreg(datarr, lonsperlat, missval=missval)
else:
Expand Down Expand Up @@ -1559,7 +1559,8 @@ cdef class gribmessage(object):
lats = self['distinctLatitudes']
if lat2 < lat1 and lats[-1] > lats[0]: lats = lats[::-1]
ny = self['Nj']
nx = self['pl'].max()
lonsperlat = self['pl'].astype(np.int64)
nx = lonsperlat.max()
lon1 = self['longitudeOfFirstGridPointInDegrees']
lon2 = self['longitudeOfLastGridPointInDegrees']
lons = np.linspace(lon1,lon2,nx)
Expand All @@ -1570,7 +1571,8 @@ cdef class gribmessage(object):
elif self['gridType'] == 'reduced_ll': # reduced lat/lon grid
if self.expand_reduced:
ny = self['Nj']
nx = self['pl'].max()
lonsperlat = self['pl'].astype(np.int64)
nx = lonsperlat.max()
lat1 = self['latitudeOfFirstGridPointInDegrees']
lat2 = self['latitudeOfLastGridPointInDegrees']
lon1 = self['longitudeOfFirstGridPointInDegrees']
Expand Down

0 comments on commit 155a0f2

Please sign in to comment.