1NCARG_GKS(1NCAR) NCAR GRAPHICS NCARG_GKS(1NCAR)
2
3
4
6 NCAR Graphics GKS - Environment variables
7
9 A collection of environment variables allows you to control certain
10 aspects of NCAR Graphics' GKS behaviour.
11
12 NCARG_GKS_OUTPUT allows you to specify what file or process CGM output
13 is directed to.
14
15 NCARG_GKS_PSOUTPUT allows you to specify what file any PostScript out‐
16 put from NCAR GKS is directed to (stdout is allowed).
17
18 NCARG_GKS_PDFOUTPUT allows you to specify what file any PDF output from
19 NCAR GKS is directed to (stdout is allowed).
20
21 NCARG_GKS_GENCGM allows you to request that the NCAR GKS package gener‐
22 ate binary encoded CGM rather than NCGM (the NCAR private encoding of
23 binary encoded CGM). Note that other NCAR Graphics utilities, such as
24 the metafile translators, cannot read in generic CGM.
25
26 NCARG_GKS_BUFSIZE provides you with control over how CGM output is
27 buffered.
28
29 NCARG_GKS_DEBUG, if set, will result in debugging information about the
30 GKS I/O subsystem being output to standard out.
31
32
34 By default, CGM output is directed to a file called "gmeta", but the
35 environment variable NCARG_GKS_OUTPUT can be used to redirect output to
36 a file with a different name or a translator process.
37
38 Examples:
39
40 setenv NCARG_GKS_OUTPUT myfile
41
42 causes CGM output to be placed in "myfile".
43
44 setenv NCARG_GKS_OUTPUT "|ctrans"
45
46 causes the "ctrans" translator to be forked and CGM output piped to it.
47
48 setenv NCARG_GKS_OUTPUT "|"
49
50 causes a default translator to be forked and CGM output to be piped to
51 it. Note that not just any process can be used here because it is
52 assumed that the process is invoked as "translatorname -" where the "-"
53 indicates that the translator is to read from standard input.
54
55
57 By default, PostScript output is written to "gmetaNN.sfx" where "NN"
58 is the NCAR GKS workstation ID used in the call to GOPWK to open the
59 workstation and "sfx" is "ps", "eps", or "epsi" as appropriate. Set‐
60 ting NCARG_GKS_PSOUTPUT will override all defaults and write any Post‐
61 Script output to the designated file.
62
63 Examples:
64
65 setenv NCARG_GKS_PSOUTPUT myfile
66
67 causes all PostScript output to be written to "myfile".
68
69 setenv NCARG_GKS_PSOUTPUT stdout
70
71 causes all PostScript output to be written to standard out.
72
73
75 By default, PDF output is written to "gmetaNN.pdf" where "NN" is the
76 NCAR GKS workstation ID used in the call to GOPWK to open the worksta‐
77 tion. Setting NCARG_GKS_PDFOUTPUT will override all defaults and write
78 any PDF output to the designated file.
79
80 Examples:
81
82 setenv NCARG_GKS_PDFOUTPUT myfile
83
84 causes all PDF output to be written to "myfile".
85
86 setenv NCARG_GKS_PDFOUTPUT stdout
87
88 causes all PDF output to be written to standard out.
89
90
92 If the NCARG_GKS_GENCGM environment variable is set, GKS will strip off
93 the NCAR wrapper and generate a binary encode CGM. As mentioned above,
94 other NCAR Graphics utilities such as translators don't yet support
95 generic CGM as input. Thus, this option is useful primarily for getting
96 CGM output into a form appropriate for use with other software packages
97 that expect binary encoded CGM.
98
99 Example:
100
101 setenv NCARG_GKS_GENCGM
102
103
105 If output is to a standard file, buffered I/O is used and the
106 NCARG_GKS_BUFSIZE environment variable provides you with some flexibil‐
107 ity in specifying buffer size.
108
109 On Cray systems, the default buffer size is 1MB. All others use what‐
110 ever the system default is, as specified in the file "stdio.h".
111
112 If the environment variable NCARG_GKS_BUFSIZE is set, it overrides the
113 defaults. If NCARG_GKS_BUFSIZE is set to N, behavior is as follows:
114
115 If N is 0:
116
117 CGM output is unbuffered.
118
119 If N is not 0:
120
121 Buffer Size = N * 1024 bytes.
122
123 Examples
124
125 Let's suppose you're running a long multi-frame graphics job on a Cray
126 supercomputer and you'd like to use a very large I/O buffer. The
127 default for a Cray is 1MB but you'd like to make it 2MB.
128
129 setenv NCARG_GKS_BUFSIZE 2048
130
131 Now let's assume you're on the same Cray computer, but you want to pipe
132 you're output to a translator and view the frames as they come up. A
133 big buffer is a bad idea because your CGM might not be flushed out
134 every frame. You can make the output unbuffered as follows:
135
136 setenv NCARG_GKS_OUTPUT "|ctrans"
137 setenv NCARG_GKS_BUFSIZE 0
138
139 As a final example, let's say you're running the big multi-frame NCAR
140 Graphics job on a Sun, which happens to have a default buffer size of
141 1024 bytes (look in /usr/include/stdio.h). Specify a 1MB buffer using:
142
143 setenv NCARG_GKS_BUFSIZE 1024
144
145
147 It's worth saying one more time: if you output binary encoded CGM
148 rather than NCGM (NCAR CGM), NCAR Graphics generally won't deal with
149 it. The one exception is that you can convert the file back to NCGM
150 using cgm2ncgm.
151
153 cgm2ncgm(1NCARG), ncargintro(5NCARG), ncarg_env(5NCARG)
154
156 Copyright (C) 1987-2002
157 University Corporation for Atmospheric Research
158 The use of this Software is governed by a License Agreement.
159
160
161
162NCAR January 1992 NCARG_GKS(1NCAR)