|
|
|||
|
||||
In order to run, Unidata McIDAS requires that a number of environment variables be pre-defined in a user's Unix/Linux session. Defining these envionment variables is the responsibility of either the system adminstrator that installs McIDAS, or of the user him/herself.
Environment Variables
|
Environment Variable |
Purpose |
|---|---|
| MCHOME | the HOME directory of mcidas |
| MCDATA | working directory for McIDAS-X sessions |
| MCPATH | a colon-separated list of directories that
McIDAS routines will search when looking for data and ancillary
data files
|
| MCGUI | the directory in which the Unidata Tcl/Tk GUI executables and scripts reside |
| MCTABLE_READ | a semi-colon separated list of fully qualified pathnames of ADDE client routing tables that will be read by McIDAS applications when determining the server from which data will be requested |
| MCTABLE_WRITE | the ADDE client routing table that will be modified when the McIDAS DATALOC command is run |
| MCCOMPRESS | when set, makes McIDAS clients request that ADDE servers send them data in compressed format |
| PATH | add the MCGUI directory to the front of your PATH |
The special user mcidas, will have two additional envionment variables defined in its Unix session:
|
Environment Variable |
Purpose |
|---|---|
| McINST_ROOT | the directory under which you wish to install Unidata McIDAS-X. This is usually the same as MCHOME |
| XCD_disp_file | fully qualified pathname of the XCD decoder status file, DECOSTAT.DAT. This should be located in mcidas's working directory. |
These environment variables need to be defined in the user's shell-specific definition file -- .cshrc for C/TC shell users, .profile for Bourne shell users, .bash_profile for BASH users, and .kshrc for Korn shell users -- so that they will be active whenever the user logs onto the workstation.
For the user mcidas, the definitions for these environment variables (C-shell syntax) will look something like:
# C-shell environment variable definitions for the user 'mcidas'
# umask
umask 002
# MCHOME defined by McINST_ROOT
setenv McINST_ROOT $HOME
setenv MCHOME $McINST_ROOT
# NOTE: conditional definition is only needed for C-shell users
if ( ! ${?MCPATH} ) then
setenv MCDATA $MCHOME/workdata
setenv MCPATH ${MCDATA}:$MCHOME/data:$MCHOME/help
setenv MCGUI $MCHOME/bin
setenv MCTABLE_READ "${MCDATA}/MCTABLE.TXT;$MCHOME/data/ADDESITE.TXT"
setenv MCTABLE_WRITE "$MCHOME/data/ADDESITE.TXT"
setenv XCD_disp_file $MCDATA/DECOSTAT.DAT
if ( ! ${?path} ) then
set path=${MCGUI}
else
set path=(${MCGUI} $path)
endif
endif
# Limit ADDE transfers to compressed ones
setenv MCCOMPRESS GZIP
For users other than mcidas, the definitions for these environment variables (C-shell syntax) will look something like:
# C-shell environment variable definitions for a general user
# MCHOME
setenv MCHOME /home/mcidas
# NOTE: conditional definition is needed for C-shell users
if ( ! ${?MCPATH} ) then
setenv MCDATA $HOME/mcidas/data
setenv MCPATH ${MCDATA}:$MCHOME/data:$MCHOME/help
setenv MCGUI $MCHOME/bin
setenv MCTABLE_READ "$MCDATA/MCTABLE.TXT;$MCHOME/data/ADDESITE.TXT"
setenv MCTABLE_WRITE "$MCDATA/MCTABLE.TXT"
if ( ! ${?path} ) then
set path=$MCGUI
else
set path=(${MCGUI} $path)
endif
endif
# Limit ADDE transfers to compressed ones
setenv MCCOMPRESS GZIP
| NOTE: The conditional definition of MCDATA, MCPATH, MCGUI, etc. is needed only by C Shell users. If this conditional clause is not included by these users, problems results will occur! |
The Unidata McIDAS-X distribution includes files of needed settings that can be incorporated into a user's shell definition file (as indicated above), or referenced from the user's shell definition file. The following are the list of files provided:
| user_env.csh | non-mcidas user's non-conforming shell environment file (.cshrc) settings |
| user_env.sh | non-mcidas user's conforming shell environment file (.profile, .bash_profile, .kshrc) settings |
| mcidas_env.csh | mcidas user's non-conforming shell environment file (.cshrc) settings |
| mcidas_env.sh | mcidas user's conforming shell environment file (.profile, .bash_profile, .kshrc) settings |
The needed environment variables can be set by a simple construct in the appropriate shell definition file. Here are examples:
| User | non-Conforming shells | Conforming shells |
| mcidas |
setenv McINST_ROOT /home/mcidas if ( -e $HOME/admin/mcidas_env.csh ) then source $HOME/admin/mcidas_env.csh endif |
McINST_ROOT=/home/mcidas export McINST_ROOT if [ -e $HOME/admin/mcidas_env.sh ]; then . $HOME/admin/mcidas_env.sh fi |
| other user |
setenv MCHOME /home/mcidas if ( -e $MCHOME/admin/user_env.csh ) then source $MCHOME/admin/user_env.csh endif |
MCHOME=/home/mcidas export MCHOME if [ -e $MCHOME/admin/user_env.sh ]; then . $MCHOME/admin/user_env.sh fi |
In addition, the user mcidas' session will have a second set of enviornment variables defined in a file named .mcenv. These definitions are used by the ADDE remote server that runs as the user mcadde (mcadde shares the HOME directory of mcidas).
# Bourne/Korn shell '.mcenv' environment variable definitions for the user # 'mcadde' # umask umask 002 # MCHOMENOTES:MCHOME=/home/mcidas # McIDAS environment variablesMCDATA=$MCHOME/workdata MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help MCGUI=$MCHOME/bin MCTABLE_READ="$MCHOME/mcidas/data/MCTABLE.TXT" MCTABLE_WRITE="$MCHOME/mcidas/data/MCTABLE.TXT" # Turn on ADDE loggingADDE_LOGGING=YES # Define the PATHPATH=${MCGUI}:$PATH # Export the environment variables aboveexport MCPATH MCTABLE_READ MCTABLE_WRITE ADDE_LOGGING PATH # CD to the MCDATA directorycd $MCDATA
| Contact Us Site Map Search Terms and Conditions Privacy Policy Participation Policy | |||||
|
|||||