mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
add argument for station id. add default bounds for Colorado.
This commit is contained in:
parent
35d0f214dd
commit
6da99eae07
2 changed files with 16 additions and 2 deletions
|
@ -141,12 +141,20 @@ while ( -e $locDir/CenterPoint.dat )
|
|||
@ lnmx = $cenlon + 20
|
||||
break
|
||||
end
|
||||
|
||||
# Colorado bounds
|
||||
set ltmn = 37
|
||||
set ltmx = 41
|
||||
set lnmn = -109
|
||||
set lnmx = -102
|
||||
|
||||
#
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
echo "/awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4" --lat-min $ltmn --lat-max $ltmx --lon-min $lnmn --lon-max $lnmx"
|
||||
/awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4" --lat-min $ltmn --lat-max $ltmx --lon-min $lnmn --lon-max $lnmx
|
||||
else
|
||||
#
|
||||
|
|
|
@ -44,6 +44,7 @@ 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("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
|
@ -67,6 +68,9 @@ 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
|
||||
|
||||
|
@ -97,13 +101,15 @@ def main():
|
|||
for geo in geometries :
|
||||
lon = geo.getGeometry().x
|
||||
lat = geo.getGeometry().y
|
||||
# this is actually really dumb...
|
||||
if lon < lonMin or lon > lonMax or lat < latMin or lat > latMax:
|
||||
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")
|
||||
ista = geo.getString("wmoId")
|
||||
atype = geo.getString("autoStationType")
|
||||
msl = geo.getNumber("seaLevelPress")
|
||||
temp = geo.getNumber("temperature")
|
||||
|
|
Loading…
Add table
Reference in a new issue