diff --git a/metar/a2gtmtr.csh b/metar/a2gtmtr.csh index 4da9251..421267e 100755 --- a/metar/a2gtmtr.csh +++ b/metar/a2gtmtr.csh @@ -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 # diff --git a/metar/a2gtmtrStub.py b/metar/a2gtmtrStub.py index 55faf83..bbfbb9d 100644 --- a/metar/a2gtmtrStub.py +++ b/metar/a2gtmtrStub.py @@ -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")