Home
EZD User Manual
Contents
1. 9 28 cesse LONG BEY E 9 29 7 22 24 care E O 7 EZGO wiwa AGA WA 8 30 ezcfradv 7 9 26 31 Abe A 32 SZCZE Dese x Oras E RR 10 oi anni a 10 ezchook 9 31 33 23 ezelgudi 7 20 EZAT 2 hod hes Oh os 7 9 26 34 NAR DE 7 19 35 ese ec rx 8 CZEDS 5 6 36 February 11 1999 2555 7 2 logical dtr ee E x tes MC ie 2 ezerquad 22222220222 7 24 epe ee ne aaa 6 WE 37 CACSOLOW 38 CZOSCIC N DE 10 Ne 1 7 5 hha 10 7 35 39 matrix multiply sand Reo 2 ezeshowg 40 MONG X d E 5 ezesquad tee eda 7 19 20 monochrome 6 13 18 36 38 41 PLAC ae 5 41 N CZW Med KSU 5 6 42 naming windows 42 ezcXn 7 31 34 NCAR occ vacate noel ee 3 5 22 24 ezdie aE A 8 NCAR CGM 5 eae 4 ARG P AR AMETER_FILE
2. Description Does actual call to do frame advance if not in the quadrant mode It also displays the graphic contents by calling ezcshowf ezcshowf in turn calls ezcdisp1 to do the display business In EZD the ezcdispl routine is a dummy routine as a place holder The client program of EZD has to provide a true function routine for displaying the graphic contents Arguments none Procedure call ezcshowf to display the graphic contents call ezcclear to clear the collection In EZD ezcclear is a stub routine that client program can replace it for real task It will stay in the current quadrant when in quadrant mode EZD User Manual February 11 1999 35 3 25 ezcps Calling Sequence subroutine ezcps iflag istring Description Controls the PS devices It is one of the underlying action routines for ezcdodev Arguments iflag character action command string the possible values are on close istring character command modifier string the possible val ues are mono color Procedure For the action command Open and activate a PS device if no existing PS device Assign a proper file name for the PS file and open a PS log file if it does not exist Activate a PS device if it has been deactivated No action if an active PS file exists For the action command off Deactivate the current active PS device No action if no active PS device For the action
3. GKS 77 c flags Bdynamic I usr local gks4101 file f and during linking 77 flags Bdynamic L usr local gks4101 N files o usr local basis bin lib libezd a N lncarg lgksflb lgkswiss lgksgksm atc device libraries gt lgksmsc lncarv lncarg loc 1 11 On Sund this requires the following format during partial compilation without GKS 77 flags Bdynamic lt file f gt and during linking 77 flags Bdynamic lt files o gt usr local basis bin lib libezd a 1 lgksflb lgkswiss lgksgksm lgksmsc 1 loc 1 11 On an 700 this requires the following format during partial compilation with GKS 77 c flags I usr local gks4101 lt file f gt and during linking f77 flags Wl L usr local gks4101 files o usr local basis bin libezd a lncarg lgksflb lgkswiss lgksgksm lt atc device libraries gt lgksmsc lncarv lncarg_loc 1X11 1m 1BSD On an HP700 this requires the following format during partial compilation without ATC GKS f77 c flags lt file f gt and during linking 77 flags lt files o gt u r l cal basis bin libezd a X lncarv lncarg loc lm 5 lncarg lgksflb lgkswiss lgksgksm lgksmsc N The UNICOS versions of these commands are similar Instead o
4. 2 4 Functionalities of EZD The EZD package is a set of Fortran utilities for controlling graphical devices in programs that use the National Center of Atmospheric Research NCAR Graphics Library Graphic devices supported by the EZD depend on the underlying Graphics Kernel System GKS A computer system with Advanced Technology Center ATC GKS the devices supported are Computer Graphic Metafile CGM files PostScript files Xwindows and Tektronix Graphics terminals For the computer system that has only the NCAR GKS the NCAR CGM file is supported and additional Xwindows is provided if NCAR3 2 or later version is used For CGM and PS we use file or device interchangeably The EZD package also has subroutines to properly start and to end the plots to make a frame advance to do graphics in quadrant mode to set up color tables to write the log files and to record the error log The EZD package has stub subroutines ezchook ezcdispl which can be replaced by a customized function routines to perform actions when a frame is advanced A set of parameters are used in EZD to perform some specific controls such as the maximum number of frames in a CGM file Xwindow display location problem name of a run etc A user may inquire the current settings of control parameters and set their values For UNICOS users EZD also provides the setup utilities to specify Boxid Security Level and Give Keep These setups will be used to generate proper pr c
5. 3 18 ezcdolev Calling Sequence subroutine ezcdolev lvstring Description Defines the Security Level for the output for LC UNICOS users Arguments lyst xing character 6 character string to identify the security lev el they are uncl UNCL CRD SRD Or 1 SW 4 155 corresponding ly Procedure The routine verifies the input string associates with its boxid for classified output to a proper box and write it to a common block holding this value ezccgm will grab this string value from the common block to issue proper 1pr command to the operating system EZD User Manual February 11 1999 29 3 19 ezcerror Calling Sequence subroutine ezcerror msg sevlev Description The routine records the error message to STDERR and calls ezcdie to send signal if fatal error occurs Arguments msg character 120 error message sevlev integer error severity level level 12 comment level 2 minor abnormality level 3 fatal error Procedure Copy the error message to the STDERR file and call ezcdie if sevlev 2 3 You may work to replace ezcdie or supply a signal handler for the signal raised by it See ezcdie 30 February 11 1999 EZD User Manual 3 20 ezcfradv Calling Sequence subroutine ezcfradv note Description Perform frame advance if the flag ezcxnhas been set to 1 Arguments note character string input to the stub r
6. are on of f sendor close istring character command modifier string has not been used by this special device Keep the argument just for consistency with other devices Procedure For the action command Open and activate a Tektronix graphic terminal device if no existing Tektronix graphic termi nal device Activate a Tektronix graphic terminal device if it has been deactivated No action if an active Tektronix graphic terminal exists For the action command off Deactivate the current active Tektronix graphic terminal device No action if no active Tektron ix graphic terminal device For the action command send Turn the Tektronix graphic terminal device send a frame then turn the Tektronix graphic terminal device off For the action command close Deactivate and then close the Tektronix graphic terminal The command modifier is not used for the Tektronix graphic terminal EZD User Manual February 11 1999 41 3 31 ezcwin Calling Sequence subroutine ezcwin iflag istring Description Controls the Xwindow devices Arguments iflag character action command string the possible values are on off send or close istring character command modifier string a window name string Procedure The command modifier istring provides the window name as the way to identify the recipient of the action command For the action command Open a
7. even the device has not been opened before send s a frame and then turns the device off If the target device is a Xwindow or a Tektronix graphic terminal then the current frame is resent to the device provided the target device is active The action colormap sets the named colormap to the device If the device does not exist at the time when colormap action was invoked the EZD creates the device and then set its colormap Due to the constraints of Xwindows driver the colormap setting for Xwindows works differ ently than other devices If ATC GKS is the underlying gks package only the first window can be set to the desired colormap and then all sebsequent windows will inherit the colormap set by it EZD User Manual February 11 1999 5 if GKS is used no colormap setting is implemented because the possible program crash induced by setting the Xwindow colormap The modifier arg is used to specify additional properties of the device A user can use the mod ifier to override the default setting for the device The command modifier color mono overrides the default setting for CGM or PS files CGM files default to color and PS files are default to One caution with the use of color PostScript file if it is printed at a black and white print er the color attribute of the graphics will be plotted in different line styles as dotted or dashed lines which may change the looks of the graphics without user s intention Th
8. the file name will be determined by the file root name fnroot parameter with extension cgmor ps correspondingly The default file root name is problem The subroutine ezccgm and ezcps check in the current directory the existence of specified files either by the user or by the program defaults If the file already exists the subrou tine tries to append a sequential three digit number to the root name to make a new file name This avoids clobbering the existing files e g problem 001 cgm problem 002 cgm etc EZD will create CGM log file or a PS log file for each CGM PS file created to record the frame count and all graphic commands in each frame The naming scheme for the log files is the same as for CGM or PS files but with extension cgmlog or pslog 2 5 Starting and Ending the plots The subroutines pltstart and pltend are provided to properly open and close graphic device s for receiving plot commands They are argumentless routines call pltstart call pltend The pltstart checks the existence of active devices It does nothing if an active device already exists It opens a CGM file automatically if no active devices were found The closes all de vices and log files pltstart should be called before any plotting commands and the client program 6 February 11 1999 EZD User Manual should call pltend to terminate graphics before program ends Explicitly close device by calling ezcdodev or im
9. 1 ROOT 1 T EE 9 EE 2 file extensions aea x yx 6 negm2cgm 5 Lesen y date vend teste RUE 6 new frame 7 39 frame advance 7 9 19 31 33 35 39 Functionalities 3 5 3 NONE 9 28 25 za 5 s w eb 1 parameter access 10 JOB 4 Ae Datser aA RU XA a REA OY 1 6 KIE ay dO W A OWA PE 5 pltstart seson tenini Du A A Gracie 6 TAC VE NaRa qe 5 POSUSCTUDE er eem 5 6 36 incorporation of EZD 3 DS SEA cu eMe 5 initialize 4 pslog ye igure Y US 6 12 36 es NC PEN 20 ie ta Sw edhe dda ae een 2 Q IM quadrant inquiry 20 K quadrant mode 7 19 24 34 35 39 ws 9 28 quadrant numbering 7 21 L R BCAA Ar su VR Sere VE LAS 3 real oa su od edd 2 library ve eee Paw d EE RAE AA 3 reference box 7 21 24 34 logfiles 6 8 10 12 36 1 2 February 11 1999 5 security level 9 29 send 5 Setting Devices 26102 west 5 SIGNAL sete wie SEE 23 9 29 start plot 6 State us 6
10. 2 5 5 13 18 36 41 42 Een 12 SUNA EUN 4 T 5 41 2 W 5 U wees Gee cata 29 unclassified 9 29 UNICOS eren 3 4 9 12 27 29 V SIE WDOFI tea ene i ek 24 W WI ocv wey 5 X XwindoWw 21 69x Ix 5 6 10 42 February 11 1999 I 3 Index 1 4 February 11 1999
11. February 11 1999 19 3 9 ezciquad Calling Sequence subroutine ezciquad v1 v2 v3 v4 Description Inquire the current quadrant boundaries Arguments vl v2 v3 v4 real Size4 the xmin xmax ymin ymax values in 0 1 of the rectangular region of the frame set by the last call to ezcsquad Procedure Retrieve the boundary values from the common block 20 February 11 1999 EZD User Manual 3 10 ezcquad Calling Sequence subroutine ezcquad iquad Description Based on the reference box for quadrants ezcquad iquad will set plotting quadrant to the com binations of customary quadrants 1 2 3 4 start from the upper left corner upper right corner low er left corner and lower right corner Arguments iquad integer one of the following values 1 2 3 4 12 13 24 34 and 1234 Procedure This is a short cut to define plotting quadrant to one of the customary quadrant or a combination of customary quadrants by calling ezcsquad with proper xmin xmax ymin and ymax EZD User Manual February 11 1999 21 3 11 ezcdquad Calling Sequence entry ezcdquad v1 v2 v3 v4 Description Change the default reference box for quadrants to v1 v2 v3 v4 Arguments vl v2 v3 v4 real Size4 xmin xmax ymin ymax values in 0 1 with respect to the full frame Procedure Set boundary limits to v2 v3 v4 and call NCAR set routine 22 February 11 1999 EZD User Manual 3 12 ezcidquad Calling S
12. command send Turn the PS device send a frame then turn the PS device off send implies so it may open i e create a PS file For the action command close Deactivate and then close the PS file 29 13 The command modifier color mono specifies the PS file color The PS file has default mono for its color specification 36 February 11 1999 EZD User Manual 3 26 ezcsetbb Calling Sequence subroutine ezcsetbb Description This subroutine sets the background color to black default Arguments none Procedure The routine sets the 1 value to 0 then ezccidx based on this value to set background color to black The client program should call this routine just before opening the device which will have the desired background color Currently this feature has been disabled due to the color table problems in the Xwindow driver EZD User Manual February 11 1999 37 3 27 ezcsetbw Calling Sequence subroutine ezcsetbw Description This subroutine sets the background color to white Arguments none Procedure The routine sets the bakcol value to 1 then ezccidx based on this value to set background color to white The client program should call this routine just before opening the device which will have the desired background color Currently this feature has been disabled due to the color table problems in the Xwindow driver 38 Februar
13. msg level accepts a quoted string and an integer error severity level as its ar guments The subroutine writes the string to the standard error file Three levels of error severity are defined as follows level one is a commentary level two is a minor abnormality the program continues to execute level three is a fatal error and it calls the user defined error handler ezcdie the client program may wish to provide this to manage alternative actions response to the sever errors When a user calls this routine to record the error message he she also needs to determine the severity of the error and assign the severity level accordingly 2 9 Color Table ezcoltb indlo indhi red green blue defines color tables for all active devices indlo is the integer for lower bound of color indices and indhi is the upper bound of color indices and red green blue are arrays of fractions of full intensity of red green and blue color range in 0 1 1 With user defined color table applications may use special colors to convey some physics quantities such as color cells 2 10 Set a Predefined Colormap Color Table ezcdodev device type colormap colormap name The routine ezcdodev can be used to setup a special colormap for a device If the device does not exist i e has not been opened at the time of the subroutine call then EZD will open the de vice activiate the device and then setup the requested colormap If the device al
14. with syntax call ezchook stringl string2 The ezcnf calls ezcfradv to advance a frame A user can substitute this stub routine ezchook with his her own subroutine to perform customized tasks when each frame advances EZD User Manual February 11 1999 9 2 13 Access to Parameters ezcseti ezcsetr ezcsetc ezcgeti ezcgetr ezcgetc A set of parameters in the EZD package provides special controls to the graphic devices such as maximum number of frames in a CGM file the Xwindow display workstation other than the default environment variable setup the root name of the problem etc Six routines ezcseti ezcsetr and ezcsetc are used to set integer real character parameters correspondingly The subroutine ezcgeti ezcgetr and ezcgetc are used to inquire and to retreive the current value of a parameter To access an array parameter the user needs to specify the index of the array element by calling call ezcseti ezcpidx ivalue before the call for set or get the parameter The arguments to these subroutines all have the same format call ezcsetx parameter name parameter value where x i r c call ezcgetx parameter name parameter variable where x i r c the first argument contains the name of the parameter variable enclosed by double quotes the sec ond argument is the value you want to set for the parameter or the variable to receive the value of the parameter If the user gives a non existin
15. UCRL MA 118543 Pt 4 The Basis System Part IV EZD User Manual NOTICE This manual has not been updated since July 1995 so may contain erroneous or misleading information Support for the EZD package as described here was frozen with the 11 3 release of Basis and it may be withdrawn in a future release Basis users should refer to the Devices chapter of the EZN User Manual for current information Written by Yu Hsing Chiu Paul F Dubois EZD User Manual February 11 1999 COPYRIGHT NOTICE files in the Basis system are Copyright 1994 by the Regents of the University of California rights served This work was produced at the University of California Lawrence Livermore National Laboratory UC LLNL un der contract no W 7405 ENG 48 Contract 48 between the U S Department of Energy DOE and The Regents of the University of California University for the operation of UC LLNL Copyright is reserved to the University for purposes of controlled dissemination commercialization through formal licensing or other disposition under terms of Contract 48 DOE policies regulations and orders and U S statutes The rights of the Federal Government are reserved under Contract 48 subject to the restrictions agreed upon by the DOE and University as allowed under DOE Acquisition Letter 88 1 DISCLAIMER This software was prepared as an account of work sponsored by an agency of the United States Government Nei ther the Unite
16. d States Government nor the University of California nor any of their employees makes any warranty ex press or implied or assumes any liability or responsibility for the accuracy completeness or usefulness of any information apparatus product or process disclosed or represents that its specific commercial products process or service by trade name trademark manufacturer or otherwise does not necessarily constitute or imply its endorsement recommendation or favoring by the United States Government or the University of California The views and opinions of the authors ex pressed herein do not necessarily state or reflect those of the United States Government or the University of California and shall not be used for advertising or product endorsement purposes DOE Order 1360 4A Notice This computer software has been developed under the sponsorship of the Department of Energy Any further dis tribution by any holder of this software package or other data therein outside of DOE offices or other DOE contractors unless otherwise specifically provided for is prohibited without the approval of the Energy Science and Technology Soft ware Center Requests from outside the Department for DOE developed computer software shall be directed to the Direc tor ESTSC P O Box 1020 Oak Ridge TN 37831 1020 February 11 1999 EZD User Manual Contents CHAPTER 1 The Basis System 1 1 1 2 153 Environment Variables Basis is Both a Pr
17. e modifier arg associated with colormap action is used to specify the name of the colormap There are 18 colormaps to choose from The first 16 colormaps are named as 1411 1 12 1 116 Those color maps defintions are borrowed from IDL with its RGB Red Green Blue settings The 17th color is named as mycolormap for user defined colormap user specifies ezcred ezcgreen and ezcblue arrays of RGB values to be used in the colormap The default color map which varies the color spectrum from blue to green to red Any colormap name which does not match above mentioned seventeen colormap names will result to use the default colormap An example to setup a colormap for the CGM file call ezcdodev cgm colo 1 11 Another usage of the command modifier is to name the Xwindow when it is opened The name of a window is used to identify it in future actions As an example call ezc dodev win on FirstWindow opens Xwindow in your default workstation and names the window FirstWindow If multiple windows were used ezcwin activates only one window The latest window with action on is the active window The activated window receives graphic output If multiple displays were used you may have one active window in each display Because of this arrangement a user can direct the graphic output to different windows in order to view and to compare the graphic results interactively When a CGM or a PS device is opened
18. ents none Procedure none EZD User Manual February 11 1999 15 3 5 ezccoltb Calling Sequence subroutine ezccoltb indlo indhi red green blue Description Set a set of color indices with the given RGB values Arguments indlo integer lower bound of the color indices indhi integer higher bound of the color indices red green blue real indhi indlo 1 arrays of reals in 0 1 of fractions of full intensity of the red green blue col Ors Procedure Set the color table with indices vary from indlo to indhi Each index associates a color defined by the corresponding indexed array element of red green and blue 16 February 11 1999 EZD User Manual 3 6 ezcctoi Calling Sequence subroutine ezcctoi colorname Description Based on the given colorname returns the corresponding color index in the color table Arguments colorname character 32 colorname string Procedure Search the colorname array for the given colorname If a name matched returns the index in the colorname array If no name is matched returns the index 1 EZD User Manual February 11 1999 17 3 7 ezcdodev Calling Sequence subroutine ezcdodev devtype argl arg2 Description A top layer user interface routine to control the graphics devices This subroutine redirects de vice control commands to the specific device control routine such as ezcwin ezcps ezccgm etc Arguments devtype character the device t
19. equence entry ezcidquad v1 v2 v3 v4 Description Inquire the default reference box for quadrants Arguments v1 v2 v3 v4 real Size4 xmin xmax ymin ymax values in 0 1 respect to the full frame Procedure Retrieve the values stored in the common block for reference box for quadrants EZD User Manual February 11 1999 23 3 13 ezcrquad Calling Sequence entry ezcrquad Description Restore quadrant to the default reference box for quadrants Refer to ezcdquad Arguments none Procedure Reset the view port to the last defined reference box for quadrants and set up linear ndc trans formation into viewport by calling NCAR set routine 24 February 11 1999 EZD User Manual 3 14 Calling Sequence subroutine ezcdie Description This is a routine called by EZD routines when abnormal conditions are encountered This rou tine raises signal SIGUSRI The client program should provide alternative actions when the signal is received Hence this is the interface for the client program exception handler Arguments none Procedure Raise the signal SIGUSRI by calling C routine raise EZD User Manual February 11 1999 25 3 15 ezcdispl Calling Sequence subroutine ezcdispl Description This is a stub routine that the client program should replace with its real procedure to flush out the graphic contents The routine is called by ezcfradv which in turn is call by ezcnf Arg
20. et the first quadrant of now just defined reference box i e the most upper left one sixteenth of the original frame for plotting graphics ezcsquad xmin xmax ymin ymax allows a user to set an arbitrary rectangular portion of the whole frame bounded by the specified arguments to plot the graphics The companion sub routine ezciquad v1 v2 v3 v4 can be used to inquire the current quadrant boundary The call to subroutine ezcrquad will restore the reference box defined by ezcdquad as the plot region 27 Frame Advance The frame advance logic is complicated because of the need to lag the actual frame advance for interactive window use and the need to handle quadrant non quadrant graphics The action rou tine ezcfradv does the frame advance if the flag ezcxn has been set to 1 i e YES The routine nq displays the current picture by calling ezcshowf which calls ezcdispl to flush out the graphic con tents and calls ezcfradv to advance the frame if needed The ezcdispl to flush out the graphic con tents is a dummy routine in the EZD and need be supplied by the client program For each new frame the client program should call ezcnf which sets the flag ezcxn to 1 and calls After the EZD User Manual February 11 1999 7 frame advanced ezcnf resets the flag ezcxn to 0 and gets it ready for the next event 2 8 Error Logging Error logging facility in the EZD library is performed through the ezcerror subroutine ezcerror
21. f usr local gks330 we use usr local lib ATC GRAFPAK GKS gks330 2 3 Initialize EZD Before invoking the functions of EZD the client program should call ezdinit to initialize the EZD It sets the parameters to its proper values The functions of EZD depend on these values February 11 1999 EZD User Manual to behave accordingly 2 4 Setting Devices In a computer system with only NCAR GKS installed a user can open CGM files to store graphic output Addtional device support for the Xwindows when NCAR3 2 or later version is used The CGM files created by the NCAR GKS are not standard CGM files The NCAR CGM files can be used as input to the NCAR graphic utilities such as ncgm2cgm idt ctrans etc For ex ample the utility ncgm2cgm translates NCAR CGM file into a standard CGM file idt lets you view the NCAR CGM file interactively Please refer to the NCAR manuals for details about its graphic utilities If ATC GKS is installed in the computer system a user can open multiple devices and direct the graphics output to different devices One application of these capabilities is for ex ample a user can open several Xwindows at the same or different workstations and display frames in different windows for comparison The graphic devices have several states opened closed active and inactive Before a device can be used it has to be opened then activated Only the active devices will receive graphic out puts Before closing a dev
22. g parameter to the subroutine including misspelled name the subroutine produces an error message and then exit The client program needs to define an error handler to respond this situation Following is a list of control parameters their function and default value brief name Descriptions default value ezccgmc maximum number of frames in a CGM file 242 ezcpsc maximum number of frames in a PS file 242 ezcdisp string to specify Xwindow display yourhost 0 0 ezcwinsz string to specify size of Xwindow dx dy u ezcwinlb string to name an Xwindow blank string numcol number of color indices in a color table 192 fnroot root name used for the CGM PS files and log problem files debcolr debugging flag for color problems 0 10 February 11 1999 EZD User Manual CHAPTER 3 List of Subroutines This chapter contains a list of subroutines and their arguments The subroutines are sorted by name brief description of each routine is also attached EZD User Manual February 11 1999 11 3 1 ezcapsfx Calling Sequence subroutine ezcapsfx namer ftype fnsfx fname succ Description Append suffix to a given file root name This routine is called by ezcwin and ezcps to open a file with unique name Arguments namer ftype fnsfx fname Succ Procedure character 80 the file root name character 16 the file type e g cgmlog ps pslog integer the fi
23. he actual arguments to match those expected by the function A compiled function can also call a user defined function passing arguments through common 1 3 About This Manual This manual is part of a series of manuals documenting the Basis System They are e Running A Basis Program A Tutorial For Beginners e Il Basis Language Reference Manual EZN User Document e EZD Graphics Device Library e V Writing Basis Programs A Manual For Program Authors e Basis Library Manual The first three parts form a basic document set for a user of programs written with Basis The remainder form a document set for an author of such programs Each of the utilities has a manual page Basis is available on Cray machines under the UNICOS operating system and on SUN HP SGI and IBM workstations A great many people have helped create Basis and its documentation The principal author is Paul Dubois Major contributors are Peter Willmann Janet Takemoto Susan Taylor Bruce Lang don Jim Crotinger Sharon Wilson Lee Busby Yu Hsing Chiu Zane Motteler Bert Still Robyn Allsman Barbara Dubois David Sinck and Kelly Barrett The authors of this manual stand as rep resentative of their efforts and those of a much larger number of minor contributors Send any comments about these documents to support icf llnl gov on the Internet or to support on Lasnet 2 February 11 1999 EZD User Manual CHAPTER 2 Introduction to EZD
24. ice the device needs to be deactivated The subroutine ezcdodev is the top layer of user interface to control the devices The calling sequence is call ezcdodev device arg action arg modifier arg The argument device arg specifies the device that client program intends to control The pos sible values are cgm ps win tv or tek Here win and tv are synonymous The argument action arg indicates the actions that the user wants to perform on the device specified The actions can be on off close send and colormap The argument modifier arg is used to specify additional properties of the device The values are color mono window name and colormap name The underlying subroutines for the device controls the subroutines ezccgm ezcps ezcwin and ezctek control the CGM PostScript files the Xwindow and the Tektronix Graphic Termi nal respectively The action on opens a device if the device has not been opened and then activates the device If the device already opened the command on activates it It has no effect on the device if it is currently active The action of f deactivates an open device but the linkage to the device for controlling still exists The action close deactivates and then closes the device Issuing the commands close or off to a non existing device causes an error The action send sends the current frame to the specified device If the target device is a CGM or a PS file the send action turns on the device
25. is a useful program for interactive calculations and graphics Authors create other programs by specifying one or more packages of variables and modules to be loaded A package is specified using a Fortran source and a variable description file in which the user specifies the common blocks to be used in the Fortran source and the functions or subroutines that are to be call able from the interactive language parser Basis programs are programmable applications that 1s applications whose behavior can be EZD User Manual February 11 1999 1 greatly modified by their users Basis also contains optional facilities to help authors do their jobs more easily A library of Basis packages is available that can be added to a program in a few sec onds The progammable nature of the application simplifies testing and debugging The Basis Language includes variable and function declarations graphics several looping and conditional control structures array syntax operators for matrix multiplication dot product trans pose array or character concatenation and a stream I O facility Data types include real double integer complex logical character chameleon and structure There are more than 100 built in functions including all the Fortran intrinsics Basis interaction with compiled routines is particularly powerful When calling a compiled routine from the interactive language Basis verifies the number of arguments and coerces the types of t
26. le name suffix as integer character 80 returned unique file name logical success flag of the subroutine process Append the fnsfx to namer if fnsfx 15 less than 999 otherwise change fnsfx to 1 and extend the file root name with ending 99 then append the new fnsfx If the extension of the root name failed the return flag succ is set to false 12 February 11 1999 EZD User Manual 3 2 ezccgm Calling Sequence subroutine ezccgm iflag istring Description Control the CGM devices This is an underlying subroutine called by ezcdodev Arguments iflag character action command string the possible values are on of f sendor close istring character command modifier string the possible val ues are color mono Procedure For the action command Open and activate a CGM device if no existing CGM device Assign a proper file name for the CGM file and open a CGM log file if it does not exist Activate a CGM device if it has been de activated No action if an active CGM file exists For the action command off Deactivate the current active CGM device No action if no active CGM device For the action command send Turn the CGM device send a frame then turn the CGM device off send implies so it may open i e create a CGM file For the action command close Deactivate and then close the CGM file If the client program run
27. lications without ATC GKS 2 11 Box Security Level and Give Keep For the programs run on the UNICOS systems at Livermore Computer Center it is required to specify a Boxid Security Level and Give Keep for the output The subroutines ezcdobox ezc dolev and ezcdogk are provided to set them up The calling sequence for these routines is call ezcdoxxx string where xxx box lev or gk The argument is a string or a variable with string value ezcdobox accepts a three character string as the argument The first character is an alphabet among a z and A Z then followed by two alphanumeric characters ezcdolev accepts the argument with the possible values of unc1 UNCL pard PARD CRD srd SRD or numerical characters 1 2 4 and 5 which corresponding to unclassified pard crd and srd The argument for ezcdogk takes either give or keep It de faults to keep if not explicitly specified When the CGM file closes the above setups will be used to send a proper 1pr command to the UNICOS operation system to produce fiche For example say the Boxid u51 Severity Lev el pard and Give Keep keep the EZD will issue the following command string lpr P105 Bu51 Spard problem005 cgm when the CGM file problem005 cgm is closed A default jobname same as the CGM file name is also provided to the 1px command to print it on the fiche 2 12 Stub Routine ezchook A stub routine named ezchook 18 called by the ezcfradv subroutine
28. nd activate an Xwindow device with the given window name if no existing Xwindow device with the same name This will deactivate other active windows in the same display Activate an Xwindow device if the named window was created before and has been deactivat ed No action if the named Xwindow already active For the action command off Deactivate the named X window device No action if the named X window is not active It is an error try to off no existing Xwindow e g no window with the given name hence can not be off ed For the action command send Send a frame to the active Xwindow For the action command close Deactivate and then close the named X window It is an error to try to close a non existing Xwindow If there is only one window by default it receives the action command 42 February 11 1999 EZD User Manual Index Symbols or dot product 2 A accessing parameters 10 ACE pete ct Nk Mik ted e ae GSA 5 active window 6 EROS 3 5 TES 1 background color 37 38 Basis ES ME 3 Basis data types 2 Basis Documentation 2 Basis Operators ordot product 2 Basis Types chameleon Sh Sale 2 Character se ss eed ces hats Boa ye er ues 2 COMPLEX iege RETO EE ee 2 double wa zaa r A O 2 i
29. nteger 2 logical 352 hue 2 real da Nea IRA 2 BASIS ROOT 1 vatum 9 27 Built in Functions 2 transpose te et fy NE EIC 2 C cudow 5 6 9 10 13 6 12 13 chameleon 2 character 222222222224 2 CLOSE COO A 5 color 5 6 8 10 13 14 16 18 36 38 41 colorcells 8 color index 14 16 17 color table 8 16 17 COMPLEX n EE USE 2 CI oxi ide Re LE EL ee 9 29 4044 OBO v E 5 D default colors 10 default DISPLAY 10 default name 6 default number of frames 10 default values 6 10 DISPLAY saxum dE 1 10 display Sess sr r p IX ERES 6 double 2 E GIN 4 2044356 sexe Y ED St 6 Environment Variables 1 environment variables 3 10 eZ a pb ts Rigel eed VERSUS 2 Error Logging 8 su coss W 12 5 6 13 27 29 6260 es Lee OA arent eden 14 A Sts 15 cee hat eee 16 E ECI L sd ge y eser ET e 17 CZEJI EE god 25 30 26 ezcdobox 9 27 ezcdodev 5 18 eZQdogsk
30. ogram and a Development System About This Manual CHAPTER 2 Introduction to EZD 2 1 22 2 3 2 4 2 9 2 6 2 2 2 8 2 9 2 10 2 11 2 12 2 13 Functionalities of EZD Incorporating EZD in your program Initialize EZD Setting Devices Starting and Ending the plots Quadrant mode Frame Advance Error Logging Color Table Set a Predefined Colormap Color Table Box Security Level and Give Keep Stub Routine ezchook Access to Parameters ezcseti ezcsetr ezcsetc ezcgeti ezcgetr ezcgetc CHAPTER 3 List of Subroutines 3 1 32 3 3 3 4 3 5 3 6 3 7 3 8 3 9 3 10 3 11 3 12 3 13 3 14 ezcapsfx ezccgm ezccidx ezcclear ezccoltb ezcctoi ezcdodev ezcsquad ezciquad ezcquad ezcdquad ezcidquad ezcrquad ezcdie R 25092 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 February 11 1999 Contents 3 15 3 16 3 17 3 18 3 19 3 20 3 21 3 22 3 23 3 24 3 25 3 26 3 27 3 28 3 29 3 30 3 31 ezcdispl ezcdobox ezcdogk ezcdolev ezcerror ezcfradv ezcgetcl ezchook ezcnf ezcnq ezcps ezcsetbb ezcsetbw ezcshowf ezcshowg ezctek ezcwin 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 February 11 1999 1 The Basis System 1 1 Environment Variables Before using Basis you should set some environment variables as follows e BASIS ROOT should contain the name of the base of your Basis distribu
31. ommands to handle user s output files 2 2 Incorporating EZD in your program The EZD package was designed that a client program does not need to have Basis to be loaded to generate the executables This reduces the size of the program and broadens its usability But because the lack of Basis support it is necessary for the client program to call some initialization programs when EZD is invoked The client program also needs to call functional routines to prop erly close the files when the client program ready to stop the execution It needs to provide some additional functions to rendering the graphics and other related tasks The client programs of the EZD should load the library libezd a during the linking process It is located in usr local basis bin lib You will also need to load with the appropriate NCAR and libraries for your site Refer to Section 1 1 Environment Variables in Chapter 1 for the list of environment variables needed Furthermore additional libraries and include files need to be specified on the command line for proper compilation of code calling EZD routines In the following descriptions 1ags should be replaced with flags for the compiler that the user desires atc device libraries with the desired ATC device libraries and lt file gt EZD User Manual February 11 1999 3 with the file or files of appropriate type On a SUN4 this requires the following format during partial compilation with
32. outine ezchook Procedure The routine checks the value of ezcxn then either do frame advance or just return to the call ing program Before exitting ezcfradv calls ezchook with note as the second argument The user can define ezchook to perform customized tasks EZD User Manual February 11 1999 31 3 21 ezcgetcl Calling Sequence subroutine ezcgetcl Description This routine returns the index of last non blank characters in the given string w Arguments w character string needs to determine the index of last non blank character Procedure Finds the rightmost occurrence of non blank character 32 February 11 1999 EZD User Manual 3 22 ezchook Calling Sequence subroutine ezchook msgl msg2 Description This is a stub routine to be replaced by a true function routine supplied by the client program when each frame advances Arguments msgl msg2 character strings used to pass the arguments to the true function routine Procedure A stub routine EZD User Manual February 11 1999 33 3 23 ezcnf Calling Sequence subroutine ezcnf Description Makes a frame advance Arguments none Procedure The ezcnf routine calls ezcnq to do frame advance if the external flag ezcxn has the value 1 It also clears the flag ezcxn and restore the full reference box for quadrants as the plotting area 34 February 11 1999 EZD User Manual 3 24 ezcnq Calling Sequence subroutine
33. plicitly by calling is important to leave the device in proper state For exam if CGM file was not properly closed it will cause command 1pr to fail on the UNICOS sys tems 2 6 Quadrant mode EZD has utilities to control the plots in quadrant mode Most quadrant routines have compan ion routines for inquiring the current settings The subroutine ezcdquad xmin xmax ymin defines the quadrant reference box xmin xmax ymin ymax are reals in 0 1 as the bounding values of a rectangular region in the frame which has the values 0 1 0 1 The default reference box of quadrant is the whole frame The routine ezcidquad v1 v2 v3 v4 returns the current boundary of the quadrant ref erence box The quadrants are defined in a customary way by bisecting both the length and the width of the reference box The quadrant 1 is the upper left quarter The quadrant 2 is the upper right quar ter The quadrant 3 is the lower left quarter and the quadrant 4 is the lower right quarter The subroutine ezcquad n where n is one of the following integers 1 2 3 4 12 13 24 34 and 1234 defines a combination of quadrants represented by each digit For example ca11 ezcquad 12 defines the region combined with quadrant 1 and 2 to draw the graphic output call ezcquad 1234 is the same as the original whole reference box Another example after called ezddquad 0 0 0 5 0 5 1 0 then the call to ezc quad 1 would s
34. ready exits then colormap is reset and then returned to its original state e g active inactive just before the ezc dodev was invoked There are sixteen predefined colormaps named id11 id12 id116 which are borrowed form the IDL s colormap definitions The 1911 colormap is the greyscale colormap so the user may use greyscale as the colormap name The id12 has alias bluescale but some idl colormaps have no proper aliases The seventeenth colormap named mycolormap is defined by the user s specifications to the arraysof ezcred ezcgreen and ezcblue for its RGB values Any other name used for colormap will result to use the default colormap which is a colormap varies the color spectrum from blue to green to red Some exceptions when Xwindow and postscript files are involved The color postscript file and mono postscript file can not switch from one to another Only color postscript file can change its colormap The Xwindow device driver from ATC allows the first Xwindow to set its colormap first time when it is brought up then the subsequent Xwindows will share the same colormap For 8 February 11 1999 EZD User Manual single Xwindow to change its colormap the EZD actually closes the window then opens it again with the new colormap The Xwindow driver currently will cause the application program to crash if change colormap is attempted So EZD will not allow any colormap setting for Xwin dows in the app
35. s on UNICOS at LC proper lpr command will be send to the operating system to generate fiche from the close CGM file 290 command modifier color mono specifies the CGM file color EZD User Manual February 11 1999 13 3 3 ezccidx Calling Sequence subroutine ezccidx iws iwstype Description Initialize the color indices table define foreground and background colors define a set of named colors with special indices Arguments iws integer the workstation id associated to this special color table iwstype integer the type of this workstation Procedure Define the color index 0 and color index 1 with RGB values The color index 0 is the back ground color and the color index 1 is the foreground color The subroutine sets black as the back ground and white as the foreground if the variable 1 has value 0 and reverse the setting if bakcol has value 1 Other color indices and associated RGB values are defined in the process This setting is closely coupled to ezcctoi subroutine call The color index returned by ezcctoi by the giving color name has the RGB value defined in this subroutine 14 February 11 1999 EZD User Manual 3 4 ezcclear Calling Sequence subroutine ezcclear Description A dummy routine called by ezcnf The original usage is to clear the attribute settings Since this routine is called by every frame advance it is user replaceable to do some customized tasks Argum
36. tion such as usr local basis e MANPATH should contain a component BASIS_ROOT man e Your path should contain a component BASIS_ROOT bin e DISPLAY should contain the name of your X Windows display e PARAMETER FILE should contain the name of ncargparams file from your NCAR 3 1 distribution if you have it e NCARG ROOT should contain the name of the root directory of your NCAR 3 2 or later distribution if you have it and wish to use it in preference to a 3 1 distribution e gksdir should contain the library directory for ATC GKS if you have it Check with your System Manager for the exact specifications on your local systems 1 2 Basis is Both a Program and a Development System Basis is a system for developing interactive computer programs in Fortran with some support for C and as well Using Basis you can create a program that has a sophisticated programming language as its user interface so that the user can set calculate with and plot all the major variables in the program The program author writes only the scientific part of the program Basis supplies an environment in which to exercise that scientific programming which includes an interactive lan guage an interpreter graphics terminal logs error recovery macros saving and retrieving vari ables formatted I O and on line documentation basis is the name of the program which results from loading the Basis System with no at tached physics It
37. uments none Procedure A dummy routine as a place holder It is called for each frame advance The user may substitute it with special task routine such as display the graphic contents write a log entry etc 26 February 11 1999 EZD User Manual 3 16 ezcdobox Calling Sequence subroutine ezcdobox boxid Description Defines the Boxid for the LC UNICOS user to receive output Arguments boxid character 3 three character string to identify the boxid first character is an alphabet in a z A Z and the last two characters are two alphanumeric characters Procedure The routine checks the legality of the input string and write it to a common block holding this value ezccgm will grab this string value from the common block to issue proper 1pr command to the operating system EZD User Manual February 11 1999 27 3 17 ezcdogk Calling Sequence subroutine ezcdogk gkstring Description Defines the GIVE KEEP flag for the LC UNICOS user to allow disposal of the CGM files after fiche output is generated Arguments gkstring character character string to set the flag to give givekeep or keep Procedure The routine verifies the input string and write it to a common block holding this value ezccgm will grab this string value from the common block to issue proper command to the operating system The default value is 28 February 11 1999 EZD User Manual
38. y 11 1999 EZD User Manual 3 208 ezcshowf Calling Sequence subroutine ezcshowf Description Display the current picture and set a new frame if not in quadrant mode Arguments none Procedure The routine checks for the plotting mode first If it is in quadrant mode then no frame advance i e does not clean the frame so the previous picture on the frame remains If it is not in quadrant mode then frame is advanced It is then plot the graphics to the frame by calling ezcdispl In the EZD this ezcdispl is just a stub routine which the client program should replace it by a true action routine EZD User Manual February 11 1999 39 3 29 ezcshowg Calling Sequence subroutine ezcshowg Description Invoking graphic display routine ezcshowf In EZD it is a dummy routine as a space holder Arguments none Procedure Invokes ezcshowf to display the graphics contents In EZD it is a dummy routine and should be replaced by a true display action routine or invokes ezcshowf to indirectly display the graphic contents The command send depends on this routine to flush a frameful graphics to the desig nated device e g 11 ezcdodev cgm send 1 40 February 11 1999 EZD User Manual 3 30 ezctek Calling Sequence subroutine ezctek iflag istring Description Controls the Tektronix graphic terminal devices Arguments iflag character action command string the possible values
39. ype that will receive the control commands the possible values are cgm ps win tv and argl character the action command string the valid com mands are on off close arg2 character the command modifier string the possible values are mono color ora window name When the de vice is a or a ps user can specify color options for the device The is default to color and the ps is default to mono When the device is a win this command mod ifier string can be used to set the window name Procedure Based on the given device type this subroutine redirects the command and its modifier to call the subroutine that handles this special device For example call ezcdodev cgm on color will call the underlying subroutine ezccgm on color to carry out its command 18 February 11 1999 EZD User Manual 3 8 ezcsquad Calling Sequence subroutine ezcsquad v1 v2 v3 v4 Description Set a rectangular portion of the frame to plot the graphics frame size will not be changed vs ezcframe which resets the frame boundary Arguments vl v2 v3 v4 real Size4 the xmin xmax ymin ymax values in 0 1 of the rectangular region of the frame Procedure This routine calls ezcnq to handle frame advance and flush out graphic contents if necessary After the call to ezcnq it sets the portion of frame as defined by v1 v2 v3 v4 to output the graphics EZD User Manual
Download Pdf Manuals
Related Search
Related Contents
Man WM396 11-10.eng Technical Manual Of Intel Cedar Trail Series CPU & NM10 Chipset 1 – OBJETIVO Edimax EW-7718Un Wireless USB Adapter Xylazel Soluciones Limpiador Antimoho ACCUPLACER TEST MANUAL November 2011 ML1021 Neptune Operating Instructions - PDF ペルレ 25 ペアタイプ (コード式) 取扱説明書 兼 無償修理規定 TDX User Manual - HME Mobility & Accessibility A6 GMC Copyright © All rights reserved.
Failed to retrieve file