GOPWK(3NCARG)

πŸ’– GOPWK β€” bestie we're opening a GKS workstation πŸ’–

okay so this is gopwk, from the NCAR Graphics crew (that's the 3NCARG manual, if you're keeping track). it's the glow-up moment where a workstation literally gets born. let's get into it πŸŽ€


✨ NAME ✨

gopwk β€” opens a GKS workstation

like. it opens it. that's the whole job. and it does it flawlessly. πŸ’…


✨ SYNOPSIS ✨

CALL GOPWK (WKID, CONID, WKTYPE)

✨ C-BINDING SYNOPSIS ✨

for my C girlies, there's a binding 🫢

#include <ncarg/gks.h>

void gopen_ws(Gint ws_id, const char *conn_id, Gint ws_type);

✨ DESCRIPTION ✨

so here are the three arguments, and yes you have to give all three, no shortcuts bestie 😭

  • WKID (Integer, Input) β€” this is the little name tag you give your workstation, its identifier, and it's the one you'll be shouting back at every single future GKS function call that wants a workstation identifier. and in NCAR GKS? WKID can literally be any non-negative integer. any of them. go wild. ✨
  • CONID (Integer, Input) β€” the connection identifier. and here's the thing, it means completely different things depending on which workstation type you picked. it's giving "context dependent" fr fr. the USAGE section below spills all the tea. πŸ“
  • WKTYPE (Integer, Input) β€” the identifier that says exactly which kind of output device you're aiming at. every GKS package has its own implementation-dependent set of workstation types it supports, so don't assume. but the legal workstation types in NCAR GKS are, and I'm listing all of them because I would never gatekeep:
    • 1 β€” NCGM
    • 3 β€” WISS
    • 7 β€” pre-existing X11 window.
    • 8 β€” non-existing X11 window.
    • 10 β€” text dump of graphics output.
    • 11 β€” PDF in portrait mode.
    • 12 β€” PDF in landscape mode.
    • 20 β€” color PostScript in portrait mode.
    • 21 β€” color Encapsulated PostScript (EPS) in portrait mode.
    • 22 β€” color Encapsulated PostScript Interchange format (EPSI) in portrait mode.
    • 23 β€” monochrome PostScript in portrait mode.
    • 24 β€” monochrome Encapsulated PostScript (EPS) in portrait mode.
    • 25 β€” monochrome Encapsulated PostScript Interchange format (EPSI) in portrait mode.
    • 26 β€” color PostScript in landscape mode.
    • 27 β€” color Encapsulated PostScript (EPS) in landscape mode.
    • 28 β€” color Encapsulated PostScript Interchange format (EPSI) in landscape mode.
    • 29 β€” monochrome PostScript in landscape mode.
    • 30 β€” monochrome Encapsulated PostScript (EPS) in landscape mode.
    • 31 β€” monochrome Encapsulated PostScript Interchange format (EPSI) in landscape mode.

like ok twenty types?? she's versatile. main character energy for real πŸ‘‘


✨ USAGE ✨

this is where the CONID lore lives. buckle up πŸ¦‹

  • for workstation types of 1 (CGM) or 3 (WISS), the connection ID gets used as a Fortran logical unit number. and listen, you can have at most one workstation of type 1 open at a time, and the exact same rule applies to workstations of type 3. but β€” plot twist β€” you can have workstations of types 1 and 3 open simultaneously, they just have to have distinct connection IDs. no sharing. πŸ’€ also, if you wanna use the GFLASH package or literally any GKS segmentation functions, WISS must be opened first. that's the rule, i don't make them.
  • for workstations of type 7, the connection ID is the X11 window ID of the existing window (you can grab that from xwininfo for example). it's giving "i already have a window, i just need you to vibe with it".
  • for workstations of type 8, an X11 window gets created right at open-workstation time. so the connection ID? irrelevant. it does not care. it will not read it. πŸ™ˆ
  • for workstations of type 10, the ASCII text gets written to standard output, and again, the connection ID is irrelevant.
and here's the hard limit bestie, no cap: there can be a maximum of fifteen simultaneously open workstations of all types. fifteen. that's it. that's the ceiling. 😭

✨ ACCESS ✨

to use GKS routines, you load the NCAR GKS-0A library ncarg_gks. that's the vibe. go get her. 🌈


✨ SEE ALSO ✨

Online: gopks, gacwk, gdawk, gclwk, gclks, opngks, clsgks, gopen_ws

Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Fundamentals, UNIX Version

iykyk, go read the friends too, they're all part of the same friend group πŸ’œ


Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.


okay that's the whole page!! πŸ’– thank you for coming to my ted talk, now go open a workstation and slay. this was GOPWK(3NCARG) from the UNIX manual, dated March 1993, and it ate. periodt. πŸŽ€βœ¨πŸ‘‘