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

20020131: is there a #Y for the previous day?



>From: Owen Cooper <address@hidden>
>Organization: NOAA Aeronomy Laboratory
>Keywords: 200201311852.g0VIqDx24350 McIDAS string McBASI

Owen,

>I'm running a MCIDAS batch from a cronjob in order to overlay AVN
>geopotential heights onto real time satellite imagery.  For instance to
>plot the most recent GOES-W IR image and the 500 hPa heights at 18 UTC,
>my batch runs at 18:20 UTC, grabs the most recent IR image and plots
>the 6-hr forecast 500 hPa from the most recent run (12UTC) of the AVN.

OK, I understand.

>This works fine for the batches run at 6:20, 12:20 and 18:20 UTC, but I
>run into a problem at 00:20 UTC.  At this time, the #Y gives the
>current day, for example 2002031 for Jan. 31, 2002.  But at this time I
>need to grab the 6-hr forecast from the 18 UTC run of the AVN from the
>previous day, 2002030.  Is there some equivalent of #Y for the previous
>day?  How do I tell MCIDAS that I want to grab fields from the AVN of
>the previous day?

No, there is no string that represents "yesterday".  You could write a
little McBASI script to calculate the DAY for yesterday, and/or you could
convert your BATCH script to a McBASI script and build in the smarts
to figure out exactly what DAY and TIME are needed in the GRDDISP selection.

There are several McBASI scripts included in the Unidata McIDAS-X
distribution that you can look at to get you going.  The one I would
peruse is UACROS.MCB since it has a section that gets the current year
(CCYY), Julian day (JJJ), and TIME (HH) and then calculates the appropriate
DAY and TIME for one hour previous.  This is very close to what you want
to do, so it should be easy to adapt.

>Thank you for any help you can provide,

To learn more about McBASI, please refer to Chapter 4 of the McIDAS-X
7.80  User's Guide:

http://www.unidata.ucar.edu/packages/mcidas/780/users_guide/McHTML-1.HTML

Please let me know if you run into any posers when converting your BATCH
file to a McBASI script.

Tom