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

Re: LDM Observations and Questions



On 25 Jan 2000, Ken Waters wrote:

> 
>      
> 
> 
> ______________________________ Forward Header 
> __________________________________
> Subject: LDM Observations and Questions
> Author:  Ken Waters at W-SR-SRH
> Date:    1/25/2000 10:54 AM
> 
> 
>      I have been playing with our LDM for quite awhile here and would like 
>      to pose a question about using Perl scripts vs. the LDM FILE 
>      mechanism.
>      
>      Basically, there are some capabilities which I wish existed in LDM but 
>      do not, and therefore I have been testing some Perl scripts to do what 
>      I need.  
>      
>      For one, I was looking for the capability to do use a Boolean "NOT" in 
>      my pattern matching.  For instance, send all products EXCEPT for MTRs 
>      and TAFs.  As far as I can tell, that capability does not exist.  The 
>      "OR" operator is there (a pipe '|') but not a "NOT" operator.  
>      
>      Another observation is that the append function (i.e., not using the 
>      -overwrite option) always appends to the bottom of the file, using 
>      standard Unix appending.  I would like to append to the top of the 
>      file.  There is no way to do this other than writing scripts and 
>      appending manually.
>      
>      Okay, what am I getting to on all this?  Well, my concern is how the 
>      operating system can handle so many calls to scripts and I'm concerned 
>      that some will get lost due to multiple calls to the same script with 
>      possibly the same matching pattern.  Is it better to just use LDM to 
>      write out the product to a temporary file and then set up a PIPE to do 
>      all the exception handling above?  


Ken,

It Ok to use perl scripts, that's how the perl decoders work. A pipe to
the perl decoders. A couple words of caution, don't use any flags on the
PIPE action, keep the perl script running as long as possible. The
starting and stopping of the script is a large overhead to the OS and LDM.
Also make the pqact entry as generic as possible, I mean don't use the
hour or minutes in a parameter fields. The LDM starts another script every
time the parameters change. Look at the perl decoders entry examples for
pqact.conf.  I forgot, you need to use the select statement on STDIN so
the script doesn't exit after a single product. Again look at the perl
decoders for examples. With this said, your script can do what ever it
wants, create new files, append to the beginning of files, filter out
reports, etc. 

Robb...



>      
>      I would be interested in any comments or suggestions any of you may 
>      have in this.
>      
>      Thanks.
>      
>      Ken Waters
>      Southern Region HQ/SSD
> 

===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
address@hidden             WWW: http://www.unidata.ucar.edu/
===============================================================================