printim within an animation

Adam Wolf adamwolf at STANFORD.EDU
Mon Sep 12 20:05:02 EDT 2005


Friends -

I am trying to animate a time sequence of a simulation.
Every timestep, I write 4 images to a buffer screen,
print the buffer using "printim", then swap the images.

I get the following error every few frames:
Logic Error 20 in gxhpng.  Notify Developer

The program seems to be swapping the image before
printim is finished writing the files.  The gif files that printim
manages to create often are missing parts of the plot.
(Note: if I print after swapping the gif is totally blank)

I wonder if it is possible to introduce a delay between
printim and swap that allows the gif to be created sucessfully.

Does anyone have experience with this problem?
I copied my script below

Thanks - Adam

              Adam Wolf

Carnegie Institute of Washington
Department of Global Ecology
260 Panama Street
Stanford CA 94305
                   *
                       cel 510.207.8303
                  adamwolf at stanford.edu
             globalecology.stanford.edu

======================================

'open dailygrid2.ctl'
'set dbuff on'
t = 10
'set lon -130 -50'
'set lat 15 55'
'set gxout shaded'
while (t <= 365)
   'set t 't
   'q time'
   result=subwrd(result,3)
   hour=substr(result,1,2)
   day=substr(result,4,2)
   month=substr(result,6,3)
   day=substr(result,4,2)
   year=substr(result,9,4)

   'set vpage 0   5.5 4 8.5'
   'set clevs -5 -4 -3 -2 -1 0 1 2 3 4 5'
   'draw title SIB  'day' 'month' 'year''
   'd SIB'
   'cbarn'

   'set vpage 5.5 11 4 8.5'
   'set clevs -5 -4 -3 -2 -1 0 1 2 3 4 5'
   'draw title PCTM-Derived NEE'
   'd NEE'
   'cbarn'

   'set vpage 0   5.5 0 4.5'
   'set clevs -30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30'
   'draw title dCO2 ppm'
   'd CO2ABL-CO2FT'
   'cbarn'

   'set vpage 5.5 11 0 4.5'
   'set clevs 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0'
   'draw title PBL turnover n/day'
   'd W/PBL*86400'
   'cbarn'

    if(t < 100)
    * This is where the error is occurring
       'printim NEE0't'.gif gif x1100 y850 black'
    else
       'printim NEE't'.gif gif x1100 y850 black'
    endif

    'swap'

   t = t + 1
endwhile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20050912/285a2dce/attachment.html 


More information about the gradsusr mailing list