RE: [ncl-talk] Reducing the file size of PS images. (fwd)

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 3 Apr 2006 22:07:12 -0600 (MDT)

>
>Does any one have an example of a good way to reduce the file size of post
>script images being created in a loop? I am trying to make yearly
>animations (365 fames) from netcdf files with daily values. Using
the "do" function I can create images as post scripts but the files
>are quite large when combined. I've playing around with the ImageMagick
>functions convert and mogrify but haven't been able to get them working.
>If someone has an example of what they've done, I would appreciate
>being able to look at their ncl >file.

[1]

The "Getting Started Using NCL"

    http://www.ncl.ucar.edu/Document/Manuals/Getting_Started/

has an example using "ncgm" See:
http://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun09n.shtml

[2]

>From within an NCL script ... [Version: ImageMagick 6.2.2]

  pltType = "ps" ; ps, eps,...
  do n=1,365
     pltName = "alex_"+ sprinti("%0.3i", n) ; alex_001, ..., alex_365
     wks = gsn_open_wks(pltType ,pltName) ; ps, eps ...
     gsn_define_colormap(wks,"BlAqGrYeOrRe")

         :

     pltNameType = pltName+"."+pltType
     system("convert -density 144 -trim +repage "+pltNameType+" "+pltName+".png")
                     ; sample options ^^^^^^^^^ => ImageMagick 6.2.2
     system("/bin/rm "+pltNameType) ; remove large file
  end do

The above should create 365 png files.

good luck

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 03 2006 - 22:07:12 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 04 2006 - 11:27:39 MDT