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

[LDM #LYH-460177]: Problem with pqact.conf syntax



Hi Evan

re:
> I am trying to save HRS IUPT41, IUPT42, and IUPT43 files in the manner
> described here:
> 
> http://www.unidata.ucar.edu/support/help/MailArchives/datastream/msg01521.html
> 
> One of the lines (the others are similar but contain IUPT42 and IUPT43
> as shown in the above link) in my pqact.conf file looks like this:
> 
> HRS     ^IUPT41 KBOU ([0-3][0-9])([0-2][0-9])([0-9][0-9])       FILE
> /home/ldm/data/ldm/bufr/profiler1/PROFILER_(\1:yyyy)(\1:mm)\1_0000.bufr
> 
> But when I attempt to start the LDM, I get the following error message
> (the above line is line 125 in the file):
> 
> address@hidden etc]$ ldmadmin start
> The product-queue is OK.
> Nov 25 07:51:14 pqact[19854] NOTE: Starting Up
> Nov 25 07:51:14 pqact[19854] ERROR: Syntax error at line 125, not enough 
> fields
> Nov 25 07:51:14 pqact[19854] ERROR: Error in configuration-file 
> "/home/ldm/etc/pqact.conf"
> Nov 25 07:51:14 pqact[19854] NOTE: Exiting
> Nov 25 07:51:14 UTC bou.ldm :
> address@hidden etc]$
> 
> Can you help me to resolve this?

A common mistake made in pqact.conf actions is using spaces as whitespace when
tabs are required.  Please reformat your entry to look like the following:

HRS<tab>^IUPT41 KBOU ([0-3][0-9])([0-2][0-9])([0-9][0-9])
<tab>FILE<tab>/home/ldm/data/ldm/bufr/profiler1/PROFILER_(\1:yyyy)(\1:mm)\1_0000.bufr

NB: <tab> should be replaced by a tab character

The other thing you might consider doing is adding a '-close' flag to the
action.  You would do this if your output file will contain exactly one
product:

HRS<tab>^IUPT41 KBOU ([0-3][0-9])([0-2][0-9])([0-9][0-9])
<tab>FILE<tab>-close<tab>/home/ldm/data/ldm/bufr/profiler1/PROFILER_(\1:yyyy)(\1:mm)\1_0000.bufr

> Also, could you explain the purpose of
> the (\1:yyyy) and (\1:mm) entries in the RegEx? I haven't been able to
> find a clear answer to this anywhere.

One of the problems with products sent in NOAAPort (and typically originating 
from
the GTS) is that their Product IDs (the textual string that your regular 
expression
will match against) do not contain the date information (i.e., year or month).  
For
real-time data, it is likely that the date of the product is the same as the 
UTC time
the product was received.  The (\n:yyyy) and (\n:mm) expressions inform 'pqact' 
that it
should guess the year (yyyy, e.g., 2008) and month (mm, e.g., 11) using the time
specified in the product header (which you identified with the first set of
parentheses).  'pqact' is smart enough to recognize that products received
close to 0 UTC are likely from the previous day).

> Many thanks,

No worries.
 

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: LYH-460177
Department: Support LDM
Priority: Normal
Status: Closed


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.