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

20041221: McIDAS problem -- no map (cont.)



>From: Harry Edmon <address@hidden>
>Organization: University of Washington
>Keywords: 200411050645.iA56jlvV007527 McIDAS setup

Hi Harry,

>I am finally taking a look at this in regards to our new LDM server.  As 
>is usual, I am very confused.

Join the group :-)

>To eliminate some of the confusion in the past, I am planning to use 
>/usr/local/ldm/Mcidashome as the home directory for the "mcidas".  This 
>would allow the ldm user to have ~ldm/mcidas as his private McIDAS area.

OK.  Any reason for McIDAS to not have a HOME directory like /home/mcidas?

>HOWEVER, I process the McIDAS images using ldm-mcidas.  I notice that 
>the "batch.k" file in ldm-mcidas-2004 (and previous versions) does NOT 
>set up the McIDAS environment variables to use the private McIDAS area, 
>but to use the ~mcidas area:
>
>cd ~mcidas
>MCHOME=`pwd`
>
>MCDATA=$MCHOME/workdata
>MCGUI=$MCHOME/bin
># MCLOG=$MCDATA/ROUTEPP.LOG
>MCLOG=~ldm/logs/ROUTEPP.LOG
>MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help
>export MCPATH
>
># Add the MCGUI directory to the front of the PATH
>#
># NOTE:  PATH _must_ include the directory containing 'sed'.  If the
>#        PATH set for the user running 'batch.k' does not contain this
>#        directory, add it to the specification below
>
>PATH=${MCGUI}:$PATH
>export PATH

Correct.  I configured the Bourne shell script 'batch.k' to work
"out of the box" for a "standard" McIDAS installation, meaning one
where users follow the recommendations I put on the Unidata McIDAS
web site.  Of course, these are just guidelines, so experienced users
can do pretty much anything they like.

>So home is this different from what I have been doing in the past?

Do you mean 'how' instead of 'home'?

>And 
>given this setup, would the realtime data files end up in $MCHOME/workdata?

Not necessarily.  The situation can be more or less complicated depending
on what your goal is.

The ldm-mcidas PNG AREA decoder, pnga2area, can write output files
using two different methods:

- specifiying a fully qualified hostname (GEMPAK folks typically use
  this way of running the decoder)

- using the McIDAS routing table (used when people want to use
  the McIDAS routing table (ROUTE.SYS) to kick off a McIDAS BATCH
  file to do some processing of the images upon receipt of a
  product)

In order to run 'batch.k' automatically upon receipt of an IDD UNIWISC
(aka MCIDAS) product, your decoding action would look something like:

# CIMSS and UW Products decoded into AREA files using McIDAS routing table
UNIWISC ^pnga2area Q. (..) (.*) (.*) (.*) (.*) (........) (....)
        PIPE    -close
        decoders/pnga2area -vl logs/ldm-mcidas.log
        -d data/mcidas -r \1,\2

The operative arguments to pnga2area are:

-d       -> directory into which to decode output imagery
-r \1,\2 -> use the McIDAS routing table (ROUTE.SYS) concepts for the
            output namespace

This method of invoking 'pnga2area' mandates that the files ROUTE.SYS
and SYSKEY.TAB be located in the directory specified by the '-d' flag,
and be readable and writable by the user running the LDM.  Furthermore,
if the first directory specified in the MCPATH environment variable
is _not_ the same as the directory specified by '-d', the user
will need to setup a bunch of REDIRECTions that tell McIDAS where the
files should be read/written.

So, you could do the following to make your transition as painless
as possible (i.e., not create REDIRECTions for AREA files):

- edit the ldm-mcidas v2004 version of batch.k and change the
  definition of MCPATH by prepending the directory you specify
  in the '-d' flag for your pqact.conf UNIWISC action to MCPATH
  after it has been setup by the script.  Let's assume that
  you want to write your output AREA files to /data/ldm/mcidas:

change:

MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help

to:

MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help
MCPATH=/data/ldm/mcidas:$MCPATH

- make sure to copy ROUTE.SYS and SYSKEY to the output directory and
  have the correct permissions:

cp /usr/local/ldm/Mcidashome/data/SYSKEY.TAB /data/ldm/mcidas
cp /usr/local/ldm/Mcidashome/workdata/ROUTE.TAB /data/ldm/mcidas
cd /data/ldm/mcidas
chmod 664 ROUTE.SYS SYSKEY.TAB

- use the McIDAS ROUTE command to turn on or off decoding and
  processing of images

Please note, however, that if you setup REDIRECTions in your McIDAS
installation, the REDIRECTions will govern where the output AREA files
are written and read.  REDIRECTions are strange to non-McIDAS folks, so
I suggest setting up your McIDAS install without using them.  This is
not as per recommendations in my McIDAS web pages, but it should seem
more natural to you.

Next, if one plans to run McIDAS invocations through scripts or
through interactive sessions from the 'mcidas' account, s/he
should make sure to adjust her/his MCPATH to include the directory
containing the AREA files before the other locations specified
in the default MCPATH contained, for example, in 'batch.k'.

This may all sound very complicated if you are not used to running
McIDAS, but it is all pretty straightforward.  Please let me know if
you would like some help setting up the processing at UW.

Cheers,

Tom
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.