[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_WRI

Jim,

>I used your script verbatim, but still get the following output:
>
>%./mc_test
>
>Group Name                    Server IP Address
>--------------------         ----------------------------------------
>DATALOC -- done
> cannot locate string names - rerun setup.
>imgdisp.k: Image data server unable to resolve this dataset:
>NEXRCOMP/1KN0R-NAT
>imgdisp.k: done
> cannot locate string names - rerun setup.
>Frame saved in /home/jim/nowrad.gif
>%
>
>I get the same thing is I run "mcenv -f 512x640 mc_test".
>
>If I start up mcidas and try running the DATALOC in command, I never get
>it setting the location of NEXRCOMP to the IP, I just get similar
>messages to that above.

I logged onto pscwx and verified that (with one minor change I will
point out below) that I could run my example script as the user
'mcidas'.  I then became you and verified your observation that the
script would cause a number of 'cannot locate string names - rerun
setup.' errors and go nowhere.  I found that the cause of the problem
was in your .cshrc file.  What happens is that McIDAS commands will
source the .cshrc file for users running in the C shell.  Part of the
setup in one's .cshrc file is to put a guard around the resetting of the
MCPATH set of directories.  The block of code that sets
MCDATA, MCPATH, etc. in your .cshrc file should look like:

if ( ! ${?MCPATH} ) then
  setenv MCDATA $HOME/mcidas/data
  setenv MCPATH 
$HOME/mcidas/data:/home/mcidas/data:/data/mcidas-c:/home/mcidas/help
  setenv MCGUI /home/mcidas/bin
  setenv MCTABLE_READ "$MCDATA/MCTABLE.TXT;$MCHOME/data/ADDESITE.TXT"
  setenv MCTABLE_WRITE "$MCHOME/data/ADDESITE.TXT"
endif

The 'if ( ! ${?MCPATH} ) then' construct says that if MCPATH is already
defined then skip all setenv invocations in the rest of the if block.
This is absolutely necessary for C shell users.

After adding the guard in your .cshrc file, I copied over the updated
version of mc_test from the ~mcidas directory and ran it with no
problems in your account:

<login as you>
cd ~
./mc_test3
--------------------         ----------------------------------------
NEXRCOMP                     PSCWX.PLYMOUTH.EDU

<LOCAL-DATA> indicates that data will be accessed from the local data 
directory.DATALOC -- done
Beginning Image Data transfer, bytes= 79364
IMGDISP: loaded frame  1
EG;MAP H
imgdisp.k: done
EU: Restoring BREF24.ET    to frame(s)=   1
EU: Done
Erased graphic frame(s) 1-1
MAP: Completed frame 1
Frame saved in /home/jim/nowrad.gif

Ok, the small change I made in my example script was to put a wait after
the imgdisp.k command.  Here is the altered code:

mcenv << EOF

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

EOF

The reason the wait was needed is that imgdisp.k runs the commands
listed in the REFRESH= keyword asynchronously: imgdisp.k exits before
EG and MAP are run, and the framsave.k line is executed very fast.  The
upshot of this is that one gets to the EOF line and exits mcenv BEFORE
the EG and MAP commands have run.  When mcenv exits, the frame into
which the display was made is removed and EG and MAP will then issue
errors.

The other way around this "timing" issue is to run the MAP command
by itself:

mcenv << EOF

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

EOF

A couple of quick comments:

When loading the 1 km resolution reflectivity product, it is best to
use a MAG=-5 first to get the big picture.  After finding out where the
action is, then you can bore down on the interesting echos using less
and less blow-down.  For instance, today the action is down at the
Gulf Coast in LA.  I would change the mc_test3 code to:

mcenv << EOF

dataloc.k ADD NEXRCOMP pscwx.plymouth.edu
imgdisp.k NEXRCOMP/1KN0R-NAT LATLON=30 93 MAG=1 EU=BREF24
eg.k
map.k H
frmsave.k 1 "/home/jim/nowrad.gif"

EOF

to get a really nice picture of the activity down there.

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.