Difference between revisions of "Raster Scripts"

From WikiROMS
Jump to navigationJump to search
Line 8: Line 8:


==ncgm2www==
==ncgm2www==
Once you have at '''gmeta''' file from <span class="red">ccnt</span> or <span class="red">csec</span>, you can use <span class="red">ncgm2www</span> to create numbered gif images for each frame of your gmeta file. I often use this script to make animations for PowerPoint. '''Note:''' You need [http://www.imagemagick.org ImageMagick] for these scripts to work. The syntax for the command is:
Once you have at '''gmeta''' file from <span class="red">ccnt</span> or <span class="red">csec</span>, you can use <span class="red">ncgm2www</span> to create numbered gif images for each frame of your gmeta file. I often use this script to make animations for PowerPoint. {{note}}'''Note:''' You need [http://www.imagemagick.org ImageMagick] for these scripts to work. The <span class="red">ncgm2www</span> and <span class="red">ncgm2gif</span> scripts can be found in the <span class="forestGreen">src/Bin</span> directory of the plotting package source. It is recommended that you place both scripts in <span class="forestGreen">$HOME/bin</span> where <span class="forestGreen">$HOME</span> is your home directory. If you place the scripts elsewhere you will need to edit the <span class="red">ncgm2www</span> to set the correct path to ncgm2gif.
 
If you do not already have [http://vis.sdsc.edu/ imtools] installed you will probably want to modify <span class="red">ncgm2gif</span> setting <span class="blue">fmt</span> to 'vec' so [http://www.imagemagick.org ImageMagick] is used for the conversion from vector to raster.
 
Also, make sure that your <span class="blue">NCARG_ROOT</span> environment variable is set properly.
 
The syntax for the command is:


   <span class="red">&gt; ncgm2www [ cgmfile] [ resolution ] [ outfile ]</span>
   <span class="red">&gt; ncgm2www [ cgmfile] [ resolution ] [ outfile ]</span>

Revision as of 15:57, 5 March 2008

Raster Scripts

Two shell scripts are available to convert the gmeta files into raster (gif) images. You will almost always use the ncgm2www script because the ncgm2gif script only operates on single frame gmeta files. Both scripts are needed because ncgm2www calls ncgm2gif.


Plotting Package Menu
1. Installation
2. Contour Plots
3. Cross-section Plots
4. Internal Plotting Parameters
5. Plotting Options
6. Plotting Fields
7. Raster Scripts


ncgm2www

Once you have at gmeta file from ccnt or csec, you can use ncgm2www to create numbered gif images for each frame of your gmeta file. I often use this script to make animations for PowerPoint. NoteNote: You need ImageMagick for these scripts to work. The ncgm2www and ncgm2gif scripts can be found in the src/Bin directory of the plotting package source. It is recommended that you place both scripts in $HOME/bin where $HOME is your home directory. If you place the scripts elsewhere you will need to edit the ncgm2www to set the correct path to ncgm2gif.

If you do not already have imtools installed you will probably want to modify ncgm2gif setting fmt to 'vec' so ImageMagick is used for the conversion from vector to raster.

Also, make sure that your NCARG_ROOT environment variable is set properly.

The syntax for the command is:

  > ncgm2www [ cgmfile] [ resolution ] [ outfile ]

For Example:

  > ncgm2www gmeta.ccnttemp 725x725 cnt_temp

Will create the a 725x725 pixel gif image for each frame of the gmeta.ccnttemp file. The resulting gif files will be named sequentially ccnt_temp_001.gif through whatever the maximum frame number in the cgmfile is. If there are 20 frames then the files would be ccnt_temp_001.gif through ccnt_temp_020.gif.

If the outfile argument is missing then ocean is assumed. If all arguments are omitted then the following values are assumed:

  cgmfile    =   gmeta
  resolution =   512x512
  outfile    =   ocean

You can then use other tools to create avi or animated gif files.

Prev: Plotting Fields