Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jswhit committed Jul 2, 2024
1 parent 268fc3e commit 373d0f7
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/pygrib/_pygrib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1322,9 +1322,9 @@ cdef class gribmessage(object):
else:
missval = 1.e30
if self.expand_reduced:
lonsperlat = self['pl'].astype(np.int32)
nx = lonsperlat.max()
print(lonsperlat.dtype, lonsperlat)
lonsperlat = self['pl']
nx = (lonsperlat.astype(np.int32)).max()
print(lonsperlat.dtype, nx)
datarr = redtoreg(datarr, lonsperlat, missval=missval)
else:
nx = None
Expand Down Expand Up @@ -1562,8 +1562,7 @@ cdef class gribmessage(object):
if lat2 < lat1 and lats[-1] > lats[0]: lats = lats[::-1]
ny = self['Nj']
lonsperlat = self['pl'].astype(np.int32)
nx = lonsperlat.max()
print(lonsperlat.dtype, lonsperlat)
nx = (lonsperlat.astype(np.int32)).max()
lon1 = self['longitudeOfFirstGridPointInDegrees']
lon2 = self['longitudeOfLastGridPointInDegrees']
lons = np.linspace(lon1,lon2,nx)
Expand All @@ -1575,8 +1574,7 @@ cdef class gribmessage(object):
if self.expand_reduced:
ny = self['Nj']
lonsperlat = self['pl'].astype(np.int32)
nx = lonsperlat.max()
print(lonsperlat.dtype, lonsperlat)
nx = (lonsperlat.astype(np.int32)).max()
lat1 = self['latitudeOfFirstGridPointInDegrees']
lat2 = self['latitudeOfLastGridPointInDegrees']
lon1 = self['longitudeOfFirstGridPointInDegrees']
Expand Down

0 comments on commit 373d0f7

Please sign in to comment.