[Thread Prev][Thread Next][Index]

creating animated GIFs with consistent colour scales



Dear Ferret users,

I'm trying to create an animated GIF representing the timeseries evolution 
of (for example) the depth of a certain isotherm in a dataset.  I am doing 
this by creating a load of GIFs using commands like:

# get a variable containing the depth of the 283K isotherm
let isotherm = temperature[z=@loc:283];

# now create a series of GIF files, one for each timestep
repeat/l=1:10 (shade/levels=100 isotherm; frame/file="isotherm.gif");

I then use whirlgif to assemble these frames into an animated GIF.

The problem is that each frame comes out with a different range of depths 
for the isotherm, so the colour scales in each frame are different.  I'd 
like to be able to work out the minimum and maximum depths of the isotherm 
in the entire dataset, then use this range for every frame.  This way the 
colour scales would be consistent and there would be no frames containing 
data out of this range.

I can find the minimum and maximum values easily:
let minval = isotherm[i=@min,j=@min,l=@min];
let maxval = isotherm[i=@max,j=@max,l=@max];

I thought I might be able to create the pictures using a command like:
shade/levels=(minval, maxval, 10) isotherm;
but I get a syntax error.  It seems that using variables instead of 
explicit numbers in shade/levels is not allowed.

How can I get the values of minval and maxval into the shade/levels 
command?  Or is there another way to do the same thing?

Any help would be very much appreciated.

Jon

-- 
--------------------------------------------------------------
Dr Jon Blower              Tel: +44 118 378 5213 (direct line)
Research Fellow            Tel: +44 118 378 8741 (ESSC)
ESSC                       Fax: +44 118 378 6413
University of Reading      Email: jdb@mail.nerc-essc.ac.uk
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement