登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
打开包含站点填图的站点数据文件(比如micaps 1)之后,用文件对象的smodeldata函数获取StationModel数据对象,然后用stationmodel函数绘制站点填图图层。
脚本程序:
- #Set data folders
- basedir = 'D:/MyProgram/Distribution/java/MeteoInfo/MeteoInfo'
- datadir = os.path.join(basedir, 'sample/MICAPS')
- mapdir = os.path.join(basedir, 'map')
- #Read shape files
- lworld = shaperead(os.path.join(mapdir, 'country1.shp'))
- lchina = shaperead(os.path.join(mapdir, 'bou2_4p.shp'))
- #Read station data
- f = addfile_micaps(os.path.join(datadir, '10101414.000'))
- data = f.smodeldata()
- #Plot
- axesm(bgcolor=(204,255,255))
- geoshow(lworld, facecolor=(255,251,195))
- geoshow(lchina, edgecolor='k')
- layer = stationmodel(data)
- #colorbar(layer)
- xlim(72, 136)
- ylim(16, 55)
|