[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20020502: SDI NOAAPORT feed to McIDAS-XCD via LDM?



>From:  "Hoeth, Brian" <address@hidden>
>Organization:  JSFC
>Keywords:  200205021541.g42FfUa28141 IDD McIDAS-XCD

Brian,

>I forget if I've asked you this before ... do you guys feed the NOAAPORT
>data from your SDI to XCD via LDM or do you use the conventional TCP/IP port
>setup?  

We use the LDM.  The SDI is setup to insert all products into a local LDM
queue, and that LDM feeds one or more downstream sites which, in turn,
feed one or several downstream sites.

The setup in the LDM ldmd.conf and pqact.conf files for XCD processing
is very simple:

ldmd.conf:

exec    "xcd_run MONITOR"


pqact.conf:

#########################################################################
#
# McIDAS-XCD section
#
DDPLUS|IDS      ^.*     PIPE
        xcd_run DDS
HRS     ^.*     PIPE
        xcd_run HRS


'xcd_run' is a Bourne shell script whose job is to setup a McIDAS
environment (e.g., define MCPATH, etc.) and run one of three things
based on the positional parameter passed to it:

positional   action           explanation
------------+----------------+---------------------------------------------
MONITOR      runs startxcd.k  this action is in the LDM's ldmd.conf file
DDS          runs ingetext.k  all LDM products in the DDPLUS or IDS streams
                              are sent vi stdout to stdin of ingetext.k
HRS          runs ingebin.k   all LDM products in the HRS stream
                              are sent vi stdout to stdin of ingebin.k

A copy of my current version of xcd_run follows:

#!/bin/sh -f

#--------------------------------------------------------------------------
#
# Name:     xcd_run
#
# Purpose:  McIDAS-XCD startup script
#
# Setup:
#           o the site administrator must have built and installed
#             Unidata McIDAS-X 7.X and Unidata McIDAS-XCD 7.X
#
#           o McIDAS-X executables must be able to run on the same
#             machine as the LDM.  This means that the executables must:
#
#                o be for the same system architecture as the system
#                  running the LDM
#                o must be accessible on a local or NFS mounted disk
#
#           o the site administrator must have setup his/her LDM pqact
#             file to run this script upon receipt of DDS|PPS|IDS
#             products.  Here are examples of two entries that could
#             be be in pqact.conf:
#
#           # Textual data from DDS, PPS, and IDS
#           DDPLUS|IDS  ^.*     PIPE
#               xcd_run DDS
#
#           # Binary data from HRS
#           HRS ^.*     PIPE
#               xcd_run HRS
#
#           If you decide to use these sample entries, PLEASE remember
#           that the LDM requires tabs for various fields in actions!
#
# Notes:    What this script does, and how it works
#
#           o the site McIDAS administrator has setup file routing for the
#             various products that can be decoded by the XCD decoders
#             This includes surface SAO/METAR, SYNOP, Terminal Forecasts,
#             MDR radar bulletins, etc.; mandatory and significant level
#             upper air reports, FOUS14 bulletins, etc.
#
#           o the site administrator must make sure that the McIDAS-XCD
#             configuration tables: DDS.CFG, PPS.CFG, IDS.CFG and HRS.CFG
#             are located in a directory defined in the MCDATA environment
#             variable defined in this script (see below).
#
#             *** NOTE ***
#             The *.CFG files must be readable and writable by the user running
#             the LDM processes
#
#           o the site administrator has made sure that the McIDAS-X System
#             Key Table, SYSKEY.TAB, has been copied to the directory in
#             which the XCD decoder will create their output.
#
#             *** NOTE ***
#             SYSKEY.TAB must be readable and writable by the user running
#             the LDM processes
#
#             The directory in which XCD decoders will write their output
#             files is defined by REDIRECTions listed in the file LWPATH.NAM
#             located in the $MCDATA directory.
#
#           o the site administrator configuring 'xcd_run' (this file) MUST
#             define the following environment variables internally in
#             'xcd_run' (further down in this script):
#
#             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) may be
#                      located in other directories if there are
#                      active REDIRECTions for them.
#
#             MCLOG  - fully qualified pathname of the file in which 
#                      the output from XCD ingesters/decoders/monitors
#                      will be written
#
#             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:  960920 - Written for Unidata McIDAS-XCD 7.000
#           961207 - Updated for Unidata McIDAS-XCD 7.10
#           961212 - Added MCHOME variable
#                    Delete log file each time startxcd.k is (re)started
#           980530 - Updated for Unidata McIDAS-X 7.40
#           981203 - 'exec' ingebin.k/ingetext.k to get rid of 'xcd_run' PIDs
#
#--------------------------------------------------------------------------

# Define macros needed for McIDAS-7.X 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/XCD_START.LOG
MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help

# Setup PATH so that the McIDAS-X executables can be found

PATH=$MCHOME/bin:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/bin:/usr/local/bin:/usr/ucb

# Set LD_LIBRARY_PATH to include all directories (other than those searched
# by default) that are needed to be searched to find shared libraries.
# For this example, I assume that the shared Fortran library is located
# in /opt/SUNWspro/lib

LD_LIBRARY_PATH=/usr/openwin/lib:/opt/SUNWspro/lib:$MCHOME/lib:/usr/lib:/usr/ucblib

# Export needed environment variables
export MCPATH PATH LD_LIBRARY_PATH

# cd to the MCDATA directory
cd $MCDATA

# Get the current time
time=`TZ=UTC date +%y%j.%H%M%S`

# Send all messages to the log file and start the process

exec 2>> $MCLOG 1>&2
echo "Starting $@ at $time"

case $1 in
    DDS)     exec ingetext.k DDS;;
    IDS)     exec ingetext.k DDS;;
    PPS)     exec ingetext.k DDS;;
    DDPLUS)  exec ingetext.k DDS;;
    HRS)     exec ingebin.k  HRS;;
    HDS)     exec ingebin.k  HRS;;
    GRID)    exec ingebin.k  HRS;;
    MONITOR) rm -f $MCLOG
             exec startxcd.k
             ;;
    *)       echo "xcd_run action $1 incorrectly specified, failing..."
             ;;
esac

# Done.  The only path to here is by no patterns matching above.

time=`TZ=UTC date +%y%j.%H%M%S`
echo "xcd_run exiting from $1 action at $time"

exit 0

I hope that this is the kind of information you were looking for.

Tom

>From address@hidden Thu May  2 10:39:01 2002
>Subject: RE: 20020502: SDI NOAAPORT feed to McIDAS-XCD via LDM? 

This is exactly what I was looking for, thank you very much for all of this
info!!

Brian

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy