Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

5.1 OVERVIEW


There are two modes for animating in Ferret. One can animate "on the fly" in an interactive sesion, or a sequence of Ferret plots can be stored and then animated. A series of gif images can also be animated, see Ch5 Sec1.2 below.

Formerly we had a method using an HDF file type. NOTE that starting with Ferret v6.6 HDF movies are no longer available.


5.1.1 Animating on the fly

In a Ferret session, display an animation with the command,

yes? REPEAT/ANIMATE[/LOOP=n]

to start an animation sequence. Given LOOP=n, the entire animation sequence will repeat n times.

Example:

yes? set data coads_climatology
yes? repeat/l=1:12/animate/loop=5 (shade sst; go fland)

NOTE: In order to properly display, it is necessary to have backing store enabled for the Xserver.


5.1.2 Note on using a set of gif images to make a movie

An easy way to make movies from gif files using third-party tools to generate an animation from a set of gif (png) images.

One such tool is gifsicle, http://www.lcdf.org/gifsicle/ free unix-based software that works well for creating animations from a set of gif images. No doubt there are other similar tools. The procedure for creating a set of Ferret gif images would be the same; see the documentation of gifsicle or other tools for how to use them to create the animation.

gfsicle is extremely easy to use:

1. Make your gif files with a Ferret command like:

yes? REPEAT/J=1:36 (GO scriptfile `j`; FRAME/FILE=sst-`j`.gif)

where the scriptfile uses the argument j to determine the plot characteristics. See sections later in this chapter for more on the REPEAT command and creating GIF files.

2. To create an animated gif (using just one example from the gifsicle website), from the Unix command line:

 > gifsicle --delay=10 --loop sst*.gif > anim.gif

This file can be as long as you want and may specify files more than once to repeat any of the images if you wish.

That's it. The tool concatenates the gif files with some connecting information needed to do the animation. The resulting movie gif file is just about as large as the sum of the input frames.