<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>hi,</div><div>&nbsp;i want add several obervation wind vector data on a map, but i cannot find appropriate function to plot.</div><div>&nbsp;the following is my script:</div><div><br></div><div>++++++++++++++++++++++++++++++++++++++</div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">load&nbsp;"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load&nbsp;"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>load&nbsp;"$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>load&nbsp;"$GEODIAG_ROOT/geodiag.ncl"<br><br>begin<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>;;&nbsp;uv&nbsp;data<br>bj_csvs=systemfunc("ls&nbsp;uvdata/112920_inside_obs.csv")<br><br>lines=asciiread(bj_csvs,-1,"string")<br>nlines=dimsizes(lines)&nbsp;-&nbsp;1<br><br>delim=","<br>field_names=str_split(lines(0),delim)<br>nfields=dimsizes(field_names)<br><br>;<br>fields=new((/nfields,nlines/),string)<br>do&nbsp;nf=0,nfields-1<br>&nbsp;&nbsp;fields(nf,:)=str_get_field(lines(1:),nf+1,delim)<br>end&nbsp;do<br><br>print(fields(1,:)&nbsp;+&nbsp;"&nbsp;&nbsp;&nbsp;"+fields(2,:)&nbsp;+&nbsp;"&nbsp;&nbsp;&nbsp;"+fields(3,:)+"&nbsp;&nbsp;&nbsp;"+fields(4,:))<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>;;&nbsp;pm2.5&nbsp;data<br><br>ncol&nbsp;=&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;number&nbsp;of&nbsp;columns&nbsp;is&nbsp;3£»ÄãµÄÁÐÊý<br>&nbsp;&nbsp;stationdata=&nbsp;readAsciiTable("pm2.5_txt/15112920.txt",&nbsp;ncol,&nbsp;"float",&nbsp;1)<br>&nbsp;&nbsp;print(dimsizes(stationdata))<br>&nbsp;&nbsp;nps&nbsp;&nbsp;=dimsizes(stationdata)<br>&nbsp;&nbsp;npts&nbsp;=&nbsp;nps(0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;Number&nbsp;of&nbsp;points.<br><br>&nbsp;&nbsp;lat&nbsp;=&nbsp;stationdata(:,1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;latitude&nbsp;values<br>&nbsp;&nbsp;lon&nbsp;=&nbsp;stationdata(:,0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;longitude&nbsp;values<br>&nbsp;&nbsp;pm25=&nbsp;stationdata(:,2)&nbsp;&nbsp;&nbsp;;&nbsp;station&nbsp;numbers&nbsp;to&nbsp;appear&nbsp;on&nbsp;the&nbsp;map£»Õâ¸öµØ·½Äã¿ÉÒÔдÎÛȾÊý¾Ý<br><br>&nbsp;&nbsp;printMinMax(pm25,0)<br>;-------interpolate-----------------------------------------------------<br>&nbsp;&nbsp;olon&nbsp;=new(80,"float")<br>&nbsp;&nbsp;olat&nbsp;=new(80,"float")<br>&nbsp;&nbsp;data1=new((/80,80/),"float")<br>&nbsp;&nbsp;do&nbsp;j=0,79<br>&nbsp;&nbsp;&nbsp;&nbsp;olon(j)=113+j*0.1<br>&nbsp;&nbsp;end&nbsp;do<br>&nbsp;&nbsp;do&nbsp;k=0,79<br>&nbsp;&nbsp;&nbsp;&nbsp;olat(k)=36+k*0.1<br>&nbsp;&nbsp;end&nbsp;do<br>&nbsp;&nbsp;&nbsp;<br><br><br>;---------set&nbsp;interpolate&nbsp;res--------------------------------------------<br>&nbsp;&nbsp;olon!0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;="lon"<br>&nbsp;&nbsp;olon@long_name="lontitude"<br>&nbsp;&nbsp;olon@units&nbsp;&nbsp;&nbsp;&nbsp;="degrees-east"<br>&nbsp;&nbsp;olon&amp;lon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=olon<br><br>&nbsp;&nbsp;olat!0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;="lat"<br>&nbsp;&nbsp;olat@long_name="latitude"<br>&nbsp;&nbsp;olat@units&nbsp;&nbsp;&nbsp;&nbsp;="degrees-north"<br>&nbsp;&nbsp;olat&amp;lat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=olat<br><br>;--------Call&nbsp;interpolation&nbsp;function--------------------------------------<br>&nbsp;&nbsp;;pm25@_FillValue=999999.000000<br>&nbsp;&nbsp;rscan=(/10,5,3,2,1,0.5,0.2,0.1/)<br>&nbsp;&nbsp;data1=obj_anal_ic_deprecated(lon,&nbsp;lat,&nbsp;pm25,&nbsp;olon,&nbsp;olat,&nbsp;rscan,&nbsp;False);creanm<br>&nbsp;&nbsp;printMinMax(data1&nbsp;,0)<br>&nbsp;&nbsp;data1!0="lat"<br>&nbsp;&nbsp;data1!1="lon"<br>&nbsp;&nbsp;data1&amp;lat=olat<br>&nbsp;&nbsp;data1&amp;lon=olon<br>&nbsp;&nbsp;data1@units=""<br>&nbsp;&nbsp;data1@long_name="pm2.5"<br>&nbsp;&nbsp;;data1@_FillValue&nbsp;=&nbsp;pm25@_FillValue<br>&nbsp;&nbsp;printMinMax(olat,0)<br>&nbsp;&nbsp;printMinMax(olon,&nbsp;0)<br><br>;;&nbsp;plot<br>&nbsp;&nbsp;type="png"<br>&nbsp;&nbsp;wks&nbsp;=&nbsp;gsn_open_wks(type,"2015112920")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;Open&nbsp;a&nbsp;workstation&nbsp;and<br>&nbsp;&nbsp;colors=(/"White","Black","(/.027,.729,.145/)","(/.431,.824,.035/)",\<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"(/.800,.937,.012/)","(/1.00,.969,0.00/)","(/1.00,.871,0.00/)",\<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"(/1.00,.710,0.00/)","(/1.00,.549,0.00/)","(/0.00,.757,1.00/)",\<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"(/0.00,0.455,1.00/)","(/0.00,.122,1.00/)","(/1.00,.275,0.00/)",\<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"(/1.00,0.059,0.00/)"/)&nbsp;&nbsp;<br>&nbsp;&nbsp;gsn_define_colormap(wks,colors)<br><br>&nbsp;&nbsp;res&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@cnFillOn&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@cnLinesOn&nbsp;=&nbsp;False<br>&nbsp;&nbsp;res@cnLineLabelsOn&nbsp;=&nbsp;False<br>&nbsp;&nbsp;res@gsnDraw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;False<br>&nbsp;&nbsp;res@gsnFrame&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;False<br>&nbsp;&nbsp;res@gsnMaximize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@gsnAddCyclic&nbsp;=&nbsp;False<br><br>&nbsp;&nbsp;<br>&nbsp;&nbsp;res@mpLimitMode&nbsp;=&nbsp;"LatLon"<br>&nbsp;&nbsp;res@mpMinLatF&nbsp;=&nbsp;39.40<br>&nbsp;&nbsp;res@mpMaxLatF&nbsp;=&nbsp;41.00<br>&nbsp;&nbsp;res@mpMinLonF&nbsp;=&nbsp;115.35<br>&nbsp;&nbsp;res@mpMaxLonF&nbsp;=&nbsp;117.55<br><br>&nbsp;&nbsp;res@isShowProvince&nbsp;=&nbsp;&nbsp;False<br>&nbsp;&nbsp;res@isShowBeijingCounty&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@beijingCountyColor&nbsp;=&nbsp;"black"<br>&nbsp;&nbsp;res@beijingCountyThickness&nbsp;=&nbsp;1.0<br>&nbsp;&nbsp;res@isShowBeijingRing2&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@beijingRing2Color&nbsp;=&nbsp;"black"<br>&nbsp;&nbsp;res@beijingRing2Thickness&nbsp;=&nbsp;1.50<br>&nbsp;&nbsp;res@isShowBeijingRing3&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@beijingRing3Color&nbsp;=&nbsp;"black"<br>&nbsp;&nbsp;res@beijingRing3Thickness&nbsp;=&nbsp;1.50<br>&nbsp;&nbsp;res@isShowBeijingRing4&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@beijingRing4Color&nbsp;=&nbsp;"black"<br>&nbsp;&nbsp;res@beijingRing4Thickness&nbsp;=&nbsp;1.5<br>&nbsp;&nbsp;res@isShowBeijingRing5&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@beijingRing5Color&nbsp;=&nbsp;"black"<br>&nbsp;&nbsp;res@beijingRing5Thickness&nbsp;=&nbsp;1.5<br>&nbsp;&nbsp;res@isShowBeijingRing6&nbsp;=&nbsp;True<br>&nbsp;&nbsp;res@beijingRing6Color&nbsp;=&nbsp;"black"<br>&nbsp;&nbsp;res@beijingRing6Thickness&nbsp;=&nbsp;1.5<br>&nbsp;&nbsp;setup_china_map(res)<br><br>&nbsp;&nbsp;plot&nbsp;=&nbsp;gsn_csm_contour_map(wks,data1,res)<br><br>&nbsp;&nbsp;attach_china_map(wks,&nbsp;plot)<br><br>&nbsp;&nbsp;draw(plot)<br><br>&nbsp;&nbsp;;&nbsp;wmsetp("vch",&nbsp;0.05)<br>&nbsp;&nbsp;;&nbsp;wmsetp("vcc",&nbsp;1)<br>&nbsp;&nbsp;;&nbsp;wmsetp("vcw",&nbsp;3.)<br>&nbsp;&nbsp;;&nbsp;wmsetp("wbs",&nbsp;0.05)<br>&nbsp;&nbsp;;&nbsp;wmsetp("col",&nbsp;1)<br>&nbsp;&nbsp;;&nbsp;wmsetp("wbs",&nbsp;0.06)<br>&nbsp;&nbsp;;&nbsp;wmsetp("ezf",2)<br>&nbsp;&nbsp;;&nbsp;wmsetp("wbs",0.12)<br>&nbsp;&nbsp;</span><span style="background-color: rgba(0, 0, 0, 0);"><font color="#ff0000"><b>wmsetp("ars",0.05)<br>&nbsp;&nbsp;wmsetp("arl",1.5)</b></font><br>&nbsp;&nbsp;;&nbsp;wmvectmap(wks,&nbsp;tofloat(fields(2,:)),&nbsp;tofloat(fields(1,:)),&nbsp;tofloat(fields(3,:)),&nbsp;tofloat(fields(4,:)))<br>&nbsp;&nbsp;;&nbsp;wmvlbl(wks,&nbsp;1.0,&nbsp;0.0)<br>&nbsp;&nbsp;<b><font color="#ff0000">wmbarbmap(wks,&nbsp;tofloat(fields(2,:)),&nbsp;tofloat(fields(1,:)),&nbsp;tofloat(fields(3,:)),&nbsp;tofloat(fields(4,:)))</font></b><br><br>&nbsp;&nbsp;frame(wks)<br><br><br>end<br><br></span></div><div>++++++++++++++++++++++++++++++++++++++&nbsp;</div><div>the red and bold font is for wind barb.</div><div><br></div><div>the figure is as follows:</div><div>&nbsp; &nbsp;<img src="cid:_Foxmail.1@aab1cd9b-dc9f-64d1-7714-3db79824f84c" border="0" style="font-size: 10.5pt; line-height: 1.5; background-color: window;"></div><div>the wind barb are so small on t<span style="background-color: window; font-size: 10.5pt; line-height: 1.5;">his plot, but those sizes are so tiny , which function can be used to &nbsp;enlarge the wind rod &nbsp;for appropriate size.</span></div><div><br></div><div>thanks &nbsp;</div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>dyjbean@gmail.com</div></div></span></div>
</body></html>