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]

[GEMPAK #BCK-543992]: GEMPAK-metar data



Keshab,

In that case you'll want to keep the foreach loop and use the state 
abbreviation in your file name, example shown below


#!/bin/csh

# Get UTC hour and add zeros
set hour=`date -u "+%H"`
set hour="${hour}00"

# Loop through states and get METAR data
foreach state (al ak as az ar ca co ct de dc fm fl ga gu hi id il in ia
ks ky la me mh)

sflist<< SFLIST_FLAG
sffile=metar
area=@$state
dattim=$hour
sfparm=text
output=f/metar_text_${state}.txt
idntyp=stid

run

exit

SFLIST_FLAG

end



> Michael,
> 
> I tried changing the AREA to US and gave me the result what I expected
> but not what I want. It produced a list of METAR (for all stations in
> US) in an alphabetical order of station identifiers. But I would like to
> have a set of METAR for each state and be able to save it as 50 text files.
> 
> thanks,
> Keshab
> 

Ticket Details
===================
Ticket ID: BCK-543992
Department: Support GEMPAK
Priority: High
Status: Open


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community 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