./configure --with-intermal-glib
make && date
sudo make install && date
./configure
make && date
sudo make install && date
./configure
make && date
sudo make install && date
./configure
make && date
sudo make install && date
./configure
make && date
sudo make install && date
./configure --with-jasper='/usr/local/'
make && date
sudo make install && date
>>> grbs.seek(0)
>>> for grb in grbs:
grb
1:Geopotential Height:gpm (instant):regular_ll:isobaricInhPa:level 500:fcst time 24 :from 201507081200
1 >>> grb = grbs.select(name='Geopotential Height')[0]
2 >>> data = grb.values
3 >>> print(data.shape,data.min(),data.max())
4 (37, 37) 5368.6796875 5941.0390625
5 >>> lat,lon=grb.latlons()
6 >>> print(lat,'\n',lon)
7 [[ 0. 0. 0. ..., 0. 0. 0. ]
8 [ 2.5 2.5 2.5 ..., 2.5 2.5 2.5]
9 [ 5. 5. 5. ..., 5. 5. 5. ]
10 ...,
11 [ 85. 85. 85. ..., 85. 85. 85. ]
12 [ 87.5 87.5 87.5 ..., 87.5 87.5 87.5]
13 [ 90. 90. 90. ..., 90. 90. 90. ]]
14 [[-90. -87.5 -85. ..., -5. -2.5 0. ]
15 [-90. -87.5 -85. ..., -5. -2.5 0. ]
16 [-90. -87.5 -85. ..., -5. -2.5 0. ]
17 ...,
18 [-90. -87.5 -85. ..., -5. -2.5 0. ]
19 [-90. -87.5 -85. ..., -5. -2.5 0. ]
20 [-90. -87.5 -85. ..., -5. -2.5 0. ]]
1 >>> import matplotlib.pyplot as plt
2 >>> from mpl_toolkits.basemap import Basemap
3 >>> import numpy as np
1 >>> plt.figure()
2 <matplotlib.figure.Figure object at 0x107e65198>
1 >>> m=Basemap(projection='mill',lat_ts=10,llcrnrlon=lon.min(), \
2 urcrnrlon=lon.max(),llcrnrlat=lat.min(),urcrnrlat=lat.max(), \
3 resolution='c')
4 >>> m.drawcoastlines(linewidth=0.25)
5 <matplotlib.collections.LineCollection object at 0x1091c1f28>
6 >>> m.drawcountries(linewidth=0.25)
7 <matplotlib.collections.LineCollection object at 0x10621d0f0>
8 >>> m.fillcontinents(color='coral',lake_color='aqua')
9 >>> m.drawmapboundary(fill_color='aqua')
10 <matplotlib.patches.Rectangle object at 0x10918b3c8>
11 >>> m.drawmeridians(np.arange(0,360,30))
12 >>> m.drawparallels(np.arange(-90,90,30))
1 >>> plt.title('Geopotential Height Contour from Grib')
2 <matplotlib.text.Text object at 0x10918bda0>
3 >>> plt.show()
欢迎光临 168大数据 (http://www.bi168.cn/) | Powered by Discuz! X3.2 |