[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[McIDAS #DPX-653014]: The mcenv command
- Subject: [McIDAS #DPX-653014]: The mcenv command
- Date: Fri, 15 Oct 2010 13:33:16 -0600
Hi Francisco,
re: simplifying the content of your .profile file
> Ok, I prepared the .profile as the instructions said.
Very good. This should make your life easier in the future.
re: two invocations of 'mcenv' when I logged in earlier
> You might have been ssh'ed as the same time I was, however now I've
> assured no mcenv is running.
OK. I just SSHed to your machine, and I see that no invocation of
'mcenv' is running.
re:
> I still can't mcenv to create that bash-like environment, and I need
> it to run the scripts from the atmos server. The script is under the
> ./scripts/gevis.sh and the core component that uses mcidas goes like
> this:
>
> mcenv -f 1@600x800 << 'EOF'
> imgdisp.k RTIMAGES/GE-VIS STA=TJSJ MAG=1 REFRESH='EG;MAP H'
> wait.k
> frmsave.k 1 ./getvis/gevis.jpg FORM=JPG
> exit
>
> Is there any other way to do this?
Yes.
The problem with what you have is that the ./getvis subdirectory does
not exist, and McIDAS will not create it for you.
I just did the following to verify that everything is working correctly:
<as mcidas on 136.145.123.167>
cd $MCDATA
cp ~mcidas/data/mcrun.sh myrun.bash
-- edit myrun.bash and:
Change:
#!/bin/sh
To:
#!/bin/bash
Change:
SHELL=sh
export SHELL
To:
SHELL=/bin/bash
export SHELL
Incorporate your invocations above into myrun.bash:
...
cd $MCDATA
# put McIDAS-X commands you want to run here, one command per line.
mcenv -f 1@600x800 << 'EOF'
eg.k
imgdisp.k RTIMAGES/GE-VIS STA=TJSJ MAG=1
map.k H
frmsave.k 1 ./getvis/gevis.jpg FORM=JPG
exit
# done
exit
EOF
- create the directory $MCDATA/getvis:
mkdir $MCDATA/getvis
- run the script
./myrun.bash
The result of this is:
- script/McIDAS log output in $MCDATA/mcrun.log
- a JPEG file named getvis.jpg in $MCDATA/getvis
While I did not transfer the JPEG back to here to take a look, I am
certain that things are working correctly.
Comments:
- I erase the frame immediately by moving the EG (eg.k) to the first
line of the command sequence. This is not a requirement; it just
seems a bit cleaner to me.
- I moved the drawing of the map to a separate line in the sequence afger
IMGDISP. This eliminated the need to WAIT (wait.k) for the IMGDISP to run
the REFRESH= commands.
- you could add the creation of the needed subdirectory(ies) (where
you want to save your JPEGs) into your script. For instance, the
following modification could easily be made to the myrun.bash script:
Change:
# Example (note that these lines are commented out!!):
#
mcenv -f 1@600x800 << 'EOF'
eg.k
imgdisp.k RTIMAGES/GE-VIS STA=TJSJ MAG=1
map.k H
frmsave.k 1 ./getvis/gevis.jpg FORM=JPG
exit
# done
exit
EOF
To:
mkdir -p ./getvis
# Example (note that these lines are commented out!!):
#
mcenv -f 1@600x800 << 'EOF'
eg.k
imgdisp.k RTIMAGES/GE-VIS STA=TJSJ MAG=1
map.k H
frmsave.k 1 ./getvis/gevis.jpg FORM=JPG
exit
# done
exit
EOF
It is my opinion that McIDAS is running correctly on your machine and
you can now concentrate on the next job(s) at hand.
re:
> Thanks!
No worries.
Cheers,
Tom
--
****************************************************************************
Unidata User Support UCAR Unidata Program
(303) 497-8642 P.O. Box 3000
address@hidden Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage http://www.unidata.ucar.edu
****************************************************************************
Ticket Details
===================
Ticket ID: DPX-653014
Department: Support McIDAS
Priority: Normal
Status: Closed