PCCPIJ.DOC Documentation for PCCPIJ 2002/06/09 Introduction ------------ PCCPIJ is an interactive graphic program that displays longitude by latitude DataFiles in color on a PC screen. The computer must have a 386 or higher CPU chip, a VGA graphic chip, and about 500K bytes of conventional DOS memory. PCCPIJ can create linear combinations of several DataFile records (e.g. differences) which can be stored to disk. There are several options for presentation of DataFile records. PCCPIJ can produce an understandable PostScript file of a single DataFile record in landscape mode or two DataFile records in portrait mode. Invocation ---------- PCCPIJ PCCPIJ datafilex PCCPIJ datafilex datafiley Location of Input Files ----------------------- PCCPIJ requires these input files: Z72X46N, CPIJ.I, and PCCOLORS. PCCPIJ searches for these files in the following directories in this order: present working directory, C:\AOM, C:\CPIJ, D:\AOM, D:\CPIJ, E:\AOM, E:\CPIJ. If any of the files cannot be found, PCCPIJ will not run. In addition, Color Bar Definition Table files are searched for in the same seven directories. If a desired CBDT file is not found, but SCT0 is present, then SCT0 is used. Input File Z72X46N ------------------ Z72X46N, like other DataFiles, is a UNIX Fortran unformatted file. The first record contains the horizontal ocean fraction which is used by PCCPIJ to determine the continental outline. Input File CPIJ.I ----------------- CPIJ.I is an ASCII text file containing default screen presentation parameters. The first time a DataFile record is displayed by PCCPIJ, the first 32 characters of the record title are compared with the lines in CPIJ.I. If a match is found, then the other presentation parameters on the line are used to display the DataFile record's contents on the screen. If a line of CPIJ.I contains periods in some character positions, then any character in the record title in the same position is accepted as a match. The meaning of each screen presentation parameter is described below: Center: Center value of the color scale Differ: Difference between scale markers (4 color blocks apart) Ro: Number of grid cells to rotate the color plot to the left G: An unused parameter for A grid, B grid, or C grid L: A = all grid cells are displayed; L = land only; O = ocean W: B = continental outline is black; W = outline is white CBDT: Name of Color Bar Definition Table to be used. Input File PCCOLORS ------------------- An ASCII file that determines the screen and PostSrcipt color shadings. Color Bar Definition Table (CBDT) Input Files --------------------------------------------- These ASCII text files should have a filename with at most 8 characters in length. PCCPIJ ignores the first 4 lines of a CBDT file. Most CBDT files use approximately 46 blocks which appear in the color bar on the left side of the screen. SCT0 is a uniformly distributed CBDT file. SCT1 to SCT9 are unevenly distributed CBDT files. Command Summary --------------- ? = list commands on console A = display data at All grid cells B = display continental outline in Black C CBDT = use new Color Block Distribution Table file: CBDT D = ... = calculate Different record, for example: D = 2*X1 - D2 + 273.16 Dn = display n-th Different record F = write current record to output Files: CPIJ.O and CPIJ.IF K = correct Keyboard error in previous command L = display data only over Land grid cells NX datafile = use New datafile for file X NY datafile = use New datafile for file Y O = display data only over Ocean grid cells P Xn = produce PostScript file of record Xn P Xm Yn = produce PostScript file of records Xm and Yn Q = Quit CPIJ program R n = Rotate plot n grid boxes to left S = display current Scaling parameters S ScaleCenter [ScaleDif] = use new Scaling parameters T = edit Title W = display continental outline in White Xn = display n-th record of file X Yn = display n-th record of file Y F command: Produce DataFile record CPIJ.O and SPP line CPIJ.IF -------------------------------------------------------------- The first execution of the F command opens the files CPIJ.O and CPIJ.IF in the present working directory, destroys prior files with those names, writes a UNIX Fortran unformatted DataFile record of the current screen contents to CPIJ.O, and writes an ASCII line to CPIJ.IF containing the presentation parameters of the current screen contents. Subsequent executions of the F command add an additional DataFile record to CPIJ.O and an additional line to CPIJ.IF. The file CPIJ.IF has the proper format for inclusion into the file CPIJ.I. If CPIJ.IF is incorporated into CPIJ.I and "PCCPIJ CPIJ.O" is executed, then the screen contents should look like it did when the F command was executed in the prior invocation of PCCPIJ. P command: Produce PostScript Output File ----------------------------------------- "P Xnnn" produces a PostScript output file in landscape mode quite similar to what record Xnnn looks like on the computer screen. "P Xmmm Ynnn" produces a PostScript output file in portrait mode displaying records Xmmm and Ynnn, one on top of the other on a single page. The PostScript output file, called CPIJ.PS, is written into the present working directory which must be writable (i.e. not a CDROM). The P command destroys and overwrites CPIJ.PS if the file already exists. Only the last PostScript output file will be present when PCCPIJ quits. Rename the file CPIJ.PS to save it. There are two common errors that can occur when printing the PostScript file: 1. The record title may not contain parentheses unless they are balanced, i.e. the same number of left and right parentheses; 2. The CBDT file associated with the record may not contain block numbers that exceed those defined in the file PCCOLORS. S command: Change Color Scaling and Numerical Labels of Color Bar ----------------------------------------------------------------- The S command accepts between 0 and 2 arguments. With no arguments, S displays the current scaling parameters but does not change them. With arguments, the scaling parameters must be given in the order below. With only one argument, the scale difference parameter is not changed. ScaleCenter: Center value of the color scale; approximately the mean value of the data. ScaleDiffer: Indicates the scale value difference between adjacent numerical labels and between 4 color blocks. The full range of the color scale is approximately ten times ScaleDiffer. Screen Display -------------- The screen display of PCCPIJ has the following elements: The title line shows the first 72 characters of the title that was read from the DataFile, and which may have been modified by the T command. The color bar on the left side of the screen and the numerical labels to its left partition the real numbers into colors. If a grid cell's data value is equal to one of the numerical labels, then the grid cell's color will be that beneath the numerical label. If a grid cell's data value is greater than all numerical labels, then the grid cell's color will be the highest color. If a grid cell's data value is less than all numerical labels, then the grid cell's color will be the lowest color. Note that colors (as defined by the CBDT file) may be the same color as the screen's background color so that both the color bar and grid cells may appear to be missing color. The color plot displays color squares for each longitude by latitude grid cell. If all grid cells are being used, a continental outline is displayed. Flush to the right and directly beneath the color plot is the file (X, Y or D) and the record number being displayed. Beneath the color plot may be some previously executed commands which may be useful to the user. The bottom line of the screen display is the command line and title editing line. Only 79 characters are available.