#!/bin/sh #-------------------------------------------------------------------------- # # Name: mcscour # # Purpose: Bourne shell script used to scour McIDAS data files # # Notes: What this script does, and how it works # # MCHOME - the home directory for the McIDAS-X installation # # MCDATA - the directory in which the XCD decoders will # create/update data and ancillary data files # NOTE: data files (e.g. MD and GRID) will probably be # located in other directories but can be located # by REDIRECTions contained in $MCDATA/LWPATH.NAM. # MCDATA is typically the working directory for # the user 'mcidas'. # # MCPATH - a colon separated list of directories that contain # McIDAS data files, ancillary data files, and help # files # # PATH - a search PATH that contains the directory of # McIDAS executables. NOTE that in this PATH # the mcidas/bin directory MUST be before the # directory in which this file, xcd_run, exists # # LD_LIBRARY_PATH - the search path for sharable libraries; # this should be the same search path as the one # used by the McIDAS session # # NOTE: AIX and HP-UX users need to change LD_LIBRARY_PATH # everywhere in this file to what is appropriate on # their systems # # AIX: LD_LIBRARY_PATH -> LIBPATH # HPUX: LD_LIBRARY_PATH -> SHLIB_PATH # # # History: 19961230 - Written for Unidata McIDAS-X, -XCD 7.10 # 19970118 - Updated comments relating to LD_LIBRARY_PATH for AIX # and HP-UX users # 19970509 - Updated to run all McIDAS scouring commands from a # single invocation of mcenv # 20000414 - Updated to scour NGM GRIDs which were moved to # start at GRID file number 5501 # Generalize LD_LIBRARY_PATH specification of Sun # SCx.x libraries # 20030611 - Added scouring for ETAMOS and GFSMOS MD files # 20040420 - Changed default log file to ~ldm/logs/mcscour.sh # #-------------------------------------------------------------------------- SHELL=sh export SHELL # Define macros needed for McIDAS-200x environment # # Set MCHOME to be the home directory of your 'mcidas' installation. # Set MCDATA to be the working directory of your 'mcidas' installation. # For this example, I will assume that this is /home/mcidas/workdata # # Set MCPATH to include MCDATA as its first directory. I assume # in this example that McIDAS-X was installed in /home/mcidas. MCHOME=/home/mcidas MCDATA=$MCHOME/workdata # MCLOG=$MCDATA/scour.log MCLOG=/usr/local/ldm/logs/mcscour.log MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help # Setup PATH so that the McIDAS-X executables can be found PATH=$MCHOME/bin:$PATH # Set LD_LIBRARY_PATH to include all directories (other than those searched # by default) that are needed to be searched to find shared libraries. LD_LIBRARY_PATH=$MCHOME/lib:/usr/local/lib:/lib:/usr/lib:/usr/ucblib # Send all textual output to the log file exec 2>$MCLOG 1>&2 # cd to the MCDATA directory cd $MCDATA # Now run 'mcenv' to create a McIDAS-X environment in which all of the # scouring routines will run. # NOTES: # o you need to modify the parameters in the commands to be run to # match your system setup. # o if you did not build the XCD component of the Unidata McIDAS-X # distribution, you should: # o comment out the 'qrtmdg.k GRID' entry below # o comment out the 'delwxt.k' entry MCPATH=$MCPATH PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH mcenv << EOF qrtmdg.k GRID 5001 6700 1 doqtl.k 1 70 2 doqtl.k 71 80 2 doqtl.k 81 90 2 doqtl.k 91 100 2 doqtl.k 101 120 2 delwxt.k 1 100 igu.k DEL 132 lwu.k DEL VIRT9001 lwu.k DEL VIRT9002 lwu.k DEL ROUTEPP.LOG exit EOF # Done exit 0