Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 
Table of contents Previous: Configuring McIDAS-XCD Next: XCD Starting the Status Display Window

Running XCD with the LDM

Use the steps below to setup Unidata McIDAS-XCD software to work with the Unidata LDM.

The McIDAS-XCD command, STARTXCD, is responsible for running the XCD data monitors. The data monitors are, in turn, responsible for running data decoders.

In Unidata McIDAS-XCD, the LDM is responsible for starting STARTXCD along with the other processes that form its suite of applications: pqact, rtstats, and possibly pqsurf. This is done through the LDM startup configuration file ldmd.conf.

Since it is only necessary for data ingesters to run when data is being received, the LDM is setup to run the ingesters from its pattern-action file, pqact.conf.

Setting up the LDM is accomplished through the following steps:

  1. Logon to the workstation as the user running the LDM (typically ldm).

  2. Copy the Bourne shell script xcd_run from the McIDAS-X installation bin directory, ~mcidas/bin, to a directory in ldm's PATH and make sure that it is executable.

    NOTE: Since the ~ldm/bin directory is typically a link to a directory that will change with each new LDM installation (if the LDM was installed following Unidata recommendations), it is best if the target directory is something else like ~ldm/decoders:

  3. The command that run XCD data monitors and ingest data into spool files used by data monitors and decoding subroutines are startxcd.k, ingetext.k, and ingebin.k. Like all other McIDAS routines, they must run in a McIDAS environment defined by a set of Unix/Linux envionment variables..

    We adopted the approach of running these routines from the shell script xcd_run in which required McIDAS environment variables are defined. Since your setup may not match what has been recommended here, you may be required to edit xcd_run and adjust environment variables to reflect your installation.

    Edit the copy of xcd_run you just made and set the McIDAS environment variables MCHOME, MCDATA, MCLOG, and MCPATH along with PATH and possibly LD_LIBRARY_PATH to match your Unidata McIDAS-X installation.

    The following is the portion of xcd_run in which the needed environment variables are defined:

    
    # 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=~ldm/logs/XCD_START.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/lib:/usr/ucblib
    
    

    It is important that $MCHOME/bin be the first directory in the definition of PATH.

    You may need to adjust some entries like PATH and LD_LIBRARY_PATH to match your workstation's operating system. Please review the informational header portion of xcd_run for details.

  4. Next, make needed changes in the LDM startup configuration file, ldmd.conf.

    If this is your first installation of Unidata McIAS-XCD, or if you found that you had multiple invocations of startxcd.k running (see Building and Installing), then make sure that the exec entries in ldmd.conf look like (the order is not critical, but it is recommended; also, running of pqsurf is typically not done):

  5. Next, make needed changes in the LDM pattern-action file, pqact.conf. For convenience, the following actions are available in the v2006 distribution in the file ~mcidas/etc/pqact.conf_xcd.

    If this is your first installation of Unidata McIDAS-XCD, copy the actions from ~mcidas/etc/pqact.conf_xcd to the end of ~ldm/etc/pqact.conf:

    Add:

    This will cause xcd_run to be run at LDM startup.

    If you were running Unidata McIDAS-XCD previously, you should have disabled the running of xcd_run during Building and Installing. If so, do the following:

    Change:

    Back to:

    NOTE: pqact.conf requires use of tabs in many locations. In the examples above, the white spaces just after IDS and HRS, and before PIPE and xcd_run are actually tabs. Also, there should never be leading spaces in pqact.conf lines.

  6. Next, verify that ldm has execute privilege for McIDAS-X commands. If you followed all of the the installation instructions for Unidata McIDAS-X, at this point the users mcidas and ldm will be in the same group. The installation for McIDAS-X commands sets world execute privilege to all McIDAS commands. McIDAS-XCD commands, on the other hand only have user and group execute privilege.

    Verify that ldm has read and write privilege in the directories owned by mcidas and that mcidas has read and write privilege in directories owned by ldm. If either of these is not met, then mcidas, ldm, or root should change the directory permissions to allow this. Again, if the umask was set to 002 for both mcidas and ldm before directories and files were created, then both users should be able to read and write files in each other's directories.

  7. At this point, you should be ready to start/restart the LDM which will, in turn, start the XCD ingestion and decoding processes.

  8. After you have verified that the LDM invocation started up startxcd.k and that data is being received by the LDM and fed to the XCD ingesters (ingetext for textual data and ingebin for binary data), you should setup scouring for the XCD-produced data files.

    Included in the Unidata McIDAS-X distribution is a Bourne shell script, mcscour.sh, that is designed to be executed by cron to scour McIDAS data files. After McIDAS-X installation, mcscour.sh will be found in mcidas' working directory, ~mcidas/workdata. mcscour.sh is best run by the user ldm. Before being run by ldm copy it to a directory in ldm's PATH and edi it to set needed McIDAS environment variables like was done for xcd_run:

    Set the EDITOR environment variable in your Unix session to be the name of your favorite text editor. For example, using C Shell syntax:

    Then, edit your crontab file:

    and add an entry like (yours may be different!) the following:

    If you had problems setting up a cron entry, contact your system administrator. This is very important for ldm as a number of LDM activities are initiated by cron.

    Now, edit the copy of mcscour.sh:

    and set its internal McIDAS environment variables.

    The invocations of doqtl.k in mcscour.sh are setup to scour McIDAS MD files so that only the two most recent days are left on disk. McIDAS MD files must be scoured before they get to be 10 days old. If they are not, then new data will be written to the end of existing files up until the file fills. After that, the data will be lost.

    The invocation qrtmdg.k GRID in the example is configured to keep only one day of XCD-decoded McIDAS GRID files on disk at one time.

    The delwxt.k invocation in the example is configured to keep one day of data on disk at one time and to search backwards ten days for data files to scour.

    More information on QRTMDG and DELWXT may be found in McIDAS-XCD Administrative Commands. More information on DOQTL, IGU, and LWU may be found in the Unidata McIDAS Users Guide.

  9. At this point your are finished configuring the LDM to run McIDAS-XCD, so you can log off:


Table of contents Previous: Configuring McIDAS-XCD Next: XCD Starting the Status Display Window
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690