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

20020228: NEXRAD composites on pscwx (cont.)



>From: Jim Koermer <address@hidden>
>Organization: Plymouth State College
>Keywords: 200202280553.g1S5rxx20688 McIDAS scripts MCTABLE_READ MCTABLE_WRITE

Jim,

>Thanks. I've been trying to view these at home via a script generating a
>GIF file, but I can't seem to get thing pointed properly to the NEXRCOMP
>on pscwx.
>
>Here is the script:
>
>#!/bin/sh
># 
># Script name "mc_test"
>#
># Usage: mcenv -f 512x640 mc_test
>dataloc.k ADD NEXRCOMP pscwx.plymouth.edu                  
>imgdisp.k NEXRCOMP/1KN0R-NAT STA=TWX EU=BREF24 MAG=2 REFRESH='EG;MAP H'  
>frmsave.k 1 "/home/jim/nowrad.gif"
>exit 0
>#
># End script
>
>Here is what I get, when I run the script:
>
>%mcenv -f 512x640 mc_test
>
>Group Name                    Server IP Address
>--------------------         ----------------------------------------
>DATALOC -- done
>imgdisp.k: Image data server unable to resolve this dataset:
>NEXRCOMP/1KN0R-NAT
>imgdisp.k: done
>Frame saved in /home/jim/nowrad.gif
>
>
>I've tried a number of other things, but I've basically can't seem to
>get any combination to get DATALOC to assign NEXRCOMP to
>pscwx.plymouth.edu and hence cannot read the file with IMAGEDISP.

In the script, you should assign values to the environment variables
MCDATA, MCPATH, MCTABLE_READ, and MCTABLE_WRITE and export those
values.  For instance, if this were running as the user 'me' (and I
am not the user 'mcidas'), and the HOME directory for the user
'mcidas' (where McIDAS is installed) is /home/mcidas, then the script
might look like:

#!/bin/sh
#
# Script name "mc_test"
#
# Set some needed environment variables
#
# NB: setting MCTABLE_WRITE to make sure that user's MCTABLE.TXT is updated

MCHOME=/home/mcidas
MCDATA=$HOME/mcidas/data
MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help
MCBIN=$MCHOME/bin
MCTABLE_READ="$MCDATA/MCTABLE.TXT;$MCHOME/data/ADDESITE.TXT"
MCTABLE_WRITE=$MCDATA/MCTABLE.TXT

PATH=${MCBIN}:$PATH

export MCDATA MCPATH MCTABLE_READ MCTABLE_WRITE PATH

cd $MCDATA

# Usage: mcenv -f 512x640 mc_test

mcenv << EOF

dataloc.k ADD NEXRCOMP pscwx.plymouth.edu
imgdisp.k NEXRCOMP/1KN0R-NAT STA=TWX EU=BREF24 MAG=2 REFRESH='EG;MAP H'
frmsave.k 1 "/home/jim/nowrad.gif"

EOF

#
# Done!  End script
#

exit 0

If the user running the script is 'mcidas', then the only real change
to the script is in $MCDATA and perhaps in MCTABLE_READ and
MCTABLE_WRITE.  MCDATA for the user 'mcidas' is $HOME/workdata, not
$HOME/mcidas/data.  MCTABLE_WRITE could be $HOME/data/ADDESITE.TXT if
you wanted to set DATALOCs for all users to on your machine.
If you wanted the DATALOCs to be "private" to the user 'mcidas', then
you would set MCTABLE_READ and MCTABLE_WRITE as listed above.

As a reminder, the meaning of MCTABLE_READ and MCTABLE_WRITE are:

MCTABLE_WRITE   <- file where DATALOC settings will be written
MCTABLE_READ    <- files to be read to find DATALOC settings

Note that MCTABLE_READ specifies a list of files (semi-colon separated)
that are to be read to determine where to look for a dataset, but
MCTABLE_WRITE is set to point to a single file in which DATALOC
settings are saved.

This may seem overly complicated, but it provides a lot of flexibility
in how 'mcidas' can do things and either affect or not affect all other
users of McIDAS on a system.  'mcidas' should be though of as 'root'
for McIDAS operations: what it does can affect all other users of McIDAS
on the system.

>I'll try from the command line in work tomorrow.

Please give my script above a test and see if it doesn't work for you.

I will be out of the office tomorrow, but I will be reading email
tomorrow night.

One last perhaps minor comment.  The term "NOWrad" is copyrighted by
WSI Corp., so it may be wise to not use it for things that are not
related to WSI products.

Tom