Warning Decision Support System -- Integrated Information

Automated algorithms, tools and displays for analysis, diagnosis and forecasts of severe weather phenomena       www.wdssii.org

WDSS-II

Real-time Data

Discussion Forum
WDSS-II Blog

Documentation
For developers
Obtaining WDSS-II

Contact


Transmitting WDSS-II products using LDM

You can transmit WDSS-II products created on your server onto other machines and organizations using Unidata's Local Directory Manager (LDM). To do that, you use the WDSS-II program w2mirror.

For explanation purposes, assume that the WDSS-II products are being created on the machine "tran" (the transmitting server) and that the products should be transmitted to the machine "rec" (the receiving machine).

Assume that you want to push from "tran" all the products notified into /data/realtime/radar/multi/code_index.lb, that your LDM queue on "tran" is at /home/ldm/data/ldm.pq and you want the feedtype to be EXP. These are the steps you need to do:

On the "tran", transmitting server

  1. Install the LDM software.
  2. Add this line to /home/ldm/etc/ldmd.conf:
     allow ANY rec.some.domain.gov 
  3. Make the ldm queue (ldmadmin mkqueue)
  4. ldmadmin start - Put this in a init.d launch so that LDM starts up automatically on reboot.
  5. In your w2alg.conf (in the w2algrun directory), add the following lines to launch off w2mirror:
       manager PROCESS-PUSH
         set PROCESS_EXE "w2mirror"
         set PROCESS_PARAMS "-i xmllb:/data/realtime/radar/multi/code_index.lb -o /home/ldm/data/ldm.pq -L EXP -r --verbose=3" 
    
    See the usage of w2mirror to find out how to transmit only selected products.
  6. ldmadmin watch - to make sure things are working right.

On the "rec", the receiving server

  1. Install the LDM software.
  2. Add this line to /home/ldm/etc/ldmd.conf:
     request {tab} EXP {tab} ".*" qtran.other.domain.gov 
  3. Add these lines to /home/ldm/etc/pqact.conf
    EXP {tab}    /tmp/(.*)/indexrecord/(.*).fml
    {tab}        PIPE  {tab}  -close {tab} /home/ldm/w2receive_fml.sh {tab} \2.fml
    EXP {tab}    ^(.*)netcdf(.*)
    {tab}        PIPE  {tab}  -close {tab} /home/ldm/w2receive.sh {tab} /\1netcdf\2
    
  4. Make the ldm queue (ldmadmin mkqueue)
  5. w2receive.sh can be found in the bin directory of your WDSS-II installation. Copy it to /home/ldm so that the above pqact entries work, and modify it as required. For reference, this is the provided w2receive.sh:
    #!/bin/sh
    # use g+w or a+w, so that wdssii can delete this file with scour
    umask a+w
    
    filename=$1
    dirname=`dirname $filename`
    tempdir=${dirname}/.working
    mkdir -p $tempdir
    tempfile=${tempdir}/w2receive.$$
    
    #echo "$filename" > $tempfile
    cat - > $tempfile
    mv $tempfile $filename
    
    What it does is to take the received file name and replicate the exact same directory structure on the "rec" as was on "tran". Therefore, the products will go to /data/realtime/radar/multi on the "rec". Make sure that the user LDM has the enecessary write permissions since pqact runs as "ldm".

    The fml files are the Index records. You have three options on dealing with these:

    • Don't have an entry for the fml records in the pqact.conf. Do this if you will be taking the WDSS-II netcdf files on "rec" and doing non-WDSS-II things with it.
    • Make w2receive.sh and w2receive_fml.sh identical. The index records (all the .fml records) will be written to individual files. You want this behavior if "rec" is really a webserver and you want to use the webindex EJB to provide http-based access to other users.
    • Use the provided w2receive_fml.sh if you wish to run WDSS-II algorithms on "rec" also. This is the provided w2receive_fml.sh:
      #!/bin/sh
      dirname=`dirname $1`
      cat - | lb_cat -w $dirname/code_index.lb
      
      so that the files go into a LB instead. Note that if you do this: (a) your RMTPORT variable for both the ldm and wdssii users should be set to "/tmp:50000", not just "50000" (b) the LB should be writeable by the user ldm and (c) lb_cat should be in the PATH of ldm.

  6. ldmadmin start - Put this in a init.d launch so that LDM starts up automatically on reboot.
  7. Make sure to scour your incoming data directories so that they don't fill up. This is our w2scour.conf -- note that the times are set up for minutes, not days (the ldm scour.conf is set up for days).
    :
    /data/realtime/radar                            60      *netcdf*
    /data/realtime/radar                            60      *fml*
    
Please post any questions on the discussion forum.