Skip to content

Commit 5f5ccee

Browse files
committed
update
1 parent 6671720 commit 5f5ccee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pygrib/_pygrib.pyx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ cdef class gribmessage(object):
13211321
else:
13221322
missval = 1.e30
13231323
if self.expand_reduced:
1324-
lonsperlat = self['pl']
1324+
lonsperlat = self['pl'].astype(np.int32)
13251325
nx = lonsperlat.max()
13261326
print(lonsperlat.dtype, lonsperlat)
13271327
datarr = redtoreg(datarr, lonsperlat, missval=missval)
@@ -1560,7 +1560,7 @@ cdef class gribmessage(object):
15601560
lats = self['distinctLatitudes']
15611561
if lat2 < lat1 and lats[-1] > lats[0]: lats = lats[::-1]
15621562
ny = self['Nj']
1563-
lonsperlat = self['pl']
1563+
lonsperlat = self['pl'].astype(np.int32)
15641564
nx = lonsperlat.max()
15651565
print(lonsperlat.dtype, lonsperlat)
15661566
lon1 = self['longitudeOfFirstGridPointInDegrees']
@@ -1573,7 +1573,7 @@ cdef class gribmessage(object):
15731573
elif self['gridType'] == 'reduced_ll': # reduced lat/lon grid
15741574
if self.expand_reduced:
15751575
ny = self['Nj']
1576-
lonsperlat = self['pl']
1576+
lonsperlat = self['pl'].astype(np.int32)
15771577
nx = lonsperlat.max()
15781578
print(lonsperlat.dtype, lonsperlat)
15791579
lat1 = self['latitudeOfFirstGridPointInDegrees']

0 commit comments

Comments
 (0)