[ncl-talk] Freeze plot in animation?

Karin Meier-Fleischer meier-fleischer at dkrz.de
Mon Jul 13 01:00:18 MDT 2015


Hi Sebastian,

you don't need to open a workstation for each plot, because NCL will do 
it automatically,
if you use a Format like "PNG".

Take a look at the NCL animations page 
http://ncl.ucar.edu/Applications/animate.shtml.
The last example is what you are looking for.

Bye,
Karin

Am 13.07.15 um 02:51 schrieb Sebastian Otarola-Bustos:
> Hello,
>
> I'm trying to do a time animation that consist in 2 plots, SLP 
> colormap, and over that I would like to plot topography contours. But 
> the thing is that as I've created the workstation inside the loop, I 
> have to plot topography(ter) every time, and the labels of the 
> contours change their positions in every image. I would like this 
> labels to be always in the same place(as topograpgy is a static 
> field), so I think I have to freeze the first terrain plot, but I 
> don't know how to do that. And I also cannot plot this outside the 
> loop, because I need to create the workstation inside the loop because 
> at the end I create an animation from all the .png files.
>
> Here is the part of the script I was talking about.
>
> * do n=0,ntimes-1*
> *      wks = gsn_open_wks("png","animate"+sprinti("%02i",n))    ; 
> animate_00.png, animate_01.png, etc*
> *      print("Trabajando en el tiempo: " + times(n))*
> *      res at gsnRightString  = "    Tiempo:  "+ times(n)*
> *      res at gsnDraw = False*
> *      res at gsnFrame = False*
> *      plotB = gsn_csm_contour(wks,SLP(n,:,:),res)*
> *      plotA = gsn_csm_contour(wks,ter(:,:),ter_res)*
> *      map = gsn_csm_map(wks,map_res)*
> *      overlay(map,plotB)*
> *      overlay(map,plotA)*
> *      draw(map)*
> *      frame(wks)*
>
> Any help would be really appreciated,
>
> Best regards,
> Sebastián.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150713/b4128255/attachment.html 


More information about the ncl-talk mailing list