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

20021011: 20021011: LDM Date/Time Template Question



Kathy,

I based my respnse on what you included in your email, including what you were 
seeing
with the \y and \m output. 

Steve Chiswell

>From: Kathy Carusone <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200210112130.g9BLUY105748

>Thanks for the info. I did try, as an experiment, to see if different
>fields were there, and put in a temporary template that include \1
>through \9, and, if I recall correctly, there were no individual date
>and time fields. How do you know that the product names have those
>fields?
>
>Kathy
>
>Unidata Support writes:
> > 
> > Kathy,
> > 
> > The LDM templates \n:yy, \n:yyyy, and \n:mm base the year and
> > month on the day being passed. Your \3 refers to a long time string
> > (eg everything in the third pair of parentheses), not just the day. 
> > 
> > In fact, since your LDM product names already have the
> > year, month and day in them, you can just grab it out of the 
> > product name, eg:
> > 
> > 
> > ^L2-([^/]*)/(....)/([0-9][0-9])([0-9][0-9])([0-1][0-9])([0-3][0-9])([0-2][0
> -9][0-5][0-9][0-9][0-9])
> >     FILE
> >     /ll/itws/projects/ldm/data/\2/\4\5\6/NEXRADII_\2.\3\4\5\6\7.bz
> > 
> > Using the extra pathentheses, now the century is \3,
> > the year is \4, the month is \5, the day is \6, and the rest of the hour, m
> in, sec is \7.
> > 
> > Steve Chiswell
> > 
> > >From: Kathy Carusone <address@hidden>
> > >Organization: UCAR/Unidata
> > >Keywords: 200210112111.g9BLBm105047
> > 
> > >I spoke with Anne Wilson at the NEXRAD Users workshop at OU a few weeks
> > >ago, and mentioned that I had a problem with LDM date templates and
> > >NEXRAD Archive II data. She recommended I email the details.
> > >
> > >The following part of my pqact file does not work as I expect; the
> > >(\3:yy), etc., do not get interpreted. In the resulting filename, I get
> > >the full expansion of the date-time string, which is \3, with the 
> > >:yy and parentheses uninterpreted. E.g.
> > >
> > >/ll/itws/projects/ldm/data/KBOX/(20021011182217:yy)(20021011182217:mm)(200
> 2101
> > > 1182217:dd)/NEXRADII_KOKX.20021011182217.bz2
> > >
> > >NEXRD2
> > >        ^L2-([^/]*)/(....)/([0-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9][0-2][
> 0-9]
> > > [0-5][0-9][0-9][0-9])
> > >        FILE
> > >        /ll/itws/projects/ldm/data/\2/(\3:yy)(\3:mm)(\3:dd)/NEXRADII_\2.\3
> .bz2
> > >
> > >What I use for a workaround, to get the YYMMDD dated directory, is to
> > >use the strfttime templates. Using the following template, I almost get
> > >what I want, but I run into problems at the start and end of day. (One
> > >volume gets split, another goes into the wrong day):
> > >
> > >NEXRD2
> > >        ^L2-([^/]*)/(....)/([0-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9][0-2][
> 0-9]
> > > [0-5][0-9][0-9][0-9])
> > >        FILE
> > >        /ll/itws/projects/ldm/data/\2/%y%m%d/NEXRADII_\2.\3.bz2
> > >
> > >This example filename is the format I want:
> > >
> > >/ll/itws/projects/ldm/data/KBOX/021011/NEXRADII_KOKX.20021011182217.bz2
> > >
> > >Is this feature supposed to work for the NEXRD2 feed, or is it only
> > >applicable to the WMO headers? (Or did I do it wrong?) Reference the LDM
> > >Site Manager's Guide, section on Configuration/Adding Dates to
> > >Filenames, p37. Thanks for any help you can provide.
> > >
> > >Kathy
> > >
> > >            Kathy Carusone  |  address@hidden                      
> > >    MIT Lincoln Laboratory  |  (781) 981-5039 
> > >       Lexington, MA 02420  |  (781) 981-0632 FAX
> > >
> > 
> > ***************************************************************************
> > Unidata User Support                                    UCAR Unidata Progra
> > (303)497-8643                                                  P.O. Box 300
> > address@hidden                                   Boulder, CO 8030
> > ---------------------------------------------------------------------------
> > Unidata WWW Service                        http://www.unidata.ucar.edu/    
> > ***************************************************************************
> > 
>