- 积分
- 55950
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-21
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
国家级和区域级自动气象站数据文件有统一的格式,都是文本文件,文件名类似AWS_WEA_NAT_MUL_FTM-YYYYMMDDHH.TXT,这个提供一个示例脚本来读取文件中所有站点的气象要素数据并绘制图形。
- fn = r'U:\data\micaps\auto\nat\2016\AWS_WEA_NAT_MUL_FTM-2016120100.TXT'
- colnames = ['year','month','day','hour','stid','lat','lon','alt', \
- 'p_alt','wd_2min','ws_2min','wd_10min','ws_10min','wd_max_10min', \
- 'ws_max_10min', 'time_max_10min','wd','ws','wd_max','ws_max', \
- 'time_max','rain','t','t_max','time_t_max','t_min','time_t_min', \
- 't_max_24h','t_min_24h','rh','rh_min','time_rh_min','press', \
- 'press_max','time_press_max','press_min','time_press_min', \
- 'press_sl']
- table = readtable(fn, format='%4i%s%10f%i%4f%i%3f%i%f%i%4f%i%2f%i%f%i%f', \
- headerlines=-1, colnames=colnames)
- ws = table['ws_10min']
- ws[ws>100000] = nan
- wd = table['wd_10min']
- wd[wd>100000] = nan
- lon = table['lon']
- lat = table['lat']
- #Plot
- axesm()
- lchina = shaperead('U:/map/bou2_4p.shp')
- geoshow(lchina, edgecolor='k')
- #layer = scatterm(lon, lat, ws, edge=False)
- layer = quiverm(lon, lat, wd, ws, ws, isuv=False, size=10)
- quiverkey(layer, 0.78, 0.18, 10, bbox={'edge':False, 'fill':True})
- colorbar(layer)
- xlim(70,138)
- ylim(15,55)
- title('Wind speed')
|
|