Documentation of the "PLOTPS" tools outputting the codes of PostScript
Teruyuki KatoForecast Research Department, Meteorological Research Institute

Abstract
This technical report is the users’ manual of "PLOTPS," a tool for drawing figures with PostScript codes.
PLOTPS was developed based on the programming language Fortran 77. Since PostScript code is one of many
programming languages, such as Fortran and C, the four fundamental rules of arithmetic calculation can be
expressed using it for the input-output of data. Codes for drawing figures are supplied in PostScript, so thatfigures can be shown on workstation displays and personal computers by converting these codes with software
such as GhostScript, and output using corresponding printers.

Standard image files (e. g. , GIF and JPG)

deteriorate through extension and reduction, while printed figures using PostScript codes do not, because they
are expressed with vectors. The PostScript codes that are often used are described briefly in CHAPTER 9.
The users’ manual of "PLOTPS" has been utilized as an on-line manual for UNIX. The description of thefunctions of "PLOTPS" can be displayed by a command on UNIX. However, the users’ manual of "PLOTPS"
has now been published because it is utilized in programming simulated results of the nonhydrostatic model,
offered to universities and related organizations from the Japan Meteorological Agency (JMA). "PLOTPS" isalso used in the drawing tool of "PANDAH" that will be operated in the numerical prediction routine of theJMA. Since this users’ manual is printed using a Fortran program with "PLOTPS," a new one can be easily
updated whenever the "PLOTPS" is improved.
The history of drawing tools in the JMA is described below. Initially, "GPSL," an XY-plotting code thatcontrols the pens that draw figures, was introduced.

"KGRAF," produced by Hitachi, was then used inconjunction with laser printers. "GPSL" was effectively converted to "KGRAF" and used until the computer
system was replaced with the Hitachi-SR8000. The laser printers connected to the computer system could
output only black-and-white figures. Since inexpensive color printers were purchased, the research results
were required to be output in color. The codes for color were not available in PostScript level-1, but wereintroduced in PostScript level-2 in the latter half of the 1990’s. Against this background, "PLOTPS" began
being programmed adhering to "GPSL" because there were many programs using this system. "GPSL" only
contains codes for drawing lines, not for painting areas within closed curves. Since Postscript prepares thecodes for painting areas within closed curves, beautiful figures with color have been created using "PLOTPS."

Furthermore, most of the functions in "GPSL" were re-introduced using the same function names in"PLOTPS," so that most of the programs using "GPSL" can output PostScript codes by using "PLOTPS." Thefunctions in "GPSL" introduced in "PLOTPS" are described in Appendix 2.
In addition to "PLOTPS," drawing tools outputting PostScript codes were developed by the Institute ofGlobal Environment and Society, "GrADS" (The Grid Analysis and Display System), the National Center for
Atmospheric Research ("NCAR Graphics"), and GFD-Dennou Club, "GFD-Dennou Library." The above tools
depend on computers to display figures. However, "PLOTPS" only outputs PostScript codes, so that it candraw the research results immediately wherever Fortran programs can be run.

Many meteorologists use"GrADS," but there is one serious problem. PostScript files are quite because the PostScript codes are output
by other software. Since "PLOTPS" was developed to produce the smallest possible Postscript files, the files
produced by "PLOTPS" are 10 to 40 % the size of those produced by "GrADS." Furthermore, "PLOTPS" wasalso developed to facilitate output file modifications by using the advantages of programming language, andsatisfies the requirements of the Japanese language, as can this manual.