Additionally, as I have already received a direct reply from someone
wanting details:
- create a script, say "/home/ldm/bin/cutmetars.sh" that looks similar
to this:
-- cut here --
#! /bin/bash
if [ -r /etc/profile ]; then
source /etc/profile
fi
if [ -r ${HOME}/.bashrc ]; then
source ${HOME}/.bashrc
fi
if [ -r ${HOME}/.bash_profile ]; then
source ${HOME}/.bash_profile
fi
finalfile=`echo "${1}" | awk -F"/" '{print $NF}'`
finalpath=`echo "${1}" | sed -e "s/${finalfile}$//g"`
mkdir -p ${finalpath}
cat | tr '\n' '\r' | sed -e "s/ \r\r\r//g" | \
sed -e "s/\r\r\r //g" | sed -e "s/\r\r\r/\r/g" | \
tr '\r' '\n' | grep -E -o "[A-Z][0-9A-Z]{3} [0-9]{6}Z .*" >> ${1}
-- cut here --
Then edit your pqact.conf file to PIPE the incoming METAR/SPECI to this
script:
#
WMO ^S[AP].... .... ([0-3][0-9])([0-2][0-9])([0-5][0-9])
PIPE -close /home/ldm/bin/cutmetars.sh
data/metar_list/%Y%m%d_%H.txt
#
Check syntax (you need tabs in particular places that email will
probably not carry):
ldmadmin pqactcheck
Then HUP it:
ldmadmin pqactHUP
This is not bulletproof, it will have both false negative and positives,
but it will work to give you a basic idea of what is coming in.
On 10/15/2013 11:05 AM, Neil Smith wrote:
> He's essentially asking if there is a way to save a short list of
> individual station metar reports to their own directory - as they come
> in from the IDD. I remember doing this as a post process with Peter
> Nelley's 'Weather' program, in conjunction with the ldm pqsurf queue.
>
> Is there a way to do this with the ldm, maybe with a decoder?
>
> -Neil
> ---
> Neil Smith neils@xxxxxxxx <mailto:neils@xxxxxxxx> 979.845.6272
> Senior IT Professional, Atmospheric Sciences, TAMU
>
>
> On Oct 15, 2013, at 10:43 AM, "Diaz, Jr., Arturo" <arturo.diaz@xxxxxxxxx
> <mailto:arturo.diaz@xxxxxxxxx>> wrote:
>
>> Good morning,
>>
>> I was wondering if anybody had information as to how the METAR reports
>> are distributed within the LDM. I have found the information about the
>> WMO header required to request file this data as text files. However,
>> it seems as if some stations are responsible to transmit reports from
>> other stations as well because I cannot request METAR reports from
>> specific stations. When requesting all reports from the United States
>> and filing the files in folder based on the ICAO ID only 60 folders
>> get created and those 60 stations' reports contain reports for many
>> stations.
>>
>> Does anyone know if there is hierarchy for reporting METAR reports?
>>
>> Any help or guidance will be much appreciated. Thank you very much in
>> advance.
>>
>>
>>
>>
>> P Please consider the environment before printing this email.
>>
>> <tamiu-banner.jpg>
>>
>> ------------------------------------------------------------------------
>> <poweredbytamiu.png>
>>
>> Arturo Diaz, Jr.
>> Programmer I (CEES)
>> Biology and Chemistry
>> LBVSC 346
>> Laredo, TX 78041
>> Tel. (956) 326-2415
>> Fax (956) 326-3125
>>
>> ------------------------------------------------------------------------
>>
>> As pursuant to Texas A&M International University rule 33.04.99.L2
>> concerning the Use and Disposition of Electronic Communications, this
>> email is a mechanism for official communication of the University.
>> Electronic mail (e-mail) should be used only for legitimate academic
>> or state business. Official email communications are intended only to
>> meet the academic and administrative needs of the campus community.
>>
>> _______________________________________________
>> ldm-users mailing list
>> ldm-users@xxxxxxxxxxxxxxxx <mailto:ldm-users@xxxxxxxxxxxxxxxx>
>> For list information or to unsubscribe,
>> visit: http://www.unidata.ucar.edu/mailing_lists/
>
>
>
> _______________________________________________
> ldm-users mailing list
> ldm-users@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/
>