<div dir="ltr">Thank you<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 3, 2014 at 3:22 PM, Xin Xi <span dir="ltr"><<a href="mailto:xin.xi30@gmail.com" target="_blank">xin.xi30@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">this is a draw order issue.<div>set at the beginning:</div><div>res@gsnDraw = False</div><div>then</div><div>plot =gsn_csm_contour_map(...)</div><div>draw(plot)</div><div>dum1=gsn_add_polygon(...)<div><div class="h5"><br><br>On Friday, October 3, 2014, Ipshita Majhi <<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear All,<br><br>I am trying to plot a polygon on a polar plot but it is not showing up<br><br>;************************************************<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>;************************************************<br>begin<br>;************************************************<br>; read in netCDF file and access data<br>a =addfile("~/Documents/Snow_cover_IMS/<a href="http://nhsce_v01r01_19661004_20140602.nc" target="_blank">nhsce_v01r01_19661004_20140602.nc</a>","r");<br> sce=a->snow_cover_extent(0,:,:)<br> lat=a->latitude<br> lon=a->longitude<br><br><br> sce@lat2d=lat<br> sce@lon2d=lon<br> ; <br>;************************************************<br>; create polygon (remember the earth is a sphere)<br>;************************************************<br> xpt = new(20,float)<br> ypt = new(20,float)<br><br> xpt(0:9) = fspan(120,-120,10) ; lon around edge<br> xpt(10:14) = -180 ; up 240<br> xpt(15:19) = 120 ; down 120<br><br> ypt(0:9) = 40 ; lat around edge<br> ypt(10:14) = fspan(40.,90.,5) ; lat up to pole<br> ypt(15:19) = fspan(90.,40.,5) ; lat down from pole<br>;************************************************<br>; create plots<br>;************************************************<br> wks = gsn_open_wks("ps" ,"sce_polar_polygon") ; create ps plot <br> res = True ; plot mods desired<br> res@gsnPolar = "NH" ; specify the hemisphere<br> plot = gsn_csm_contour_map_polar(wks,sce,res) ; create the plot<br><br><br> dum1 = gsn_add_polygon(wks,plot,xpt,ypt,False) ; add polygon<br>end<br>;***********************************************<br></div>Best Regards<br>Ipshita<br></div>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br>-- <br>Sent from Gmail Mobile<br>
</font></span></blockquote></div><br></div>