<div dir="ltr"><div class="gmail_default" style="font-size:small">Jatin&#39;s suggestion is a good one, because you want to be careful about plotting single markers in this way.  You have two rather large do loops which are plotting one marker at a time. This could be incredibly slow.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I think you could also get rid of the double do loop, if you can spare a little extra memory usage:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><font face="monospace, monospace">z2dims = dimsizes(z2)</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">i_save = ndtooned(conform(z2,ispan(0,z2dims(0),1),0)</font></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace">j_save = ndtooned(conform(z2,ispan(0,z2dims(1),1),1)</font></div><div><font face="monospace, monospace">i_save@_FillValue = -999</font></div><div><div><font face="monospace, monospace">j_save@_FillValue = -999</font></div></div><div><font face="monospace, monospace"><br></font></div></div><div class="gmail_default" style="font-size:small"><span style="font-family:monospace,monospace">z2_1d  = ndtooned(z2)</span><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">imsg   = ind(ismissing(z2_1d).or.z2_1d.ge.0)</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><br></font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">i_save(imsg) = i_save@_FillValue</font></div><div class="gmail_default" style="font-size:small"><div><div class="gmail_default"><font face="monospace, monospace">j_save(imsg) = j_save@_FillValue</font></div><div class="gmail_default"></div></div></div><div class="gmail_default" style=""><div class="gmail_default" style=""><font face="monospace, monospace"><span style="font-size:12.8px">add_poly = gsn_add_polymarker(wks,plot,i_</span><span style="font-size:12.8px">save,j_save,polyres)</span></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br style="font-size:12.8px"><span style="font-size:12.8px">draw(plot)</span><br style="font-size:12.8px"><span style="font-size:12.8px">frame(wks)</span></font><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 22, 2016 at 3:10 AM, Jatin Kala <span dir="ltr">&lt;<a href="mailto:jatin.kala.jk@gmail.com" target="_blank">jatin.kala.jk@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Here&#39;s a suggestion:<br>
    <br>
    i_save = new(100000,integer)<br>
    j_save = new(100000,integer)<br>
    counter = 0<span class=""><br>
    <br>
    do i=0,127<br>
    do j=0,364<br>
    if(.not.ismissing(z2(i,j)).and.z2(i,j).lt. 0.0)then<br></span>
          i_save(counter) = i<br>
          j_save(counter) = j<br>
          counter = counter + 1<br>
    end if<br>
    end do<br>
    end do<br>
    <br>
    add_poly= gsn_add_polymarker(wks,plot,i_save,j_save,polyres)<br>
    draw(plot)<br>
    frame(wks)<div><div class="h5"><br>
    <br>
    <div>On 22/02/2016 3:10 PM, Anusha
      sathyanadh wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>Dear Sir,<br>
            (haley_at_nyahnyahspammersnyahnyah)<br>
            <br>
          </div>
          I have seen your reply to the query <em>to overcome
            this <br>
            <br>
               warning:TransformPostDraw: tfPolyDrawList element 0 is
            invalid
          </em><br>
          <em>&gt; warning:TransformPostDraw: tfPolyDrawList
            element 1 is invalid
          </em><br>
          <em>&gt; warning:TransformPostDraw: tfPolyDrawList
            element 2 is invalid
          </em><br>
          <br>
          <br>
          like<br>
          <br>
          <br>
           a = new(3,graphic)
          <br>
             a(0) = gsn_add_polygon(wks,plot,x1,y1,gsres)
          <br>
             a(1) = gsn_add_polyline(wks,plot,x2,y2,gsres)
          <br>
             a(2) = gsn_add_polymarker(wks,plot,x3,y3,gsres)
          <br>
          <br>
        </div>
        but it doesnt work for my script as I have to use loop
        within..Can u help to get out of this trouble?<br>
        <br>
        <br>
        do i=0,127<br>
        do j=0,364<br>
        if(.not.ismissing(z2(i,j)).and.z2(i,j).lt. 0.0)then<br>
        add_poly= gsn_add_polymarker(wks,plot,i,j,polyres)<br>
        <br>
        end if<br>
        draw(plot)<br>
        end do<br>
        end do<br>
        frame(wks)<br clear="all">
        <div>
          <div>
            <div><br>
              -- <br>
              <div>
                <div dir="ltr"><b style="color:rgb(0,0,0)"><i><span style="font-family:georgia,serif">ANUSHA
                        SATHYANADH</span><br style="font-family:georgia,serif">
                      <span style="font-family:georgia,serif">Senior
                        Research Fellow</span><br style="font-family:georgia,serif">
                      <span style="font-family:georgia,serif">Deparment
                        of Atmospheric and Space Sciences</span><br style="font-family:georgia,serif">
                      <span style="font-family:georgia,serif">Pune
                        university</span><br>
                    </i></b><br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
ncl-talk mailing list
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre cols="72">-- 
Dr. Jatin Kala
Lecturer in Atmospheric Science
Murdoch University,Perth, Western Australia
Tel: <a href="tel:%28%2B618%29%209360%206297" value="+61893606297" target="_blank">(+618) 9360 6297</a>
<a href="http://www.jatinkala.com/" target="_blank">http://www.jatinkala.com/</a>

</pre>
  </font></span></div>

<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>