<html>
<body>
Friends - <br><br>
I am trying to animate a time sequence of a simulation.<br>
Every timestep, I write 4 images to a buffer screen, <br>
print the buffer using "printim", then swap the
images.<br><br>
I get the following error every few frames:<br>
Logic Error 20 in gxhpng. Notify Developer<br><br>
The program seems to be swapping the image before<br>
printim is finished writing the files. The gif files that
printim<br>
manages to create often are missing parts of the plot.<br>
(Note: if I print after swapping the gif is totally blank)<br><br>
I wonder if it is possible to introduce a delay between<br>
printim and swap that allows the gif to be created sucessfully.<br><br>
Does anyone have experience with this problem?<br>
I copied my script below<br><br>
Thanks - Adam<br>
<x-sigsep><p></x-sigsep>
<font face="Courier, Courier">
Adam Wolf<br><br>
Carnegie Institute of Washington<br>
</font><font face="Courier, Courier" color="#0000FF">Department of Global
Ecology<br>
</font><font face="Courier, Courier">260 Panama Street<br>
Stanford CA 94305<br>
* <br>
cel 510.207.8303 <br>
</font><font face="Courier, Courier" color="#0000FF">
adamwolf@stanford.edu<br>
</font><font face="Courier, Courier">
globalecology.stanford.edu<br><br>
======================================</font> <br><br>
<font face="Courier, Courier">'open dailygrid2.ctl'<br>
'set dbuff on'<br>
t = 10<br>
'set lon -130 -50'<br>
'set lat 15 55'<br>
'set gxout shaded'<br>
while (t <= 365)<br>
'set t 't<br>
'q time'<br>
result=subwrd(result,3)<br>
hour=substr(result,1,2)<br>
day=substr(result,4,2)<br>
month=substr(result,6,3)<br>
day=substr(result,4,2)<br>
year=substr(result,9,4)<br><br>
'set vpage 0 5.5 4 8.5'<br>
'set clevs -5 -4 -3 -2 -1 0 1 2 3 4 5'<br>
'draw title SIB 'day' 'month' 'year''<br>
'd SIB' <br>
'cbarn'<br><br>
'set vpage 5.5 11 4 8.5'<br>
'set clevs -5 -4 -3 -2 -1 0 1 2 3 4 5'<br>
'draw title PCTM-Derived NEE'<br>
'd NEE' <br>
'cbarn'<br><br>
'set vpage 0 5.5 0 4.5'<br>
'set clevs -30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30'<br>
'draw title dCO2 ppm'<br>
'd CO2ABL-CO2FT' <br>
'cbarn'<br>
<br>
'set vpage 5.5 11 0 4.5'<br>
'set clevs 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0'<br>
'draw title PBL turnover n/day'<br>
'd W/PBL*86400' <br>
'cbarn'<br><br>
if(t < 100)<br>
* This is where the error is occurring<br>
'printim NEE0't'.gif gif x1100 y850
black'<br>
else<br>
'printim NEE't'.gif gif x1100 y850
black'<br>
endif <br><br>
'swap'<br><br>
t = t + 1<br>
endwhile<br>
</font></body>
</html>