⼀、风向风速⽮量图
先看⼀个风向风速的样例图⽚:
这⾥与上⼀篇⽓温分布图的绘制⽅法基本相同,不同的地⽅在于 wres@vcRefMagnitudeF = 20. ; make vectors larger
wres@vcRefLengthF = 0.030 ; ref vec length
wres@vcGlyphStyle = "WindBarb" ; select wind barbs
wres@vcMinDistanceF = 0.025 ; thin out windbarbs
wres@vcWindBarbColor = 3
以及最后调⽤的绘制函数
wplot = gsn_csm_vector_map(wks,ddata1,vdata1,wres) ; create plot
ddata1是插值后的风向,vdata1是插值后的风速
由于wplot要和之前的map叠加,使⽤overlayhas函数,最后在显⽰叠加后的map
overlay(map,wplot)
draw(map)
⼆、地⾯⽓象要素天⽓分析图
1.各要素分析图标
需要50char的字符串⽤来显⽰图中左侧的图标,具体数据格式如下:
example:
imdat ="11721700181008020050300004983052026604007289086925"
A string (or array) of 50 characters encoded as per the WMO/NOAA(世界⽓象组织/美国国家海洋⼤⽓局) guidelines. If an array, it must have the same shape as the x and y arrays. In more detail (where the characters are numbered from left to right, starting at character number 0):
character 0 = iR - the precipitation data indicator (冰雹数据指数)
character 1 = iX - weather data and station type indicator(天⽓数据和站点类型指数)
character 2 = h - height above ground of base of lowest cloud
characters 3-4 = VV - visibility in miles and fractions (能见度)
character 5 = N - total amount of cloud cover (总云量)
characters 6-7 = dd - direction from which wind is blowing (风向)
characters 8-9 = ff - wind speed in knots(风速)
If character 10 = "1", then
character 11 = sn - sign of temperature
characters 12-14 = TTT - current air temperature
If character 15 = "2", then
character 16 = sn - sign of temperature
characters 17-19 = Td - dew point
If character 20 = "3", then
characters 21-24 = PO - station pressure (not plotted)
If character 25 = "4", then
characters 26-29 = PPPP - pressure reduced to sea level
If character 30 = "5", then
character 31 = a - characteristic of barograph
characters 32-34 = ppp - pressure change, last 3 hrs.
If character 35 = "6", then
19rrrcharacters 36-38 = RRR - precipitation
character 39 = tR - time duration of precipitation
If character 40 = "7", then
characters 41-42 = ww - present weather
character 43 = W1 - most significant past weather
character 44 = W2 - 2nd most sig. past weather
If character 45 = "8", then
character 46 = Nh - Fraction of sky cover
character 47 = CL - cloud type, low clouds
character 48 = CM - cloud type, medium clouds
character 49 = CH - cloud type, high clouds
可以根据实际数据需要将数据转换成50char,传送给
wmstnm(wks,lat_imdat,lon_imdat,imdat) 进⾏绘制
2.冷暖峰
wmsetp("fro","warm") ; Specify stationary front. ;cold or warm or stationary(interal)
wmsetp("cfc",3) ; Use blue for the triangles.
wmsetp("wfc",2) ; Use red for the bumps.
wmsetp("swi",0.02) ; Increase the size of the bumps and triangles.
wmsetp("nms",2) ; 设置峰的个数
wmsetp("sig",0.005)
wmsetp("slf",0) ;0 使⽤SL1和SL2 ,1 使⽤SL1 ,2 使⽤SL2 , 3 均不使⽤,默认值
wmsetp("sl1",90.) ; 起始⽅向与X轴的夹⾓
wmsetp("sl2",0.) ; 终⽌⽅向与X轴的夹⾓
xlat = (/ 25., 30./) ; Latitudes.
xlon = (/ 113., 116./) ; Longitudes.
wmdrft(wks, xlat, xlon)
3.绘制⾼低⽓压中⼼
以⾼⽓压为例,⽤红⾊的"D"代表。
tres = True ; text mods desired
tres@txFontHeightF = 0.015 ; make smaller
tres@txFontColor = 2 ; 红⾊字体
gsn_text(wks,map,"D",123.,51.,tres)
三、⾼空⽓象要素天⽓分析图
就是等温线和等压线的叠加,使⽤函数map = gsn_csm_contour_map_overlay(wks,pdata,vdata,res,res2),即可,其他同地⾯⽓象要素