<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi Dave</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks a lot for pointing this out - I now get nice curved vectors.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Cheers</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br clear="all"></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">Tabish U Ansari<br></font></span></i></span></div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">Postdoctoral Researcher <br></font></span></i></span></div><div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">Centre for Climate and Air Pollution Studies (C-CAPS)<br></font></span></i></span></div><div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">School of Physics, NUI-Galway</font></span></i><font size="1"><span style="font-family:tahoma,sans-serif"><i><span style="font-family:verdana,sans-serif">, Ireland</span></i><br></span></font></span></div><div><span style="color:rgb(11,83,148)"><font size="1"><span style="font-family:tahoma,sans-serif"><i><span style="font-family:verdana,sans-serif">ResearchGate: <a href="https://www.researchgate.net/profile/Tabish_Ansari" target="_blank">https://www.researchgate.net/profile/Tabish_Ansari</a></span></i><br></span></font></span></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 17 Feb 2020 at 02:56, Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Those really are curly vectors. However, there is a mistake in your plot data. In the second line here, you are subsetting u_corr when I think you want v_corr. This has the remarkable effect of making the vectors pointing always to or from the same direction. This results in zero apparent divergence, thus the vectors do not curl.<br><br> U = u_corr(0,2,0:260,1160:1438)<br> V = u_corr(0,2,0:260,1160:1438)<br><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 16, 2020 at 5:42 PM Tabish Ansari via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:"trebuchet ms",sans-serif">Hi <br></div><div style="font-family:"trebuchet ms",sans-serif"><br></div><div style="font-family:"trebuchet ms",sans-serif">I'm trying to make a wind vector plot using 0.25deg resolution gridded data. I want to draw curly vectors but despite using "vecres@vcGlyphStyle = "CurlyVector" option, I'm getting straight vectors (see attached plot). Could you please point out what is wrong here?</div><div style="font-family:"trebuchet ms",sans-serif"><br></div><div style="font-family:"trebuchet ms",sans-serif">Here's my script:</div><div style="font-family:"trebuchet ms",sans-serif"><br></div><div style="font-family:"trebuchet ms",sans-serif">#########################################################################<br></div><div style="font-family:"trebuchet ms",sans-serif"><i>begin<br>;READING WIND COMPONENTS OFF THE FILE<br>a = addfile("/ichec/work/ngear013c/ERA5_uvw_1000-975-950hpa_27-30Jun2011.nc","r")<br>u = a->u<br>v = a->v<br><br>;APPLYING CORRECTIONS AND OFFSETS TO GET REAL VALUES<br>u_corr = (/0.0012*u/)<br>u_corr = (/u_corr-0.6127/)<br>v_corr = (/0.0012*v/)<br>v_corr = (/v_corr-1.7441/)<br><br>;PRESERVING VARIABLE METADATA FOR CORRECTED ARRAYS<br>copy_VarMeta(u,u_corr)<br>copy_VarMeta(v,v_corr)<br>print("Transformed")<br><br>;PRINTING MIN AND MAX VALUES FROM THE CORRECTED ARRAYS TO CONFIRM IF THE RANGE IS REALISTIC<br>printMinMax(u_corr(:,0,:,:),1) ; 950HPA<br>printMinMax(u_corr(:,1,:,:),1) ; 975 HPA<br>printMinMax(u_corr(:,2,:,:),1) ; 1000 HPA<br><br>;READING 1000HPA WINDS FOR THE FIRST HOUR AND CROPPING OVER GREENLAND-IRELAND REGION<br>U = u_corr(0,2,0:260,1160:1438)<br>V = u_corr(0,2,0:260,1160:1438)<br><br>speed = sqrt(U^2+V^2)<br>copy_VarCoords(U,speed) <br><br>;OPEN A WORKSTATION<br> wks = gsn_open_wks ("pdf", "windvectors-Oct2011") ; send graphics to PNG file<br><br> res = True<br> res@gsnDraw = False ; don't draw<br> res@gsnFrame = False ; don't advance frame<br> res@gsnMaximize = True ; Maximize plot in frame<br> res@cnFillOn = True ; turn on color<br> res@cnFillPalette = "gui_default" ; set color map<br> res@cnLinesOn = False ; no contour lines<br> res@gsnLeftString = "Wind Speed" ; change left string<br> res@gsnRightString = U@units ; assign right string<br> res@gsnAddCyclic = False<br> res@mpFillOn = False ; no map fill<br> res@mpGeophysicalLineThicknessF = 2.0<br> res@mpDataBaseVersion = "MediumRes" <br><br>; SELECTING THE GREENLAND-IRELAND SUBREGION FROM THE MAP<br> res@mpMinLonF = -70. <br> res@mpMaxLonF = 0.<br> res@mpMinLatF = 30. <br> res@mpMaxLatF = 90.<br><br> vecres = True ; vector only resources<br> vecres@gsnDraw = False ; don't draw<br> vecres@gsnFrame = False ; don't advance frame<br> vecres@vcGlyphStyle = "CurlyVector" ; curly vectors<br> vecres@vcRefMagnitudeF = 20 ; define vector ref mag<br> vecres@vcRefLengthF = 0.045 ; define length of vec ref<br> vecres@gsnRightString = " " ; turn off right string<br> vecres@gsnLeftString = " " ; turn off left string<br> vecres@tiXAxisString = " " ; turn off axis label <br> vecres@vcRefAnnoOrthogonalPosF = -.35 ; move ref vector into plot<br><br> plotA = gsn_csm_contour_map_ce(wks,speed(:,:),res)<br> plotB = gsn_csm_vector(wks,U(::10,::10),V(::10,::10),vecres)<br> overlay(plotA,plotB) ; overlaying plotB over plotA<br><br>draw(plotA)<br>frame(wks)<br><br>end</i></div><div style="font-family:"trebuchet ms",sans-serif">############################################################<br></div><div style="font-family:"trebuchet ms",sans-serif"><br></div><div style="font-family:"trebuchet ms",sans-serif">Thanks in advance.</div><div style="font-family:"trebuchet ms",sans-serif"><br></div><div style="font-family:"trebuchet ms",sans-serif">Tabish</div><div style="font-family:"trebuchet ms",sans-serif"><br></div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">Tabish U Ansari<br></font></span></i></span></div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">Postdoctoral Researcher <br></font></span></i></span></div><div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">Centre for Climate and Air Pollution Studies (C-CAPS)<br></font></span></i></span></div><div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">School of Physics, NUI-Galway</font></span></i><font size="1"><span style="font-family:tahoma,sans-serif"><i><span style="font-family:verdana,sans-serif">, Ireland</span></i><br></span></font></span></div><div><span style="color:rgb(11,83,148)"><font size="1"><span style="font-family:tahoma,sans-serif"><i><span style="font-family:verdana,sans-serif">ResearchGate: <a href="https://www.researchgate.net/profile/Tabish_Ansari" target="_blank">https://www.researchgate.net/profile/Tabish_Ansari</a></span></i></span></font></span></div></div></div></div></div></div></div></blockquote></div></div></div></div>
</blockquote></div>