NCARG_GKS(1NCAR)
π ncarg_gks β the NCAR Graphics GKS environment variables (1NCAR, NCAR GRAPHICS) π
okay bestie, gather round, because this one is literally just a big pile of environment variables that let you boss around how NCAR Graphics' GKS behaves. no command, no flags, just vibes you set in your shell and the library obeys. it's giving puppet master. π
β¨ SYNOPSIS β¨
a whole collection of environment variables lets you control certain aspects of NCAR Graphics' GKS behaviour. here's the lineup, no cap:
NCARG_GKS_OUTPUTlets you specify what file or process CGM output is directed to.NCARG_GKS_PSOUTPUTlets you specify what file any PostScript output from NCAR GKS is directed to (and yeah,stdoutis allowed π).NCARG_GKS_PDFOUTPUTlets you specify what file any PDF output from NCAR GKS is directed to (also,stdoutis allowed π ).NCARG_GKS_GENCGMlets you request that the NCAR GKS package generate binary encoded CGM rather than NCGM (which is the NCAR private encoding of binary encoded CGM). heads up though: other NCAR Graphics utilities, like the metafile translators, cannot read in generic CGM. not a single one. πNCARG_GKS_BUFSIZEgives you control over how CGM output is buffered.NCARG_GKS_DEBUG, if set, will result in debugging information about the GKS I/O subsystem being output to standard out. it's the "tell me everything" button π«Ά
πΈ NCARG_GKS_OUTPUT πΈ
by default, CGM output is directed to a file called gmeta, but bestie, the environment variable NCARG_GKS_OUTPUT can be used to redirect output to a file with a different name or to a translator process. glow-up for your filenames β¨
Examples:
setenv NCARG_GKS_OUTPUT myfile
this causes CGM output to be placed in myfile. iconic.
setenv NCARG_GKS_OUTPUT "|ctrans"
this causes the ctrans translator to be forked and CGM output piped to it. feeding it straight into the machine π
setenv NCARG_GKS_OUTPUT "|"
this causes a default translator to be forked and CGM output to be piped to it. now listen β not just any process can be used here, because it's assumed that the process is invoked as translatorname - where the - indicates that the translator is to read from standard input. so no random little guy off the street, okay? π
π¦ NCARG_GKS_PSOUTPUT π¦
by default, PostScript output is written to gmetaNN.sfx where NN is the NCAR GKS workstation ID used in the call to GOPWK to open the workstation, and sfx is ps, eps, or epsi as appropriate. setting NCARG_GKS_PSOUTPUT will override all defaults and write any PostScript output to the designated file. periodt.
Examples:
setenv NCARG_GKS_PSOUTPUT myfile
this causes all PostScript output to be written to myfile.
setenv NCARG_GKS_PSOUTPUT stdout
this causes all PostScript output to be written to standard out. straight to the terminal, main character energy π
π NCARG_GKS_PDFOUTPUT π
by default, PDF output is written to gmetaNN.pdf where NN is the NCAR GKS workstation ID used in the call to GOPWK to open the workstation. setting NCARG_GKS_PDFOUTPUT will override all defaults and write any PDF output to the designated file. she's consistent like that π
Examples:
setenv NCARG_GKS_PDFOUTPUT myfile
this causes all PDF output to be written to myfile.
setenv NCARG_GKS_PDFOUTPUT stdout
this causes all PDF output to be written to standard out.
π NCARG_GKS_GENCGM π
if the NCARG_GKS_GENCGM environment variable is set, GKS will strip off the NCAR wrapper and generate a binary encoded CGM. and as mentioned above, other NCAR Graphics utilities such as translators don't yet support generic CGM as input. so this option is useful primarily for getting CGM output into a form appropriate for use with other software packages that expect binary encoded CGM. iykyk π§
Example:
setenv NCARG_GKS_GENCGM
π NCARG_GKS_BUFSIZE π
if output is to a standard file, buffered I/O is used and the NCARG_GKS_BUFSIZE environment variable provides you with some flexibility in specifying buffer size. choose your own adventure, bestie.
on Cray systems, the default buffer size is 1MB. all others use whatever the system default is, as specified in the file stdio.h.
if the environment variable NCARG_GKS_BUFSIZE is set, it overrides the defaults. if NCARG_GKS_BUFSIZE is set to N, behavior is as follows:
- if N is 0: CGM output is unbuffered.
- if N is not 0: Buffer Size = N * 1024 bytes.
Examples
let's suppose you're running a long multi-frame graphics job on a Cray supercomputer and you'd like to use a very large I/O buffer. the default for a Cray is 1MB but you'd like to make it 2MB:
setenv NCARG_GKS_BUFSIZE 2048
now let's assume you're on the same Cray computer, but you want to pipe you're output to a translator and view the frames as they come up. a big buffer is a bad idea because your CGM might not be flushed out every frame. you can make the output unbuffered as follows:
setenv NCARG_GKS_OUTPUT "|ctrans"
setenv NCARG_GKS_BUFSIZE 0
as a final example, let's say you're running the big multi-frame NCAR Graphics job on a Sun, which happens to have a default buffer size of 1024 bytes (look in /usr/include/stdio.h). specify a 1MB buffer using:
setenv NCARG_GKS_BUFSIZE 1024
π CAVEATS π
it's worth saying one more time, because we love a rerun: if you output binary encoded CGM rather than NCGM (NCAR CGM), NCAR Graphics generally won't deal with it. she said no. π
the one exception is that you can convert the file back to NCGM using cgm2ncgm. thank u next π
π₯ SEE ALSO π₯
cgm2ncgm(1NCARG)ncargintro(5NCARG)ncarg_env(5NCARG)
β COPYRIGHT β
Copyright (C) 1987-2002 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
okay that's the whole page, bestie, go forth and set your environment variables responsibly π«Ά
later, legend β this was the NCAR Graphics manual page for NCARG_GKS(1NCAR), dated January 1992, straight from NCAR πβ¨
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms