|
|
|||
|
||||
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:
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:
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.
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):
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:
# Entries for XCD decoders
IDS|DDPLUS ^.* PIPE
xcd_run DDS
HRS ^.* PIPE
xcd_run HRS
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:
# Entries for XCD decoders
#IDS|DDPLUS ^.* PIPE
# xcd_run DDS
#HRS ^.* PIPE
# xcd_run HRS
# Entries for XCD decoders
IDS|DDPLUS ^.* PIPE
xcd_run DDS
HRS ^.* PIPE
xcd_run HRS
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.
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.
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.
| Contact Us Site Map Search Terms and Conditions Privacy Policy Participation Policy | ||||||
|
||||||