[Thread Prev][Thread Next][Index]

Re: [ferret_users] for multiple png or gif file for the use of animation



Hi,

Thank you for writing back with your script.

The python graphics libraries that we use in PyFerret write png files, not gif's. If you do a web search you will find discussions about converting pngs to gifs using ImageMagick. (https://github.com/kohler/gifsicle/issues/12)  Is that an option for you? If you or anyone tries it, please let us know how it looks.

I have answered more of your queries, below:

On 11/17/2016 3:17 PM, saurabh rathore wrote:
Dear All,
first of all many thanks to all you guys who participate in this discussion, i am very happy in saying that i made my animation from gif files and also created multiple gif file in one go. As  russ and sudheer pointed out my mistake of grave accent whic is not the inverted coma / quote. in this mail i want to explain the steps that i did make the movie from gif files.

1)  first of all i made a script to develop the plot from required calculation. this is the usual script that we are making for our analysis purpose which contain all the analysis step and beautification steps required for plots. i named this script as ohc_mov.jnl (as in my case i want to calculate ocean heat content from 0_700 m so i named it like this, this is the jnl script. i have analyzed ohc from 2005-2016 annually so the plot ohc_0_700_001 means 2005 and so on ).

2) in the above mentioned script after the frame command i made five comments
i) for making png images
ii) for making multiple gif files
iii) for making multiple png files
iv) for making animation specially from gif files.

in this ohc_mov.jnl script you will the label/nouser command so i made it as ohc($stamp) which will automatically put the time step number on the plot which helps to understand the animation in time step.

!!!!!!!!!!!!!!  BUT HERE I AM HAVING A QUESTION TO FERRETERS THAT IF I WANT TO PUT LABEL IN THE DATE FORMAT (e.g. 15-jan-2005 and so on ) / ONLY MOTHS FORMAT / ONLY YEAR FORMAT SO WHAT SHOULD I HAVE TO DO. i mean to say that i want label according to my time series over the plots. so is it possible ?  !!!!!!!!!!!!!!!!!!!

You can control the precision of the date strings with MODE CALENDAR.  The default is

yes? show mode calendar
yes? use monthly_navy_winds
yes? shade/l=3 uwnd   ! the label is dd-MMM-yyyy mm:ss

yes? set mode calendar:months
yes? shade/l=3 uwnd   ! the label is MMM-yyyy
However the time label is not drawn if you have used /NOLABEL .  To turn it back on, do not use /UNLABEL, but instead get rid of most of the other labels in your script, using "go unlabel".  First, also turn off the labels in the upper left with "cancel mode logo", and then see the section on 'removing moveable labels: http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/customizing-plots/LABELS#_VPID_236

You can set the time-label precision that you want, and remove all of the automatic labels that you don't want, leving the time label.

3) please make sure that for making animation from gif files you should have installed a software gifsicle. from a simple command in the linux prompt
sudo apt-get install gifsicle

!!!!!!!!!!!!!!!!!!!!  APART FROM THIS I AM A LITTLE QUERY THAT WHAT DOES IT MEANS `LI,ZW=3`. WHAT IS THE FUNCTION OF THIS. ACCORDING TO MY UNDERSTANDING THIS IS THE PLOT NUMBER LIKE 001, 002 AND SO ON IF WE MADE IT ZW=4 THEN THIS WILL BE 0001, 0002 ANS SO ON  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Yes, `LI,ZW=3` adds 0's to pad out the number if it is shorter than 3 digits.  For file naming, this is nice so the files are in the correct order in a directory listing:
file001.gif, file002.gif, ..., file010.gif  instead of file1.gif, file2.gif, ..., file10.gif

WILL THIS GIF ANIMATION THAT IS CREATED ANIM.GIF CAN WE RUN ON WINDOWS ALSO IF NOT THEN HOW TO MAKE IT DOES WE HAVE TO CHANGE THE EXTENSION FROM .GIF TO SOMETHING ELSE ?

please reply to my above queries.

but guys please remember the grave accent this have to use instead of quotes which is present above the TAB key. and one more thing that i faced is that pyferret is not creating gif files so for this kind of work you have to use ferret instead of pyferret.

i hope we can make thousands of plot in one go for the peoples working on climatic scale ( decadal or multidecadal scales ) and use those to make animation.

please find the attached script of my animation with all commands. once again thank you all for your supports.

happy to work with ferret and its team.

regards, saurabh

 

On Thu, Nov 17, 2016 at 2:42 PM, Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi folks,

What you seem to miss is that the original script

use coads_climatology

REPEAT/L=1:12 (FILL SST; GO fland; FRAME/file=sst0_`l`.gif)

should work! I copied and pasted it to my Ferret prompt and it did produce the 12 image files sst0_1.gif, sst0_2.gif, . . . , with right images.  The puzzle is why it failed on Saurabh.  Or am I missing something?

Regards,

Ryo



--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement