NCARG_GKS(1NCAR)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

πŸ’– NCARG_GKS β€” the NCAR Graphics GKS vibe manual πŸ’–

okay bestie, so this is NCARG_GKS(1NCAR) from the NCAR Graphics collection, and it's literally just a whole little family of environment variables that let you boss around how NCAR Graphics' GKS behaves. no cap. let's get into it ✨


🌸 NAME 🌸

NCAR Graphics GKS β€” Environment variables (yes, the whole page is about the env vars, she's a themed girlie)


✨ SYNOPSIS ✨

so basically there's a collection of environment variables that lets you control certain aspects of NCAR Graphics' GKS behaviour. here's the whole lineup, bestie:

  • NCARG_GKS_OUTPUT lets you specify what file or process CGM output is directed to.
  • NCARG_GKS_PSOUTPUT lets you specify what file any PostScript output from NCAR GKS is directed to (stdout is allowed, we love a flexible queen).
  • NCARG_GKS_PDFOUTPUT lets you specify what file any PDF output from NCAR GKS is directed to (stdout is allowed here too 🫢).
  • NCARG_GKS_GENCGM lets you request that the NCAR GKS package generate binary encoded CGM rather than NCGM β€” and NCGM is the NCAR private encoding of binary encoded CGM, iykyk. ⚠️ heads up though: other NCAR Graphics utilities, like the metafile translators, cannot read in generic CGM.
  • NCARG_GKS_BUFSIZE gives you control over how CGM output is buffered. very main character energy.
  • NCARG_GKS_DEBUG, if set, will result in debugging information about the GKS I/O subsystem being output to standard out. πŸ‘€

πŸ¦‹ NCARG_GKS_OUTPUT πŸ¦‹

by default, CGM output goes to a file called "gmeta", but bestie, the environment variable NCARG_GKS_OUTPUT can redirect that output to a file with a different name, or even to a translator process. it's giving options πŸ’…

Examples:

setenv NCARG_GKS_OUTPUT myfile

this one causes CGM output to be placed in "myfile". simple, iconic.

setenv NCARG_GKS_OUTPUT "|ctrans"

this causes the "ctrans" translator to be forked and CGM output piped to it. piped!! 🌈

setenv NCARG_GKS_OUTPUT "|"

this causes a default translator to be forked and CGM output to be piped to it. and 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 like, read the room, it has to be a translator-shaped process fr fr.


πŸŽ€ 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

causes all PostScript output to be written to "myfile".

setenv NCARG_GKS_PSOUTPUT stdout

causes all PostScript output to be written to standard out. slay. ✨


🌈 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. same energy as her PS sister πŸ’œ

Examples:

setenv NCARG_GKS_PDFOUTPUT myfile

causes all PDF output to be written to "myfile".

setenv NCARG_GKS_PDFOUTPUT stdout

causes all PDF output to be written to standard out. we love a stdout moment 🫢


⭐ 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. it's niche, it's specific, it ate. πŸ’…

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. customization era πŸ’–

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, behaviour 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. okay so:

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. (yes, the manual says "you're output", we're keeping it, it's canon now 😭). a big buffer is a bad idea here 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, bestie: if you output binary encoded CGM rather than NCGM (NCAR CGM), NCAR Graphics generally won't deal with it. the one exception is that you can convert the file back to NCGM using cgm2ncgm. so like... you've been warned fr fr πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

  • cgm2ncgm(1NCARG)
  • ncargintro(5NCARG)
  • ncarg_env(5NCARG)

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, you're officially educated πŸ’… this was NCARG_GKS(1NCARG) from the NCAR crew, dated January 1992 β€” yeah she's vintage and she still serves. go forth and set your environment variables, bestie, mwah πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from