mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
localtion.stationId identifier added to metar obs retrieval
This commit is contained in:
parent
d320e7c928
commit
323c752b33
2 changed files with 13 additions and 5 deletions
|
@ -14,5 +14,14 @@
|
|||
|
||||
### Use
|
||||
|
||||
#### GRID
|
||||
|
||||
./data/grid/gridInventory.csh HRRR T
|
||||
|
||||
#### Radar
|
||||
|
||||
python data/radar/a2invradStub.py --icao kftg --date 2015-06-22 --time 17:09
|
||||
|
||||
#### Obs
|
||||
|
||||
python data/metar/a2gtmtrStub.py -b "2015-06-18 21:40" -e "2015-06-18 22:00" -s KCLK
|
||||
|
|
|
@ -44,7 +44,8 @@ def get_args():
|
|||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-s", action="store", dest="stid", metavar="stid")
|
||||
parser.add_argument("-s", action="store", dest="stationId",
|
||||
help="Station ID (optional)", metavar="stationId")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
|
@ -68,8 +69,6 @@ def main():
|
|||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
if user_args.stid:
|
||||
stid = user_args.stid
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
@ -88,6 +87,8 @@ def main():
|
|||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("obs")
|
||||
if user_args.stationId:
|
||||
req.addIdentifier("location.stationId",user_args.stationId)
|
||||
req.setParameters("stationName","timeObs","wmoId","autoStationType",
|
||||
"elevation","seaLevelPress","temperature","dewpoint",
|
||||
"windDir","windSpeed","altimeter" )
|
||||
|
@ -106,8 +107,6 @@ def main():
|
|||
continue
|
||||
ista = geo.getString("wmoId")
|
||||
sName = geo.getString("stationName")
|
||||
if 'stid' in locals() and stid != sName:
|
||||
continue
|
||||
tobs = geo.getNumber("timeObs")
|
||||
elev = geo.getNumber("elevation")
|
||||
atype = geo.getString("autoStationType")
|
||||
|
|
Loading…
Add table
Reference in a new issue