Skip to content

Commit b09798a

Browse files
committed
test
1 parent 155a0f2 commit b09798a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/pygrib/_pygrib.pyx

+8-5
Original file line numberDiff line numberDiff line change
@@ -1321,8 +1321,9 @@ cdef class gribmessage(object):
13211321
else:
13221322
missval = 1.e30
13231323
if self.expand_reduced:
1324-
lonsperlat = self['pl'].astype(np.int64)
1325-
nx = lonsperlat.max()
1324+
lonsperlat = self['pl']
1325+
#nx = lonsperlat.max()
1326+
nx = 2*ny
13261327
datarr = redtoreg(datarr, lonsperlat, missval=missval)
13271328
else:
13281329
nx = None
@@ -1559,8 +1560,9 @@ cdef class gribmessage(object):
15591560
lats = self['distinctLatitudes']
15601561
if lat2 < lat1 and lats[-1] > lats[0]: lats = lats[::-1]
15611562
ny = self['Nj']
1562-
lonsperlat = self['pl'].astype(np.int64)
1563-
nx = lonsperlat.max()
1563+
lonsperlat = self['pl']
1564+
#nx = lonsperlat.max()
1565+
nx = 2*ny
15641566
lon1 = self['longitudeOfFirstGridPointInDegrees']
15651567
lon2 = self['longitudeOfLastGridPointInDegrees']
15661568
lons = np.linspace(lon1,lon2,nx)
@@ -1572,7 +1574,8 @@ cdef class gribmessage(object):
15721574
if self.expand_reduced:
15731575
ny = self['Nj']
15741576
lonsperlat = self['pl'].astype(np.int64)
1575-
nx = lonsperlat.max()
1577+
#nx = lonsperlat.max()
1578+
nx = 2*ny
15761579
lat1 = self['latitudeOfFirstGridPointInDegrees']
15771580
lat2 = self['latitudeOfLastGridPointInDegrees']
15781581
lon1 = self['longitudeOfFirstGridPointInDegrees']

0 commit comments

Comments
 (0)