
                         HELP (WRITE FILES)

----------------------------------------------------------------------

When the "WRITE FILES" button is activated from the main tgcmidl
window, a popup window is generated from which the current frame 
can be saved in the following four formats:

SUN:		Sun raster image files (monochrome or color, single frame 
		  per file). Pre-existing files are overwritten.
NCGM:		Ncar computer graphics metacode, currently for monochrome
		  only (multiple frames per file). Opening an existing
                  file results in truncation.
POSTSCRIPT:	Monochrome or color, multiple frames per file. Opening
                  an existing file results in truncation.
ASCII:		Ascii text files with data (multiple frames per file).
                  Opening an existing file results in appending.

Unix commands to view saved files (s.a., man pages):
  Sun Raster:   xloadimage
  Cgm graphics: idt, ictrans, or ctrans
  Postscript:   pageview
  Ascii data:   any editor, cat, etc.

Unix commands to get hardcopy (s.a., man pages):
  Sun Raster:   (not easy)
  Cgm graphics: laserplot file.cgm, or for color, 
                laserplot -Phaocolor file.cgm
  Postscript:   lpr file.ps, or for color, lpr -Phaocolor file.ps
  Ascii data:   lpr file.dat, or enscript file.dat

----------------------------------------------------------------------

There are four areas in the "WRITE FILES" popup window from top down
in this order:

Sun Raster Files:
  Enter desired file path in the text widget. Click on "WRITE SUN RASTER
  FILE (single frame)" to make the raster file. IF THE FILE ALREADY
  EXISTS IT WILL BE OVERWRITTEN. Sun raster files are made by copying 
  the current display in the draw widget of the main tgcmidl window 
  (other file types are made by redrawing the frame to the new device). 
  Consequently, the draw widget should be completely exposed (not covered 
  by another window) when the file is made. One frame per file only.

CGM Metacode Files:
  Enter file path in the text widget. Use "OPEN CGM FILE" and "CLOSE
  CGM FILE" to open or close the file. Use "WRITE TO CGM FILE" and
  "NO WRITE TO CGM FILE" to control whether or not frames are to be
  written to the currently open file.  This file can contain multiple 
  frames. However, YOU CANNOT REOPEN AN EXISTING CGM FILE AND APPEND 
  ADDITIONAL FRAMES. OPENING AN EXISTING CGM FILE WILL DESTROY (TRUNCATE)
  ITS CONTENTS. If you attempt to open an existing file, a warning
  window will require confirmation. Color raster images will not be
  written to CGM files.

  Cgm files may be viewed using ncar's idt (image display tool), ctrans,
  ictrans, etc. Hard copies can be made with the laserplot command. In
  general you should be able to treat these files as if they had been
  made using ncar graphics. (If you want to use idt during execution of
  tgcmidl, you must invoke idt and open a file for display *before* 
  starting IDL with the tgcmidl command.)

  There are some problems with the cgm device, e.g., dashed lines are
  poor in hardcopy, lines are thin, character sizes vary, etc. Its best 
  to use postscript for camera-ready figures.

Postscript Files:
  Similiar to CGM files above, but will write color or monochrome.
  Multiple frames per file are permitted, but opening an existing
  file will result in truncation (warning/confirmation as in CGM)

Ascii Data Files:
  Similiar to CGM and Postscript above, except that existing files
  may be appended. If an existing file is opened, the pointer will
  be positioned for appending.

  Like any text file, these files may be viewed with any editor, printed
  with lpr, etc.  Short headers are written to the ascii file for each frame.
  In the case of a velocity vectors-only plot, the magnitudes (vector sums)
  will be written to the ascii data file. Any "missing data" (e.g., 
  attempt to plot outside height range of model, or attempt to take
  log10 of values <= 0), will be entered as 1.e+20. The x and y coordinates
  are written to the file as well as the field data. Data is written
  with a 6e13.5 format. Try looking in ~foster/tigcmproc/rdascii for
  examples of fortran code to read these files.

Buttons at bottom of Write Files window:

DONE:
  Exits write files (wirte files window goes away).

PAGEVIEW (PS):
  Execute shell command to run pageview in background. Pageview is
  the postscript viewer and will be invoked with the current postscript
  file name. (it can take awhile for pageview to read the file before
  coming up on the screen)

XLOADIMAGE (SUN):
  Execute shell command to run xloadimage in background. Xloadimage
  will display the current sun raster image file.

(A button to run idt is not provided, since idt works best if started
 *before* idl is initiated by tgcmidl)

Note: if you have problems with color tables, it is best to quit
tgcmidl, quit IDL, then restart the utility (xloadimage, idt, etc).

----------------------------------------------------------------------
