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

[IDD #NMC-701918]: USPLN pqact question



Hi Gilbert,

You will notice that your inquiry was moved to our IDD inquiry
support since it is more of a how to use a tool than how to build
the tool and get it ready to run.  A bit of a fine distinction I
know, but...

re:
> OK. I'm quite confused about the new USPLN feed and how to save data
> files.
> 
> LIGHTNING       ^NAPLN1EX
> FILE    -overwrite -close uspln/\1/\2/\3/\4.napln
> FILE    -overwrite -close uspln/YYYYMMDDHHNN.napln

Two comments on this:

- having two action lines for a single pattern-action file
  entry is a no-no

- the first action contains back references (e.g., \1, \2,
  etc.) that refer to nothing since there are no fields in
  the pattern line that are sorrounded with parentheses

> #
> LIGHTNING       ^USPLN1EX
> #       FILE    -overwrite -close uspln/\1/\2/\3/\4.uspln
> #       FILE    -overwrite -close uspln/YYYYMMDDHHNN.uspln
> FILE    -overwrite -close uspln/(\1:yy)(\2:mmm)(\3:dd)(\4:hh)(\5:mm).uspln

The second comment above applies to this action -- you have back references
that refer to nothing.

> I've been trying several things here, but not getting what I want. NAPLN
> isn't saving at all into the uspln directory (IE, I'm not getting any
> NAPLN saved, even though I have requested ".*" for my ldmd.conf request).
> What I want is a file that saves as:
> 
> 2009040512.uspln
> 
> And have it accumulate with the data over the hour.

Here is the action that I use to save USPLN/NAPLN data:

EXP     USPLN1EX-(....)_(..)_(..)_(..)_(..)_..\.uspln$
        FILE    -close
        data/uspln/USPLN1EX/\1\2\3/uspln_\1\2\3.\4

EXP     NAPLN1EX-(....)_(..)_(..)_(..)_(..)_..\.dat$
        FILE    -close
        data/uspln/NAPLN1EX/\1\2\3/uspln_\1\2\3.\4

> What am I doing wrong?

The back references have to refer to parentheses-surrounded expressions
in the pattern.  For instance, my first action reads as follows:

NAPLN1EX-(....)_(..)_(..)_(..)_(..)_..\.dat$

(....) -> \1
(..)   -> \2
(..)   -> \3
(..)   -> \4
(..)   -> \5

A quick look at a NAPLN product header shows what the parameters mean:

Product ID:  NAPLN1EX-2008_09_18_22_02_00.dat

Back reference values:

\1 == 2008
\2 == 09
\3 == 18
\4 == 22
\5 == 00

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: NMC-701918
Department: Support IDD
Priority: Normal
Status: Closed