Table of contents Previous: What You Need to Know to Start Using McIDAS Next: Getting Started

2.0 The McIDAS Environment

McIDAS is a set of independent applications that communicate with each other through blocks of Unix/Linux shared memory. Each time a McIDAS session is started, system code in the package creates the necessary shared memory segments and "announces" the availability of the shared memory (its read/write handle) known through a Unix/Linux environment variable, MCENV_POSUC. The existence of MCENV_POSUC is not, however, sufficient for McIDAS applications to run.

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
MySQL_ROOT setting this environment variable to a non-blank value tells the McIDAS-X/-XCD build process to include MySQL support. If MySQL is installed in a standard location, specify the flag as TRUE). If MySQL is installed in a non-standard install location, specify the flag as MySQL=directory, where directory is the root MySQL install directory.

NB: if MySQL is not installed setting this environment variable will cause the build to fail.

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.

 

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
# McINST_ROOT and VENDOR non-conforming shell defines
# needed to build McIDAS
setenv McINST_ROOT $HOME
setenv VENDOR -gfortran

# NOTE: uncomment the line that sets MySQL_ROOT if you want to
#       build with MySQL support:
#       - leave the value blank if MySQL is installed in a standard
#         location
#       - specify the value as the root directory of the MySQL
#         installation if MySQL is not installed in a standard
#         location
# setenv MySQL_ROOT TRUE

if ( -e $HOME/admin/mcidas_env.csh ) then
  source $HOME/admin/mcidas_env.csh
endif
# McINST_ROOT and VENDOR conforming shell defines
# needed to bulid McIDAS
McINST_ROOT=$HOME
VENDOR=-gfortran
export McINST_ROOT VENDOR

# NOTE: uncomment the next two lines that set MySQL_ROOT if you
#       want to build with MySQL support:
#       - leave the value blank if MySQL is installed in a standard
#         location
#       - specify the value as the root directory of the MySQL
#         installation if MySQL is not installed in a standard
#         location
# MySQL_ROOT=TRUE
# export MySQL_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 will have a second set of enviornment variables defined in the file ~mcidas/.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 environment variable definitions for the user 'mcidas'

# umask
umask 002

# MCHOME and McINST_ROOT
MCHOME=/home/mcidas

# McIDAS environment variables
MCDATA=$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 logging
ADDE_LOGGING=YES

# Define the PATH
PATH=${MCGUI}:$PATH

# Export the environment variables above
export MCPATH MCTABLE_READ MCTABLE_WRITE ADDE_LOGGING PATH

# CD to the MCDATA directory
cd $MCDATA


NOTES:


Table of contents Previous: What You Need to Know to Start Using McIDAS Next: Getting Started