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

20011029: 6-minute profiler decode at COD and image loops (cont.)

>From: "Paul L. Sirvatka" <address@hidden>
>Organization: COD
>Keywords: 200110292153.f9TLrs128399 ldm-mcidas proftomd imgdisp.k


>I can't tell who gil is feeding from since I don't have access to


>But we fixed the feed so we are getting fed from UIUC. And now things are
>working. Thank you Tom for getting this working. Things are fine now.

I'm glad things are working.  Given the error in the pqact.conf file,
it seems like the 6-minute profiler decoding should have never worked

>One more question...
>I am creating gif's from the satellite files. I have set a crontab
>entry to do the job of getting them. I am also setting a loop of images.
>See http://weather.cod.edu/satellite/us.vaporloop.html


> I want images every 30 minutes at let's say 00 and 30 mins after the
>hour. I have the crontab to create the file as soon as I can when the
>files arrive (about 15 mins after image time). Unfortunately, depending on
>when they arrive at the server site, I sometimes get images from 15
>minutes after the hour. As a result, my image loops are jumpy. Is there a
>way to insure the images are the correct time and if not, abort the batch

Given the control you want over the load, it would be better to use a
McBASI script than a BATCH file.  With the McBASI script, you could
create the TIME to specify for the IMGDISP from the system clock.  This
way, you wouldn't be asking for the latest image from the dataset; you
would be asking for a specific image from the dataset.

For instance, compare:




If it is 46 after the hour, the first listing might well be the image
from 23:45, not the one from 23:30.  Specifying the specific time you
want insures that you get the one for the time you want.  If that
image doesn't exist, you can check the error return from IMGDISP
and skip the creation of the GIF/JPEG/etc.

So, the job in this case is writing the McBASI code that calculates
the time you want for the latest image.  Here is one idea on how to
do this:

------------- TEST.MCB -------------- clip ---------------------------------

REM Set the "fudge factor".  This is the amount of time past the ordinal time
REM that the image desired is expected to be available
f = 15

REM Save the hour portion of the current time in 'h$'
h$ = mid$(time$,1,2)

REM Get the numeric value of the current minute adjusted by the fudget factor
m = val(mid$(time$,3,2)) - f

REM Quantize the minutes to '0' or '30'
m = 30*(int(m/30))

REM Turn the minutes back into a string.  Make sure string min is two digits 
m$ = str$(m)
if len(m$)<2 m$="0"+m$

REM Create the full TIME string
t$ = h$ + ":" + m$

REM Display the image that corresponds to the time selected

REM Check the status return from IMGDISP.  If it is not zero, stop before
REM creating the GIF/JPEG/whatever.
if status <> 0 stop

REM Note that the MAP is run in a separate step AFTER the exist status of
REM IMGDISP has been checked.  This has two beneficial effects:
REM 2) IMGDISP ran successfully
REM 1) IMGDISP is done before MAP is run
keyin "EG;MAP H"

REM If the image load was not successful, exit.

REM Create the GIF (tm)

------------- TEST.MCB -------------- clip ---------------------------------

This is run by:


>I hope that is clear.



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.