Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 
Previous: GEMPAK Map Aesthetics Next: GEMPAK File Templates and Aliases Table of contents Frames User Manual GEMPAK Online Tutorial

11 GEMPAK Device Drivers
Device drivers translate the graphics commands generated by GEMPLT into format specific commands for each output device.

The following device drivers are currently supported by GEMPAK:


Device Specific Notes

  • XW - X windows are by far the most popular format for displaying graphics on workstations. The portability in display features provides the user with the ability to design displays that can be viewed locally, or to any other display console which provides display access to the computer initiating the output. As a result, distributed processing of data sets is possible.

    The XW device is capable of dumping the contents of the current frame to a GIF file by using the GSAVE [NAME] command at the GEMPAK prompt.

  • PS - Postscript output is generally used for hardcopy devices. The attractive feature about Postscript is that the graphics are independent of the resolution of the hardware which generates the image. This is because the graphics commands use vectors to define graphics primatives. Ultimately, the resolution of the image is determined by the printer or other output device which is typically a much higher resolution device than the workstation console.

    The PS driver now supports image types as well.

  • GF - GIF format graphics files are one of the most popular forms for storing and transporting image information due to the widely accepted standard, and their relatively efficient use of data compression. GIF images are raster data, and therefore are limited by the resolution of the hardware on which they are generated. These images are typically used for console display, but are less attractive for hardcopy output.

  • GIF - The standard GF driver utilizes the X display to generate its graphics output, as well as to obtain hardware fonts. GIF provides for GIF file generation without connecting to an X server. All fonts will be rendered in software.

  • NC - NTRANS CGM driver for creating META files for use with the NTRANS viewing Software.


    The DEVICE definition in GEMPAK programs utilizes the following format:

    DEVICE = device | name | X ; Y-size | color-type

    NAME

    • In the XW driver, NAME specifies the window to be used. Up to 5 windows may be opened. The default window name is "GEMPAK".
    • For the NC, GF and PS drivers, NAME is the output filename. For the NC driver, if the file already exists, subsequent plots (frames) will be appended to the end of the file unless the name specified is the default name ("Nmeta"), in which case a new file is always created. The PS driver will always overwrite an existing file (if it exists) when it starts up. The default file for the PS driver is "ps.plt". The gif driver GF default output file is "gempak.gif". If the file "gempak.gif" already exists, then a sequence number is appended, so that the next file written is "gempak.gif.1". This is useful when generating multiple gif images from the same application.
    X ; Y-size
    • X and Y are the device dimensions. For XW, xsize and ysize may be (1) the number of pixels in the corresponding direction, or (2) a percentage of the screen size. In the PS driver, xsize and ysize are the paper dimensions in inches. If xsize is greater than ysize, then a landscape orientation is used. For xsize less than ysize, the plot orientation is portrait.

      If xsize and ysize are not specified the following defaults will be used:

        XW .7;.7 (70 percent of the screen size)
        PS 11;8.5 (Standard letter size paper in landscape)
      Xsize and ysize are not currently used by the NC driver.
    CMODE
    • CMODE is the color mode for the device. It is only used by the PS driver. Possible values are:
        M : Monochrome (one color - black)
        G : Gray scales, 20
        C : 32 colors
      The default is M.
    The following table displays which device attributes may be set for the different devices. An "x" means the attribute may be set for that device.
                    XW      PS      NC      GF
          -------------------------------------
          name      x       x       x       x
          X;Y size  x       x               x
          cmode             x
    
    
    Not all options are valid for all devices.

    It is very important that you run GPEND when you are finished generating your output files. Otherwise, the "End of File" message won't get written to the files. Without the "End of File" message, you will be unable to view or print your picture.

     


    Previous: GEMPAK Map Aesthetics Next: GEMPAK File Templates and Aliases Table of contents Frames User Manual GEMPAK Online Tutorial

     
     
      Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
     
    National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
    P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690