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

19990706: another GEMPAK raw data question



>From: weather <address@hidden>
>Organization: .
>Keywords: 199907061432.IAA08044

>I have another GEMPAK question.. I having trouble seeing all of
>the raw undecoded U/A bulletins (not getting PPDD for Canada)
>using McIDAS RAOBRPT, but am getting it in the raw data.  
>Tom is looking into this, but is there anyway to view the raw
>upper air files using GEMPAK.  Again, this is to be run
>from a cgi script, so a GUI solution won't work.  It appears
>to me that this cannot be done.  I am saving the raw data and
>could write my own extraction routine, but really don't have time.
>
>
>Thanks for all the help,
>Robert Mullenax
>

Robert,

The raw upperair reports aren't available in snlist. The only way to
output the PPDD portion would be to look at the unmerged decoded portion.

However, it is very simple to extract the ascii lines you want from 
the raw files you are storing using awk.

Below is a quick example of a csh script that uses awk to pull out the
lines of a report which matches a station desired through the line
containing an "=" character. You can modify the script as necessary for
a cgi by setting the ASTN and PART portion from your HTML and
the FILE names you wish to search through using any criteria needed.

Steve Chiswell
Unidata User Support


<<<<<<<< sample csh script called upair.awk >>>>>>>>>
#!/bin/csh -f

set ASTN=72469
set PART=PPDD
set FILE=/shemp/data/ldm/upperair/1999070712_upa.wmo

awk -v ASTN=${ASTN} -v PART=${PART} \
   'index($0,ASTN) != 0 && index($0,PART) != 0 { print \
   while(index($0,"=") == 0) \
      { getline; print $0 } \
   printf "\n" \
   }' $FILE


Sample output: 

[343]chiz on flip --> upair.awk
PPDD 72469 NIL=

72469 PPDD 72469 NIL=

PPDD  57120 72469 9559/ 00509 01512 96248 09013 10011 05515 
9703/ 06520 08020 98058 08527 12021 12015 99015 09513 08513 
06023 10017 08027 08529 07535=

PPDD 57120 72469 9559/ 00509 01512 96248 09013 10011 05515 9703/
06520 08020 98058 08527 12021 12015 99015 09513 08513 06023 10017
08027 08529 07535=

72469 PPDD 57120 72469 9559/ 00509 01512 96248 09013 10011 05515
9703/ 06520 08020 98058 08527 12021 12015 99015 09513 08513 06023
10017 08027 08529 07535=