What are those _nc programs for?
Date: Fri, 20 Sep 1996 08:08:30 -0600 From: Peggy Bruehl To: Charles.Mcgill@noaa.gov Subject: 960920:ASGQ, not! Cc: peggy@comet.ucar.edu Status: R >Date: 19 Sep 1996 22:08:28 -0400 >From: "Charles McGill" >To: "peggy@comet.ucar.edu" (Return requested) >Cc: "paul sisson" (Return requested) >Subject: A.S.G.Q (Another Silly GEMPAK Question) Chuck, >I was wondering what the difference is between gdplot and gdplot_nc (and >others like this) besides the nc versions being larger. What (if any) >advantage is there to using the nc programs for generating metafiles? This is not a silly question at all. The "_nc" versions of GEMPAK programs are special executables that have the GPLT (graphics drawing) process and the NC (metafile generation) driver pre-compiled and linked together with the GEMPAK application program. Ordinarily, those three processes (gdplot, gplt, nc) all run separately and communicate with each other via message queues. If something unusual happens and one of processes crashes (or is killed with a control-C), then the other two processes and the messages queues could become "orphaned". Orphaned processes and queues can pile up on a workstation, slowing performance, and possibly even causing more crashes of other GEMPAK processes. Enough orphaned processes and queues could even hang the workstation. (Incidently, this "three process/two message queue" system is the reason that the GPEND program is necessary. After the successful execution of a GEMPAK program (such as GDPLOT, or GDCROSS), you must run GPEND in order to gently exit the gplt and nc (or xw, ps, gf, etc) processes, and to close the message queues. If you forget to run GPEND, you will be orphaning those processes and queues on your workstation.) When the three processes are linked together, there is no chance for any orphaned processes. If something happens to crash process, there are no other processes or queues left behind. This is why the "_nc" programs are so popular in scripts, where crashes can sometimes be common. However, there is nothing about the "_nc" programs that require they be run from scripts. You can run them interactively as well. In the old days when I was at Unidata, I also used to release "_gf" versions of the programs too, for making GIF images. There's no reason "_ps" versions can't be made either, for making Postscript files. The big drawback of the "_nc" programs is that you can not create an overlay graphic from two different programs. So, for example, if you wanted to use GPMAP to drop a high resolution county map, or a US roads & interstates map on top of your GDPLOT graphic, you can't use GDPLOT_NC or GPMAP_NC because once either of these programs is exited, the NC device driver is also exited. Once the device driver is exited, all the navigation information about the graphic is gone. Peggy __________________________________________________________________ Peggy Bruehl National STRC Coordinator - NWS peggy@comet.ucar.edu COMET/UCAR PO Box 3000 (303) 497-8356 Boulder, CO 80307-3000 SOO/STRC Home Page: http://www.comet.ucar.edu/pub_html/STRC_html/index.html ------------------------------------------------------------------