<div dir="ltr"><div class="gmail_default" style="font-size:small">The same principles apply when overlay contour lines versus filled contours.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">But, I do see that it can be an issue if you are trying to overlay lines with labels, and the labels keep changing.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I suggest either turning off the line labels with "res@cnLineLabelsOn = False", or try to control the look of your labels with some extra resources. You can see some examples at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/contourLab.shtml">http://www.ncl.ucar.edu/Applications/contourLab.shtml</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">I don't know if you need to define a new workstation inside the loop, every time you create a topography plot. It's likely that you can just have one workstation open, as I do in the example I created earlier, and then just change the data each time in the loop.</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 3, 2015 at 3:25 AM, Sebastian Otarola-Bustos <span dir="ltr"><<a href="mailto:Sebastian.F.Otarola-Bustos.1@nd.edu" target="_blank">Sebastian.F.Otarola-Bustos.1@nd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you very much Mary, I saw your nice script, but I'm not sure if it is what I'm looking for. Because I want to do contours lines of height, but not filled, because I want them to be over a colormap. And My trouble is that I'm plotting topography inside the loop, and the labels of the contour lines are changing their possitions on every iteration. So it's a little bit confussing. And I don't know how to do this outside the loop, because I'm defining the workstation inside. I'm also not sure if I can overlay things that belong from different workstations. In that case, I only need to plot topography once before the do loop, but I haven't checked yet :P<br><br>All the best,<br>Thank you,<br>Sebastián.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 31, 2015 at 3:04 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Sebastian,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Please see a new example I just created, which generates an animation of filled contours of a data field across time, over filled contours of a terrain map.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/animate.shtml#ex3" target="_blank">http://www.ncl.ucar.edu/Applications/animate.shtml#ex3</a><br></div><div class="gmail_default"><br></div><div class="gmail_default" style="font-size:small">The terrain map is static for each time step, while the reflectivity changes. The animate_3_1.ncl script is the more traditional way of generating the contours, like you are currently doing, while the animate_3_2.ncl and animate_3_3.ncl use "setvalues" and/or "NhlRemoveOverlay" to speed things up.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I didn't get a lot of speed up with the "faster" versions of this script, because the field I contoured was relatively small and I "only" had 97 time steps. If you have more time steps or your terrain map is particularly large, then you might get better speed up with animate_3_2.ncl or animate_3_3.ncl.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I may attempt a panel plot of this same script but at different levels, just to see if I better illustrate the speed up better.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</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" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jul 21, 2015 at 4:40 AM, Sebastian Otarola-Bustos <span dir="ltr"><<a href="mailto:Sebastian.F.Otarola-Bustos.1@nd.edu" target="_blank">Sebastian.F.Otarola-Bustos.1@nd.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi All, <br><br>I'm trying to do an animation of different fields and I need to plot also topography contours, because I'm working in a valley surrounded by mountains. I'm doing something like this:<br><br> <font face="garamond, serif"> do n=0,ntimes-1</font><div><font face="garamond, serif"> wks = gsn_open_wks("png","animate"+sprinti("%03i",n)) </font></div><div><font face="garamond, serif"> print("Trabajando en el tiempo: " + times(n))</font></div><div><font face="garamond, serif"> res@gsnRightString = " Tiempo: "+ times(n)</font></div><div><font face="garamond, serif"> res@gsnDraw = False</font></div><div><font face="garamond, serif"> res@gsnFrame = False</font></div><div><font face="garamond, serif"> plotB = gsn_csm_contour(wks,SLP(n,:,:),res)</font></div><div><font face="garamond, serif"> plotA = gsn_csm_contour(wks,ter(:,:),ter_res)</font></div><div><font face="garamond, serif"><br></font></div><div><font face="garamond, serif"> map = gsn_csm_map(wks,map_res)<br> overlay(map,plotB)</font></div><div><font face="garamond, serif"> overlay(map,plotA)</font></div><div><font face="garamond, serif"> draw(map)</font></div><div><font face="garamond, serif"> frame(wks)</font></div><div><font face="garamond, serif"><br></font></div><div><font face="garamond, serif"> delete(wks) ; Make sure PNG file is closed</font></div><div><font face="garamond, serif"> end do</font></div><div><br>The problem is, as I'm creating the workstation inside de loop, I have to plot topography(which is a static field) every time. And when I finally see the animation, the contours are fixed, but the contour numbers are moving all the time. Does anybody know other way to the the same or to fix this? <br><br><br>All the best,<br>Sebastián.</div><div> </div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>