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

19991130: MCIDAS: BATCH Questions



>From: Michael Keables <address@hidden>
>Organization: University of denver
>Keywords: 199911302306.QAA00439 McIDAS-X BATCH

Mike,

>I'm trying to use McIDAS to create the weather graphics for the DU
>weather website and have run in to a couple of problems.
>
>1. I want to create hourly gif images of a variety of products using the
>SKEDULER capabilities of McIDAS (I've created some batch files which I
>want to launch at specific times.)

Using the scheduler means that you have to keep McIDAS running all of
the time in the account you want to run the BATCH files in.  Other
sites have chosen to kick off processing jobs from Unix's cron
facility.  To do this, one has to write a shell script that sets McIDAS
environment variables and then run the McIDAS command (see the script
~mcidas/workdata/mcscour.sh for an example).  The shell script is then
kicked off by cron at the time that you want.  Doing this allows you to
not have to keep a McIDAS session running, which is usually a desirable
(not mandatory) thing.

>I'm creating a surface composite map
>by overlaying isobars and fronts on a satellite image. When using PTCON
>to generate the SLP contours, unless I specify a time in the SEL=
>keyword, PTCON searches the entire file for the most recent time (which
>takes about 30 secs to generate the pressure contours.) Is there a way
>to have PTCON use the most recent data product to produce the contours
>without specifying a time?

I would use the SFCCON command to do the contouring of sea level
pressure.  SFCCON is simplier to run PTCON, and it has some features
that we added, like being able to specify the time to be plotted as
FRAME meaning that it should go out to the frame diretory and get the
time of the thing that is already in the frame (like a satellite image
or previous plot).  I would avoid running PTCON and/or PTDISP directly
as much as possible.  It is best to let "macro" commands like SFCPLOT
and SFCCON run PTDISP and PTCON for you (there are instances where
running PTDISP/PTCON directly is needed, but they are mostly few and
far between).

>2. Once I get the gif files created for the images for the weather
>website, I need to have them stored in a single directory outside of
>mcidas/data (I don't want to make this directory readily accessible to
>the world.) My first thought was to include a unix system command in a
>batch file to copy the gif file created by SVGIF to a separate directory
>(i.e. !cp file newdir/file) but BATCH doesn't recognize ! as a valid
>command.

Two things:

o first, you can setup a REDIRECTion for files with a GIF (or gif)
  suffix that points to the directory where you want the files to
  be written in the first place.  This way you don't have to
  do a move or copy

o second, to execute a Unix command from a BATCH file, you use the
  OS command.  The '!' construct works only in the McIDAS command
  window

>How can I store gif files in a directory outside mcidas/data
>using a batch program?

Let's assume that you will name your GIF files with a .GIF suffix.
Add the following REDIRECTion to the McIDAS session you are running
the BATCH files from:

REDIRECT ADD *.GIF "/directory_where_you_want_the_GIFs_to_go

Now, when SVGIF (old command being replaced by FRMSAVE) is run, the
output file is written into the directory you specified with the
REDIRECT command.

>I had also thought about automatically ftp'ing
>the gif files to the DU server but don't know how to do this as a batch
>routine.

This is not needed at all.  Try the REDIRECTion technique "by hand"
until you get things right, and then your BATCH files will work
as you want.

>Please advise.

Please let me know if the above doesn't solve your problem.

Tom