Converting NCAR CGM to Sun Raster Format

NOTE: In what follows hao> is the computer prompt.

  1. Convert the NCAR metacode file to Sun rasterfile format. Note that we are converting the metacode file to a Sun rasterfile and rescaling to 400 by 400 pixels using -d sun and -resolution 400x400, respectively.

    hao> ctrans -d sun -resolution 400x400 SHS28022.amieplt1.eobs > eobs.sun

    Beware that the Sun rasterfile is significantly larger than the original metacode file - eobs.sun (22.8 Mb) versus SHS28022.amieplt1.eobs (3.7 Mb). This is due to the fact that Sun rasterfiles are 8 bits per pixel and contain a colortable.

  2. Obtain the individual frames from the single Sun rasterfile.

    hao> rassplit eobs.sun

    hao> ls

    eobs.0001.sun   eobs.0030.sun   eobs.0059.sun   eobs.0088.sun   eobs.0117.sun
    eobs.0002.sun   eobs.0031.sun   eobs.0060.sun   eobs.0089.sun   eobs.0118.sun
    eobs.0003.sun   eobs.0032.sun   eobs.0061.sun   eobs.0090.sun   eobs.0119.sun
    eobs.0004.sun   eobs.0033.sun   eobs.0062.sun   eobs.0091.sun   eobs.0120.sun
    eobs.0005.sun   eobs.0034.sun   eobs.0063.sun   eobs.0092.sun   eobs.0121.sun
    eobs.0006.sun   eobs.0035.sun   eobs.0064.sun   eobs.0093.sun   eobs.0122.sun
    eobs.0007.sun   eobs.0036.sun   eobs.0065.sun   eobs.0094.sun   eobs.0123.sun
    eobs.0008.sun   eobs.0037.sun   eobs.0066.sun   eobs.0095.sun   eobs.0124.sun
    eobs.0009.sun   eobs.0038.sun   eobs.0067.sun   eobs.0096.sun   eobs.0125.sun
    eobs.0010.sun   eobs.0039.sun   eobs.0068.sun   eobs.0097.sun   eobs.0126.sun
    eobs.0011.sun   eobs.0040.sun   eobs.0069.sun   eobs.0098.sun   eobs.0127.sun
    eobs.0012.sun   eobs.0041.sun   eobs.0070.sun   eobs.0099.sun   eobs.0128.sun
    eobs.0013.sun   eobs.0042.sun   eobs.0071.sun   eobs.0100.sun   eobs.0129.sun
    eobs.0014.sun   eobs.0043.sun   eobs.0072.sun   eobs.0101.sun   eobs.0130.sun
    eobs.0015.sun   eobs.0044.sun   eobs.0073.sun   eobs.0102.sun   eobs.0131.sun
    eobs.0016.sun   eobs.0045.sun   eobs.0074.sun   eobs.0103.sun   eobs.0132.sun
    eobs.0017.sun   eobs.0046.sun   eobs.0075.sun   eobs.0104.sun   eobs.0133.sun
    eobs.0018.sun   eobs.0047.sun   eobs.0076.sun   eobs.0105.sun   eobs.0134.sun
    eobs.0019.sun   eobs.0048.sun   eobs.0077.sun   eobs.0106.sun   eobs.0135.sun
    eobs.0020.sun   eobs.0049.sun   eobs.0078.sun   eobs.0107.sun   eobs.0136.sun
    eobs.0021.sun   eobs.0050.sun   eobs.0079.sun   eobs.0108.sun   eobs.0137.sun
    eobs.0022.sun   eobs.0051.sun   eobs.0080.sun   eobs.0109.sun   eobs.0138.sun
    eobs.0023.sun   eobs.0052.sun   eobs.0081.sun   eobs.0110.sun   eobs.0139.sun
    eobs.0024.sun   eobs.0053.sun   eobs.0082.sun   eobs.0111.sun   eobs.0140.sun
    eobs.0025.sun   eobs.0054.sun   eobs.0083.sun   eobs.0112.sun   eobs.0141.sun
    eobs.0026.sun   eobs.0055.sun   eobs.0084.sun   eobs.0113.sun   eobs.0142.sun
    eobs.0027.sun   eobs.0056.sun   eobs.0085.sun   eobs.0114.sun   eobs.sun
    eobs.0028.sun   eobs.0057.sun   eobs.0086.sun   eobs.0115.sun
    eobs.0029.sun   eobs.0058.sun   eobs.0087.sun   eobs.0116.sun

    Remove the original Sun rasterfile.
    hao>rm eobs.sun

  3. Create the MPEG movie. This is a rather slow process, taking more time the more frames you have. Note also that we must specify the size of the input files, here using the command line option -r 400x400.

    hao> mpeg_create eobs -r 400x400 *.sun

    This will create an MPEG movie named eobs.mpg from the 142 Sun rasterfiles derived from the NCAR metacode file using ctrans representing a monotonic progression in time - eobs.mpg (1.7 Mb).

    Be sure to clean up by removing the individual Sun rasterfiles, hao> rm *.sun

 Return to HAO homepage.

--Revised 25 January 1996 by