Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

[LDM #JTZ-993835]: LDM Question



Steven,

> We use LDM to get Forecasted River Stages from the National Weather Service
> and it works great.  We just started receiving Forecasted Flow Data from
> them, however, they are sending the flow data in kcfs (thousand cfs), instead
> of being cfs.  Therefore, we need to take their data and multiply it by 1000
> to get it into our database correctly.
> 
> 
> The question I have is, is there a way in LDM to do the math before it sends
> it out?  For example, the pqact file tells where to put the data.  Is there a
> way to do the math before it sends it out?

By "send it out" I assume you mean that you want your receiving LDM system to
transform the data before relaying it to additional LDM's under your control.

No, the LDM can't, itself, perform such an operation.  You can, however, use
the capabilities of the LDM to accomplish this with a little programming effort.  
Use the PIPE action of "pqact" to convey the data-products to be transformed
to a utility that will perform the conversion, generating a new data-product.
Then insert that new data product into the product-queue, using a new product-
identifier that identifies it as the converted data-product.  To save
development time, the conversion utility could be written in a scripting
language (e.g., Perl, Python), providing it doesn't consume to much of the
CPU.  If a script is used, then its output file could be inserted into the
product-queue as a new data-product via the "pqinsert" utility.

> Thanks,
> 
> Steve
> 
> Steve Simmer
> Reservoir Regulation Team
> New England District - COE
> (978)318-8524


Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: JTZ-993835
Department: Support LDM
Priority: Normal
Status: Closed


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690