mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
cleanup and config changes
This commit is contained in:
parent
215df60d85
commit
94b53cb145
45 changed files with 13 additions and 7091 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
.ipynb_checkpoints
|
||||
build
|
||||
docs/build/
|
||||
docs/source/examples/generated
|
||||
|
|
|
@ -1,128 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
|
||||
#
|
||||
# A script wrapper around a UEngine call that is meant to get all available
|
||||
# acars data in the A-II database over a specified range of times.
|
||||
# The data is output to stdout as ASCII. Each line is one time/platform
|
||||
# combination. The individual data items are comma delimited.
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2acars.csh {p} yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm
|
||||
#
|
||||
# The literal p flag is optional. The p flag means preserve
|
||||
# the final version of the python submitted to the UEngine instead of
|
||||
# cleaning it up. The path to the finalized python is /tmp/a2acarsNNNNN.py
|
||||
# where NNNNN is a unix process id. This flag does nothing when using the
|
||||
# DataAccessFramework.
|
||||
#
|
||||
# This outputs the following set of variables for each line:
|
||||
#
|
||||
# tailNumber,asciitime,latitude,longitude,acarsReceivingStation,
|
||||
# pressure,flightPhase,rollQuality,temperature,windDir,windSpeed,
|
||||
# relHumidity,mixRatio
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 07/23/2014 3392 nanbowle Initial modification. Passes parameters straight to DAF script instead of using sed.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./a2acarsStub.py ) then
|
||||
set stubpy = ./a2acarsStub.py
|
||||
else if ( -e $mydir/a2acarsStub.py ) then
|
||||
set stubpy = $mydir/a2acarsStub.py
|
||||
else if ( -e $FXA_HOME/src/dm/bufr/acars/a2acarsStub.py ) then
|
||||
set stubpy = $FXA_HOME/src/dm/bufr/acars/a2acarsStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2acarsStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2acarsStub.py
|
||||
else
|
||||
bash -c "echo could not find a2acarsStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
/awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4"
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
set specpy = /tmp/a2acars${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
cat $stubpy | sed "s/BBBBB/$1 $2/g" | sed "s/EEEEE/$3 $4/g" > $specpy
|
||||
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | grep -v Response
|
||||
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
|
||||
#
|
||||
# Gets all available acars data in the A-II database over a specified range of
|
||||
# times. The data is output to stdout as ASCII. Each line is one time/platform
|
||||
# combination. The individual data items are comma delimited.
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 07/23/2014 3392 nabowle Initial modification. Replaces UEngine with DAF.
|
||||
# 07/28/2014 3392 nabowle Strip tail and receiver to match original formatting.
|
||||
# 09/04/2014 3405 nabowle NO_DATA and date to string extracted to a2dafcommon
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
import a2dafcommon
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
# Set the host in the DataAcessLayer if supplied
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
|
||||
req = DataAccessLayer.newDataRequest("acars")
|
||||
req.setParameters("tailNumber", "receiver", "pressure", "flightPhase",
|
||||
"rollAngleQuality", "temp", "windDirection", "windSpeed",
|
||||
"humidity", "mixingRatio", "icing")
|
||||
|
||||
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if len(geometries) == 0:
|
||||
# print("No data available.")
|
||||
return
|
||||
|
||||
for geoData in geometries:
|
||||
mytail = geoData.getString("tailNumber")
|
||||
if a2dafcommon.is_no_data(mytail):
|
||||
mytail = ""
|
||||
else:
|
||||
mytail = mytail.strip()
|
||||
|
||||
mytime = geoData.getDataTime()
|
||||
if mytime == None:
|
||||
continue
|
||||
#2014-07-16 00:00:00 (0) => 2014-07-16_00:00:00
|
||||
mytime = a2dafcommon.datatime_to_string(mytime)
|
||||
|
||||
geo = geoData.getGeometry()
|
||||
if geo == None:
|
||||
continue
|
||||
mylon = geo.x
|
||||
mylat = geo.y
|
||||
if a2dafcommon.is_no_data(mylat) or a2dafcommon.is_no_data(mylon):
|
||||
continue
|
||||
mylat = "%.4f"%float(mylat)
|
||||
mylon = "%.4f"%float(mylon)
|
||||
|
||||
myrec = geoData.getString("receiver")
|
||||
if a2dafcommon.is_no_data(myrec):
|
||||
myrec = ""
|
||||
else:
|
||||
myrec = myrec.strip()
|
||||
|
||||
mypres = geoData.getNumber("pressure")
|
||||
if a2dafcommon.is_no_data(mypres):
|
||||
mypres = "1e37"
|
||||
else :
|
||||
mypres = "%.0f"%mypres
|
||||
|
||||
myphs = geoData.getString("flightPhase")
|
||||
if a2dafcommon.is_no_data(myphs):
|
||||
myphs = "7"
|
||||
else :
|
||||
myphs = "%d"%int(myphs)
|
||||
|
||||
myrol = geoData.getString("rollAngleQuality")
|
||||
if a2dafcommon.is_no_data(myrol):
|
||||
myrol = "3"
|
||||
else :
|
||||
myrol = "%d"%int(myrol)
|
||||
|
||||
mytemp = geoData.getNumber("temp")
|
||||
if a2dafcommon.is_no_data(mytemp):
|
||||
mytemp = "1e37"
|
||||
else :
|
||||
mytemp = "%.1f"%mytemp
|
||||
|
||||
mydir = geoData.getString("windDirection")
|
||||
if a2dafcommon.is_no_data(mydir):
|
||||
mydir = "1e37"
|
||||
else :
|
||||
mydir = "%d"%int(mydir)
|
||||
|
||||
myspd = geoData.getNumber("windSpeed")
|
||||
if a2dafcommon.is_no_data(myspd):
|
||||
myspd = "1e37"
|
||||
else :
|
||||
myspd = "%.1f"%myspd
|
||||
|
||||
myhum = geoData.getNumber("humidity")
|
||||
if a2dafcommon.is_no_data(myhum):
|
||||
myhum = "1e37"
|
||||
else :
|
||||
myhum = "%.0f"%myhum
|
||||
|
||||
mymix = geoData.getNumber("mixingRatio")
|
||||
if a2dafcommon.is_no_data(mymix):
|
||||
mymix = "1e37"
|
||||
else :
|
||||
mymix = "%.2f"%mymix
|
||||
|
||||
# Icing was commented out of the uengine version
|
||||
# myicg = geoData.getString("icing")
|
||||
# if a2dafcommon.is_no_data(myicg):
|
||||
# myicg = "1e37"
|
||||
# else :
|
||||
# myicg = "%d"%int(myicg)
|
||||
|
||||
msg = mytail + "," + mytime + "," + mylat + "," + mylon + "," + \
|
||||
myrec + "," + mypres + "," + myphs + "," + myrol + "," + \
|
||||
mytemp + "," + mydir + "," + myspd + "," + myhum + "," + mymix
|
||||
print msg
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,228 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
#
|
||||
# A script wrapper around a UEngine call that is meant to get all available
|
||||
# maritime data in the A-II database over a specified range of times.
|
||||
# The data is output to stdout as ASCII. Each line is one time/platform
|
||||
# combination. The individual data items are comma delimited.
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2aircraft.csh {p} {t} yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm
|
||||
#
|
||||
# The literal p flag is optional. The p flag means preserve
|
||||
# the final version of the python submitted to the UEngine instead of
|
||||
# cleaning it up. The path to the finalized python is /tmp/a2aircraftNNNNN.py
|
||||
# where NNNNN is a unix process id. This flag does nothing when using the DAF
|
||||
# version.
|
||||
#
|
||||
# The optional literal t mean change some of the ascii phenomena descriptions
|
||||
# for pireps into codes suitable for D-2D format aircraft data files.
|
||||
#
|
||||
# This outputs the following set of variables for each line:
|
||||
#
|
||||
# lat|lon,asciitime,flightLevel,reportType,aircraftType,
|
||||
# temperature,windDir,windSpeed,visibility,
|
||||
# FlightWeather*,FlightHazard*,FlightConditions*,WeatherGroup*,
|
||||
# numCloudLayers,cloudBaseHeight,cloudTopHeight,cloudAmount,
|
||||
# numIcingLayers,heightBaseIcing,heightTopIcing,typeIcing,intensityOfIcing,
|
||||
# numTurbulenceLayers,heightBaseTurb,heightTopTurb,
|
||||
# typeTurbulence,intensityOfTurbulence
|
||||
#
|
||||
# Asterisk (*) means variable that does not directly correspond to a
|
||||
# variable in the D-2D format aircraft data files.
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/02/2014 3405 nabowle Initial modification to better handle daf.
|
||||
#
|
||||
#
|
||||
set rmpy = yes
|
||||
set typcod = qwertyuiop
|
||||
if ( "$1" == "t" ) then
|
||||
set typcod = "typecode = 'no'"
|
||||
shift
|
||||
endif
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
set repType = ""
|
||||
set rt = `echo $1 | tr 'a-z' 'A-Z' | grep '^.IREP$'`
|
||||
if ( "$rt" != "" ) then
|
||||
set repType = $rt
|
||||
shift
|
||||
endif
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
if ( "$1" == "t" ) then
|
||||
set typcod = "typecode = 'no'"
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./a2airepStub.py ) then
|
||||
set stubpy = ./a2airepStub.py
|
||||
else if ( -e $mydir/a2airepStub.py ) then
|
||||
set stubpy = $mydir/a2airepStub.py
|
||||
else if ( -e $FXA_HOME/src/dm/bufr/acars/a2airepStub.py ) then
|
||||
set stubpy = $FXA_HOME/src/dm/bufr/acars/a2airepStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2airepStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2airepStub.py
|
||||
else
|
||||
bash -c "echo could not find a2airepStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set method = "daf"
|
||||
if ( "$repType" != "PIREP" ) then
|
||||
/awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4" --match-legacy
|
||||
# /awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4"
|
||||
endif
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
#
|
||||
set specpy = /tmp/a2airep${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
cat $stubpy | sed "s/BBBBB/$1 $2/g" | sed "s/EEEEE/$3 $4/g" > $specpy
|
||||
if ( "$repType" != "PIREP" ) then
|
||||
set here = `pwd`
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | grep -v Response
|
||||
cd $here
|
||||
endif
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./a2pirepStub.py ) then
|
||||
set stubpy = ./a2pirepStub.py
|
||||
else if ( -e $mydir/a2pirepStub.py ) then
|
||||
set stubpy = $mydir/a2pirepStub.py
|
||||
else if ( -e $FXA_HOME/src/dm/bufr/acars/a2pirepStub.py ) then
|
||||
set stubpy = $FXA_HOME/src/dm/bufr/acars/a2pirepStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2pirepStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2pirepStub.py
|
||||
else
|
||||
bash -c "echo could not find a2pirepStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set method = "daf"
|
||||
if ( "$repType" != "AIREP" ) then
|
||||
# By default, match the legacy output.
|
||||
set pyargs = "--match-legacy"
|
||||
# set pyargs = ""
|
||||
if ( "$typcod" != "qwertyuiop" ) then
|
||||
set pyargs = "$pyargs -t"
|
||||
endif
|
||||
|
||||
/awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4" $pyargs
|
||||
endif
|
||||
else
|
||||
if ( "$method" == "daf" ) then
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
endif
|
||||
|
||||
#
|
||||
set specpy = /tmp/a2pirep${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
cat $stubpy | sed "s/BBBBB/$1 $2/g" | sed "s/EEEEE/$3 $4/g" | \
|
||||
grep -v "$typcod" > $specpy
|
||||
cd $UE_BIN_PATH
|
||||
if ( "$repType" != "AIREP" ) then
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | grep -v Response
|
||||
endif
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
|
||||
#
|
||||
# Gets all available pirep data in the A-II database over a specified range of
|
||||
# times. The data is output to stdout as ASCII. Each line is one record.
|
||||
# The individual data items are comma delimited.
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/25/2014 3405 nabowle Initial modification. Replaces UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
import a2dafcommon
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
parser.add_argument("--match-legacy", action="store_true", dest="match",
|
||||
help="If set, the legacy script output will be matched.",
|
||||
default=False)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("airep")
|
||||
req.setParameters("id", "flightLevel", "temp", "windDirection", "windSpeed",
|
||||
"flightWeather", "flightHazard", "flightConditions")
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if not geometries :
|
||||
# print "No data available."
|
||||
return
|
||||
|
||||
msg = "";
|
||||
|
||||
geometries.sort(key=lambda geo: str(geo.getDataTime()))
|
||||
for geoData in geometries :
|
||||
mytime = geoData.getDataTime()
|
||||
if not mytime:
|
||||
continue
|
||||
mytime = a2dafcommon.datatime_to_string(mytime)
|
||||
|
||||
geo = geoData.getGeometry()
|
||||
if not geo:
|
||||
continue
|
||||
|
||||
mylon = geo.x
|
||||
mylat = geo.y
|
||||
if a2dafcommon.is_no_data(mylat) or a2dafcommon.is_no_data(mylon):
|
||||
continue
|
||||
mylat = "%.4f"%mylat
|
||||
mylon = "%.4f"%mylon
|
||||
|
||||
myflvl = geoData.getNumber("flightLevel")
|
||||
if a2dafcommon.is_no_data(myflvl) :
|
||||
myflvl = "1e37"
|
||||
else :
|
||||
myflvl = "%d"%myflvl
|
||||
|
||||
# Temp is not stored.
|
||||
# mytemp = geoData.getString("temp")
|
||||
# if a2dafcommon.is_no_data(mytemp) :
|
||||
# mytemp = "1e37"
|
||||
# else :
|
||||
# mytemp = "%.1f"%float(mytemp)
|
||||
mytemp = "1e37"
|
||||
|
||||
# Wind Direction is not stored.
|
||||
# mydir = geoData.getString("windDirection")
|
||||
# if a2dafcommon.is_no_data(mydir) :
|
||||
# mydir = "1e37"
|
||||
# else :
|
||||
# mydir = "%d"%int(mydir)
|
||||
mydir = "1e37"
|
||||
|
||||
myspd = geoData.getNumber("windSpeed")
|
||||
if a2dafcommon.is_no_data(myspd) :
|
||||
myspd = "1e37"
|
||||
else :
|
||||
myspd = "%.1f"%myspd
|
||||
|
||||
myfwx = geoData.getNumber("flightWeather")
|
||||
if myfwx :
|
||||
myfwx = "-1"
|
||||
else :
|
||||
myfwx = "%d"%myfwx
|
||||
|
||||
myhaz = geoData.getNumber("flightHazard")
|
||||
if a2dafcommon.is_no_data(myhaz) :
|
||||
myhaz = "-1"
|
||||
else :
|
||||
myhaz = "%d"%myhaz
|
||||
|
||||
mycond = geoData.getNumber("flightConditions")
|
||||
if a2dafcommon.is_no_data(mycond) :
|
||||
mycond = "-1"
|
||||
else :
|
||||
mycond = "%d"%mycond
|
||||
|
||||
if user_args.match:
|
||||
# Wind Speed not returned to legacy script.
|
||||
myspd = "1e37"
|
||||
|
||||
msg += mylat + "|" + mylon + "," + mytime + "," + myflvl + ",AIREP,," + \
|
||||
mytemp + "," + mydir + "," + myspd + ",1e37," + \
|
||||
myfwx + "," + myhaz + "," + mycond + ",,0,,,,0,,,,,0,,,,\n"
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,385 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
|
||||
#
|
||||
# Gets all available pirep data in the A-II database over a specified time
|
||||
# range. The data is output to stdout as ASCII. Each line is one record. The
|
||||
# individual data items are comma delimited.
|
||||
#
|
||||
# The legacy script does not retrieve any values not stored in the postgres db.
|
||||
# To compensate for this in side-by-side comparison, a --match-legacy flag is
|
||||
# provided that will ignore these fields.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/25/2014 3405 nabowle Initial modification. Replaces UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
import a2dafcommon
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
parser.add_argument("--match-legacy", action="store_true", dest="match",
|
||||
help="If set, the legacy script output will be matched.",
|
||||
default=False)
|
||||
parser.add_argument("-t", action="store_true", dest="typecode",
|
||||
help="If set, more type information is displayed.",
|
||||
default=False)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
MULTI_DIM_PARAMS = set(["hazardType",
|
||||
"turbType", "turbBaseHeight", "turbTopHeight",
|
||||
"iceType", "iceBaseHeight", "iceTopHeight",
|
||||
"skyCover1", "skyCover2", "skyBaseHeight", "skyTopHeight"
|
||||
])
|
||||
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("pirep")
|
||||
req.setParameters('id', 'flightLevel', 'temp', 'windDirection', 'windSpeed',
|
||||
'horzVisibility', 'aircraftType', 'weatherGroup')
|
||||
req.getParameters().extend(MULTI_DIM_PARAMS)
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if not geometries :
|
||||
# print "No data available."
|
||||
return
|
||||
|
||||
typecode = user_args.typecode
|
||||
match = user_args.match
|
||||
msg = ""
|
||||
layerData = []
|
||||
combinedGeos = []
|
||||
for geoData in geometries :
|
||||
# The DAF returns multi-dimensional parameters as separate results before
|
||||
# the base result that contain the single-dimensional parameters.
|
||||
# Because of the separation of parameters and known ordering of result
|
||||
# types, we can easily figure out what each result is and correlate the
|
||||
# ancillary data with the base data.
|
||||
if set(geoData.getParameters()) & MULTI_DIM_PARAMS :
|
||||
layerData.append(geoData)
|
||||
continue
|
||||
|
||||
combinedGeos.append({"base":geoData, "layers":layerData})
|
||||
layerData = []
|
||||
|
||||
combinedGeos.sort(key=lambda geoMap: str(geoMap['base'].getDataTime()))
|
||||
|
||||
for geoMap in combinedGeos :
|
||||
geoData = geoMap['base']
|
||||
layerData = geoMap['layers']
|
||||
|
||||
mytime = geoData.getDataTime()
|
||||
if not mytime:
|
||||
continue
|
||||
mytime = mytime = a2dafcommon.datatime_to_string(mytime)
|
||||
|
||||
geo = geoData.getGeometry()
|
||||
if not geo:
|
||||
continue
|
||||
|
||||
mylon = geo.x
|
||||
mylat = geo.y
|
||||
if a2dafcommon.is_no_data(mylat) or a2dafcommon.is_no_data(mylon) :
|
||||
continue
|
||||
mylat = "%.4f"%mylat
|
||||
mylon = "%.4f"%mylon
|
||||
|
||||
myflvl = geoData.getNumber("flightLevel")
|
||||
if a2dafcommon.is_no_data(myflvl) :
|
||||
myflvl = "1e37"
|
||||
else :
|
||||
myflvl = "%d"%myflvl
|
||||
|
||||
# Temp is not stored.
|
||||
# mytemp = geoData.getNumber("temp")
|
||||
# if a2dafcommon.is_no_data(mytemp) :
|
||||
# mytemp = "1e37"
|
||||
# else :
|
||||
# mytemp = "%.1f"%float(mytemp)
|
||||
mytemp = "1e37"
|
||||
|
||||
# Wind Direction is not stored.
|
||||
# mydir = geoData.getString("windDirection")
|
||||
# if a2dafcommon.is_no_data(mydir) :
|
||||
# mydir = "1e37"
|
||||
# else :
|
||||
# mydir = "%d"%int(mydir)
|
||||
mydir = "1e37"
|
||||
|
||||
myspd = geoData.getNumber("windSpeed")
|
||||
if a2dafcommon.is_no_data(myspd) :
|
||||
myspd = "1e37"
|
||||
else :
|
||||
myspd = "%.1f"%myspd
|
||||
|
||||
myvis = geoData.getNumber("horzVisibility")
|
||||
if a2dafcommon.is_no_data(myvis) :
|
||||
myvis = "1e37"
|
||||
else :
|
||||
myvis = "%.1f"%myvis
|
||||
|
||||
mycraft = geoData.getString("aircraftType")
|
||||
if a2dafcommon.is_no_data(mycraft) :
|
||||
mycraft = ""
|
||||
|
||||
mywx = geoData.getString("weatherGroup")
|
||||
if a2dafcommon.is_no_data(mywx) :
|
||||
mywx = ""
|
||||
|
||||
|
||||
cc = 0
|
||||
cldBas = ""
|
||||
cldTop = ""
|
||||
cldVal = ""
|
||||
ii = 0
|
||||
icgBas = ""
|
||||
icgTop = ""
|
||||
icgTyp = ""
|
||||
icgVal = ""
|
||||
tt = 0
|
||||
trbBas = ""
|
||||
trbTop = ""
|
||||
trbTyp = ""
|
||||
trbVal = ""
|
||||
|
||||
if match :
|
||||
# Speed, Horizontal Visibility, aircraft type, and weather group are
|
||||
# not returned to the legacy script. Flightlevel of -9999 is output
|
||||
# as such instead of being replaced by "1e37"
|
||||
myspd = "1e37"
|
||||
myvis = "-9999998.0"
|
||||
mycraft = ""
|
||||
mywx = ""
|
||||
if geoData.getNumber("flightLevel") == -9999:
|
||||
myflvl = "-9999"
|
||||
else :
|
||||
for pld in layerData:
|
||||
sep = ""
|
||||
ltyp = pld.getString("hazardType")
|
||||
if a2dafcommon.is_no_data(ltyp) :
|
||||
continue
|
||||
|
||||
fval = pld.getString("skyCover1")
|
||||
if fval == "None" :
|
||||
fval = ""
|
||||
|
||||
sval = pld.getString("skyCover2")
|
||||
if sval == "None" :
|
||||
sval = ""
|
||||
if ltyp == "CLOUD" :
|
||||
if fval == "TOP" :
|
||||
fval = ""
|
||||
if sval == "TOP" :
|
||||
sval = ""
|
||||
if sval != "" :
|
||||
fval += "-"+sval
|
||||
if typecode :
|
||||
if fval == "CLR" :
|
||||
fval = "0"
|
||||
elif fval == "OVC" :
|
||||
fval = "8"
|
||||
elif fval == "SCT" :
|
||||
fval = "11"
|
||||
elif fval == "BKN" :
|
||||
fval = "12"
|
||||
elif fval == "FEW" :
|
||||
fval = "13"
|
||||
else :
|
||||
continue
|
||||
if cldBas != "" :
|
||||
sep = "|"
|
||||
|
||||
base = pld.getNumber("skyBaseHeight")
|
||||
if a2dafcommon.is_no_data(base) or base == 99999 :
|
||||
base = "1e37"
|
||||
else :
|
||||
base = "%.0f"%float(base)
|
||||
|
||||
top = pld.getNumber("skyTopHeight")
|
||||
if a2dafcommon.is_no_data(top) or top == 99999 :
|
||||
top = "1e37"
|
||||
else :
|
||||
top = "%.0f"%float(top)
|
||||
|
||||
cldBas += sep+base
|
||||
cldTop += sep+top
|
||||
cldVal += sep+fval
|
||||
cc += 1
|
||||
elif ltyp == "ICING" :
|
||||
dtyp = pld.getString("iceType")
|
||||
if a2dafcommon.is_no_data(dtyp) :
|
||||
dtyp = ""
|
||||
|
||||
if sval != "" :
|
||||
fval += "-"+sval
|
||||
if icgBas != "" :
|
||||
sep = "|"
|
||||
if typecode :
|
||||
if dtyp == "RIME" :
|
||||
dtyp = "1"
|
||||
elif dtyp == "CLR" :
|
||||
dtyp = "2"
|
||||
elif dtyp == "MXD" :
|
||||
dtyp = "3"
|
||||
else :
|
||||
dtyp = "-9999"
|
||||
if fval == "NEG" :
|
||||
fval = "0";
|
||||
elif fval == "TRACE" :
|
||||
fval = "1"
|
||||
elif fval == "TRACE-LGT" :
|
||||
fval = "2"
|
||||
elif fval == "LGT" :
|
||||
fval = "3"
|
||||
elif fval == "LGT-MOD" :
|
||||
fval = "4"
|
||||
elif fval == "MOD" :
|
||||
fval = "5"
|
||||
elif fval == "MOD-SEV" :
|
||||
fval = "7"
|
||||
elif fval == "SEV" :
|
||||
fval = "8"
|
||||
else :
|
||||
fval = "-9999"
|
||||
if fval == "-9999" and dtyp == "-9999" :
|
||||
continue
|
||||
|
||||
base = pld.getNumber("iceBaseHeight")
|
||||
if a2dafcommon.is_no_data(base) or base == 99999 :
|
||||
base = "1e37"
|
||||
else :
|
||||
base = "%.0f"%float(base)
|
||||
|
||||
top = pld.getNumber("iceTopHeight")
|
||||
if a2dafcommon.is_no_data(top) or top == 99999 :
|
||||
top = "1e37"
|
||||
else :
|
||||
top = "%.0f"%float(top)
|
||||
|
||||
icgBas += sep+base
|
||||
icgTop += sep+top
|
||||
icgTyp += sep+dtyp
|
||||
icgVal += sep+fval
|
||||
ii += 1
|
||||
elif ltyp == "TURBC" :
|
||||
dtyp = pld.getString("turbType")
|
||||
if a2dafcommon.is_no_data(dtyp) :
|
||||
dtyp = ""
|
||||
|
||||
if sval != "" :
|
||||
fval += "-"+sval
|
||||
if typecode :
|
||||
if dtyp == "CAT" :
|
||||
dtyp = "1"
|
||||
elif dtyp == "CHOP" :
|
||||
dtyp = "2"
|
||||
else :
|
||||
dtyp = "-9999"
|
||||
if fval == "NEG" :
|
||||
fval = "0";
|
||||
elif fval == "LGT" :
|
||||
fval = "2"
|
||||
elif fval == "LGT-MOD" :
|
||||
fval = "3"
|
||||
elif fval == "MOD" :
|
||||
fval = "4"
|
||||
elif fval == "MOD-SEV" :
|
||||
fval = "5"
|
||||
elif fval == "SEV" :
|
||||
fval = "6"
|
||||
elif fval == "EXTRM" :
|
||||
fval = "8"
|
||||
else :
|
||||
fval = "-9999"
|
||||
if fval == "-9999" and dtyp == "-9999" :
|
||||
continue
|
||||
if trbBas != "" :
|
||||
sep = "|"
|
||||
|
||||
base = pld.getNumber("turbBaseHeight")
|
||||
if a2dafcommon.is_no_data(base) or base == 99999 :
|
||||
base = "1e37"
|
||||
else :
|
||||
base = "%.0f"%float(base)
|
||||
|
||||
top = pld.getNumber("turbTopHeight")
|
||||
if a2dafcommon.is_no_data(top) or top == 99999 :
|
||||
top = "1e37"
|
||||
else :
|
||||
top = "%.0f"%float(top)
|
||||
|
||||
trbBas += sep+base
|
||||
trbTop += sep+top
|
||||
trbTyp += sep+dtyp
|
||||
trbVal += sep+fval
|
||||
tt += 1
|
||||
|
||||
msg += mylat + "|" + mylon + "," + mytime + "," + myflvl + ",PIREP," + \
|
||||
mycraft + "," + mytemp + "," + mydir + "," + myspd + "," + \
|
||||
myvis + ",-1,-1,-1," + mywx + "," + \
|
||||
str(cc) + "," + cldBas + "," + cldTop + "," + cldVal + "," + \
|
||||
str(ii) + "," + icgBas + "," + icgTop + "," + \
|
||||
icgTyp + "," + icgVal + "," + \
|
||||
str(tt) + "," + trbBas + "," + trbTop + "," + \
|
||||
trbTyp + "," + trbVal + "\n"
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,28 +0,0 @@
|
|||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
#set release = ""
|
||||
#if ( -e /awips2/edex/conf/banner.txt ) then
|
||||
# set release = `grep Version /awips2/edex/conf/banner.txt | tr '*' ' ' | \
|
||||
# sed 's/ *$//g' | sed 's/^.* //g'`
|
||||
#endif
|
||||
#
|
||||
while (1)
|
||||
if ( $?INSTALL_BASE ) then
|
||||
if ( -d $INSTALL_BASE/python ) break
|
||||
endif
|
||||
setenv INSTALL_BASE /awips2
|
||||
break
|
||||
end
|
||||
if ( -e $INSTALL_BASE/bin/uengine ) then
|
||||
setenv UE_BIN_PATH $INSTALL_BASE/bin
|
||||
else
|
||||
setenv UE_BIN_PATH $INSTALL_BASE/fxa/bin
|
||||
endif
|
||||
if ( ! $?PRE_ADE_PATH ) then
|
||||
setenv PRE_ADE_PATH ${PATH}
|
||||
endif
|
||||
setenv JAVA_HOME $INSTALL_BASE/java
|
||||
setenv LD_LIBRARY_PATH /usr/lib
|
||||
setenv PYTHONPATH .:$INSTALL_BASE/bin/src
|
||||
setenv PATH ${JAVA_HOME}/bin:${UE_BIN_PATH}:${PRE_ADE_PATH}
|
|
@ -1,43 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
|
||||
#
|
||||
# Common functionality for MSAS/LAPS scripts using the Data Acess Framework.
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/02/2014 3405 nabowle Initial creation.
|
||||
#
|
||||
#
|
||||
|
||||
NO_DATA = [None, "None", -9999, -9999.0, "-9999", "-9999.0", ""]
|
||||
|
||||
def is_no_data(val):
|
||||
return val in NO_DATA
|
||||
|
||||
|
||||
def datatime_to_string(datatime):
|
||||
return str(datatime)[0:19].replace(" ","_")
|
Binary file not shown.
|
@ -1,108 +0,0 @@
|
|||
# 35 36 37 38 41 50 51 57 65 66 67 81 85 86 90
|
||||
s/^0 *$/0|STImotion/g
|
||||
s/^2 *$/2|GSM/g
|
||||
s/^3 *$/3|PRR/g
|
||||
s/^6 *$/6|AAP/g
|
||||
s/^8 *$/8|PTL/g
|
||||
s/^9 *$/9|AM/g
|
||||
s/^16 *$/16|Z 1km 3bit/g
|
||||
s/^17 *$/17|Z 2km 3bit/g
|
||||
s/^18 *$/18|Z 4km 3bit/g
|
||||
s/^19 *$/19|Z 1km 4bit/g
|
||||
s/^20 *$/20|Z 2km 4bit/g
|
||||
s/^21 *$/21|Z 4km 4bit/g
|
||||
s/^22 *$/22|V 0.25km 3bit/g
|
||||
s/^23 *$/23|V 0.5km 3bit/g
|
||||
s/^24 *$/24|V 1km 3bit/g
|
||||
s/^25 *$/25|V 0.25km 4bit/g
|
||||
s/^26 *$/26|V 0.5km 4bit/g
|
||||
s/^27 *$/27|V 1km 4bit/g
|
||||
s/^28 *$/28|SW 0.25km 3bit/g
|
||||
s/^29 *$/29|SW 0.5km 3bit/g
|
||||
s/^30 *$/30|SW 1km 3bit/g
|
||||
s/^31 *$/31|USP 2km 4bit/g
|
||||
s/^32 *$/32|DHR 1km 8bit/g
|
||||
s/^33 *$/33|HSR 1km 4bit/g
|
||||
s/^34 *$/34|CFC 1km 3bit/g
|
||||
s/^35 *$/35|CZ 1km 3bit/g
|
||||
s/^36 *$/36|CZ 4km 3bit/g
|
||||
s/^37 *$/37|CZ 1km 4bit/g
|
||||
s/^38 *$/38|CZ 4km 4bit/g
|
||||
s/^41 *$/41|ET 4km 4bit/g
|
||||
s/^48 *$/48|VWP/g
|
||||
s/^50 *$/50|RCS 1km 4bit/g
|
||||
s/^51 *$/51|VCS 0.5km 4bit/g
|
||||
s/^55 *$/55|SRR 0.5km 4bit/g
|
||||
s/^56 *$/56|SRM 1km 4bit/g
|
||||
s/^57 *$/57|VIL 4km 4bit/g
|
||||
s/^58 *$/58|STI/g
|
||||
s/^59 *$/59|HI/g
|
||||
s/^60 *$/60|M/g
|
||||
s/^61 *$/61|TVS/g
|
||||
s/^62 *$/62|SS/g
|
||||
s/^65 *$/65|LRM 4km 3bit/g
|
||||
s/^66 *$/66|LRM 4km 3bit/g
|
||||
s/^67 *$/67|APR 4km 3bit/g
|
||||
s/^73 *$/73|UAM/g
|
||||
s/^74 *$/74|RCM/g
|
||||
s/^75 *$/75|FTM/g
|
||||
s/^78 *$/78|OHP 2km 4bit/g
|
||||
s/^79 *$/79|THP 2km 4bit/g
|
||||
s/^80 *$/80|STP 2km 4bit/g
|
||||
s/^81 *$/81|DPA 4km 8bit/g
|
||||
s/^82 *$/82|SPD 40km 3bit/g
|
||||
s/^84 *$/84|VAD/g
|
||||
s/^85 *$/85|RCS 1km 3bit/g
|
||||
s/^86 *$/86|VCS 0.5km 3bit/g
|
||||
s/^90 *$/90|LRM 4km 3bit/g
|
||||
s/^93 *$/93|DBV 1km 8bit/g
|
||||
s/^94 *$/94|Z 1km 8bit/g
|
||||
s/^99 *$/99|V 0.25km 8bit/g
|
||||
s/^100 *$/100|VSDT/g
|
||||
s/^101 *$/101|STIT/g
|
||||
s/^102 *$/102|HIT/g
|
||||
s/^103 *$/103|MT/g
|
||||
s/^104 *$/104|TVST/g
|
||||
s/^107 *$/107|OHPT/g
|
||||
s/^108 *$/108|THPT/g
|
||||
s/^109 *$/109|STPT/g
|
||||
s/^132 *$/132|CLR 1km 4bit/g
|
||||
s/^133 *$/133|CLD 1km 4bit/g
|
||||
s/^134 *$/134|DVL 1km 8bit/g
|
||||
s/^135 *$/135|EET 1km 8bit/g
|
||||
s/^136 *$/136|SO/g
|
||||
s/^137 *$/137|ULR 1km 4bit/g
|
||||
s/^138 *$/138|STP 2km 8bit/g
|
||||
s/^139 *$/139|MRU/g
|
||||
s/^140 *$/140|GFM/g
|
||||
s/^141 *$/141|MD/g
|
||||
s/^143 *$/143|TRU/g
|
||||
s/^144 *$/144|OSW 2km 4bit/g
|
||||
s/^145 *$/145|OSD 2km 4bit/g
|
||||
s/^146 *$/146|SSW 2km 4bit/g
|
||||
s/^147 *$/147|SSD 2km 4bit/g
|
||||
s/^149 *$/149|DMD/g
|
||||
s/^150 *$/150|USW 2km 4bit/g
|
||||
s/^151 *$/151|USD 2km 4bit/g
|
||||
s/^152 *$/152|RSS/g
|
||||
s/^153 *$/153|Z 0.25km 0.5Deg 8bit/g
|
||||
s/^154 *$/154|V 0.25km 0.5Deg 8bit/g
|
||||
s/^155 *$/155|SW 0.25km 0.5Deg 8bit/g
|
||||
s/^158 *$/158|ZDR 1km 4bit/g
|
||||
s/^159 *$/159|ZDR 0.25km 8bit/g
|
||||
s/^160 *$/160|CC 1km 4bit/g
|
||||
s/^161 *$/161|CC 0.25km 8bit/g
|
||||
s/^162 *$/162|KDP 1km 4bit/g
|
||||
s/^163 *$/163|KDP 0.25km 8bit/g
|
||||
s/^164 *$/164|HC 1km 4bit/g
|
||||
s/^165 *$/165|HC 0.25km 8bit/g
|
||||
s/^166 *$/166|ML/g
|
||||
s/^169 *$/169|OHA 2km 4bit/g
|
||||
s/^170 *$/170|DAA 0.25km 8bit/g
|
||||
s/^171 *$/171|STA 2km 4bit/g
|
||||
s/^172 *$/172|STA 0.25km 8bit/g
|
||||
s/^173 *$/173|DUA 0.25km 8bit/g
|
||||
s/^174 *$/174|DOD 0.25km 8bit/g
|
||||
s/^175 *$/175|DSD 0.25km 8bit/g
|
||||
s/^176 *$/176|DPR 0.25km gen/g
|
||||
s/^177 *$/177|HHC 0.25km 8bit/g
|
|
@ -1,290 +0,0 @@
|
|||
s/^04202,/BGTL,/g
|
||||
s/^08594,/GVAC,/g
|
||||
s/^21824,/RUTS,/g
|
||||
s/^25563,/UHMA,/g
|
||||
s/^25594,/UHMD,/g
|
||||
s/^25913,/UHMM,/g
|
||||
s/^31329,/UHPB,/g
|
||||
s/^31735,/RUHB,/g
|
||||
s/^31960,/UHWW,/g
|
||||
s/^32150,/RUSH,/g
|
||||
s/^32540,/UHPP,/g
|
||||
s/^46692,/RCSS,/g
|
||||
s/^46697,/RCGM,/g
|
||||
s/^46747,/RCMJ,/g
|
||||
s/^47058,/ZKKK,/g
|
||||
s/^47110,/RKSS,/g
|
||||
s/^47122,/RKSO,/g
|
||||
s/^47138,/RKTH,/g
|
||||
s/^47158,/RKJJ,/g
|
||||
s/^47187,/RKPM,/g
|
||||
s/^47401,/RJCW,/g
|
||||
s/^47412,/RJCO,/g
|
||||
s/^47580,/RJSM,/g
|
||||
s/^47582,/RJSK,/g
|
||||
s/^47590,/RJSS,/g
|
||||
s/^47678,/RJTH,/g
|
||||
s/^47681,/RJNH,/g
|
||||
s/^47808,/RJFF,/g
|
||||
s/^47827,/RJFK,/g
|
||||
s/^47881,/RJOS,/g
|
||||
s/^47918,/ROIG,/g
|
||||
s/^47931,/RODN,/g
|
||||
s/^47936,/ROAH,/g
|
||||
s/^47945,/ROMD,/g
|
||||
s/^47971,/RJAO,/g
|
||||
s/^47981,/RJAW,/g
|
||||
s/^47991,/RJAM,/g
|
||||
s/^50745,/ZYQQ,/g
|
||||
s/^50953,/ZYHB,/g
|
||||
s/^54161,/ZYCC,/g
|
||||
s/^54342,/ZYYY,/g
|
||||
s/^54662,/ZYTL,/g
|
||||
s/^54857,/ZSQD,/g
|
||||
s/^58457,/ZSHC,/g
|
||||
s/^61641,/GOOY,/g
|
||||
s/^61902,/FHAW,/g
|
||||
s/^61967,/DJDG,/g
|
||||
s/^70026,/PABR,/g
|
||||
s/^70086,/PABA,/g
|
||||
s/^70133,/PAOT,/g
|
||||
s/^70200,/PAOM,/g
|
||||
s/^70219,/PABE,/g
|
||||
s/^70231,/PAMC,/g
|
||||
s/^70261,/PAFA,/g
|
||||
s/^70273,/PAFC,/g
|
||||
s/^70308,/PASN,/g
|
||||
s/^70316,/PACB,/g
|
||||
s/^70326,/PAKN,/g
|
||||
s/^70350,/PADQ,/g
|
||||
s/^70361,/PAYA,/g
|
||||
s/^70398,/PANT,/g
|
||||
s/^70414,/PASY,/g
|
||||
s/^71043,/CYVQ,/g
|
||||
s/^71051,/CWSY,/g
|
||||
s/^71081,/CYUX,/g
|
||||
s/^71082,/CYLT,/g
|
||||
s/^71109,/CYZT,/g
|
||||
s/^71119,/CWEG,/g
|
||||
s/^71120,/CYOD,/g
|
||||
s/^71121,/CYED,/g
|
||||
s/^71123,/CYEG,/g
|
||||
s/^71203,/CYLW,/g
|
||||
s/^71396,/CYHZ,/g
|
||||
s/^71399,/CWOS,/g
|
||||
s/^71600,/CWSA,/g
|
||||
s/^71603,/CYQI,/g
|
||||
s/^71624,/CYYZ,/g
|
||||
s/^71627,/CYUL,/g
|
||||
s/^71701,/CYCX,/g
|
||||
s/^71722,/CWMW,/g
|
||||
s/^71799,/CYYJ,/g
|
||||
s/^71801,/CYYT,/g
|
||||
s/^71807,/CWAR,/g
|
||||
s/^71811,/CYZV,/g
|
||||
s/^71815,/CYJT,/g
|
||||
s/^71816,/CYYR,/g
|
||||
s/^71823,/CYAH,/g
|
||||
s/^71836,/CYMO,/g
|
||||
s/^71845,/CWPL,/g
|
||||
s/^71853,/CWLO,/g
|
||||
s/^71867,/CYQD,/g
|
||||
s/^71879,/CYXD,/g
|
||||
s/^71896,/CYXS,/g
|
||||
s/^71906,/CYVP,/g
|
||||
s/^71907,/CYPH,/g
|
||||
s/^71909,/CYFB,/g
|
||||
s/^71913,/CYYQ,/g
|
||||
s/^71915,/CYZS,/g
|
||||
s/^71917,/CWEU,/g
|
||||
s/^71924,/CYRB,/g
|
||||
s/^71925,/CYCB,/g
|
||||
s/^71926,/CYBK,/g
|
||||
s/^71934,/CYSM,/g
|
||||
s/^71945,/CYYE,/g
|
||||
s/^71957,/CYEV,/g
|
||||
s/^71964,/CYXY,/g
|
||||
s/^72201,/KKEY,/g
|
||||
s/^72202,/KMFL,/g
|
||||
s/^72206,/KJAX,/g
|
||||
s/^72208,/KCHS,/g
|
||||
s/^72210,/KTBW,/g
|
||||
s/^72214,/KTAE,/g
|
||||
s/^72215,/KFFC,/g
|
||||
s/^72221,/KVPS,/g
|
||||
s/^72230,/KBMX,/g
|
||||
s/^72233,/KLIX,/g
|
||||
s/^72235,/KJAN,/g
|
||||
s/^72240,/KLCH,/g
|
||||
s/^72248,/KSHV,/g
|
||||
s/^72249,/KFWD,/g
|
||||
s/^72250,/KBRO,/g
|
||||
s/^72251,/KCRP,/g
|
||||
s/^72257,/KHLR,/g
|
||||
s/^72261,/KDRT,/g
|
||||
s/^72265,/KMAF,/g
|
||||
s/^72269,/KWSD,/g
|
||||
s/^72274,/KTWC,/g
|
||||
s/^72280,/KYUM,/g
|
||||
s/^72291,/KNSI,/g
|
||||
s/^72293,/KNKX,/g
|
||||
s/^72305,/KMHX,/g
|
||||
s/^72317,/KGSO,/g
|
||||
s/^72318,/KRNK,/g
|
||||
s/^72327,/KOHX,/g
|
||||
s/^72340,/KLZK,/g
|
||||
s/^72357,/KOUN,/g
|
||||
s/^72363,/KAMA,/g
|
||||
s/^72364,/KEPZ,/g
|
||||
s/^72365,/KABQ,/g
|
||||
s/^72376,/KFGZ,/g
|
||||
s/^72381,/KEDW,/g
|
||||
s/^72386,/KLAS,/g
|
||||
s/^72387,/KDRA,/g
|
||||
s/^72391,/KNTD,/g
|
||||
s/^72393,/KVBG,/g
|
||||
s/^72402,/KWAL,/g
|
||||
s/^72403,/KLWX,/g
|
||||
s/^72426,/KILN,/g
|
||||
s/^72440,/KSGF,/g
|
||||
s/^72451,/KDDC,/g
|
||||
s/^72456,/KTOP,/g
|
||||
s/^72469,/KDNR,/g
|
||||
s/^72476,/KGJT,/g
|
||||
s/^72489,/KREV,/g
|
||||
s/^72493,/KOAK,/g
|
||||
s/^72501,/KOKX,/g
|
||||
s/^72518,/KALY,/g
|
||||
s/^72520,/KPBZ,/g
|
||||
s/^72528,/KBUF,/g
|
||||
s/^72558,/KOAX,/g
|
||||
s/^72562,/KLBF,/g
|
||||
s/^72572,/KSLC,/g
|
||||
s/^72582,/KLKN,/g
|
||||
s/^72597,/KMFR,/g
|
||||
s/^72632,/KDTX,/g
|
||||
s/^72634,/KAPX,/g
|
||||
s/^72645,/KGRB,/g
|
||||
s/^72649,/KMPX,/g
|
||||
s/^72659,/KABR,/g
|
||||
s/^72662,/KUNR,/g
|
||||
s/^72672,/KRIW,/g
|
||||
s/^72681,/KBOI,/g
|
||||
s/^72694,/KSLE,/g
|
||||
s/^72712,/KCAR,/g
|
||||
s/^72747,/KINL,/g
|
||||
s/^72764,/KBIS,/g
|
||||
s/^72768,/KGGW,/g
|
||||
s/^72776,/KTFX,/g
|
||||
s/^72786,/KOTX,/g
|
||||
s/^72797,/KUIL,/g
|
||||
s/^74002,/KAPG,/g
|
||||
s/^74004,/K1Y7,/g
|
||||
s/^74005,/K1Y8,/g
|
||||
s/^74006,/K1Y9,/g
|
||||
s/^74389,/KGYX,/g
|
||||
s/^74455,/KDVN,/g
|
||||
s/^74494,/KCHH,/g
|
||||
s/^74560,/KILX,/g
|
||||
s/^74626,/KPSR,/g
|
||||
s/^74794,/KXMR,/g
|
||||
s/^76151,/MILS,/g
|
||||
s/^76225,/MMCU,/g
|
||||
s/^76256,/MMGM,/g
|
||||
s/^76342,/MMOV,/g
|
||||
s/^76361,/MLMM,/g
|
||||
s/^76382,/MTRC,/g
|
||||
s/^76394,/MMMY,/g
|
||||
s/^76405,/MLAP,/g
|
||||
s/^76458,/MMMZ,/g
|
||||
s/^76491,/MCVM,/g
|
||||
s/^76499,/MSOT,/g
|
||||
s/^76548,/MTAM,/g
|
||||
s/^76612,/MMGL,/g
|
||||
s/^76644,/MMMD,/g
|
||||
s/^76649,/MCZM,/g
|
||||
s/^76654,/MMZO,/g
|
||||
s/^76665,/MMOR,/g
|
||||
s/^76679,/MMMX,/g
|
||||
s/^76680,/MMDF,/g
|
||||
s/^76692,/MMVR,/g
|
||||
s/^76723,/MISC,/g
|
||||
s/^76749,/MCME,/g
|
||||
s/^76805,/MACA,/g
|
||||
s/^76830,/MIZT,/g
|
||||
s/^76840,/MARR,/g
|
||||
s/^76904,/MTAP,/g
|
||||
s/^78016,/TXKF,/g
|
||||
s/^78073,/MYNN,/g
|
||||
s/^78367,/MUGM,/g
|
||||
s/^78384,/MKCG,/g
|
||||
s/^78397,/MKJP,/g
|
||||
s/^78486,/MDSD,/g
|
||||
s/^78526,/TJSJ,/g
|
||||
s/^78583,/MZBZ,/g
|
||||
s/^78806,/MPHO,/g
|
||||
s/^78808,/MABK,/g
|
||||
s/^78866,/MACM,/g
|
||||
s/^78897,/TFFR,/g
|
||||
s/^78954,/MKPB,/g
|
||||
s/^78970,/MKPP,/g
|
||||
s/^78988,/MACC,/g
|
||||
s/^80001,/MCSP,/g
|
||||
s/^80035,/SKRH,/g
|
||||
s/^81405,/SOCA,/g
|
||||
s/^91066,/PMDY,/g
|
||||
s/^91165,/PHLI,/g
|
||||
s/^91212,/PGUM,/g
|
||||
s/^91217,/PGAC,/g
|
||||
s/^91218,/PGUA,/g
|
||||
s/^91245,/PWAK,/g
|
||||
s/^91250,/PKMA,/g
|
||||
s/^91275,/PJON,/g
|
||||
s/^91285,/PHTO,/g
|
||||
s/^91334,/PTKK,/g
|
||||
s/^91348,/PTPN,/g
|
||||
s/^91366,/PKWA,/g
|
||||
s/^91376,/PMKJ,/g
|
||||
s/^91408,/PTRO,/g
|
||||
s/^91413,/PTYA,/g
|
||||
s/^91517,/AGGH,/g
|
||||
s/^91558,/NHHH,/g
|
||||
s/^91592,/NWWN,/g
|
||||
s/^91610,/NGTA,/g
|
||||
s/^91643,/NGFU,/g
|
||||
s/^91680,/NFFN,/g
|
||||
s/^91700,/PCIS,/g
|
||||
s/^91765,/NSTU,/g
|
||||
s/^91843,/NCRG,/g
|
||||
s/^91925,/NTMN,/g
|
||||
s/^91938,/NTTT,/g
|
||||
s/^91944,/NTTO,/g
|
||||
s/^93997,/NZRN,/g
|
||||
s/^94027,/AYLA,/g
|
||||
s/^94035,/AYPY,/g
|
||||
s/^94120,/YPDN,/g
|
||||
s/^94203,/YPBR,/g
|
||||
s/^94212,/AHHC,/g
|
||||
s/^94238,/YDTC,/g
|
||||
s/^94287,/YBCS,/g
|
||||
s/^94294,/YBTL,/g
|
||||
s/^94326,/YBAS,/g
|
||||
s/^94332,/YBMA,/g
|
||||
s/^94346,/YBLR,/g
|
||||
s/^94367,/YBMK,/g
|
||||
s/^94380,/YBGL,/g
|
||||
s/^94510,/YBCV,/g
|
||||
s/^94578,/YBBN,/g
|
||||
s/^94637,/YPKG,/g
|
||||
s/^94646,/YPFT,/g
|
||||
s/^94653,/YPCD,/g
|
||||
s/^94659,/YPWR,/g
|
||||
s/^94672,/YPAD,/g
|
||||
s/^94693,/YMMI,/g
|
||||
s/^94750,/YSNW,/g
|
||||
s/^94767,/YSSY,/g
|
||||
s/^94776,/YSWM,/g
|
||||
s/^94791,/YSCH,/g
|
||||
s/^94995,/ASLH,/g
|
||||
s/^94996,/YSNF,/g
|
||||
s/^98327,/RPMK,/g
|
|
@ -1,124 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets inventories of gridded data from the A-II database. The data is output
|
||||
# to stdout as ASCII.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-22 3599 nabowle Initial modification. Convert to DAF.
|
||||
# 2014-11-17 3599 nabowle Fix call to get_args().
|
||||
#
|
||||
|
||||
import argparse
|
||||
import numpy
|
||||
import sys
|
||||
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)", metavar="hostname")
|
||||
parser.add_argument("--srcId", action="store", dest="srcId",
|
||||
help="Unique alphanumeric name for gridded data source",
|
||||
metavar="srcId")
|
||||
parser.add_argument("--varAbrev", action="store", dest="varAbrev",
|
||||
help="Variable abreviation", metavar="varAbrev")
|
||||
parser.add_argument("--lvlOne", action="store", dest="lvlOne",
|
||||
help="Level One value", metavar="lvlOne", type=float)
|
||||
parser.add_argument("--lvlTwo", action="store", dest="lvlTwo",
|
||||
help="Level Two value", metavar="lvlTwo", type=float)
|
||||
parser.add_argument("--lvlName", action="store", dest="lvlName",
|
||||
help="Master level name", metavar="lvlName")
|
||||
parser.add_argument("--mode", action="store", dest="mode", default="time",
|
||||
help="Mode - time, plane, field, or fieldplane")
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("grid")
|
||||
|
||||
if not user_args.srcId:
|
||||
print >> sys.stderr, "srcId not provided"
|
||||
return
|
||||
req.addIdentifier("info.datasetId", user_args.srcId)
|
||||
|
||||
if user_args.varAbrev:
|
||||
req.setParameters(user_args.varAbrev)
|
||||
if user_args.lvlName is not None:
|
||||
req.addIdentifier("info.level.masterLevel.name", user_args.lvlName)
|
||||
if user_args.lvlOne is not None:
|
||||
req.addIdentifier("info.level.levelonevalue", numpy.float64(user_args.lvlOne))
|
||||
if user_args.lvlTwo is not None:
|
||||
req.addIdentifier("info.level.leveltwovalue", numpy.float64(user_args.lvlTwo))
|
||||
|
||||
mode = user_args.mode
|
||||
if mode not in ["time", "plane", "field", "fieldplane"]:
|
||||
print >> sys.stderr, "mode must be one of time, plane, field, or fieldplane."
|
||||
return
|
||||
|
||||
msg = "";
|
||||
if mode == "time":
|
||||
times = DataAccessLayer.getAvailableTimes(req)
|
||||
for time in times:
|
||||
timeStr = str(time)
|
||||
if "--" in timeStr:
|
||||
timeStr = timeStr[0:-22] + ".0" + timeStr[-22:-1] + ".0" + timeStr[-1]
|
||||
msg += timeStr[0:19] + ".0" + timeStr[19:] + "\n"
|
||||
elif mode == "plane":
|
||||
levels = DataAccessLayer.getAvailableLevels(req)
|
||||
for level in levels:
|
||||
msg += level_to_string(level) + "\n"
|
||||
elif mode == "field":
|
||||
params = DataAccessLayer.getAvailableParameters(req)
|
||||
msg = "\n".join(params)
|
||||
else: #fieldplane
|
||||
params = DataAccessLayer.getAvailableParameters(req)
|
||||
for param in params:
|
||||
msg += param + ":\n"
|
||||
req.setParameters(param)
|
||||
levels = DataAccessLayer.getAvailableLevels(req)
|
||||
if levels:
|
||||
levelStr = []
|
||||
for level in levels:
|
||||
levelStr.append(level_to_string(level))
|
||||
msg += " ".join(levelStr) + " \n"
|
||||
|
||||
print msg.strip("\n")
|
||||
|
||||
|
||||
def level_to_string(level):
|
||||
name = level.getMasterLevel().getName()
|
||||
lvlOne = str(level.getLevelonevalue())
|
||||
lvlTwo = str(level.getLeveltwovalue())
|
||||
msg = name + " " + lvlOne
|
||||
if lvlTwo not in ["None", "-999999.0"]:
|
||||
msg += " " + lvlTwo
|
||||
return msg
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,142 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available raob data in the A-II database over a specified range of
|
||||
# times. The data is output to stdout as ASCII.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-15 3598 nabowle Initial creation. Extracted common code from a2rdmdl*.py
|
||||
# 2014-12-15 3598 nabowle Fix retrieval when fcst is 0.
|
||||
#
|
||||
|
||||
import argparse
|
||||
import numpy
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import DataTime
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_parser():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)", metavar="hostname")
|
||||
parser.add_argument("--date", action="store", dest="date",
|
||||
help="The date in YYYY-MM-DD", metavar="date")
|
||||
parser.add_argument("--hour", action="store", dest="hour",
|
||||
help="The hour in HH", metavar="hour")
|
||||
parser.add_argument("--fcst", action="store", dest="fcst",
|
||||
help="The forecast time in hours", metavar="fcst")
|
||||
parser.add_argument("--srcId", action="store", dest="srcId",
|
||||
help="Unique alphanumeric name for gridded data source",
|
||||
metavar="srcId")
|
||||
parser.add_argument("--varAbrev", action="store", dest="varAbrev",
|
||||
help="Variable abreviation", metavar="varAbrev")
|
||||
parser.add_argument("--lvlOne", action="store", dest="lvlOne",
|
||||
help="Level One value", metavar="lvlOne", type=float)
|
||||
parser.add_argument("--lvlTwo", action="store", dest="lvlTwo",
|
||||
help="Level Two value", metavar="lvlTwo", type=float)
|
||||
parser.add_argument("--lvlName", action="store", dest="lvlName",
|
||||
help="Master level name", metavar="lvlName")
|
||||
return parser
|
||||
|
||||
def do_request(user_args):
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
srcId = user_args.srcId
|
||||
varAbrev = user_args.varAbrev
|
||||
|
||||
if not srcId or not varAbrev:
|
||||
raise Exception("srcId or varAbrev not provided")
|
||||
return
|
||||
|
||||
date = user_args.date
|
||||
hour = user_args.hour
|
||||
fcst = user_args.fcst
|
||||
|
||||
if not date or not hour or not fcst:
|
||||
raise Exception("date, hour, or fcst not provided")
|
||||
return
|
||||
|
||||
dt = datetime.strptime( str(date) + " " + str(hour) + ":00:00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
|
||||
# check for and build date range if necessary
|
||||
daterange = None
|
||||
if varAbrev.endswith("hr"):
|
||||
import re
|
||||
matches = re.findall(r'\d+', varAbrev)
|
||||
if matches:
|
||||
from datetime import timedelta
|
||||
hourRange = int(matches[-1])
|
||||
endDate = dt + timedelta(hours=int(fcst))
|
||||
beginDate = endDate - timedelta(hours=hourRange)
|
||||
daterange = TimeRange(beginDate, endDate)
|
||||
|
||||
# convert hours to seconds because DataTime does the reverse
|
||||
time = DataTime(dt, int(fcst)*3600, daterange)
|
||||
|
||||
|
||||
req = DataAccessLayer.newDataRequest("grid")
|
||||
req.setParameters(varAbrev)
|
||||
req.addIdentifier("info.datasetId", srcId)
|
||||
|
||||
# To handle partial level matches, use identifiers instead of a Level.
|
||||
if user_args.lvlName is not None:
|
||||
req.addIdentifier("info.level.masterLevel.name", user_args.lvlName)
|
||||
if user_args.lvlOne is not None:
|
||||
req.addIdentifier("info.level.levelonevalue", numpy.float64(user_args.lvlOne))
|
||||
if user_args.lvlTwo is not None:
|
||||
req.addIdentifier("info.level.leveltwovalue", numpy.float64(user_args.lvlTwo))
|
||||
|
||||
times = [time]
|
||||
|
||||
# If fcst is 0, also query for times with FCST_USED flag
|
||||
if fcst == '0':
|
||||
time = DataTime(dt, int(fcst)*3600, daterange)
|
||||
time.utilityFlags.add("FCST_USED")
|
||||
times.append(time)
|
||||
|
||||
grids = DataAccessLayer.getGridData(req, times)
|
||||
|
||||
if not grids:
|
||||
# print "Data not available"
|
||||
raise Exception("")
|
||||
|
||||
grid = grids[0]
|
||||
rawData = grid.getRawData()
|
||||
|
||||
yLen = len(rawData[0])
|
||||
xLen = len(rawData)
|
||||
|
||||
return grid, xLen, yLen
|
||||
|
||||
def get_indices(j, rowLen):
|
||||
# the lengths are reversed from how getRawData() returns the data and forces
|
||||
# the need to calculate the dataIdx and arrIdx instead of
|
||||
# for row in reversed(rawData): for k in row: ...
|
||||
# it's important to check that arrIdx < len(arr) when arrIdx is incremented
|
||||
dataIdx = int(j / rowLen) # index into rawData
|
||||
arrIdx = j % rowLen # index into rawData[dataIdx]
|
||||
return dataIdx, arrIdx
|
||||
|
|
@ -1,167 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available raob data in the A-II database over a specified range of
|
||||
# times. The data is output to stdout as ASCII.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-14 3598 nabowle Initial modification. Changed to use DataAccessLayer.
|
||||
#
|
||||
|
||||
import a2rdmdlCommon
|
||||
import argparse
|
||||
import numpy
|
||||
import sys
|
||||
|
||||
def get_args():
|
||||
parser = a2rdmdlCommon.get_parser()
|
||||
parser.add_argument("--dimLine", action="store_true", dest="dimLine",
|
||||
help="Output dimensions", default=False)
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
try:
|
||||
grid, xLen, yLen = a2rdmdlCommon.do_request(user_args)
|
||||
except Exception as e:
|
||||
print >> sys.stderr, str(e)
|
||||
return
|
||||
|
||||
rawData = grid.getRawData()
|
||||
|
||||
msg = ""
|
||||
if user_args.dimLine:
|
||||
msg += str(xLen) + " " + str(yLen) + "\n"
|
||||
|
||||
nxy = yLen*xLen
|
||||
j = nxy-xLen
|
||||
while j>=0 :
|
||||
dataIdx, arrIdx = a2rdmdlCommon.get_indices(j, yLen)
|
||||
arr = rawData[dataIdx]
|
||||
i = 0
|
||||
while i<xLen:
|
||||
if arrIdx >= yLen:
|
||||
arrIdx = 0
|
||||
dataIdx += 1
|
||||
arr = rawData[dataIdx]
|
||||
|
||||
k = arr[arrIdx]
|
||||
if numpy.isnan(k) :
|
||||
k = 0
|
||||
if k<0 :
|
||||
a = -k
|
||||
else :
|
||||
a = k
|
||||
if a>=999998 :
|
||||
msg += "1e37 "
|
||||
elif a<0.00005 :
|
||||
msg += "%g"%k + " "
|
||||
elif a<0.0009 :
|
||||
if round(k,8) == round(k,4) :
|
||||
msg += "%.4f"%k + " "
|
||||
elif round(k,8) == round(k,5) :
|
||||
msg += "%.5f"%k + " "
|
||||
elif round(k,8) == round(k,6) :
|
||||
msg += "%.6f"%k + " "
|
||||
elif round(k,8) == round(k,7) :
|
||||
msg += "%.7f"%k + " "
|
||||
else :
|
||||
msg += "%.8f"%k + " "
|
||||
elif a<0.009 :
|
||||
if round(k,7) == round(k,3) :
|
||||
msg += "%.3f"%k + " "
|
||||
elif round(k,7) == round(k,4) :
|
||||
msg += "%.4f"%k + " "
|
||||
elif round(k,7) == round(k,5) :
|
||||
msg += "%.5f"%k + " "
|
||||
elif round(k,7) == round(k,6) :
|
||||
msg += "%.6f"%k + " "
|
||||
else :
|
||||
msg += "%.7f"%k + " "
|
||||
elif a<0.09 :
|
||||
if round(k,6) == round(k,2) :
|
||||
msg += "%.2f"%k + " "
|
||||
elif round(k,6) == round(k,3) :
|
||||
msg += "%.3f"%k + " "
|
||||
elif round(k,6) == round(k,4) :
|
||||
msg += "%.4f"%k + " "
|
||||
elif round(k,6) == round(k,5) :
|
||||
msg += "%.5f"%k + " "
|
||||
else :
|
||||
msg += "%.6f"%k + " "
|
||||
elif a<0.9 :
|
||||
if round(k,5) == round(k,1) :
|
||||
msg += "%.1f"%k + " "
|
||||
elif round(k,5) == round(k,2) :
|
||||
msg += "%.2f"%k + " "
|
||||
elif round(k,5) == round(k,3) :
|
||||
msg += "%.3f"%k + " "
|
||||
elif round(k,5) == round(k,4) :
|
||||
msg += "%.4f"%k + " "
|
||||
else :
|
||||
msg += "%.5f"%k + " "
|
||||
elif a<9 :
|
||||
if round(k,4) == round(k,0) :
|
||||
msg += "%.0f"%k + " "
|
||||
elif round(k,4) == round(k,1) :
|
||||
msg += "%.1f"%k + " "
|
||||
elif round(k,4) == round(k,2) :
|
||||
msg += "%.2f"%k + " "
|
||||
elif round(k,4) == round(k,3) :
|
||||
msg += "%.3f"%k + " "
|
||||
else :
|
||||
msg += "%.4f"%k + " "
|
||||
elif a<99 :
|
||||
if round(k,3) == round(k,0) :
|
||||
msg += "%.0f"%k + " "
|
||||
elif round(k,3) == round(k,1) :
|
||||
msg += "%.1f"%k + " "
|
||||
elif round(k,3) == round(k,2) :
|
||||
msg += "%.2f"%k + " "
|
||||
else :
|
||||
msg += "%.3f"%k + " "
|
||||
elif a<999 :
|
||||
if round(k,2) == round(k,0) :
|
||||
msg += "%.0f"%k + " "
|
||||
elif round(k,2) == round(k,1) :
|
||||
msg += "%.1f"%k + " "
|
||||
else :
|
||||
msg += "%.2f"%k + " "
|
||||
elif a<9999 :
|
||||
if round(k,1) == round(k,0) :
|
||||
msg += "%.0f"%k + " "
|
||||
else :
|
||||
msg += "%.1f"%k + " "
|
||||
else :
|
||||
msg += "%.0f"%k + " "
|
||||
i += 1
|
||||
arrIdx += 1
|
||||
|
||||
msg += "\n"
|
||||
j -= xLen
|
||||
|
||||
print msg.strip() + " "
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,91 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available raob data in the A-II database over a specified range of
|
||||
# times. The data is output to stdout as ASCII.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-15 3598 nabowle Initial modification. Changed to use DataAccessLayer.
|
||||
#
|
||||
|
||||
import a2rdmdlCommon
|
||||
import argparse
|
||||
import numpy
|
||||
import xdrlib
|
||||
import bz2
|
||||
import sys
|
||||
|
||||
def get_args():
|
||||
return a2rdmdlCommon.get_parser().parse_args()
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
try:
|
||||
grid, xLen, yLen = a2rdmdlCommon.do_request(user_args)
|
||||
except Exception as e:
|
||||
print >> sys.stderr, str(e)
|
||||
return
|
||||
|
||||
rawData = grid.getRawData()
|
||||
|
||||
msg = str(xLen) + " " + str(yLen) + "\n"
|
||||
|
||||
nxy = yLen*xLen
|
||||
j = nxy-xLen
|
||||
mypacker = xdrlib.Packer()
|
||||
mypacker.reset()
|
||||
while j>=0 :
|
||||
dataIdx, arrIdx = a2rdmdlCommon.get_indices(j, yLen)
|
||||
arr = rawData[dataIdx]
|
||||
i = 0
|
||||
while i<xLen:
|
||||
if arrIdx >= yLen:
|
||||
arrIdx = 0
|
||||
dataIdx += 1
|
||||
arr = rawData[dataIdx]
|
||||
|
||||
k = arr[arrIdx]
|
||||
if numpy.isnan(k) :
|
||||
k = 0
|
||||
|
||||
mypacker.pack_float(float(k))
|
||||
i += 1
|
||||
arrIdx += 1
|
||||
|
||||
j -= xLen
|
||||
|
||||
packLen = len(mypacker.get_buffer())
|
||||
xdrbuf = bz2.compress(mypacker.get_buffer())
|
||||
cmpLen = len(xdrbuf)
|
||||
msg += str(packLen)+" "+str(cmpLen*2)+"\t\n"
|
||||
i = 0
|
||||
while i<cmpLen :
|
||||
msg += "%2.2x"%ord(xdrbuf[i])
|
||||
i += 1
|
||||
msg += "\t\n"
|
||||
|
||||
print msg.strip() + "\t"
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,254 +0,0 @@
|
|||
#!/bin/csh -f
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
#
|
||||
# A script wrapper that is meant to get inventories of gridded data
|
||||
# from the A-II database. The data is output to stdout as ASCII.
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2invmdl.csh p srcid ctyp lval1 lval2 varAbrev
|
||||
# p - A literal p. (optional)
|
||||
# srcid - Unique alphanumeric name for gridded data source.
|
||||
# ctyp - Level type id (optional)
|
||||
# lval1 - First level value (optional)
|
||||
# lval2 - Second level value (optional)
|
||||
# varAbrev - Variable abreviation. (optional)
|
||||
#
|
||||
# Legacy usage, not supported in all cases:
|
||||
#
|
||||
# a2invmdl.csh p gproc ggid ctyp lval1 lval2 varAbrev
|
||||
#
|
||||
# p - A literal p. (optional)
|
||||
# gproc - GRIB process number (can be multiple comma delimited)
|
||||
# ggid - GRIB grid number
|
||||
# ctyp - Level type id (optional)
|
||||
# lval1 - First level value (optional)
|
||||
# lval2 - Second level value (optional)
|
||||
# varAbrev - Variable abreviation. (optional)
|
||||
#
|
||||
# With the new unified GRIB decoder, instead of gproc ggid, it is best
|
||||
# to supply the srcid, which is like ETA or GFS254; e.g. the directory
|
||||
# under /awips2/edex/data/hdf5/grid where the data is stored.
|
||||
#
|
||||
# Note that now for sources with no <grid> tag in the associated <model>
|
||||
# entry, the ggid must be supplied as a quoted empty string.
|
||||
#
|
||||
# With no arguments after the grid number, returns a list of variables for
|
||||
# the data source specified by the process and grid id. With only a variable,
|
||||
# returns information for the list of planes for that variable. With more
|
||||
# arguments, returns a list of times for that variable and plane.
|
||||
#
|
||||
# Level value arguments are meaningless without the level type argument,
|
||||
# but it is meaningful to provide only a level type.
|
||||
#
|
||||
# If the only argument after the process and grid is a literal at sign ('@')
|
||||
# then what is returned is a list of all times for which there is data
|
||||
# available for the given process/grid combination.
|
||||
#
|
||||
# If the only argument after the process and grid is a literal plus sign (+),
|
||||
# then what will be returned will be a level inventory for all variables.
|
||||
#
|
||||
# The literal p option means preserve the final version of the python
|
||||
# submitted to the UEngine instead of cleaning it up. The path to the
|
||||
# finalized python is /tmp/a2rdmdlNNNNN.py where NNNNN is a unix process id.
|
||||
#
|
||||
# Gets all available raob data in the A-II database over a specified range of
|
||||
# times. The data is output to stdout as ASCII.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-22 3599 nabowle Initial modification. Changed to properly call DAF version.
|
||||
#
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( -x $mydir/$0 ) then
|
||||
set me = $mydir/$0
|
||||
else
|
||||
set me = $0
|
||||
endif
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
#
|
||||
# Primarily base stuff on source name, but try to use the old interface.
|
||||
#
|
||||
set sss = "$1"
|
||||
shift
|
||||
set ids = `echo $sss | tr ',' ' '`
|
||||
echo "$ids[1]" | grep '^[0-9][0-9]*$' >& /dev/null
|
||||
if ( $status == 0 || $#ids > 1 ) then
|
||||
set mroot = /awips2/edex/data/utility/edex_static/base/grib/models
|
||||
set ids = `echo $ids | tr ' ' '\n' | grep -v '^ *$' | \
|
||||
sed 's#^#<id>#g' | sed 's#$#<|#g'`
|
||||
set ids = `echo ${ids}quertyuiop | sed 's/ *//g'`
|
||||
set ggg = "$1"
|
||||
shift
|
||||
if ( "$ggg" == "" ) then
|
||||
set mmm = `find $mroot -name '*xml' ! -name '*ECMWF*' \
|
||||
-exec cat '{}' \; | sed 's|-->|~|g' | \
|
||||
tr '\t' ' ' | sed 's/ *//g' | sed 's|</model>|~|g' | \
|
||||
tr '\n' ' ' | tr '~' '\n' | grep -E "$ids" | \
|
||||
grep -v "<grid>" | sed 's/^.*<name>//g' | \
|
||||
cut '-d<' -f1 | sort -u`
|
||||
else
|
||||
set mmm = `find $mroot -name '*xml' -exec cat '{}' \; | \
|
||||
sed 's|-->|~|g' | \
|
||||
tr '\t' ' ' | sed 's/ *//g' | sed 's|</model>|~|g' | \
|
||||
tr '\n' ' ' | tr '~' '\n' | grep -E "$ids" | \
|
||||
grep "<grid>$ggg<" | sed 's/^.*<name>//g' | \
|
||||
cut '-d<' -f1 | sort -u`
|
||||
endif
|
||||
if ( $#mmm != 1 ) then
|
||||
echo "$mmm"
|
||||
echo "Could not look up model name based on $sss '$ggg'"
|
||||
exit 1
|
||||
endif
|
||||
set sss = $mmm
|
||||
endif
|
||||
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./a2invmdlStub.py ) then
|
||||
set stubpy = ./a2invmdlStub.py
|
||||
else if ( -e $mydir/a2invmdlStub.py ) then
|
||||
set stubpy = $mydir/a2invmdlStub.py
|
||||
else if ( -e $FXA_HOME/src/dm/grid/a2invmdlStub.py ) then
|
||||
set stubpy = $FXA_HOME/src/dm/grid/a2invmdlStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2invmdlStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2invmdlStub.py
|
||||
else
|
||||
bash -c "echo could not find a2invmdlStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
if ( "$*" == "+" ) then
|
||||
python $stubpy --mode fieldplane --srcId $sss
|
||||
else if ( "$1" == "" ) then
|
||||
python $stubpy --mode field --srcId $sss
|
||||
else if ( "$1" == "@" ) then
|
||||
python $stubpy --mode time --srcId $sss
|
||||
else if ( "$2" == "" ) then
|
||||
python $stubpy --mode plane --srcId $sss --varAbrev $1
|
||||
else if ( "$3" == "" ) then
|
||||
python $stubpy --mode time --srcId $sss --lvlName $1 --varAbrev $2
|
||||
else if ( "$4" == "" ) then
|
||||
python $stubpy --mode time --srcId $sss --lvlName $1 --lvlOne $2 --varAbrev $3
|
||||
else
|
||||
python $stubpy --mode time --srcId $sss --lvlName $1 --lvlOne $2 --lvlTwo $3 --varAbrev $4
|
||||
endif
|
||||
else
|
||||
#
|
||||
if ( "$*" == "+" ) then
|
||||
set varList = `$me $sss`
|
||||
foreach onevar ( $varList )
|
||||
echo ${onevar}:
|
||||
$me $sss $onevar | tr '\n' ' '
|
||||
echo
|
||||
end
|
||||
exit
|
||||
endif
|
||||
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
#
|
||||
# Modify the text of special tags in stub to create finalized script.
|
||||
#
|
||||
set specpy = /tmp/a2invmdl${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
set plane = no
|
||||
if ( "$1" == "" ) then
|
||||
cat $stubpy | sed "s/MMMMM/field/g" | sed "s/SSSSS/$sss/g" | \
|
||||
sed 's/^.*TTTTT.*$//g' | sed 's/^.*LLLLL.*$//g' | \
|
||||
sed 's/^.*22222.*$//g' | sed 's/^.*VVVVV.*$//g' >> $specpy
|
||||
else if ( "$1" == "@" ) then
|
||||
cat $stubpy | sed "s/MMMMM/time/g" | sed "s/SSSSS/$sss/g" | \
|
||||
sed 's/^.*TTTTT.*$//g' | sed 's/^.*LLLLL.*$//g' | \
|
||||
sed 's/^.*22222.*$//g' | sed 's/^.*VVVVV.*$//g' >> $specpy
|
||||
else if ( "$2" == "" ) then
|
||||
set plane = yes
|
||||
cat $stubpy | sed "s/MMMMM/plane/g" | sed "s/SSSSS/$sss/g" | \
|
||||
sed 's/^.*TTTTT.*$//g' | sed 's/^.*LLLLL.*$//g' | \
|
||||
sed 's/^.*22222.*$//g' | sed "s/VVVVV/$1/g" >> $specpy
|
||||
else if ( "$3" == "" ) then
|
||||
cat $stubpy | sed "s/MMMMM/time/g" | sed "s/SSSSS/$sss/g" | \
|
||||
sed "s/TTTTT/$1/g" | sed 's/^.*LLLLL.*$//g' | \
|
||||
sed 's/^.*22222.*$//g' | sed "s/VVVVV/$2/g" >> $specpy
|
||||
else if ( "$4" == "" ) then
|
||||
cat $stubpy | sed "s/MMMMM/time/g" | sed "s/SSSSS/$sss/g" | \
|
||||
sed "s/TTTTT/$1/g" | sed "s/LLLLL/$2/g"| \
|
||||
sed 's/^.*22222.*$//g' | sed "s/VVVVV/$3/g" >> $specpy
|
||||
else
|
||||
cat $stubpy | sed "s/MMMMM/time/g" | sed "s/SSSSS/$sss/g" | \
|
||||
sed "s/TTTTT/$1/g" | sed "s/LLLLL/$2/g" | \
|
||||
sed "s/22222/$3/g" | sed "s/VVVVV/$4/g" >> $specpy
|
||||
endif
|
||||
if ( "$plane" == "no" ) then
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) |& grep attributes | cut '-d"' -f4
|
||||
else
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) |& sed 's|.*</items>.*|@|g' | \
|
||||
grep -E 'attributes|@' | cut '-d"' -f4 | tr '\n' ' ' | tr '@' '\n' | \
|
||||
sed 's/ -999999.0//g' | sed 's/^ *//g' | sed 's/ *$//g'
|
||||
endif
|
||||
#if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
#
|
||||
endif
|
||||
|
|
@ -1,305 +0,0 @@
|
|||
#!/bin/csh -f
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available raob data in the A-II database over a specified range of
|
||||
# times. The data is output to stdout as ASCII.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-16 3598 nabowle Initial modification. Changed to handle DataAccessLayer.
|
||||
#
|
||||
#
|
||||
# A script wrapper that is meant to get a single slab of gridded data
|
||||
# from the A-II database. The data is output to stdout as ASCII.
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2rdmdl.csh p n x srcid ctyp lval1 lval2 varAbrev date hour fcst
|
||||
#
|
||||
# p - A literal p. (optional)
|
||||
# n - A literal n. (optional)
|
||||
# x - A literal x. (optional)
|
||||
# srcid - Unique alphanumeric name for gridded data source.
|
||||
# ctyp - Level type id (optional)
|
||||
# lval1 - First level value (optional)
|
||||
# lval2 - Second level value (optional)
|
||||
# varAbrev - Variable abreviation.
|
||||
# date - Date of model run time as yyyy-mm-dd
|
||||
# hour - Hour of model run time as hh
|
||||
# fcst - Forecast time in hours
|
||||
#
|
||||
# Legacy usage, not supported in all cases:
|
||||
#
|
||||
# a2rdmdl.csh p n x gproc ggid ctyp lval1 lval2 varAbrev date hour fcst
|
||||
#
|
||||
# p - A literal p. (optional)
|
||||
# n - A literal n. (optional)
|
||||
# x - A literal x. (optional)
|
||||
# gproc - GRIB process number (can be multiple comma delimited)
|
||||
# ggid - GRIB grid number
|
||||
# ctyp - Level type id (optional)
|
||||
# lval1 - First level value (optional)
|
||||
# lval2 - Second level value (optional)
|
||||
# varAbrev - Variable abreviation.
|
||||
# date - Date of model run time as yyyy-mm-dd
|
||||
# hour - Hour of model run time as hh
|
||||
# fcst - Forecast time in hours
|
||||
#
|
||||
# With the new unified GRIB decoder, instead of gproc ggid, it is best
|
||||
# to supply the srcid, which is like ETA or GFS254; e.g. the directory
|
||||
# under /awips2/edex/data/hdf5/grid where the data is stored.
|
||||
#
|
||||
# Note that now for sources with no <grid> tag in the associated <model>
|
||||
# entry, the ggid must be supplied as a quoted empty string.
|
||||
#
|
||||
# The literal p option means preserve the final version of the python
|
||||
# submitted to the UEngine instead of cleaning it up. The path to the
|
||||
# finalized python is /tmp/a2rdmdlNNNNN.py where NNNNN is a unix process id.
|
||||
# The literal n option means the first line of output is the dimension of
|
||||
# the grid returned. The literal x option means return the data in xdr
|
||||
# format; in this case the xdr data begins immediately after a tab-linefeed.
|
||||
#
|
||||
# Process any one character options.
|
||||
#
|
||||
set rmpy = yes
|
||||
set dimStr = dimStr
|
||||
set specpyName = a2rdmdlStub
|
||||
while (1)
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
else if ( "$1" == "n" ) then
|
||||
set dimStr = qwertyuiop
|
||||
else if ( "$1" == "x" ) then
|
||||
set specpyName = a2rdmdlXdr
|
||||
set dimStr = qwertyuiopx
|
||||
else
|
||||
break
|
||||
endif
|
||||
shift
|
||||
end
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files we need.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
#
|
||||
# Special case of topo, we will hard code it.
|
||||
#
|
||||
echo " $* " | grep " Topo " >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set outfile = `find . -maxdepth 1 \
|
||||
-name "$1.Topo" -o -name "$1.$2.Topo" -o -name "*,$1.$2.Topo" -o \
|
||||
-name "$1,*.$2.Topo" -o -name "*,$1,*.$2.Topo"` >& /dev/null
|
||||
if ( ( $#outfile != 1 ) && ( $mydir != $PWD ) ) then
|
||||
set outfile = `find $mydir -maxdepth 1 \
|
||||
-name "$1.Topo" -o -name "$1.$2.Topo" -o -name "*,$1.$2.Topo" -o \
|
||||
-name "$1,*.$2.Topo" -o -name "*,$1,*.$2.Topo"` >& /dev/null
|
||||
endif
|
||||
if ( ( $#outfile != 1 ) && ( -d $FXA_HOME/data ) ) then
|
||||
set outfile = `find $FXA_HOME/data -maxdepth 1 \
|
||||
-name "$1.Topo" -o -name "$1.$2.Topo" -o -name "*,$1.$2.Topo" -o \
|
||||
-name "$1,*.$2.Topo" -o -name "*,$1,*.$2.Topo"` >& /dev/null
|
||||
endif
|
||||
if ( $#outfile != 1 ) then
|
||||
bash -c "echo No flat file available with topo for $1 $2 1>&2"
|
||||
exit
|
||||
endif
|
||||
if ( "$dimStr" == "qwertyuiop" ) then
|
||||
set nnn = `cat $outfile | wc`
|
||||
set ny = $nnn[1]
|
||||
@ nx = $nnn[2] / $ny
|
||||
echo $nx $ny
|
||||
endif
|
||||
cat $outfile
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Primarily base stuff on source name, but try to use the old interface.
|
||||
#
|
||||
set sss = "$1"
|
||||
shift
|
||||
set ids = `echo $sss | tr ',' ' '`
|
||||
echo "$ids[1]" | grep '^[0-9][0-9]*$' >& /dev/null
|
||||
if ( $status == 0 || $#ids > 1 ) then
|
||||
set mroot = /awips2/edex/data/utility/edex_static/base/grib/models
|
||||
set ids = `echo $ids | tr ' ' '\n' | grep -v '^ *$' | \
|
||||
sed 's#^#<id>#g' | sed 's#$#<|#g'`
|
||||
set ids = `echo ${ids}quertyuiop | sed 's/ *//g'`
|
||||
set ggg = "$1"
|
||||
shift
|
||||
if ( "$ggg" == "" ) then
|
||||
set mmm = `find $mroot -name '*xml' ! -name '*ECMWF*' \
|
||||
-exec cat '{}' \; | sed 's|-->|~|g' | \
|
||||
tr '\t' ' ' | sed 's/ *//g' | sed 's|</model>|~|g' | \
|
||||
tr '\n' ' ' | tr '~' '\n' | grep -E "$ids" | \
|
||||
grep -v "<grid>" | sed 's/^.*<name>//g' | \
|
||||
cut '-d<' -f1 | sort -u`
|
||||
else
|
||||
set mmm = `find $mroot -name '*xml' -exec cat '{}' \; | \
|
||||
sed 's|-->|~|g' | \
|
||||
tr '\t' ' ' | sed 's/ *//g' | sed 's|</model>|~|g' | \
|
||||
tr '\n' ' ' | tr '~' '\n' | grep -E "$ids" | \
|
||||
grep "<grid>$ggg<" | sed 's/^.*<name>//g' | \
|
||||
cut '-d<' -f1 | sort -u`
|
||||
endif
|
||||
if ( $#mmm != 1 ) then
|
||||
echo "$mmm"
|
||||
echo "Could not look up model name based on $sss '$ggg'"
|
||||
exit 1
|
||||
endif
|
||||
set sss = $mmm
|
||||
endif
|
||||
|
||||
@ i = $#argv - 3
|
||||
set vvvvv = $argv[$i]
|
||||
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./${specpyName}.py ) then
|
||||
set stubpy = ./${specpyName}.py
|
||||
else if ( -e $mydir/${specpyName}.py ) then
|
||||
set stubpy = $mydir/${specpyName}.py
|
||||
else if ( -e $FXA_HOME/src/dm/grid/${specpyName}.py ) then
|
||||
set stubpy = $FXA_HOME/src/dm/grid/${specpyName}.py
|
||||
else if ( -e $FXA_HOME/bin/${specpyName}.py ) then
|
||||
set stubpy = $FXA_HOME/bin/${specpyName}.py
|
||||
else
|
||||
bash -c "echo could not find ${specpyName}.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set userArgs = "--srcId $sss --varAbrev $vvvvv"
|
||||
if ( ( "$dimStr" != "dimStr" ) && ( "$specpyName" != "a2rdmdlXdr" ) ) then
|
||||
set userArgs = "$userArgs --dimLine"
|
||||
endif
|
||||
|
||||
if ( "$5" == "" ) then
|
||||
set userArgs = "$userArgs --date $2 --hour $3 --fcst $4"
|
||||
else if ( "$6" == "" ) then
|
||||
set userArgs = "$userArgs --lvlName $1 --date $3 --hour $4 --fcst $5"
|
||||
else if ( "$7" == "" ) then
|
||||
set userArgs = "$userArgs --lvlName $1 --lvlOne $2 --date $4 --hour $5 --fcst $6"
|
||||
else
|
||||
set userArgs = "$userArgs --lvlName $1 --lvlOne $2 --lvlTwo $3 --date $5 --hour $6 --fcst $7"
|
||||
endif
|
||||
python $stubpy $userArgs
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
set rrrrr = ""
|
||||
set aaa = `echo $vvvvv | grep -E '^CP|^TP|^LgSP' | tr 'A-z' ' '`
|
||||
set aaa = `echo $aaa`
|
||||
#
|
||||
# Special case of formatting the times for accumulated precip
|
||||
#
|
||||
if ( "$aaa" != "" ) then
|
||||
if ( -x ./gtasUtil ) then
|
||||
set gtasUtil = ./gtasUtil
|
||||
else if ( -x $mydir/gtasUtil ) then
|
||||
set gtasUtil = $mydir/gtasUtil
|
||||
else if ( -x $FXA_HOME/src/dm/point/gtasUtil ) then
|
||||
set gtasUtil = $FXA_HOME/src/dm/point/gtasUtil
|
||||
else if ( -x $FXA_HOME/bin/gtasUtil ) then
|
||||
set gtasUtil = $FXA_HOME/bin/gtasUtil
|
||||
else
|
||||
bash -c "echo could not find gtasUtil executable 1>&2"
|
||||
exit
|
||||
endif
|
||||
@ i++
|
||||
set t = `echo $* | cut '-d ' -f${i}-$#argv`
|
||||
@ fff = $t[3] * 3600
|
||||
set vt = `$gtasUtil = $t[1] ${t[2]}:00:00.0 $fff`
|
||||
@ aaa = $aaa * 3600
|
||||
set bt = `$gtasUtil = $vt -$aaa`
|
||||
set rrrrr = "[$bt--$vt]"
|
||||
endif
|
||||
|
||||
#
|
||||
# Modify the text of special tags in stub to create finalized script.
|
||||
#
|
||||
set specpy = /tmp/a2rdmdl${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
if ( "$5" == "" ) then
|
||||
cat $stubpy | grep -v $dimStr | sed "s/SSSSS/$sss/g" | \
|
||||
sed 's/^.*TTTTT.*$//g' | sed 's/^.*LLLLL.*$//g' | \
|
||||
sed 's/^.*22222.*$//g' | sed "s/VVVVV/$1/g" | sed "s/DDDDD/$2/g" | \
|
||||
sed "s/HHHHH/$3/g" | sed "s/FFFFF/$4/g" | sed "s/RRRRR/$rrrrr/g" >> \
|
||||
$specpy
|
||||
else if ( "$6" == "" ) then
|
||||
cat $stubpy | grep -v $dimStr | sed "s/SSSSS/$sss/g" | \
|
||||
sed "s/TTTTT/$1/g" | sed 's/^.*LLLLL.*$//g' | sed 's/^.*22222.*$//g' | \
|
||||
sed "s/VVVVV/$2/g" | sed "s/DDDDD/$3/g" | \
|
||||
sed "s/HHHHH/$4/g" | sed "s/FFFFF/$5/g" | sed "s/RRRRR/$rrrrr/g" >> \
|
||||
$specpy
|
||||
else if ( "$7" == "" ) then
|
||||
cat $stubpy | grep -v $dimStr | sed "s/SSSSS/$sss/g" | \
|
||||
sed "s/TTTTT/$1/g" | sed "s/LLLLL/$2/g" | sed 's/^.*22222.*$//g' | \
|
||||
sed "s/VVVVV/$3/g" | sed "s/DDDDD/$4/g" | \
|
||||
sed "s/HHHHH/$5/g" | sed "s/FFFFF/$6/g" | sed "s/RRRRR/$rrrrr/g" >> \
|
||||
$specpy
|
||||
else
|
||||
cat $stubpy | grep -v $dimStr | sed "s/SSSSS/$sss/g" | \
|
||||
sed "s/TTTTT/$1/g" | sed "s/LLLLL/$2/g" | sed "s/22222/$3/g" | \
|
||||
sed "s/VVVVV/$4/g" | sed "s/DDDDD/$5/g" | \
|
||||
sed "s/HHHHH/$6/g" | sed "s/FFFFF/$7/g" | sed "s/RRRRR/$rrrrr/g" >> \
|
||||
$specpy
|
||||
endif
|
||||
#
|
||||
# Submit the temporary python script stripping any xml stuff, then remove it
|
||||
#
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | grep -v Response
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
|
@ -1,160 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available Laps maritime data in the A-II database over a specified
|
||||
# range of times. The data is output to stdout as ASCII. Each line is one
|
||||
# time/platform combination. The individual data items are comma delimited.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/18/2014 3591 nabowle Initial modification. Replace UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("sfcobs")
|
||||
req.setParameters("stationId","timeObs","elevation","reportType",
|
||||
"wx_present","visibility","seaLevelPress","stationPress",
|
||||
"pressChange3Hour","pressChangeChar","temperature",
|
||||
"dewpoint","seaSurfaceTemp","wetBulb","windDir",
|
||||
"windSpeed","equivWindSpeed10m","windGust","precip1Hour",
|
||||
"precip6Hour","precip24Hour" )
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if not geometries :
|
||||
# print "No data available."
|
||||
return
|
||||
|
||||
# Initialize conversion array for wx.
|
||||
wxstr = [ " ", " ", " ", " ", "FU", "HZ", "DU", "BLSA", "PO", "VCSS", \
|
||||
"BR", "BCFG", "MIFG", "VCTS", "VCSH", "VCSH", "VCSH", " ", "SQ", "+FC", \
|
||||
"DZ", "RA", "SN", "RA SN", "FZRA", "SHRA", "SHRA SHSN", "SHGR", "FG FZFG", "TS", \
|
||||
"SS", "SS", "SS", "+SS", "+SS", "+SS", "DRSN", " ", "BLSN", "+BLSN", \
|
||||
"VCFG", "BCFG", "FG FZFG", "FG FZFG", "FG FZFG", "FG FZFG", "FG FZFG", "FG FZFG", "FZFG", "FZFG", \
|
||||
"-DZ", "-DZ", "DZ", "DZ", "+DZ", "+DZ", "-FZDZ", "FZDZ", "-DZ -RA", "DZ RA", \
|
||||
"-RA", "-RA", "RA", "RA", "+RA", "+RA", "-FZRA", "FZRA", "-RA -SN", "RA SN", \
|
||||
"-SN", "-SN", "SN", "SN", "+SN", "+SN", "IC", "SG", "IC", "PE", \
|
||||
"-SHRA", "SHRA", "+SHRA", "-SHSN -SHRA", "SHSN SHRA", "-SNSN", "SHSN", "-SHPE", "SHPE", " ", \
|
||||
"SHGR", "-RA", "+RA", "-RA -SN -GR", "+RA +SN +GR", "TSRA", "TSPE", "+TSRA", " ", "+TSPE" ]
|
||||
|
||||
msg = ""
|
||||
for geo in geometries :
|
||||
lon = geo.getGeometry().x
|
||||
lat = geo.getGeometry().y
|
||||
|
||||
sName = geo.getString("stationId")
|
||||
tobs = geo.getNumber("timeObs")
|
||||
elev = geo.getNumber("elevation")
|
||||
typ = geo.getNumber("reportType")
|
||||
wx = geo.getNumber("wx_present")
|
||||
vis = geo.getNumber("visibility")
|
||||
msl = geo.getNumber("seaLevelPress")
|
||||
p = geo.getNumber("stationPress")
|
||||
pchg = geo.getNumber("pressChange3Hour")
|
||||
pchr = geo.getNumber("pressChangeChar")
|
||||
temp = geo.getNumber("temperature")
|
||||
dpt = geo.getNumber("dewpoint")
|
||||
th2o = geo.getNumber("seaSurfaceTemp")
|
||||
tw = geo.getNumber("wetBulb")
|
||||
dir = geo.getNumber("windDir")
|
||||
spd = geo.getNumber("windSpeed")
|
||||
s10 = geo.getNumber("equivWindSpeed10m")
|
||||
gust = geo.getNumber("windGust")
|
||||
pr1 = geo.getNumber("precip1Hour")
|
||||
pr6 = geo.getNumber("precip6Hour")
|
||||
pr24 = geo.getNumber("precip24Hour")
|
||||
|
||||
msg += sName + ","
|
||||
msg += str(tobs/1000) + ","
|
||||
msg += "%.4f"%lat + ","
|
||||
msg += "%.4f"%lon + ","
|
||||
msg += "%.0f"%elev + ","
|
||||
if typ < 1001 or typ > 1007 :
|
||||
msg += "-32767,"
|
||||
elif typ == 1001 or typ == 1004 or typ == 1005 :
|
||||
msg += "0,"
|
||||
else :
|
||||
msg += "1,"
|
||||
if wx < 0 or wx > 99 :
|
||||
msg += " ,"
|
||||
else :
|
||||
msg += wxstr[wx] + ","
|
||||
msg += str(vis) + ","
|
||||
msg += "%.2f"%msl + ","
|
||||
msg += "%.2f"%p + ","
|
||||
msg += "%.0f"%pchg + ","
|
||||
if pchr <= -9999 :
|
||||
pchr = -32767
|
||||
msg += str(pchr) + " ,"
|
||||
msg += "%.1f"%temp + ","
|
||||
msg += "%.1f"%dpt + ","
|
||||
msg += "%.1f"%th2o + ","
|
||||
msg += "%.1f"%tw + ","
|
||||
msg += "%.0f"%dir + ","
|
||||
msg += "%.1f"%spd + ","
|
||||
msg += "%.1f"%s10 + ","
|
||||
msg += "%.1f"%gust + ","
|
||||
msg += "%.2f"%pr1 + ","
|
||||
msg += "%.2f"%pr6 + ","
|
||||
msg += "%.2f"%pr24 + "\n"
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,134 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
#
|
||||
# A script wrapper around a UEngine call that is meant to get all available
|
||||
# maritime data in the A-II database over a specified range of times.
|
||||
# The data is output to stdout as ASCII. Each line is one time/platform
|
||||
# combination. The individual data items are comma delimited.
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2gtboy.csh {p} {c} yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm
|
||||
#
|
||||
# The literal p and c flags are optional. The p flag means preserve
|
||||
# the final version of the python submitted to the UEngine instead of
|
||||
# cleaning it up. The path to the finalized python is /tmp/a2gtboyNNNNN.py
|
||||
# where NNNNN is a unix process id. The c flag means to retreive the
|
||||
# Laps set of variables, instead of the default MSAS set.
|
||||
#
|
||||
#
|
||||
# Not using the 'c' format, the MSAS set of variables, outputs the following
|
||||
# variables for each line:
|
||||
#
|
||||
# stationId,timeObs,latitude,longitude,elevation,seaLevelPress,
|
||||
# stationPress,temperature,dewpoint,windDir,windSpeed,pressChange3Hour
|
||||
#
|
||||
# Using the 'c' format, the Laps set of variables, outputs the following
|
||||
# variables for each line:
|
||||
#
|
||||
# stationId,timeObs,latitude,longitude,elevation,reportType,wx_present,
|
||||
# visibility,seaLevelPress,stationPress,pressChange3Hour,pressChangeChar,
|
||||
# temperature,dewpoint,seaSurfaceTemp,wetBulb,windDir,windSpeed,
|
||||
# equivWindSpeed10m,windGust,precip1Hour,precip6Hour,precip24Hour
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/22/2014 3591 nabowle Initial modification. Properly call DAF script.
|
||||
#
|
||||
#
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
#
|
||||
set stubbase = a2gtboyStub.py
|
||||
if ( "$1" == "c" ) then
|
||||
shift
|
||||
set stubbase = a2cvboyStub.py
|
||||
endif
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./$stubbase ) then
|
||||
set stubpy = ./$stubbase
|
||||
else if ( -e $mydir/$stubbase ) then
|
||||
set stubpy = $mydir/$stubbase
|
||||
else if ( -e $FXA_HOME/src/dm/maritime/$stubbase ) then
|
||||
set stubpy = $FXA_HOME/src/dm/maritime/$stubbase
|
||||
else if ( -e $FXA_HOME/bin/$stubbase ) then
|
||||
set stubpy = $FXA_HOME/bin/$stubbase
|
||||
else
|
||||
bash -c "echo could not find $stubbase 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
/awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4"
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
set specpy = /tmp/a2gtboy${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
cat $stubpy | sed "s/BBBBB/$1 $2/g" | sed "s/EEEEE/$3 $4/g" > $specpy
|
||||
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | sed -n '2,$p'
|
||||
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
|
@ -1,114 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available MSAS maritime data in the A-II database over a specified
|
||||
# range of times. The data is output to stdout as ASCII. Each line is one
|
||||
# time/platform combination. The individual data items are comma delimited.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/18/2014 3591 nabowle Initial modification. Replace UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("sfcobs")
|
||||
req.setParameters("stationId","timeObs","elevation","seaLevelPress",
|
||||
"stationPress","temperature","dewpoint","windDir",
|
||||
"windSpeed","pressChange3Hour" )
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if not geometries :
|
||||
# print "No data available."
|
||||
return
|
||||
|
||||
msg = ""
|
||||
for geo in geometries :
|
||||
lon = geo.getGeometry().x
|
||||
lat = geo.getGeometry().y
|
||||
|
||||
sName = geo.getString("stationId")
|
||||
tobs = geo.getNumber("timeObs")
|
||||
elev = geo.getNumber("elevation")
|
||||
msl = geo.getNumber("seaLevelPress")
|
||||
p = geo.getNumber("stationPress")
|
||||
temp = geo.getNumber("temperature")
|
||||
dpt = geo.getNumber("dewpoint")
|
||||
dir = geo.getNumber("windDir")
|
||||
spd = geo.getNumber("windSpeed")
|
||||
pchg = geo.getNumber("pressChange3Hour")
|
||||
|
||||
|
||||
msg += sName + ","
|
||||
msg += str(tobs/1000) + ","
|
||||
msg += "%.4f"%lat + ","
|
||||
msg += "%.4f"%lon + ","
|
||||
msg += "%.0f"%elev + ","
|
||||
msg += "%.2f"%msl + ","
|
||||
msg += "%.2f"%p + ","
|
||||
msg += "%.1f"%temp + ","
|
||||
msg += "%.1f"%dpt + ","
|
||||
msg += "%.0f"%dir + ","
|
||||
msg += "%.1f"%spd + ","
|
||||
msg += "%.0f"%pchg + "\n"
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,210 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available Laps metar data in the A-II database over a specified range
|
||||
# of times within a specifed area. The data is output to stdout as ASCII.
|
||||
# Each line is one time/station combination. The individual data items are comma
|
||||
# delimited.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/15/2014 3593 nabowle Initial modification. Fix index issues on 2D parameters.
|
||||
# 09/15/2014 3593 nabowle Replace UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
parser.add_argument("--lat-min", action="store", dest="latMin", type=float,
|
||||
help="Minimum latitude", default=0.0, metavar="lat")
|
||||
parser.add_argument("--lat-max", action="store", dest="latMax", type=float,
|
||||
help="Maximum latitude", default=90.0, metavar="lat")
|
||||
parser.add_argument("--lon-min", action="store", dest="lonMin", type=float,
|
||||
help="Minimum longitude", default=-180.0, metavar="lon")
|
||||
parser.add_argument("--lon-max", action="store", dest="lonMax", type=float,
|
||||
help="Maximum longitude", default=180.0, metavar="lon")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
# The multi-dimensional parameters.
|
||||
PRES_PARAMS = set(["presWeather"])
|
||||
SKY_PARAMS = set(["skyCover", "skyLayerBase"])
|
||||
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
latMin = user_args.latMin
|
||||
latMax = user_args.latMax
|
||||
lonMin = user_args.lonMin
|
||||
lonMax = user_args.lonMax
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("obs")
|
||||
req.setParameters("stationName","timeObs","wmoId","autoStationType",
|
||||
"elevation","reportType","presWeather","visibility","skyCover",
|
||||
"skyLayerBase","altimeter","seaLevelPress","pressChange3Hour",
|
||||
"pressChangeChar","temperature","tempFromTenths","dewpoint",
|
||||
"dpFromTenths","windDir","windSpeed","windGust","maxTemp24Hour",
|
||||
"minTemp24Hour""","precip1Hour","precip3Hour","precip6Hour",
|
||||
"precip24Hour")
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if not geometries :
|
||||
# print "No data available."
|
||||
return
|
||||
|
||||
msg = ""
|
||||
wx = []
|
||||
cvr = []
|
||||
bas = []
|
||||
for geoData in geometries:
|
||||
if set(geoData.getParameters()) & PRES_PARAMS :
|
||||
wx.append(geoData.getString("presWeather"))
|
||||
continue
|
||||
if set(geoData.getParameters()) & SKY_PARAMS :
|
||||
cvr.append(geoData.getString("skyCover"))
|
||||
bas.append(geoData.getNumber("skyLayerBase"))
|
||||
continue
|
||||
|
||||
lon = geoData.getGeometry().x
|
||||
lat = geoData.getGeometry().y
|
||||
if lon < lonMin or lon > lonMax or lat < latMin or lat > latMax:
|
||||
wx = []
|
||||
cvr = []
|
||||
bas = []
|
||||
continue
|
||||
|
||||
sName = geoData.getString("stationName")
|
||||
tobs = geoData.getNumber("timeObs")
|
||||
elev = geoData.getNumber("elevation")
|
||||
ista = geoData.getNumber("wmoId")
|
||||
atype = geoData.getString("autoStationType")
|
||||
repTyp = geoData.getString("reportType")
|
||||
vis = geoData.getNumber("visibility")
|
||||
alt = geoData.getNumber("altimeter")
|
||||
msl = geoData.getNumber("seaLevelPress")
|
||||
pchg = geoData.getNumber("pressChange3Hour")
|
||||
pchr = geoData.getString("pressChangeChar")
|
||||
temp = geoData.getNumber("temperature")
|
||||
t10 = geoData.getNumber("tempFromTenths")
|
||||
dpt = geoData.getNumber("dewpoint")
|
||||
td10 = geoData.getNumber("dpFromTenths")
|
||||
dir = geoData.getNumber("windDir")
|
||||
spd = geoData.getNumber("windSpeed")
|
||||
gust = geoData.getNumber("windGust")
|
||||
tmx = geoData.getNumber("maxTemp24Hour")
|
||||
tmn = geoData.getNumber("minTemp24Hour")
|
||||
pr1 = geoData.getNumber("precip1Hour")
|
||||
pr3 = geoData.getNumber("precip3Hour")
|
||||
pr6 = geoData.getNumber("precip6Hour")
|
||||
pr24 = geoData.getNumber("precip24Hour")
|
||||
|
||||
|
||||
msg += sName + ","
|
||||
msg += str(tobs/1000) + ","
|
||||
msg += "%.4f"%lat + ","
|
||||
msg += "%.4f"%lon + ","
|
||||
msg += "%.0f"%elev + ","
|
||||
if ista < 0 :
|
||||
msg += "-99,"
|
||||
else :
|
||||
msg += str(ista) + ","
|
||||
msg += atype + " ,"
|
||||
msg += repTyp + " ,"
|
||||
msg += wx[0] + " ,"
|
||||
msg += "%.3f"%vis + ","
|
||||
|
||||
|
||||
msg += cvr[0];
|
||||
kk = 5
|
||||
while kk > 0 and cvr[0+kk] == "" :
|
||||
kk -= 1
|
||||
k = 1
|
||||
while k <= kk :
|
||||
msg += "|" + cvr[0+k];
|
||||
k += 1
|
||||
msg += " ,"
|
||||
msg += "%.1f"%bas[0];
|
||||
kk = 5
|
||||
while kk > 0 and bas[0+kk] < -9998 :
|
||||
kk -= 1
|
||||
k = 1
|
||||
while k <= kk :
|
||||
msg += "|" + "%.1f"%bas[0+k];
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.2f"%alt + ","
|
||||
msg += "%.2f"%msl + ","
|
||||
msg += "%.0f"%pchg + ","
|
||||
msg += pchr + " ,"
|
||||
msg += "%.1f"%temp + ","
|
||||
msg += "%.1f"%t10 + ","
|
||||
msg += "%.1f"%dpt + ","
|
||||
msg += "%.1f"%td10 + ","
|
||||
msg += "%.0f"%dir + ","
|
||||
msg += "%.1f"%spd + ","
|
||||
msg += "%.1f"%gust + ","
|
||||
msg += "%.1f"%tmx + ","
|
||||
msg += "%.1f"%tmn + ","
|
||||
msg += "%.2f"%pr1 + ","
|
||||
msg += "%.2f"%pr3 + ","
|
||||
msg += "%.2f"%pr6 + ","
|
||||
msg += "%.2f"%pr24 + "\n"
|
||||
|
||||
wx = []
|
||||
cvr = []
|
||||
bas = []
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,189 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
#
|
||||
# A script wrapper around a UEngine call that is meant to get all available
|
||||
# metar data in the A-II database over a specified range of times. The data
|
||||
# is output to stdout as ASCII. Each line is one time/station combination.
|
||||
# The individual data items are comma delimited. This version can adapt to
|
||||
# use apython stub that calls the data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2gtmtr.csh {p} {c} yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm
|
||||
#
|
||||
# The literal p and c flags are optional. The p flag means preserve
|
||||
# the final version of the python submitted to the UEngine instead of
|
||||
# cleaning it up. The path to the finalized python is /tmp/a2gtmtrNNNNN.py
|
||||
# where NNNNN is a unix process id. The c flag means to retreive the
|
||||
# Laps set of variables, instead of the default MSAS set.
|
||||
#
|
||||
# Not using the 'c' format, the MSAS set of variables, outputs the following
|
||||
# variables for each line:
|
||||
#
|
||||
# stationName,timeObs,latitude,longitude,elevation,wmoId,autoStationType
|
||||
# seaLevelPress,temperature,dewpoint,windDir,windSpeed,altimeter
|
||||
#
|
||||
# Using the 'c' format, the Laps set of variables, outputs the following
|
||||
# variables for each line:
|
||||
#
|
||||
# stationName,timeObs,latitude,longitude,elevation,wmoId,autoStationType
|
||||
# reportType,presWeather,visibility,skyCover,skyLayerBase,altimeter
|
||||
# seaLevelPress,pressChange3Hour,pressChangeChar,temperature,tempFromTenths
|
||||
# dewpoint,dpFromTenths,windDir,windSpeed,windGust,maxTemp24Hour,
|
||||
# minTemp24Hour,precip1Hour,precip3Hour,precip6Hour,precip24Hour
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/15/2014 3593 nabowle Initial modification to properly use DAF version of the script.
|
||||
#
|
||||
#
|
||||
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
if ( ! $?FXA_LOCAL_SITE ) set FXA_LOCAL_SITE = xxxx
|
||||
if ( ! $?FXA_INGEST_SITE ) set FXA_INGEST_SITE = $FXA_LOCAL_SITE
|
||||
#
|
||||
set stubbase = a2gtmtrStub.py
|
||||
if ( "$1" == "c" ) then
|
||||
shift
|
||||
set stubbase = a2cvmtrStub.py
|
||||
endif
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./$stubbase ) then
|
||||
set stubpy = ./$stubbase
|
||||
else if ( -e $mydir/$stubbase ) then
|
||||
set stubpy = $mydir/$stubbase
|
||||
else if ( -e $FXA_HOME/src/dm/metar/$stubbase ) then
|
||||
set stubpy = $FXA_HOME/src/dm/metar/$stubbase
|
||||
else if ( -e $FXA_HOME/bin/$stubbase ) then
|
||||
set stubpy = $FXA_HOME/bin/$stubbase
|
||||
else
|
||||
bash -c "echo could not find $stubbase 1>&2"
|
||||
exit
|
||||
endif
|
||||
|
||||
#
|
||||
# Attempt to use current D-2D localization to determine lat/lon bounds.
|
||||
#
|
||||
set ltmn = 0
|
||||
set ltmx = 90
|
||||
set lnmn = -180
|
||||
set lnmx = 180
|
||||
set locDir = $FXA_HOME/data/localizationDataSets/$FXA_INGEST_SITE
|
||||
while ( -e $locDir/CenterPoint.dat )
|
||||
grep conusScale $locDir/scaleInfo.txt >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set ltmn = 15
|
||||
set ltmx = 60
|
||||
set lnmn = -145
|
||||
set lnmx = -55
|
||||
break
|
||||
endif
|
||||
set cenLoc = `cat $locDir/CenterPoint.dat`
|
||||
if ( $#cenLoc != 2 ) break
|
||||
set cenlat = `echo $cenLoc[1] | cut '-d.' -f1`
|
||||
set cenlat = `( @ x = $cenlat + 0 >& /dev/null ; echo $x )`
|
||||
if ( "$cenlat" == "" ) break
|
||||
set cenlon = `echo $cenLoc[2] | cut '-d.' -f1`
|
||||
set cenlon = `( @ x = $cenlon + 0 >& /dev/null ; echo $x )`
|
||||
if ( "$cenlon" == "" ) break
|
||||
if ( $cenlat > 75 ) then
|
||||
set ltmn = 55
|
||||
break
|
||||
endif
|
||||
if ( $cenlat > 50 ) then
|
||||
@ ltmn = $cenlat - 20
|
||||
break
|
||||
endif
|
||||
@ ltmn = $cenlat - 20
|
||||
@ ltmx = $cenlat + 20
|
||||
@ lnmn = $cenlon - 20
|
||||
@ 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
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
set specpy = /tmp/a2gtmtr${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
cat $stubpy | sed "s/LTMN/$ltmn/g" | sed "s/LTMX/ /g" | \
|
||||
sed "s/LNMN/$lnmn/g" | sed "s/LNMX/$lnmx/g" | \
|
||||
sed "s/BBBBB/$1 $2/g" | sed "s/EEEEE/$3 $4/g" > $specpy
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | sed -n '3,$p'
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
#
|
|
@ -1,137 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available metar data in the A-II database over a specified range of
|
||||
# times within a specifed area. The data is output to stdout as ASCII.
|
||||
# Each line is one time/station combination. The individual data items are comma
|
||||
# delimited.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/15/2014 3593 nabowle Initial modification. Fix losing first record.
|
||||
# 09/15/2014 3593 nabowle Replace UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
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")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
parser.add_argument("--lat-min", action="store", dest="latMin", type=float,
|
||||
help="Minimum latitude", default=0.0, metavar="lat")
|
||||
parser.add_argument("--lat-max", action="store", dest="latMax", type=float,
|
||||
help="Maximum latitude", default=90.0, metavar="lat")
|
||||
parser.add_argument("--lon-min", action="store", dest="lonMin", type=float,
|
||||
help="Minimum longitude", default=-180.0, metavar="lon")
|
||||
parser.add_argument("--lon-max", action="store", dest="lonMax", type=float,
|
||||
help="Maximum longitude", default=180.0, metavar="lon")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
latMin = user_args.latMin
|
||||
latMax = user_args.latMax
|
||||
lonMin = user_args.lonMin
|
||||
lonMax = user_args.lonMax
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
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" )
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if not geometries :
|
||||
# print "No data available."
|
||||
return
|
||||
|
||||
msg = ""
|
||||
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")
|
||||
tobs = geo.getNumber("timeObs")
|
||||
elev = geo.getNumber("elevation")
|
||||
atype = geo.getString("autoStationType")
|
||||
msl = geo.getNumber("seaLevelPress")
|
||||
temp = geo.getNumber("temperature")
|
||||
dpt = geo.getNumber("dewpoint")
|
||||
dir = geo.getNumber("windDir")
|
||||
spd = geo.getNumber("windSpeed")
|
||||
alt = geo.getNumber("altimeter")
|
||||
|
||||
msg += sName + ","
|
||||
msg += str(tobs/1000) + ","
|
||||
msg += "%.4f"%lat + ","
|
||||
msg += "%.4f"%lon + ","
|
||||
msg += "%.0f"%elev + ","
|
||||
msg += str(ista) + ","
|
||||
msg += atype + " ,"
|
||||
msg += "%.2f"%msl + ","
|
||||
msg += "%.1f"%temp + ","
|
||||
msg += "%.1f"%dpt + ","
|
||||
msg += "%.0f"%dir + ","
|
||||
msg += "%.1f"%spd + ","
|
||||
msg += "%.2f"%alt + "\n"
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,129 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
#
|
||||
# A script wrapper around a UEngine call that is meant to get all available
|
||||
# profiler data in the A-II database over a specified range of times. The
|
||||
# data is output to stdout as ASCII. Each line is one time/station combination.
|
||||
# The individual data variables are comma delimited, and when what is returned
|
||||
# for a data item is a profile, each item in the profile is vertical bar
|
||||
# delimited. This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2gtprof.csh {p} yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm
|
||||
#
|
||||
# The literal p flag is optional. The p flag means preserve
|
||||
# the final version of the python submitted to the UEngine instead of
|
||||
# cleaning it up. The path to the finalized python is /tmp/a2gtprofNNNNN.py
|
||||
# where NNNNN is a unix process id.
|
||||
#
|
||||
# The following data variables are output for each line:
|
||||
#
|
||||
# profilerId,validTime,latitude,longitude,elevation,pressure,
|
||||
# temperature,relHumidity,windDirSfc,windSpeedSfc,rainRate,submode,
|
||||
# height,levelMode,uComponent,vComponent,wComponent,
|
||||
# peakPower,HorizSpStdDev,VertSpStdDev,uvQualityCode,consensusNum
|
||||
#
|
||||
# Everything from height onward are profiles.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Oct 6, 2014 3594 nabowle Initial modification. Handle DAF version.
|
||||
#
|
||||
#
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
if ( ! $?FXA_LOCAL_SITE ) set FXA_LOCAL_SITE = xxxx
|
||||
if ( ! $?FXA_INGEST_SITE ) set FXA_INGEST_SITE = $FXA_LOCAL_SITE
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
set stubbase = a2gtprofStub.py
|
||||
if ( -e ./$stubbase ) then
|
||||
set stubpy = ./$stubbase
|
||||
else if ( -e $mydir/$stubbase ) then
|
||||
set stubpy = $mydir/$stubbase
|
||||
else if ( -e $FXA_HOME/src/dm/profiler/$stubbase ) then
|
||||
set stubpy = $FXA_HOME/src/dm/profiler/$stubbase
|
||||
else if ( -e $FXA_HOME/bin/$stubbase ) then
|
||||
set stubpy = $FXA_HOME/bin/$stubbase
|
||||
else
|
||||
bash -c "echo could not find $stubbase 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
/awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4"
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
set specpy = /tmp/a2gtprof${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
cat $stubpy | sed "s/BBBBB/$1 $2/g" | sed "s/EEEEE/$3 $4/g" > $specpy
|
||||
|
||||
cd $UE_BIN_PATH
|
||||
#uengine -r python < $specpy
|
||||
( uengine -r python < $specpy ) | grep -v '<' | sed -n '2,$p'
|
||||
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available profiler data in the A-II database over a specified range
|
||||
# of times. The data is output to stdout as ASCII. Each line is one
|
||||
# time/station combination. The individual data variables are comma delimited,
|
||||
# and when what is returned for a data item is a profile, each item in the
|
||||
# profile is vertical bar delimited
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Oct 6, 2014 3594 nabowle Initial modification. Replace UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
# The multi-dimensional parameters.
|
||||
MULTI_DIM_PARAMS = set(['vComponent', 'uComponent', 'peakPower',
|
||||
'levelMode', 'uvQualityCode', 'consensusNum',
|
||||
'HorizSpStdDev', 'wComponent', 'height',
|
||||
'VertSpStdDev'])
|
||||
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("profiler")
|
||||
req.setParameters('numProfLvls', 'elevation', 'windDirSfc', 'validTime',
|
||||
'windSpeedSfc', 'pressure', 'submode', 'relHumidity',
|
||||
'profilerId', 'rainRate', 'temperature')
|
||||
req.getParameters().extend(MULTI_DIM_PARAMS)
|
||||
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if not geometries :
|
||||
# print "couldn't get data"
|
||||
return
|
||||
|
||||
|
||||
subgeos = []
|
||||
msg = ""
|
||||
for geoData in geometries :
|
||||
if set(geoData.getParameters()) & MULTI_DIM_PARAMS :
|
||||
subgeos.append(geoData)
|
||||
continue
|
||||
|
||||
elev = geoData.getNumber("elevation")
|
||||
msg += geoData.getString("profilerId") + ","
|
||||
msg += str(geoData.getNumber("validTime")/1000) + ","
|
||||
msg += "%.4f"%geoData.getGeometry().y + ","
|
||||
msg += "%.4f"%geoData.getGeometry().x + ","
|
||||
msg += "%.0f"%elev + ","
|
||||
msg += "%.1f"%geoData.getNumber("pressure") + ","
|
||||
msg += "%.1f"%geoData.getNumber("temperature") + ","
|
||||
msg += "%.1f"%geoData.getNumber("relHumidity") + ","
|
||||
msg += "%.0f"%geoData.getNumber("windDirSfc") + ","
|
||||
msg += "%.1f"%geoData.getNumber("windSpeedSfc") + ","
|
||||
msg += "%.1f"%geoData.getNumber("rainRate") + ","
|
||||
msg += str(geoData.getNumber("submode")) + ","
|
||||
|
||||
kk = len(subgeos)
|
||||
# msg += str(kk) + ","
|
||||
|
||||
subgeos[0].getString("consensusNum")
|
||||
if kk>0 : msg += "%.0f"%(subgeos[0].getNumber("height")-elev)
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.0f"%(subgeos[k].getNumber("height")-elev)
|
||||
k += 1
|
||||
msg += ","
|
||||
if kk>0 : msg += str(subgeos[0].getNumber("levelMode"))
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + str(subgeos[k].getNumber("levelMode"))
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
if kk>0 : msg += "%.1f"%subgeos[0].getNumber("uComponent")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%subgeos[k].getNumber("uComponent")
|
||||
k += 1
|
||||
msg += ","
|
||||
if kk>0 : msg += "%.1f"%subgeos[0].getNumber("vComponent")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%subgeos[k].getNumber("vComponent")
|
||||
k += 1
|
||||
msg += ","
|
||||
if kk>0 : msg += "%.2f"%subgeos[0].getNumber("wComponent")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.2f"%subgeos[k].getNumber("wComponent")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
if kk>0 : msg += "%.1f"%subgeos[0].getNumber("peakPower")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%subgeos[k].getNumber("peakPower")
|
||||
k += 1
|
||||
msg += ","
|
||||
if kk>0 : msg += "%.1f"%subgeos[0].getNumber("HorizSpStdDev")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%subgeos[k].getNumber("HorizSpStdDev")
|
||||
k += 1
|
||||
msg += ","
|
||||
if kk>0 : msg += "%.1f"%subgeos[0].getNumber("VertSpStdDev")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%subgeos[k].getNumber("VertSpStdDev")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
if kk>0 : msg += subgeos[0].getString("uvQualityCode")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + subgeos[k].getString("uvQualityCode")
|
||||
k += 1
|
||||
msg += ","
|
||||
if kk>0 : msg += subgeos[0].getString("consensusNum")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + subgeos[k].getString("consensusNum")
|
||||
k += 1
|
||||
msg += "\n"
|
||||
subgeos = []
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Binary file not shown.
|
@ -1,232 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
#
|
||||
# A script wrapper that is meant to get data for a single radar product
|
||||
# from the A-II database. The result is output to stdout as ASCII.
|
||||
# The first line has the dimensions of the data, the volume scan time,
|
||||
# 'radial' or 'raster', elevation number, a product description, the tilt
|
||||
# angle or layer, and the VCP. The second line contains the level labels,
|
||||
# and the third line has a partial list of the product dependent parameters.
|
||||
# If the product is radial, the fourth line contains a list of the
|
||||
# radial angles. Otherwise each line after that has data for one
|
||||
# radial/row, as a sequence of space delimited plain decimal integers.
|
||||
#
|
||||
# The product description includes the mnemonic, the resolution, and
|
||||
# the bit depth. If the azimuthal resolution is finer than 1 degree,
|
||||
# the product description will additionally include a note of that.
|
||||
# The product dependent parameters as defined in an 88D RPG product
|
||||
# are 28 signed two byte integers. The list here includes those
|
||||
# with indices from 17 to 26 (C indexing).
|
||||
#
|
||||
# Note that for now, this is only designed to return data for image
|
||||
# products.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2advrad.csh {p} {x} radar msgcode {elev} date time {slop}
|
||||
#
|
||||
# p - A literal p. (optional)
|
||||
# x - A literal x. (optional) Expanded set of header information.
|
||||
# radar - four character radar id
|
||||
# msgcode - RPG message code
|
||||
# elev - tilt angle/layer value. defaults to 0.
|
||||
# date - yyyy-mm-dd
|
||||
# time - hh:mm
|
||||
# slop - seconds of slop either side, defaults to 60
|
||||
#
|
||||
# The tilt angles specified are primary tilt angles for a range of tilts.
|
||||
#
|
||||
# The literal p option means preserve the final version of the python
|
||||
# submitted to the UEngine instead of cleaning it up. The path to the
|
||||
# finalized python is /tmp/a2advradNNNNN.py where NNNNN is a unix process id.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/07/2014 3393 nabowle Initial modification. Passes parameters straight to
|
||||
# non-uengine script instead of sed. Remove use of gtasUtil
|
||||
# if not using the uengine stub.
|
||||
#
|
||||
#
|
||||
set rmpy = yes
|
||||
set fff = ""
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
if ( "$1" == "x" ) then
|
||||
set fff = "x"
|
||||
shift
|
||||
endif
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
set fxa_home = $FXA_HOME
|
||||
if ( $?STAGING ) then
|
||||
set fxa_home = $STAGING/D-2D
|
||||
endif
|
||||
|
||||
#
|
||||
# Locate python stub that we will modify to create the final UEngine script
|
||||
#
|
||||
if ( -e ./a2advradStub.py ) then
|
||||
set stubpy = ./a2advradStub.py
|
||||
else if ( -e $mydir/a2advradStub.py ) then
|
||||
set stubpy = $mydir/a2advradStub.py
|
||||
else if ( -e $fxa_home/src/dm/radar/a2advradStub.py ) then
|
||||
set stubpy = $fxa_home/src/dm/radar/a2advradStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2advradStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2advradStub.py
|
||||
else
|
||||
bash -c "echo could not find a2advradStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set method = "daf"
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
endif
|
||||
|
||||
#
|
||||
# Locate file that lets us provide a description of the data set.
|
||||
#
|
||||
if ( -e ./msgCodeSeds.txt ) then
|
||||
set mctrans = $PWD/msgCodeSeds.txt
|
||||
else if ( -e $mydir/msgCodeSeds.txt ) then
|
||||
set mctrans = $mydir/msgCodeSeds.txt
|
||||
else if ( -e $fxa_home/src/dm/radar/msgCodeSeds.txt ) then
|
||||
set mctrans = $fxa_home/src/dm/radar/msgCodeSeds.txt
|
||||
else if ( -e $FXA_HOME/data/msgCodeSeds.txt ) then
|
||||
set mctrans = $FXA_HOME/data/msgCodeSeds.txt
|
||||
else
|
||||
bash -c "echo could not find msgCodeSeds.txt 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
#
|
||||
set rrr = $1
|
||||
set mmm = $2
|
||||
shift
|
||||
shift
|
||||
set ddd = `echo $mmm | sed -f $mctrans | cut '-d|' -f2 `
|
||||
|
||||
set eee = `echo $1 | grep -v '.*-'`
|
||||
if ( "$eee" != "" ) shift
|
||||
set slop = `echo $3 | grep '[0-9]'`
|
||||
if ( "$slop" == "" ) set slop = 60
|
||||
|
||||
|
||||
if ( "$method" == "daf" ) then
|
||||
set datetime = $1' '$2
|
||||
set opts = ""
|
||||
|
||||
if ( "$eee" != "" ) then
|
||||
set opts = "$opts --angle $eee"
|
||||
endif
|
||||
|
||||
if ( "$fff" == "x" ) then
|
||||
set opts = "$opts --extended"
|
||||
endif
|
||||
|
||||
/awips2/python/bin/python $stubpy --radar $rrr --code $mmm --datetime="${datetime}" --slop $slop --description="${ddd}" $opts
|
||||
else
|
||||
#
|
||||
# Get program that can do math with ascii time string, then use this to
|
||||
# properly encode range of times for which we look for data.
|
||||
#
|
||||
if ( -x ./gtasUtil ) then
|
||||
set gtasUtil = ./gtasUtil
|
||||
else if ( -x $mydir/gtasUtil ) then
|
||||
set gtasUtil = $mydir/gtasUtil
|
||||
else if ( -x $fxa_home/src/dm/point/gtasUtil ) then
|
||||
set gtasUtil = $fxa_home/src/dm/point/gtasUtil
|
||||
else if ( -x $FXA_HOME/bin/gtasUtil ) then
|
||||
set gtasUtil = $FXA_HOME/bin/gtasUtil
|
||||
else
|
||||
bash -c "echo could not find gtasUtil executable 1>&2"
|
||||
exit
|
||||
endif
|
||||
|
||||
set aaa = `$gtasUtil = $1 $2 -$slop`
|
||||
set bbb = `$gtasUtil = $1 $2 $slop`
|
||||
|
||||
#
|
||||
# Modify the text of special tags in stub to create finalized script.
|
||||
#
|
||||
set specpy = /tmp/a2advrad${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
if ( "$eee" == "" ) then
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | sed "s/MMMM/$mmm/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | sed "s/FFF/$fff/g" | \
|
||||
sed "s/DDDDD/$ddd/g" | sed 's/^.*EEEE.*$//g' >> $specpy
|
||||
else
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | sed "s/MMMM/$mmm/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | sed "s/FFF/$fff/g" | \
|
||||
sed "s/DDDDD/$ddd/g" | sed "s/EEEE/$eee/g" >> $specpy
|
||||
endif
|
||||
#
|
||||
# Submit the temporary python script stripping xml stuff, then remove it
|
||||
#
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | sed 's/>/>/g' | \
|
||||
sed 's/</</g' | grep -v Response
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
#
|
|
@ -1,128 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
#
|
||||
# Gets data for a single radar product from the A-II database. The result is
|
||||
# output to stdout as ASCII. This uses a data-specific Request/Response instead
|
||||
# of the DataAccessLayer in order to preserve data-genericness of the interface.
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/13/2014 3393 nabowle Initial modification. Replaces UEngine
|
||||
# with a custom Request/Response.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import a2radcommon
|
||||
|
||||
def get_args():
|
||||
parser = a2radcommon.get_args_parser()
|
||||
parser.add_argument("--extended", action='store_true', default=False,
|
||||
dest="extended", help="Output the extended header.")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
records = a2radcommon.send_request(user_args)
|
||||
|
||||
if not records:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
description = user_args.description
|
||||
if not description:
|
||||
print >> sys.stderr, "Description not provided"
|
||||
return
|
||||
|
||||
format = user_args.extended
|
||||
|
||||
print_record(records[0], format, description)
|
||||
|
||||
|
||||
def print_record(record, format, description):
|
||||
idra = record.getHdf5Data()
|
||||
|
||||
rdat,azdat,depVals,threshVals = a2radcommon.get_hdf5_data(idra)
|
||||
|
||||
if not rdat:
|
||||
# Graphic, XY
|
||||
# print "Unsupported radar format"
|
||||
return
|
||||
|
||||
dim = rdat.getDimension()
|
||||
if dim != 2:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
yLen = rdat.getSizes()[0]
|
||||
xLen = rdat.getSizes()[1]
|
||||
|
||||
# byte[] -- the raw data
|
||||
array = rdat.getByteData()
|
||||
arraySize = len(array)
|
||||
if xLen * yLen != arraySize:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
# get data for azimuth angles if we have them.
|
||||
if azdat :
|
||||
azVals = azdat.getFloatData()
|
||||
azValsLen = len(azVals)
|
||||
if yLen != azValsLen:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
msg = a2radcommon.get_header(record, format, xLen, yLen, azdat, description)
|
||||
|
||||
msg += a2radcommon.encode_thresh_vals(threshVals)
|
||||
msg += a2radcommon.encode_dep_vals(depVals)
|
||||
if azdat :
|
||||
msg += a2radcommon.encode_radial(azVals)
|
||||
msg += encode_data(yLen, xLen, array)
|
||||
|
||||
print msg
|
||||
|
||||
|
||||
def encode_data(yLen, xLen, array):
|
||||
nxy = yLen*xLen
|
||||
j = 0
|
||||
msg = ""
|
||||
while j<nxy :
|
||||
i = 0
|
||||
while i<xLen :
|
||||
if array[i+j]<0 :
|
||||
msg += str(256+array[i+j]) + " "
|
||||
else :
|
||||
msg += str(array[i+j]) + " "
|
||||
i += 1
|
||||
msg += "\n"
|
||||
j += xLen
|
||||
return msg[0:-1]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,257 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
#
|
||||
# A script wrapper that is meant to get data for a single radar product
|
||||
# from the A-II database. The result is output to stdout as ASCII.
|
||||
# The first line has the dimensions of the data, the volume scan time,
|
||||
# 'radial' or 'raster', elevation number, a product description, the tilt
|
||||
# angle or layer, and the VCP. The second line contains the level labels,
|
||||
# and the third line has a partial list of the product dependent parameters.
|
||||
# If the product is radial, the fourth line contains a list of the radial
|
||||
# angles. Otherwise each line after that has data for one radial/row.
|
||||
# The data for each radial/row undergoes second order compression.
|
||||
# Each pixel value of 0 or 255 is encoded as @ or #, respectively. Otherwise
|
||||
# the first pixel on the row and any pixel that is more than 20 counts
|
||||
# different than the previous one is encoded as two hex digits. Pixels the
|
||||
# same as the previous are encoded as a period, pixels from 1 to 20 counts less
|
||||
# than the previous are encoded as G through Z, and pixels from 1 to 20 counts
|
||||
# more than the previous are encoded as g through z. There are no delimeters
|
||||
# between the encoding for each pixel.
|
||||
#
|
||||
# The product description includes the mnemonic, the resolution, and
|
||||
# the bit depth. If the azimuthal resolution is finer than 1 degree,
|
||||
# the product description will additionally include a note of that.
|
||||
# The product dependent parameters as defined in an 88D RPG product
|
||||
# are 28 signed two byte integers. The list here includes those
|
||||
# with indices from 17 to 26 (C indexing).
|
||||
#
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Note that for now, this is only designed to return data for image
|
||||
# products.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2gtrad.csh {p} {x} {h|i} radar msgcode {elev} date time {slop}
|
||||
#
|
||||
# p - A literal p. (optional)
|
||||
# x - A literal x. (optional) Expanded set of header information.
|
||||
# h|i - (optional) A literal h or literal i.
|
||||
# Output pure undelimited hex or delimited integer values.
|
||||
# radar - four character radar id
|
||||
# msgcode - RPG message code
|
||||
# elev - tilt angle/layer value. defaults to 0.
|
||||
# date - yyyy-mm-dd
|
||||
# time - hh:mm
|
||||
# slop - seconds of slop either side, defaults to 60
|
||||
#
|
||||
# The tilt angles specified are primary tilt angles for a range of tilts.
|
||||
#
|
||||
# The literal p option means preserve the final version of the python
|
||||
# submitted to the UEngine instead of cleaning it up. The path to the
|
||||
# finalized python is /tmp/a2gtradNNNNN.py where NNNNN is a unix process id.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/07/2014 3393 nabowle Initial modification. Passes parameters straight to
|
||||
# non-uengine script instead of sed. Remove use of gtasUtil
|
||||
# if not using the uengine stub.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
set rmpy = yes
|
||||
set fff = ""
|
||||
set encoding = 2
|
||||
while (1)
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
else if ( "$1" == "x" ) then
|
||||
set fff = "x"
|
||||
shift
|
||||
else if ( "$1" == "h" ) then
|
||||
set encoding = 1
|
||||
shift
|
||||
else if ( "$1" == "i" ) then
|
||||
set encoding = 0
|
||||
shift
|
||||
else
|
||||
break
|
||||
endif
|
||||
end
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
set fxa_home = $FXA_HOME
|
||||
if ( $?STAGING ) then
|
||||
set fxa_home = $STAGING/D-2D
|
||||
endif
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./a2gtradStub.py ) then
|
||||
set stubpy = ./a2gtradStub.py
|
||||
else if ( -e $mydir/a2gtradStub.py ) then
|
||||
set stubpy = $mydir/a2gtradStub.py
|
||||
else if ( -e $fxa_home/src/dm/radar/a2gtradStub.py ) then
|
||||
set stubpy = $fxa_home/src/dm/radar/a2gtradStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2gtradStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2gtradStub.py
|
||||
else
|
||||
bash -c "echo could not find a2gtradStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set method = "daf"
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
endif
|
||||
#
|
||||
# Locate file that lets us provide a description of the data set.
|
||||
#
|
||||
if ( -e ./msgCodeSeds.txt ) then
|
||||
set mctrans = $PWD/msgCodeSeds.txt
|
||||
else if ( -e $mydir/msgCodeSeds.txt ) then
|
||||
set mctrans = $mydir/msgCodeSeds.txt
|
||||
else if ( -e $fxa_home/src/dm/radar/msgCodeSeds.txt ) then
|
||||
set mctrans = $fxa_home/src/dm/radar/msgCodeSeds.txt
|
||||
else if ( -e $FXA_HOME/data/msgCodeSeds.txt ) then
|
||||
set mctrans = $FXA_HOME/data/msgCodeSeds.txt
|
||||
else
|
||||
bash -c "echo could not find msgCodeSeds.txt 1>&2"
|
||||
exit
|
||||
endif
|
||||
#
|
||||
#
|
||||
set rrr = $1
|
||||
set mmm = $2
|
||||
shift
|
||||
shift
|
||||
set ddd = `echo $mmm | sed -f $mctrans | cut '-d|' -f2 `
|
||||
|
||||
set eee = `echo $1 | grep -v '.*-'`
|
||||
if ( "$eee" != "" ) shift
|
||||
set slop = `echo $3 | grep '[0-9]'`
|
||||
if ( "$slop" == "" ) set slop = 60
|
||||
|
||||
if ( "$method" == "daf" ) then
|
||||
set datetime = $1' '$2
|
||||
set opts = ""
|
||||
|
||||
if ( "$eee" != "" ) then
|
||||
set opts = "$opts --angle $eee"
|
||||
endif
|
||||
|
||||
if ( "$fff" == "x" ) then
|
||||
set opts = "$opts --extended"
|
||||
endif
|
||||
if ( "$encoding" == "1" ) then
|
||||
set opts = "$opts --hex"
|
||||
else if ( "$encoding" == "0" ) then
|
||||
set opts = "$opts --int"
|
||||
endif
|
||||
|
||||
/awips2/python/bin/python $stubpy --radar $rrr --code $mmm --datetime="${datetime}" --slop $slop --description="${ddd}" $opts
|
||||
else
|
||||
#
|
||||
# Get program that can do math with ascii time string, then use this to
|
||||
# properly encode range of times for which we look for data.
|
||||
#
|
||||
if ( -x ./gtasUtil ) then
|
||||
set gtasUtil = ./gtasUtil
|
||||
else if ( -x $mydir/gtasUtil ) then
|
||||
set gtasUtil = $mydir/gtasUtil
|
||||
else if ( -x $fxa_home/src/dm/point/gtasUtil ) then
|
||||
set gtasUtil = $fxa_home/src/dm/point/gtasUtil
|
||||
else if ( -x $FXA_HOME/bin/gtasUtil ) then
|
||||
set gtasUtil = $FXA_HOME/bin/gtasUtil
|
||||
else
|
||||
bash -c "echo could not find gtasUtil executable 1>&2"
|
||||
exit
|
||||
endif
|
||||
|
||||
set aaa = `$gtasUtil = $1 $2 -$slop`
|
||||
set bbb = `$gtasUtil = $1 $2 $slop`
|
||||
#
|
||||
# Modify the text of special tags in stub to create finalized script.
|
||||
#
|
||||
set specpy = /tmp/a2gtrad${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
if ( "$eee" == "" ) then
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | sed "s/MMMM/$mmm/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | sed "s/FFF/$fff/g" | \
|
||||
sed "s/DDDDD/$ddd/g" | sed 's/^.*EEEE.*$//g' | \
|
||||
sed "s/XXXXX/$encoding/g" >> $specpy
|
||||
else
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | sed "s/MMMM/$mmm/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | sed "s/FFF/$fff/g" | \
|
||||
sed "s/DDDDD/$ddd/g" | sed "s/EEEE/$eee/g" | \
|
||||
sed "s/XXXXX/$encoding/g" >> $specpy
|
||||
endif
|
||||
#
|
||||
# Submit the temporary python script stripping xml stuff, then remove it
|
||||
#
|
||||
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | sed 's/>/>/g' | \
|
||||
sed 's/</</g' | grep -v Response
|
||||
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
|
||||
#
|
|
@ -1,167 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
#
|
||||
# Gets data for a single radar product from the A-II database. The result is
|
||||
# output to stdout as ASCII. This uses a data-specific Request/Response instead
|
||||
# of the DataAccessLayer in order to preserve data-genericness of the interface.
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/11/2014 3393 nabowle Initial modification. Replaces UEngine
|
||||
# with a custom Request/Response.
|
||||
# 12/16/2014 3393 nabowle Fix negative k values.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import a2radcommon
|
||||
|
||||
def get_args():
|
||||
parser = a2radcommon.get_args_parser()
|
||||
parser.add_argument("--hex", action='store_const', dest="encoding",
|
||||
const=1, help="Hex encoding.", metavar="encoding")
|
||||
parser.add_argument("--int", action='store_const', dest="encoding",
|
||||
const=0, help="Delimited integer encoding.",
|
||||
metavar="encoding")
|
||||
parser.add_argument("--extended", action='store_true', default=False,
|
||||
dest="extended", help="Output the extended header.")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
records = a2radcommon.send_request(user_args)
|
||||
|
||||
if not records:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
description = user_args.description
|
||||
if not description:
|
||||
print >> sys.stderr, "Description not provided"
|
||||
return
|
||||
|
||||
format = user_args.extended
|
||||
encoding = user_args.encoding
|
||||
|
||||
print_record(records[0], format, description, encoding)
|
||||
|
||||
|
||||
def print_record(record, format, description, encoding):
|
||||
|
||||
idra = record.getHdf5Data()
|
||||
|
||||
rdat,azdat,depVals,threshVals = a2radcommon.get_hdf5_data(idra)
|
||||
|
||||
if not rdat:
|
||||
# Graphic, XY
|
||||
# print "Unsupported radar format"
|
||||
return
|
||||
|
||||
dim = rdat.getDimension()
|
||||
if dim != 2:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
yLen = rdat.getSizes()[0]
|
||||
xLen = rdat.getSizes()[1]
|
||||
|
||||
# byte[] -- the raw data
|
||||
array = rdat.getByteData()
|
||||
arraySize = len(array)
|
||||
if xLen * yLen != arraySize:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
# get data for azimuth angles if we have them.
|
||||
if azdat :
|
||||
azVals = azdat.getFloatData()
|
||||
azValsLen = len(azVals)
|
||||
if yLen != azValsLen:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
msg = a2radcommon.get_header(record, format, xLen, yLen, azdat, description)
|
||||
|
||||
msg += a2radcommon.encode_thresh_vals(threshVals)
|
||||
msg += a2radcommon.encode_dep_vals(depVals)
|
||||
if azdat :
|
||||
msg += a2radcommon.encode_radial(azVals)
|
||||
msg += encode_data(yLen, xLen, array, encoding)
|
||||
|
||||
print msg.strip()
|
||||
|
||||
|
||||
def encode_data(yLen, xLen, array, encoding):
|
||||
plus = " ghijklmnopqrstuvwxyz"
|
||||
minus = " GHIJKLMNOPQRSTUVWXYZ"
|
||||
nxy = yLen*xLen
|
||||
j = 0
|
||||
msg = ""
|
||||
while j<nxy :
|
||||
i = 0
|
||||
kk = array[i+j]
|
||||
if kk<0 : kk += 256
|
||||
if encoding == 0 :
|
||||
msg += str(kk)
|
||||
elif encoding == 1 :
|
||||
msg += "%2.2x"%kk
|
||||
elif kk == 0 :
|
||||
msg += "@"
|
||||
elif kk == 255 :
|
||||
msg += "#"
|
||||
else :
|
||||
msg += "%2.2x"%kk
|
||||
i += 1
|
||||
while i<xLen :
|
||||
k = array[i+j]
|
||||
if k<0 : k += 256
|
||||
if encoding == 0 :
|
||||
msg += " "+str(k)
|
||||
elif encoding == 1 :
|
||||
msg += "%2.2x"%k
|
||||
elif k==0 :
|
||||
msg += "@"
|
||||
elif k == 255 :
|
||||
msg += "#"
|
||||
elif k==kk :
|
||||
msg += "."
|
||||
elif k>kk+20 or k<kk-20 :
|
||||
msg += "%2.2x"%k
|
||||
elif k>kk :
|
||||
msg += plus[k-kk]
|
||||
else :
|
||||
msg += minus[kk-k]
|
||||
kk = k
|
||||
i += 1
|
||||
msg += "\n"
|
||||
j += xLen
|
||||
return msg
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
@ -1,267 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
#
|
||||
# Gets data for a single radar product from the A-II database. The result is
|
||||
# output to stdout as ASCII. This uses a data-specific Request/Response instead
|
||||
# of the DataAccessLayer in order to preserve data-genericness of the interface.
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/11/2014 3393 nabowle Initial modification. Replaces UEngine
|
||||
# with a custom Request/Response.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import a2radcommon
|
||||
|
||||
def get_args():
|
||||
parser = a2radcommon.get_args_parser()
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
records = a2radcommon.send_request(user_args)
|
||||
|
||||
if not records:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
description = user_args.description
|
||||
if not description:
|
||||
print >> sys.stderr, "Description not provided"
|
||||
return
|
||||
|
||||
print_record(records[0], description)
|
||||
|
||||
|
||||
def print_record(record, description):
|
||||
|
||||
idra = record.getHdf5Data()
|
||||
|
||||
rdat,azdat,depVals,prodVals,recVals,stormVals,symVals,symData,threshVals = get_hdf5_data(idra)
|
||||
|
||||
if not rdat:
|
||||
# Graphic, XY
|
||||
# print "Unsupported radar format"
|
||||
return
|
||||
|
||||
dim = rdat.getDimension()
|
||||
if dim != 2:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
yLen = rdat.getSizes()[0]
|
||||
xLen = rdat.getSizes()[1]
|
||||
|
||||
# byte[] -- the raw data
|
||||
array = rdat.getByteData()
|
||||
arraySize = len(array)
|
||||
if xLen * yLen != arraySize:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
# get data for azimuth angles if we have them.
|
||||
if azdat :
|
||||
azVals = azdat.getFloatData()
|
||||
azValsLen = len(azVals)
|
||||
if yLen != azValsLen:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
msg = get_header(record, xLen, yLen, azdat, description)
|
||||
msg += encode_dep_vals(depVals)
|
||||
msg += encode_prod_vals(prodVals)
|
||||
msg += encode_rec_vals(recVals)
|
||||
msg += encode_storm_vals(stormVals)
|
||||
msg += encode_sym_vals(symVals)
|
||||
msg += encode_sym_data(symData)
|
||||
msg += encode_thresh_vals(threshVals)
|
||||
|
||||
if azdat :
|
||||
msg += a2radcommon.encode_radial(azVals)
|
||||
|
||||
msg += encode_data(yLen, xLen, array)
|
||||
|
||||
print msg
|
||||
|
||||
|
||||
def get_hdf5_data(idra):
|
||||
rdat = []
|
||||
azdat = []
|
||||
depVals = []
|
||||
prodVals = []
|
||||
recVals = []
|
||||
stormVals = []
|
||||
symVals = []
|
||||
symData = []
|
||||
threshVals = []
|
||||
if len(idra) > 0:
|
||||
for ii in range(len(idra)):
|
||||
if idra[ii].getName() == "Data":
|
||||
rdat = idra[ii]
|
||||
elif idra[ii].getName() == "Angles":
|
||||
azdat = idra[ii]
|
||||
dattyp = "radial"
|
||||
elif idra[ii].getName() == "DependentValues":
|
||||
depVals = idra[ii].getShortData()
|
||||
elif idra[ii].getName() == "ProductVals":
|
||||
prodVals = idra[ii].getByteData()
|
||||
elif idra[ii].getName() == "RecordVals":
|
||||
recVals = idra[ii].getByteData()
|
||||
elif idra[ii].getName() == "StormIds":
|
||||
stormVals = idra[ii].getByteData()
|
||||
elif idra[ii].getName() == "Symbology":
|
||||
symVals = idra[ii].getByteData()
|
||||
elif idra[ii].getName() == "SymbologyData":
|
||||
symData = idra[ii].getByteData()
|
||||
elif idra[ii].getName() == "Thresholds":
|
||||
threshVals = idra[ii].getShortData()
|
||||
|
||||
return rdat,azdat,depVals,prodVals,recVals,stormVals,symVals,symData,threshVals
|
||||
|
||||
|
||||
def get_header(record, xLen, yLen, azdat, description):
|
||||
# Encode dimensions, time, mapping, description, tilt, and VCP
|
||||
mytime = a2radcommon.get_datetime_str(record)
|
||||
dattyp = a2radcommon.get_data_type(azdat)
|
||||
|
||||
msg = str(xLen) + " " + str(yLen) + " " + mytime + " " + dattyp + \
|
||||
" " + description + "\n" + \
|
||||
str(record.getTrueElevationAngle()) + " " + \
|
||||
str(record.getVolumeCoveragePattern()) + "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_dep_vals(depVals):
|
||||
nnn = len(depVals)
|
||||
msg = str(nnn)
|
||||
j = 0
|
||||
while j<nnn :
|
||||
if depVals[j]<0 :
|
||||
msg += " " + "%4.4X"%(65536+depVals[j])
|
||||
else :
|
||||
msg += " " + "%4.4X"%depVals[j]
|
||||
j += 1
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_prod_vals(prodVals):
|
||||
nnn = len(prodVals)
|
||||
msg = str(nnn)
|
||||
j = 0
|
||||
while j<nnn :
|
||||
if prodVals[j]<0 :
|
||||
msg += " " + "%2.2X"%(255+prodVals[j])
|
||||
else :
|
||||
msg += " " + "%2.2X"%prodVals[j]
|
||||
j += 1
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_rec_vals(recVals):
|
||||
nnn = len(recVals)
|
||||
msg = str(nnn)
|
||||
j = 0
|
||||
while j<nnn :
|
||||
if recVals[j]<0 :
|
||||
msg += " " + "%2.2X"%(255+recVals[j])
|
||||
else :
|
||||
msg += " " + "%2.2X"%recVals[j]
|
||||
j += 1
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_storm_vals(stormVals):
|
||||
nnn = len(stormVals)
|
||||
msg = str(nnn)
|
||||
j = 0
|
||||
while j<nnn :
|
||||
if stormVals[j]<0 :
|
||||
msg += " " + "%2.2X"%(255+stormVals[j])
|
||||
else :
|
||||
msg += " " + "%2.2X"%stormVals[j]
|
||||
j += 1
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_sym_vals(symVals):
|
||||
nnn = len(symVals)
|
||||
msg = str(nnn)
|
||||
j = 0
|
||||
while j<nnn :
|
||||
if symVals[j]<0 :
|
||||
msg += " " + "%2.2X"%(255+symVals[j])
|
||||
else :
|
||||
msg += " " + "%2.2X"%symVals[j]
|
||||
j += 1
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_sym_data(symData):
|
||||
nnn = len(symData)
|
||||
msg = str(nnn)
|
||||
j = 0
|
||||
while j<nnn :
|
||||
if symData[j]<0 :
|
||||
msg += " " + "%2.2X"%(255+symData[j])
|
||||
else :
|
||||
msg += " " + "%2.2X"%symData[j]
|
||||
j += 1
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_thresh_vals(threshVals):
|
||||
msg = str(len(threshVals)) + a2radcommon.encode_thresh_vals(threshVals)
|
||||
return msg
|
||||
|
||||
|
||||
def encode_data(yLen, xLen, array):
|
||||
msg = ""
|
||||
nxy = yLen*xLen
|
||||
j = 0
|
||||
while j<nxy :
|
||||
i = 0
|
||||
while i<xLen :
|
||||
if array[i+j]<0 :
|
||||
msg += str(256+array[i+j]) + " "
|
||||
else :
|
||||
msg += str(array[i+j]) + " "
|
||||
i += 1
|
||||
msg += "\n"
|
||||
j += xLen
|
||||
return msg[0:-1]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,285 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
#
|
||||
# A script wrapper that is meant to get inventories of radar data
|
||||
# from the A-II database. The data is output to stdout as ASCII.
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2invrad.csh p radar date time msgcode elev
|
||||
#
|
||||
# p - A literal p.
|
||||
# radar - four character radar id
|
||||
# date - yyyy-mo-dd
|
||||
# time - hh:mm
|
||||
# msgcode - RPG message code
|
||||
# elev - tilt angle/layer value. defaults to 0.
|
||||
#
|
||||
# All arguments are optional, but must retain the specified order.
|
||||
#
|
||||
# The literal p option means preserve the final version of the python
|
||||
# submitted to the UEngine instead of cleaning it up. The path to the
|
||||
# finalized python is /tmp/a2invradNNNNN.py where NNNNN is a unix process id.
|
||||
# This argument does not change the output of the script.
|
||||
#
|
||||
# If no radar id is supplied, the only other useable arguments are the
|
||||
# date and time, and what is returned is a list of radars.
|
||||
#
|
||||
# The date and time must be supplied together. If not supplied, then the
|
||||
# information returned covers all times, otherwise +/- one minute from
|
||||
# the supplied date and time.
|
||||
#
|
||||
# If the message code is not supplied, or is a literal '+', then what is
|
||||
# listed is the available message code for the specified radar. The plus
|
||||
# sign causes some descriptive information to be supplied with the returned
|
||||
# codes.
|
||||
#
|
||||
# If the message code is supplied and the tilt/layer is a literal '+',
|
||||
# then what is returned is a list of tilts available for the specified
|
||||
# message code.
|
||||
#
|
||||
# When a message code is supplied but no tilt is supplied, this is meant
|
||||
# to return a list of times for a non-tilt based product, such as storm
|
||||
# total precip. Otherwise if a tilt/layer is supplied, this is meant
|
||||
# to return a list of times for product that are for a specific tilt,
|
||||
# like base reflectivity.
|
||||
#
|
||||
# When tilt angles are specified on the command line, or are returned
|
||||
# in response to a tilt angle argument of '+', these tilt angles are
|
||||
# primary tilt angles for a range of tilts. When tilt angles are returned
|
||||
# with a time inventory, then these are the actual tilt angle of the
|
||||
# data received.
|
||||
#
|
||||
# Gets inventories of radar grid data from the A-II database. The data is
|
||||
# output to stdout as ASCII. Inventories are limited to Radial and Raster
|
||||
# formats.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-28 3600 nabowle Initial modification. Call DAF properly.
|
||||
#
|
||||
#
|
||||
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
set fxa_home = $FXA_HOME
|
||||
if ( $?STAGING ) then
|
||||
set fxa_home = $STAGING/D-2D
|
||||
endif
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./a2invradStub.py ) then
|
||||
set stubpy = ./a2invradStub.py
|
||||
else if ( -e $mydir/a2invradStub.py ) then
|
||||
set stubpy = $mydir/a2invradStub.py
|
||||
else if ( -e $fxa_home/src/dm/radar/a2invradStub.py ) then
|
||||
set stubpy = $fxa_home/src/dm/radar/a2invradStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2invradStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2invradStub.py
|
||||
else
|
||||
bash -c "echo could not find a2invradStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
|
||||
set rrr = `echo $1 | grep '[a-z][a-z][a-z][a-z]'`
|
||||
if ( "$rrr" != "" ) shift
|
||||
set lastcmd = cat
|
||||
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set mydate = `echo "$1" | grep '.*-.*-'`
|
||||
set mytime = `echo "$2" | grep ':'`
|
||||
if ( "$mydate" != "" && "$mytime" != "" ) then
|
||||
shift
|
||||
shift
|
||||
set userargs = "--date ${mydate} --time ${mytime}"
|
||||
else
|
||||
set userargs = ""
|
||||
endif
|
||||
|
||||
if ( "$rrr" == "" ) then
|
||||
#done
|
||||
else if ( "$1" == "" ) then
|
||||
set userargs = "$userargs --icao $rrr"
|
||||
else if ( "$1" == "+" ) then
|
||||
set userargs = "$userargs --icao $rrr"
|
||||
if ( -e ./msgCodeSeds.txt ) then
|
||||
set mctrans = $PWD/msgCodeSeds.txt
|
||||
else if ( -e $mydir/msgCodeSeds.txt ) then
|
||||
set mctrans = $mydir/msgCodeSeds.txt
|
||||
else if ( -e $fxa_home/src/dm/radar/msgCodeSeds.txt ) then
|
||||
set mctrans = $fxa_home/src/dm/radar/msgCodeSeds.txt
|
||||
else if ( -e $FXA_HOME/data/msgCodeSeds.txt ) then
|
||||
set mctrans = $FXA_HOME/data/msgCodeSeds.txt
|
||||
else
|
||||
bash -c "echo could not find msgCodeSeds.txt 1>&2"
|
||||
exit
|
||||
endif
|
||||
set lastcmd = "sed -f $mctrans"
|
||||
else if ( "$2" == "" ) then
|
||||
set userargs = "$userargs --icao $rrr --productCode $1 --angle 0.0 --outputDate"
|
||||
else if ( "$2" == "+" ) then
|
||||
set userargs = "$userargs --icao $rrr --productCode $1 --outputPrimary"
|
||||
else
|
||||
set userargs = "$userargs --icao $rrr --productCode $1 --angle $2 --outputTrue --outputDate"
|
||||
endif
|
||||
echo /awips2/python/bin/python $stubpy ${userargs} | $lastcmd
|
||||
/awips2/python/bin/python $stubpy ${userargs} | $lastcmd
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
#
|
||||
# Set range of time we will request this information over, will default to
|
||||
# essentially forever.
|
||||
#
|
||||
set aaa = "1970-01-01 00:00:00.0"
|
||||
set bbb = "2038-01-01 00:00:00.0"
|
||||
set mydate = `echo "$1" | grep '.*-.*-'`
|
||||
set mytime = `echo "$2" | grep ':'`
|
||||
if ( "$mydate" != "" && "$mytime" != "" ) then
|
||||
shift
|
||||
shift
|
||||
if ( -x ./gtasUtil ) then
|
||||
set gtasUtil = ./gtasUtil
|
||||
else if ( -x $mydir/gtasUtil ) then
|
||||
set gtasUtil = $mydir/gtasUtil
|
||||
else if ( -x $fxa_home/src/dm/point/gtasUtil ) then
|
||||
set gtasUtil = $fxa_home/src/dm/point/gtasUtil
|
||||
else if ( -x $FXA_HOME/bin/gtasUtil ) then
|
||||
set gtasUtil = $FXA_HOME/bin/gtasUtil
|
||||
else
|
||||
bash -c "echo could not find gtasUtil executable 1>&2"
|
||||
exit
|
||||
endif
|
||||
set aaa = `$gtasUtil = $mydate $mytime -60`
|
||||
set bbb = `$gtasUtil = $mydate $mytime 60`
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# Modify the text of special tags in stub to create finalized script.
|
||||
#
|
||||
set binary = no
|
||||
set specpy = /tmp/a2invrad${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
if ( "$rrr" == "" ) then
|
||||
cat $stubpy | grep -v "KKKK" | grep -v "MMMM" | grep -v "EEEE" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | \
|
||||
grep -v 'Code")' | grep -v 'Time")' | grep -v 'Angle")' \
|
||||
>> $specpy
|
||||
else if ( "$1" == "" ) then
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | grep -v "MMMM" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | grep -v 'icao")' | \
|
||||
sed 's/^.*EEEE.*$//g' | grep -v 'Time")' | grep -v 'Angle")' \
|
||||
>> $specpy
|
||||
else if ( "$1" == "+" ) then
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | grep -v "MMMM" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | grep -v 'icao")' | \
|
||||
sed 's/^.*EEEE.*$//g' | grep -v 'Time")' | grep -v 'Angle")' \
|
||||
>> $specpy
|
||||
if ( -e ./msgCodeSeds.txt ) then
|
||||
set mctrans = $PWD/msgCodeSeds.txt
|
||||
else if ( -e $mydir/msgCodeSeds.txt ) then
|
||||
set mctrans = $mydir/msgCodeSeds.txt
|
||||
else if ( -e $fxa_home/src/dm/radar/msgCodeSeds.txt ) then
|
||||
set mctrans = $fxa_home/src/dm/radar/msgCodeSeds.txt
|
||||
else if ( -e $FXA_HOME/data/msgCodeSeds.txt ) then
|
||||
set mctrans = $FXA_HOME/data/msgCodeSeds.txt
|
||||
else
|
||||
bash -c "echo could not find msgCodeSeds.txt 1>&2"
|
||||
exit
|
||||
endif
|
||||
set lastcmd = "sed -f $mctrans"
|
||||
else if ( "$2" == "" ) then
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | sed "s/MMMM/$1/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | grep -v 'icao")' | \
|
||||
sed 's/EEEE/0.0/g' | grep -v 'Angle")' | grep -v 'Code")' \
|
||||
>> $specpy
|
||||
else if ( "$2" == "+" ) then
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | sed "s/MMMM/$1/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | grep -v 'icao")' | \
|
||||
sed 's/^.*EEEE.*$//g' | grep -v 'Time")' | grep -v 'Code")' | \
|
||||
sed 's/true/primary/g' >> $specpy
|
||||
else
|
||||
cat $stubpy | sed "s/KKKK/$rrr/g" | sed "s/MMMM/$1/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | grep -v 'icao")' | \
|
||||
sed "s/EEEE/$2/g" | grep -v 'Code")' >> $specpy
|
||||
set binary = yes
|
||||
endif
|
||||
#
|
||||
# Submit the temporary python script stripping xml stuff, then remove it
|
||||
#
|
||||
if ( "$binary" == "yes" ) then
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) |& sed 's|.*</items>.*|@|g' | \
|
||||
grep -E 'attributes|@' | cut '-d"' -f4 | tr '\n' ' ' | tr '@' '\n' | \
|
||||
sed 's/00000.*$//g' | sed 's/^ *//g' | sed 's/ *$//g'
|
||||
else
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) |& grep attributes | cut '-d"' -f4 | \
|
||||
$lastcmd
|
||||
endif
|
||||
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
|
|
@ -1,195 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets inventories of radar grid data from the A-II database. The data is
|
||||
# output to stdout as ASCII. Inventories are limited to Radial and Raster
|
||||
# formats.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-27 3600 nabowle Initial modification. Convert to DAF.
|
||||
# 2014-12-18 3600 nabowle Use new getAvailableLevels() to speed up retrieval.
|
||||
#
|
||||
|
||||
import argparse
|
||||
import numpy
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from datetime import timedelta
|
||||
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.level import Level
|
||||
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)", metavar="hostname")
|
||||
|
||||
parser.add_argument("--icao", action="store", dest="icao",
|
||||
help="The ICAO (optional)", metavar="icao")
|
||||
|
||||
parser.add_argument("--productCode", action="store", dest="productCode",
|
||||
help="Product Code (optional)", metavar="productCode")
|
||||
|
||||
parser.add_argument("--angle", action="store", dest="angle", type=float,
|
||||
help="The Primary Elevation Angle (optional)",
|
||||
metavar="angle")
|
||||
|
||||
parser.add_argument("--date", action="store", dest="date",
|
||||
help="A date to find data within a minute of. (optional, --time required if provided)",
|
||||
metavar="YYYY-MM-DD")
|
||||
|
||||
parser.add_argument("--time", action="store", dest="time",
|
||||
help="A time to find data within a minute of. (optional, --date required if provided)",
|
||||
metavar="HH:MM")
|
||||
|
||||
parser.add_argument("--outputDate", action="store_true",
|
||||
dest="outputDate", help="Output the datetime (optional)")
|
||||
|
||||
parser.add_argument("--outputTrue", action="store_const",
|
||||
dest="outputAngle", const="true",
|
||||
help="Output true elevation angle, if relevant. (optional,"
|
||||
+ " exclusive with --outputPrimary)")
|
||||
|
||||
parser.add_argument("--outputPrimary", action="store_const",
|
||||
dest="outputAngle", const="primary",
|
||||
help="Output primary elevation angle, if relevant. "
|
||||
+ "(optional, exclusive with --outputTrue)")
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
if (user_args.date and not user_args.time) or (user_args.time and not user_args.date):
|
||||
print >> sys.stderr, "date and time must be provided together"
|
||||
return
|
||||
|
||||
# If a time range is provided, results will be filtered based on available times
|
||||
timeRange = None
|
||||
if user_args.date:
|
||||
midRange = datetime.strptime( user_args.date + " " + user_args.time, "%Y-%m-%d %H:%M")
|
||||
beginRange = midRange - timedelta(0, 60)
|
||||
endRange = midRange + timedelta(0, 60)
|
||||
timeRange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = create_request(user_args)
|
||||
if user_args.icao:
|
||||
if user_args.productCode: # retrieve available times and/or true or primary elevation angles
|
||||
if timeRange:
|
||||
tr = timeRange
|
||||
else:
|
||||
tr = None
|
||||
lines = set()
|
||||
|
||||
if user_args.outputAngle:
|
||||
levels = DataAccessLayer.getAvailableLevels(req)
|
||||
for level in levels:
|
||||
line = ""
|
||||
req.setLevels(level)
|
||||
if user_args.outputDate:
|
||||
times = DataAccessLayer.getAvailableTimes(req)
|
||||
for time in times:
|
||||
if not tr or tr.contains(time.getValidPeriod()):
|
||||
line = str(time) + ".0"
|
||||
line += " "
|
||||
if user_args.outputAngle == "true":
|
||||
line += "%.1f"%level.getLeveltwovalue()
|
||||
else:
|
||||
line += "%.1f"%level.getLevelonevalue()
|
||||
lines.add(line)
|
||||
else:
|
||||
if not tr or data_in_time_range(req, tr):
|
||||
if user_args.outputAngle == "true":
|
||||
line = "%.1f"%level.getLeveltwovalue()
|
||||
else:
|
||||
line = "%.1f"%level.getLevelonevalue()
|
||||
lines.add(line)
|
||||
else : # just output time
|
||||
times = DataAccessLayer.getAvailableTimes(req)
|
||||
for time in times:
|
||||
if not tr or tr.contains(time.getValidPeriod()):
|
||||
lines.add(str(time) + ".0")
|
||||
msg = "\n".join(lines)
|
||||
else: #retrieve available product codes
|
||||
unfiltered = DataAccessLayer.getAvailableParameters(req)
|
||||
productCodes = []
|
||||
for parameter in unfiltered: #filter to just productCodes
|
||||
if parameter.isdigit():
|
||||
productCodes.append(parameter)
|
||||
if timeRange:
|
||||
unfiltered = productCodes
|
||||
productCodes = []
|
||||
for productCode in unfiltered:
|
||||
req = create_request(user_args)
|
||||
req.setParameters(productCode)
|
||||
if data_in_time_range(req, timeRange):
|
||||
productCodes.append(productCode)
|
||||
msg = "\n".join(productCodes)
|
||||
|
||||
else: # retrieve available icaos
|
||||
icaos = DataAccessLayer.getAvailableLocationNames(req)
|
||||
if timeRange:
|
||||
unfiltered = icaos
|
||||
icaos = []
|
||||
for icao in unfiltered:
|
||||
req = create_request(user_args)
|
||||
req.addIdentifier("icao", icao)
|
||||
if data_in_time_range(req, timeRange):
|
||||
icaos.append(icao)
|
||||
|
||||
msg = "\n".join(icaos)
|
||||
|
||||
print msg.strip()
|
||||
|
||||
def create_request(user_args):
|
||||
req = DataAccessLayer.newDataRequest("radar")
|
||||
if user_args.icao:
|
||||
req.addIdentifier("icao", user_args.icao)
|
||||
if user_args.productCode:
|
||||
req.setParameters(user_args.productCode)
|
||||
if user_args.angle is not None:
|
||||
level = Level()
|
||||
level.setLevelonevalue(user_args.angle)
|
||||
req.setLevels(level)
|
||||
# Indicate that when providing or requesting levels, the Levelonevalue
|
||||
# is the primaryElevationAngle and the Leveltwovalue value is the
|
||||
# trueElevationAngle
|
||||
req.addIdentifier("level.one.field", "primaryElevationAngle")
|
||||
req.addIdentifier("level.two.field", "trueElevationAngle")
|
||||
|
||||
return req
|
||||
|
||||
def data_in_time_range(req, timeRange):
|
||||
times = DataAccessLayer.getAvailableTimes(req)
|
||||
for time in times:
|
||||
if timeRange.contains(time.getValidPeriod()):
|
||||
return True
|
||||
return False
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,251 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
#
|
||||
# Common methods for the a2gtrad and a2advrad scripts.
|
||||
#
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/13/2014 3393 nabowle Initial creation to contain common
|
||||
# code for a2*radStub scripts.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from datetime import timedelta
|
||||
from awips import ThriftClient
|
||||
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.level import Level
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.radar.request import GetRadarDataRecordRequest
|
||||
|
||||
def get_default_host():
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
return DataAccessLayer.THRIFT_HOST
|
||||
|
||||
|
||||
def get_args_parser():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("--host", action="store", dest="host",
|
||||
help="EDEX server hostname",
|
||||
metavar="hostname")
|
||||
parser.add_argument("--datetime", action="store", dest="datetime",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="datetime")
|
||||
parser.add_argument("--radar", action="store", dest="radar",
|
||||
help="The ICAO code for the radar",
|
||||
metavar="radar")
|
||||
parser.add_argument("--code", action="store", dest="code",
|
||||
help="The product code.", type=int,
|
||||
metavar="code")
|
||||
parser.add_argument("--angle", action="store", dest="angle", default=0,
|
||||
help="The Elevation Angle", metavar="angle")
|
||||
parser.add_argument("--description", action="store", dest="description",
|
||||
help="The description.",
|
||||
metavar="desc")
|
||||
parser.add_argument("--slop", action="store", dest="slop", default=60,
|
||||
help="The amount of slop, in seconds, to allow around the datetime.",
|
||||
metavar="slop", type=int)
|
||||
return parser
|
||||
|
||||
|
||||
def send_request(user_args):
|
||||
slop = user_args.slop
|
||||
|
||||
dateTimeStr = user_args.datetime
|
||||
if not dateTimeStr:
|
||||
print >> sys.stderr, "DateTime not provided"
|
||||
return
|
||||
dateTime = datetime.strptime(dateTimeStr, "%Y-%m-%d %H:%M")
|
||||
beginRange = dateTime - timedelta(0, slop)
|
||||
endRange = dateTime + timedelta(0, slop)
|
||||
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
radar = user_args.radar
|
||||
if not radar:
|
||||
print >> sys.stderr, "Radar code not provided"
|
||||
return
|
||||
|
||||
code = user_args.code
|
||||
if not code:
|
||||
print >> sys.stderr, "Product code not provided"
|
||||
return
|
||||
|
||||
angle = user_args.angle
|
||||
|
||||
slop = int(user_args.slop)
|
||||
|
||||
host = user_args.host
|
||||
if not host:
|
||||
host = get_default_host()
|
||||
|
||||
client = ThriftClient.ThriftClient(host)
|
||||
|
||||
# Perform a GetRadarHDF5Request
|
||||
req = GetRadarDataRecordRequest()
|
||||
req.setRadarId(radar)
|
||||
req.setPrimaryElevationAngle(float(angle))
|
||||
req.setTimeRange(timerange)
|
||||
req.setProductCode(int(code))
|
||||
|
||||
response = client.sendRequest(req)
|
||||
|
||||
if response is None:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
records = response.getData()
|
||||
return records
|
||||
|
||||
|
||||
def get_datetime_str(record):
|
||||
#2014-07-16 00:00:00 (0) => 2014-07-16_00:03:00.0
|
||||
return str(record.getDataTime())[0:19].replace(" ","_") + ".0"
|
||||
|
||||
|
||||
def get_data_type(azdat):
|
||||
if azdat:
|
||||
dattyp = "radial"
|
||||
else :
|
||||
dattyp = "raster"
|
||||
return dattyp
|
||||
|
||||
|
||||
def get_hdf5_data(idra):
|
||||
rdat = []
|
||||
azdat = []
|
||||
depVals = []
|
||||
threshVals = []
|
||||
if len(idra) > 0:
|
||||
for ii in range(len(idra)):
|
||||
if idra[ii].getName() == "Data":
|
||||
rdat = idra[ii]
|
||||
elif idra[ii].getName() == "Angles":
|
||||
azdat = idra[ii]
|
||||
dattyp = "radial"
|
||||
elif idra[ii].getName() == "DependentValues":
|
||||
depVals = idra[ii].getShortData()
|
||||
## Commented out from the original. May not be available.
|
||||
# elif idra[ii].getName() == "ProductVals":
|
||||
# prodVals = idra[ii].getByteData()
|
||||
# elif idra[ii].getName() == "RecordVals":
|
||||
# recVals = idra[ii].getByteData()
|
||||
# elif idra[ii].getName() == "StormIds":
|
||||
# stormVals = idra[ii].getByteData()
|
||||
# elif idra[ii].getName() == "Symbology":
|
||||
# symVals = idra[ii].getByteData()
|
||||
# elif idra[ii].getName() == "SymbologyData":
|
||||
# symData = idra[ii].getByteData()
|
||||
##
|
||||
elif idra[ii].getName() == "Thresholds":
|
||||
threshVals = idra[ii].getShortData()
|
||||
|
||||
return rdat,azdat,depVals,threshVals
|
||||
|
||||
|
||||
def get_header(record, format, xLen, yLen, azdat, description):
|
||||
# Encode dimensions, time, mapping, description, tilt, and VCP
|
||||
mytime = get_datetime_str(record)
|
||||
dattyp = get_data_type(azdat)
|
||||
|
||||
if format :
|
||||
msg = str(xLen) + " " + str(yLen) + " " + mytime + " " + \
|
||||
dattyp + " " + str(record.getLatitude()) + " " + \
|
||||
str(record.getLongitude()) + " " + \
|
||||
str(record.getElevation()) + " " + \
|
||||
str(record.getElevationNumber()) + " " + \
|
||||
description + " " + str(record.getTrueElevationAngle()) + " " + \
|
||||
str(record.getVolumeCoveragePattern()) + "\n"
|
||||
#"%.1f"%
|
||||
else :
|
||||
msg = str(xLen) + " " + str(yLen) + " " + mytime + " " + \
|
||||
dattyp + " " + description + " " + \
|
||||
str(record.getTrueElevationAngle()) + " " + \
|
||||
str(record.getVolumeCoveragePattern()) + "\n"
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
def encode_thresh_vals(threshVals):
|
||||
spec = [".", "TH", "ND", "RF", "BI", "GC", "IC", "GR", "WS", "DS",
|
||||
"RA", "HR", "BD", "HA", "UK"]
|
||||
nnn = len(threshVals)
|
||||
j = 0
|
||||
msg = ""
|
||||
while j<nnn :
|
||||
lo = threshVals[j] % 256
|
||||
hi = threshVals[j] / 256
|
||||
msg += " "
|
||||
j += 1
|
||||
if hi < 0 :
|
||||
if lo > 14 :
|
||||
msg += "."
|
||||
else :
|
||||
msg += spec[lo]
|
||||
continue
|
||||
if hi % 16 >= 8 :
|
||||
msg += ">"
|
||||
elif hi % 8 >= 4 :
|
||||
msg += "<"
|
||||
if hi % 4 >= 2 :
|
||||
msg += "+"
|
||||
elif hi % 2 >= 1 :
|
||||
msg += "-"
|
||||
if hi >= 64 :
|
||||
msg += "%.2f"%(lo*0.01)
|
||||
elif hi % 64 >= 32 :
|
||||
msg += "%.2f"%(lo*0.05)
|
||||
elif hi % 32 >= 16 :
|
||||
msg += "%.1f"%(lo*0.1)
|
||||
else :
|
||||
msg += str(lo)
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_dep_vals(depVals):
|
||||
nnn = len(depVals)
|
||||
j = 0
|
||||
msg = ""
|
||||
while j<nnn :
|
||||
msg += " " + str(depVals[j])
|
||||
j += 1
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
||||
|
||||
def encode_radial(azVals):
|
||||
azValsLen = len(azVals)
|
||||
j = 0
|
||||
msg = ""
|
||||
while j<azValsLen :
|
||||
msg += "%.1f"%azVals[j] + " "
|
||||
j += 1
|
||||
msg += "\n"
|
||||
return msg
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
# creates the radar_spatial table from an sql script file
|
||||
|
||||
echo "Generating new radar_spatial table"
|
||||
psql -U awips -d metadata -c "DELETE FROM radar_spatial"
|
||||
psql -U awips -d metadata -f ./radarSpatial.sql
|
||||
echo "Done generating radar_spatial table"
|
|
@ -1,211 +0,0 @@
|
|||
BEGIN;
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KABR','309','154.0000','ABR','1382.6840','Aberdeen','-98.41306','45.45583','421.44208',GeometryFromText('POINT(-98.41306 45.45583)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KABX','311','93.0000','ABQ','5949.5264','La Mesita Negra','-106.82389','35.14972','1813.41564',GeometryFromText('POINT(-106.82389 35.14972)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KAKQ','516','101.0000','AKQ','254.8560','Wakefield','-77.00750','36.98389','77.68011',GeometryFromText('POINT(-77.0075 36.98389)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KAMA','313','53.0000','AMA','3702.1360','Amarillo','-101.70928','35.23333','1128.41105',GeometryFromText('POINT(-101.70928 35.23333)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KAMX','728','64.0000','MFL','111.4216','Miami','-80.41306','25.61056','33.96130',GeometryFromText('POINT(-80.41306 25.61056)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KAPX','312','61.0000','APX','1561.0504','Gaylord','-84.71953','44.90635','475.80816',GeometryFromText('POINT(-84.71953 44.90635)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KARX','389','125.0000','ARX','1356.6736','La Crosse','-91.19111','43.82278','413.51411',GeometryFromText('POINT(-91.19111 43.82278)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KATX','542','56.0000','SEW','641.8960','Camano Island','-122.49569','48.19461','195.64990',GeometryFromText('POINT(-122.49569 48.19461)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBBX','380','71.0000','STO','221.1704','Oroville','-121.63167','39.49611','67.41274',GeometryFromText('POINT(-121.63167 39.49611)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBGM','319','137.0000','BGM','1703.0088','Binghamton','-75.98472','42.19969','519.07708',GeometryFromText('POINT(-75.98472 42.19969)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBHX','359','102.0000','EKA','2515.2024','Bunker Hill','-124.29217','40.49833','766.63369',GeometryFromText('POINT(-124.29217 40.49833)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBIS','321','30.0000','BIS','1754.9968','Bismarck','-100.76028','46.77083','534.92302',GeometryFromText('POINT(-100.76028 46.77083)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBLX','318','151.0000','BYZ','3702.1360','Alkali Creek Rd','-108.60681','45.85378','1128.41105',GeometryFromText('POINT(-108.60681 45.85378)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBMX','320','127.0000','BMX','758.6640','Alabaster','-86.76972','33.17194','231.24079',GeometryFromText('POINT(-86.76972 33.17194)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBOX','323','14.0000','BOX','231.7976','Taunton','-71.13686','41.95578','70.65191',GeometryFromText('POINT(-71.13686 41.95578)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBRO','324','68.0000','BRO','87.6088','Brownsville','-97.41861','25.91556','26.70316',GeometryFromText('POINT(-97.41861 25.91556)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBUF','325','138.0000','BUF','790.2504','Cheektowaga','-78.73694','42.94861','240.86832',GeometryFromText('POINT(-78.73694 42.94861)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBYX','386','63.0000','EYW','89.0192','Key West','-81.70333','24.59694','27.13305',GeometryFromText('POINT(-81.70333 24.59694)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCAE','341','115.0000','CAE','344.7608','Columbia','-81.11861','33.94861','105.08309',GeometryFromText('POINT(-81.11861 33.94861)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCBW','329','117.0000','CAR','859.6224','Houlton','-67.80642','46.03917','262.01291',GeometryFromText('POINT(-67.80642 46.03917)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCBX','322','41.0000','BOI','3170.7760','Wild Horse Corral','-116.23603','43.49022','966.45252',GeometryFromText('POINT(-116.23603 43.49022)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCCX','374','37.0000','CTP','2485.3872','Rush','-78.00389','40.92306','757.54602',GeometryFromText('POINT(-78.00389 40.92306)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCLE','340','69.0000','CLE','860.2128','Cleveland','-81.86000','41.41306','262.19286',GeometryFromText('POINT(-81.86 41.41306)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCLX','333','114.0000','CHS','228.6160','Grays','-81.04219','32.65553','69.68216',GeometryFromText('POINT(-81.04219 32.65553)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCRP','343','65.0000','CRP','142.4176','Corpus Christi','-97.51083','27.78389','43.40888',GeometryFromText('POINT(-97.51083 27.78389)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCXX','326','139.0000','BTV','430.7296','Colchester','-73.16639','44.51111','131.28638',GeometryFromText('POINT(-73.16639 44.51111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCYS','335','144.0000','CYS','6191.0328','Cheyenne','-104.80611','41.15194','1887.02679',GeometryFromText('POINT(-104.80611 41.15194)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDAX','536','72.0000','STO','143.7952','Sacramento','-121.67783','38.50111','43.82878',GeometryFromText('POINT(-121.67783 38.50111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDDC','350','16.0000','DDC','2670.3464','Dodge City','-99.96889','37.76083','813.92158',GeometryFromText('POINT(-99.96889 37.76083)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDFX','394','66.0000','EWX','1195.3304','Brackettville (US Hwy 90)','-100.28028','29.27250','364.33671',GeometryFromText('POINT(-100.28028 29.2725)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDGX','855','169.0000','JAN','608.8336','Brandon','-89.98444','32.28000','185.57248',GeometryFromText('POINT(-89.98444 32.28)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDIX','523','38.0000','PHI','229.9936','Manchester','-74.41072','39.94694','70.10205',GeometryFromText('POINT(-74.41072 39.94694)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDLH','352','29.0000','DLH','1541.4360','Duluth','-92.20972','46.83694','469.82969',GeometryFromText('POINT(-92.20972 46.83694)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDMX','348','106.0000','DMX','1094.5688','Johnston','-93.72286','41.73111','333.62457',GeometryFromText('POINT(-93.72286 41.73111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDOX','351','100.0000','AKQ','163.8032','Ellendale State Forest','-75.44000','38.82556','49.92722',GeometryFromText('POINT(-75.44 38.82556)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDTX','349','58.0000','DTX','1215.8960','White Lake','-83.47167','42.70000','370.60510',GeometryFromText('POINT(-83.47167 42.7)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDVN','530','107.0000','DVN','851.2256','Davenport','-90.58083','41.61167','259.45356',GeometryFromText('POINT(-90.58083 41.61167)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KDYX','353','35.0000','SJT','1581.2224','Moran','-99.25417','32.53833','481.95659',GeometryFromText('POINT(-99.25417 32.53833)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KEAX','385','17.0000','EAX','1092.1744','Pleasant Hill','-94.26447','38.81025','332.89476',GeometryFromText('POINT(-94.26447 38.81025)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KEMX','556','90.0000','TWC','5317.4704','Empire Mtn','-110.63028','31.89361','1620.76498',GeometryFromText('POINT(-110.63028 31.89361)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KENX','310','136.0000','ALY','1934.2160','East Berne','-74.06408','42.58656','589.54904',GeometryFromText('POINT(-74.06408 42.58656)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KEOX','362','129.0000','TAE','536.9360','Echo','-85.45939','31.46056','163.65809',GeometryFromText('POINT(-85.45939 31.46056)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KEPZ','357','79.0000','EPZ','4216.7680','Santa Teresa','-106.69800','31.87306','1285.27088',GeometryFromText('POINT(-106.698 31.87306)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KESX','566','104.0000','VEF','4946.7648','Opal Mtn','-114.89139','35.70111','1507.77391',GeometryFromText('POINT(-114.89139 35.70111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KEVX','307','149.0000','MOB','220.9736','Redbay','-85.92167','30.56503','67.35275',GeometryFromText('POINT(-85.92167 30.56503)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KEWX','539','67.0000','EWX','766.5360','New Braunfels','-98.02861','29.70406','233.64017',GeometryFromText('POINT(-98.02861 29.70406)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KEYX','511','103.0000','VEF','2872.2960','Boron','-117.56075','35.09778','875.47582',GeometryFromText('POINT(-117.56075 35.09778)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KFCX','534','99.0000','RNK','2964.6936','Coles Knob','-80.27417','37.02417','903.63861',GeometryFromText('POINT(-80.27417 37.02417)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KFDR','305','25.0000','OUN','1314.8864','Frederick','-98.97667','34.36219','400.77737',GeometryFromText('POINT(-98.97667 34.36219)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KFDX','328','94.0000','ABQ','4697.0256','Field Village (State Rd 89)','-103.61889','34.63417','1431.65340',GeometryFromText('POINT(-103.61889 34.63417)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KFFC','316','49.0000','FFC','971.6016','Peachtree City','-84.56583','33.36333','296.14417',GeometryFromText('POINT(-84.56583 33.36333)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KFSD','544','108.0000','FSD','1494.2368','Sioux Falls','-96.72889','43.58778','455.44338',GeometryFromText('POINT(-96.72889 43.58778)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KFSX','361','87.0000','FGZ','7512.5120','Anderson Mesa','-111.19844','34.57433','2289.81365',GeometryFromText('POINT(-111.19844 34.57433)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KFTG','347','0.0000','BOU','5609.4232','Front Range Arpt','-104.54581','39.78664','1709.75219',GeometryFromText('POINT(-104.54581 39.78664)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KFWS','345','34.0000','FWD','776.3760','Fort Worth','-97.30314','32.57278','236.63940',GeometryFromText('POINT(-97.30314 32.57278)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGGW','365','152.0000','GGW','2383.5760','Glasgow','-106.62469','48.20636','726.51396',GeometryFromText('POINT(-106.62469 48.20636)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGJX','368','145.0000','GJT','10098.1360','Grand Mesa','-108.21376','39.06222','3077.91185',GeometryFromText('POINT(-108.21376 39.06222)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGLD','366','18.0000','GLD','3714.6656','Goodland','-101.70028','39.36694','1132.23007',GeometryFromText('POINT(-101.70028 39.36694)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGRB','371','124.0000','GRB','805.8960','Ashwaubenon','-88.11111','44.49863','245.63710',GeometryFromText('POINT(-88.11111 44.49863)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGRK','332','33.0000','FWD','602.4704','Granger','-97.38278','30.72167','183.63298',GeometryFromText('POINT(-97.38278 30.72167)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGRR','369','59.0000','GRR','875.2024','Kent County Arpt','-85.54489','42.89389','266.76169',GeometryFromText('POINT(-85.54489 42.89389)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGSP','555','116.0000','GSP','1068.2960','Greer','-82.21983','34.88331','325.61662',GeometryFromText('POINT(-82.21983 34.88331)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGWX','342','111.0000','JAN','589.4160','Greenwood Springs (MS Hwy 8 & US Hwy','-88.32919','33.89692','179.65400',GeometryFromText('POINT(-88.32919 33.89692)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KGYX','528','118.0000','GYX','473.5008','Gray','-70.25636','43.89131','144.32304',GeometryFromText('POINT(-70.25636 43.89131)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KHDX','376','80.0000','EPZ','4269.1496','White Sands Missile Range','-106.12003','33.07700','1301.23680',GeometryFromText('POINT(-106.12003 33.077)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KHGX','378','48.0000','HGX','115.4232','Dickinson','-95.07889','29.47194','35.18099',GeometryFromText('POINT(-95.07889 29.47194)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KHNX','363','123.0000','HNX','340.3656','Hanford','-119.63214','36.31417','103.74343',GeometryFromText('POINT(-119.63214 36.31417)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KHPX','364','46.0000','PAH','624.0528','Trenton (US Hwy 41N)','-87.28500','36.73667','190.21129',GeometryFromText('POINT(-87.285 36.73667)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KHTX','826','157.0000','HUN','1858.9728','Hytop','-86.08361','34.93056','566.61491',GeometryFromText('POINT(-86.08361 34.93056)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KICT','562','19.0000','ICT','1399.2808','Wichita','-97.44306','37.65444','426.50079',GeometryFromText('POINT(-97.44306 37.65444)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KICX','330','20.0000','SLC','10754.1360','Blowhead Mtn','-112.86222','37.59105','3277.86065',GeometryFromText('POINT(-112.86222 37.59105)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KILN','338','42.0000','ILN','1169.5496','Wilmington','-83.82167','39.42028','356.47872',GeometryFromText('POINT(-83.82167 39.42028)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KILX','549','75.0000','ILX','730.4560','Logan County Arpt','-89.33679','40.15050','222.64299',GeometryFromText('POINT(-89.33679 40.1505)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KIND','381','43.0000','IND','887.2072','Indianapolis','-86.28028','39.70750','270.42075',GeometryFromText('POINT(-86.28028 39.7075)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KINX','557','21.0000','TSA','748.8568','Inola','-95.56414','36.17500','228.25155',GeometryFromText('POINT(-95.56414 36.175)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KIWA','524','89.0000','PSR','1425.8160','Mesa','-111.67000','33.28917','434.58872',GeometryFromText('POINT(-111.67 33.28917)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KIWX','827','158.0000','IWX','1056.1600','North Webster','-85.70000','41.35861','321.91757',GeometryFromText('POINT(-85.7 41.35861)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KJAX','383','148.0000','JAX','159.7360','Jacksonville','-81.70190','30.48463','48.68753',GeometryFromText('POINT(-81.7019 30.48463)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KJGX','535','51.0000','FFC','618.2800','Jeffersonville (State Hwy 96)','-83.35111','32.67500','188.45174',GeometryFromText('POINT(-83.35111 32.675)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KJKL','373','44.0000','JKL','1461.0760','Noctor','-83.31306','37.59083','445.33596',GeometryFromText('POINT(-83.31306 37.59083)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLBB','398','81.0000','LUB','3377.4160','Lubbock','-101.81417','33.65414','1029.43640',GeometryFromText('POINT(-101.81417 33.65414)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLCH','391','96.0000','LCH','136.7760','Lake Charles','-93.21589','30.12531','41.68932',GeometryFromText('POINT(-93.21589 30.12531)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLIX','545','36.0000','LIX','179.4160','Slidell','-89.82542','30.33667','54.68600',GeometryFromText('POINT(-89.82542 30.33667)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLNX','517','91.0000','LBF','3111.7360','Thedford','-100.57622','41.95794','948.45713',GeometryFromText('POINT(-100.57622 41.95794)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLOT','337','76.0000','LOT','760.2384','Romeoville','-88.08444','41.60444','231.72066',GeometryFromText('POINT(-88.08444 41.60444)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLRX','564','141.0000','LKN','6893.5760','Sheep Creek Mtn','-116.80278','40.73972','2101.16196',GeometryFromText('POINT(-116.80278 40.73972)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLSX','308','78.0000','LSX','721.6656','St Charles','-90.68278','38.69889','219.96367',GeometryFromText('POINT(-90.68278 38.69889)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLTX','563','86.0000','ILM','145.0088','Shallotte','-78.42917','33.98917','44.19868',GeometryFromText('POINT(-78.42917 33.98917)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLVX','397','45.0000','LMK','832.6280','Fort Knox','-85.94389','37.97528','253.78501',GeometryFromText('POINT(-85.94389 37.97528)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLWX','303','98.0000','LWX','404.2272','Sterling','-77.48750','38.97611','123.20845',GeometryFromText('POINT(-77.4875 38.97611)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KLZK','395','110.0000','LZK','648.8824','North Little Rock','-92.26194','34.83639','197.77936',GeometryFromText('POINT(-92.26194 34.83639)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMAF','518','82.0000','MAF','2960.8560','Midland','-102.18925','31.94346','902.46891',GeometryFromText('POINT(-102.18925 31.94346)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMAX','500','142.0000','MFR','7559.2848','Mount Ashland','-122.71736','42.08111','2304.07000',GeometryFromText('POINT(-122.71736 42.08111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMBX','507','31.0000','BIS','1590.0456','Deering','-100.86444','48.39250','484.64590',GeometryFromText('POINT(-100.86444 48.3925)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMHX','375','84.0000','MHX','144.8120','Newport','-76.87639','34.77583','44.13870',GeometryFromText('POINT(-76.87639 34.77583)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMKX','504','126.0000','MKX','1022.3760','Dousman','-88.55056','42.96778','311.62020',GeometryFromText('POINT(-88.55056 42.96778)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMLB','302','52.0000','MLB','116.0136','Melbourne','-80.65444','28.11306','35.36095',GeometryFromText('POINT(-80.65444 28.11306)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMOB','509','134.0000','MOB','288.9680','Mobile','-88.23972','30.67944','88.07745',GeometryFromText('POINT(-88.23972 30.67944)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMPX','506','28.0000','MPX','1101.0960','Chanhassen','-93.56553','44.84889','335.61406',GeometryFromText('POINT(-93.56553 44.84889)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMQT','399','60.0000','MQT','1524.4456','Marquette','-87.54833','46.53111','464.65102',GeometryFromText('POINT(-87.54833 46.53111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMRX','387','109.0000','MRX','1434.0816','Morristown','-83.40194','36.16833','437.10807',GeometryFromText('POINT(-83.40194 36.16833)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMSX','508','55.0000','MSO','7975.9760','Point Six Mtn','-113.98611','47.04111','2431.07748',GeometryFromText('POINT(-113.98611 47.04111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMTX','537','22.0000','SLC','6591.8160','Promontory Pt','-112.44778','41.26278','2009.18551',GeometryFromText('POINT(-112.44778 41.26278)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMUX','541','73.0000','MTR','3549.1240','Mt Umunhum','-121.89844','37.15522','1081.77299',GeometryFromText('POINT(-121.89844 37.15522)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMVX','360','155.0000','FGF','1083.1544','Mayville','-97.32500','47.52806','330.14546',GeometryFromText('POINT(-97.325 47.52806)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KMXX','354','128.0000','BMX','559.8960','Carrville','-85.78975','32.53665','170.65630',GeometryFromText('POINT(-85.78975 32.53665)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KNKX','540','121.0000','SGX','1052.1584','Miramar MCAS','-117.04194','32.91889','320.69788',GeometryFromText('POINT(-117.04194 32.91889)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KNQA','501','112.0000','MEG','435.2560','Millington','-89.87333','35.34472','132.66603',GeometryFromText('POINT(-89.87333 35.34472)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KOAX','519','92.0000','OAX','1261.5208','Valley','-96.36681','41.32028','384.51154',GeometryFromText('POINT(-96.36681 41.32028)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KOHX','512','113.0000','OHX','676.2704','Old Hickory','-86.56250','36.24722','206.12722',GeometryFromText('POINT(-86.5625 36.24722)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KOKX','515','39.0000','OKX','198.8008','Upton','-72.86392','40.86553','60.59448',GeometryFromText('POINT(-72.86392 40.86553)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KOTX','547','57.0000','OTX','2447.9952','Rambo Rd','-117.62583','47.68056','746.14894',GeometryFromText('POINT(-117.62583 47.68056)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KPAH','521','47.0000','PAH','505.7104','Paducah','-88.77194','37.06833','154.14053',GeometryFromText('POINT(-88.77194 37.06833)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KPBZ','526','15.0000','PBZ','1265.7192','Coraopolis','-80.21794','40.53167','385.79121',GeometryFromText('POINT(-80.21794 40.53167)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KPDT','522','143.0000','PDT','1579.2216','Pendleton','-118.85292','45.69056','481.34674',GeometryFromText('POINT(-118.85292 45.69056)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KPOE','339','95.0000','LCH','472.5168','Leesville','-92.97583','31.15528','144.02312',GeometryFromText('POINT(-92.97583 31.15528)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KPUX','529','146.0000','PUB','5361.8160','Boone Highland Rds','-104.18139','38.45944','1634.28151',GeometryFromText('POINT(-104.18139 38.45944)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KRAX','531','85.0000','RAH','461.7256','Clayton','-78.49000','35.66528','140.73396',GeometryFromText('POINT(-78.49 35.66528)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KRGX','533','105.0000','REV','8394.3072','Virginia Peak','-119.46203','39.75406','2558.58483',GeometryFromText('POINT(-119.46203 39.75406)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KRIW','392','147.0000','RIW','5631.2024','Riverton','-108.47730','43.06611','1716.39049',GeometryFromText('POINT(-108.4773 43.06611)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KRLX','334','70.0000','RLX','1212.6160','Ruthdale','-81.72278','38.31111','369.60536',GeometryFromText('POINT(-81.72278 38.31111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KRTX','527','40.0000','PQR','1727.5760','Dixie Mtn','-122.96500','45.71500','526.56516',GeometryFromText('POINT(-122.965 45.715)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KSFX','546','153.0000','PIH','4537.4864','Springfield','-112.68613','43.10560','1383.02585',GeometryFromText('POINT(-112.68613 43.1056)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KSGF','548','77.0000','SGF','1375.0744','Springfield','-93.40028','37.23528','419.12268',GeometryFromText('POINT(-93.40028 37.23528)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KSHV','543','97.0000','SHV','386.7448','Shreveport','-93.84125','32.45083','117.87981',GeometryFromText('POINT(-93.84125 32.45083)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KSJT','538','83.0000','SJT','2003.3256','San Angelo','-100.49222','31.37111','610.61364',GeometryFromText('POINT(-100.49222 31.37111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KSOX','574','122.0000','SGX','3105.1760','Santa Ana Mtns','-117.63600','33.81773','946.45764',GeometryFromText('POINT(-117.636 33.81773)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KSRX','825','161.0000','TSA','737.0160','Ft. Smith','-94.36189','35.29042','224.64248',GeometryFromText('POINT(-94.36189 35.29042)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KTBW','552','135.0000','TBW','122.0160','Ruskin','-82.40194','27.70528','37.19048',GeometryFromText('POINT(-82.40194 27.70528)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KTFX','370','54.0000','TFX','3803.8160','Great Falls','-111.38528','47.45972','1159.40312',GeometryFromText('POINT(-111.38528 47.45972)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KTLH','551','150.0000','TAE','176.7920','Tallahassee','-84.32889','30.39750','53.88620',GeometryFromText('POINT(-84.32889 30.3975)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KTLX','001','24.0000','OUN','1277.2976','Twin Lakes','-97.27776','35.33306','389.32031',GeometryFromText('POINT(-97.27776 35.33306)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KTWX','554','23.0000','TOP','1414.8608','Alma','-96.23250','38.99694','431.24957',GeometryFromText('POINT(-96.2325 38.99694)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KTYX','850','162.0000','BTV','1959.3408','Montague','-75.68000','43.75583','597.20707',GeometryFromText('POINT(-75.68 43.75583)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KUDX','532','156.0000','UNR','3193.7360','New Underwood','-102.83000','44.12472','973.45073',GeometryFromText('POINT(-102.83 44.12472)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KUEX','367','32.0000','GID','2056.4944','Blue Hill','-98.44194','40.32083','626.81949',GeometryFromText('POINT(-98.44194 40.32083)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KVAX','510','50.0000','TAE','330.2960','Stockton (State Rd 129)','-83.00181','30.89028','100.67422',GeometryFromText('POINT(-83.00181 30.89028)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KVBX','559','120.0000','LOX','1353.6560','Lompoc','-120.39792','34.83855','412.59435',GeometryFromText('POINT(-120.39792 34.83855)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KVNX','558','27.0000','OUN','1257.9128','Jet','-98.12750','36.74083','383.41182',GeometryFromText('POINT(-98.1275 36.74083)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KVTX','396','119.0000','LOX','2806.3024','Sulphur Mtn','-119.17861','34.41167','855.36097',GeometryFromText('POINT(-119.17861 34.41167)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KVWX','851','168.0000','PAH','624.6760','Evansville','-87.72453','38.26025','190.40124',GeometryFromText('POINT(-87.72453 38.26025)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KYUX','393','88.0000','PSR','238.5872','Yuma','-114.65669','32.49528','72.72138',GeometryFromText('POINT(-114.65669 32.49528)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('LPLA','390','164.0000','PLA','3414.1520','Lajes AFB','-27.32067','38.73017','1040.63353',GeometryFromText('POINT(-27.32067 38.73017)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PABC','304','8.0000','ACR','192.7656','Bethel','-161.87639','60.79194','58.75495',GeometryFromText('POINT(-161.87639 60.79194)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PACG','553','2.0000','AJK','271.5512','Sitka','-135.52917','56.85278','82.76881',GeometryFromText('POINT(-135.52917 56.85278)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PAEC','346','4.0000','AFG','89.8064','Nome','-165.29500','64.51139','27.37299',GeometryFromText('POINT(-165.295 64.51139)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PAHG','344','1.0000','AFC','355.7488','Kenai','-151.35147','60.72591','108.43223',GeometryFromText('POINT(-151.35147 60.72591)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PAIH','505','9.0000','AFC','131.5936','Middleton Island','-146.30111','59.46194','40.10973',GeometryFromText('POINT(-146.30111 59.46194)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PAKC','568','5.0000','ACR','143.9920','King Salmon','-156.62944','58.67944','43.88876',GeometryFromText('POINT(-156.62944 58.67944)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PAPD','525','3.0000','AFG','2706.1640','Pedro Dome','-147.50143','65.03511','824.83879',GeometryFromText('POINT(-147.50143 65.03511)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PGUA','314','74.0000','GUM','386.0560','Barrigada Comms Stn','144.81111','13.45583','117.66987',GeometryFromText('POINT(144.81111 13.45583)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PHKI','550','12.0000','HFO','340.1360','South Kauai','-159.55250','21.89389','103.67345',GeometryFromText('POINT(-159.5525 21.89389)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PHKM','377','10.0000','HFO','3964.5360','Kohala Mtns','-155.77778','20.12528','1208.39057',GeometryFromText('POINT(-155.77778 20.12528)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PHMO','336','11.0000','HFO','1443.6592','Molokai','-157.18028','21.13278','440.02732',GeometryFromText('POINT(-157.18028 21.13278)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('PHWA','570','13.0000','HFO','1460.6496','South Shore Hawaii Is','-155.56889','19.09500','445.20600',GeometryFromText('POINT(-155.56889 19.095)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('RKJK','388','165.0000','KUZ','191.7816','Kunsan AFB','126.62222','35.92417','58.45503',GeometryFromText('POINT(126.62222 35.92417)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('RKSG','327','166.0000','PTK','1520.9360','Camp Humphreys','127.28556','37.20757','463.58129',GeometryFromText('POINT(127.28556 37.20757)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('RODN','384','167.0000','KAD','331.7720','Kadena','127.90972','26.30194','101.12411',GeometryFromText('POINT(127.90972 26.30194)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TJUA','502','163.0000','SJU','2957.5760','Cayey','-66.07817','18.11567','901.46916',GeometryFromText('POINT(-66.07817 18.11567)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KBIX','572','132.0000','XXX','138.0000','Keesler AFB','-88.98470','30.52390','42.06240',GeometryFromText('POINT(-88.9847 30.5239)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('KCRI','520','26.0000','ROC','1295.0000','OSF','-97.46030','35.23830','394.71600',GeometryFromText('POINT(-97.4603 35.2383)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TADW','3001','3001.0000','LWX','346.1500','Andrews AFB, MD','-76.84500','38.69500','105.50652',GeometryFromText('POINT(-76.845 38.695)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TATL','3002','3002.0000','FFC','1075.1800','Hartsfield Atlanta International Air','-84.26200','33.64700','327.71486',GeometryFromText('POINT(-84.262 33.647)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TBNA','3003','3003.0000','OHX','816.9700','Nashville International Airport','-86.66200','35.98000','249.01246',GeometryFromText('POINT(-86.662 35.98)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TBOS','3004','3004.0000','BOX','264.1200','Boston Logan Airport','-70.93300','42.15800','80.50378',GeometryFromText('POINT(-70.933 42.158)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TBWI','3005','3005.0000','LWX','297.2600','Baltimore Washington International','-76.63000','39.09000','90.60485',GeometryFromText('POINT(-76.63 39.09)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TLVE','3006','3006.0000','CLE','931.1500','Hopkins International Airport, Cleve','-82.00800','41.29000','283.81452',GeometryFromText('POINT(-82.008 41.29)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TCLT','3007','3007.0000','GSP','871.1100','Charlotte Airport','-80.88500','35.33700','265.51433',GeometryFromText('POINT(-80.885 35.337)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TCMH','3008','3008.0000','ILN','1148.3500','Columbus Airport','-82.71500','40.00600','350.01708',GeometryFromText('POINT(-82.715 40.006)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TCVG','3009','3009.0000','ILN','1053.2000','Cincinati/Northern Kentucky Intl Air','-84.58000','38.89800','321.01536',GeometryFromText('POINT(-84.58 38.898)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TDAL','3010','3010.0000','FWD','622.4100','Dallas Love Field Airport','-96.96800','32.92600','189.71057',GeometryFromText('POINT(-96.968 32.926)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TDAY','3011','3011.0000','ILN','1018.7500','Dayton International Airport','-84.12300','40.02200','310.51500',GeometryFromText('POINT(-84.123 40.022)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TDCA','3012','3012.0000','LWX','344.8300','Ronald Reagan Washington Nat','-76.96200','38.75900','105.10418',GeometryFromText('POINT(-76.962 38.759)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TDEN','3013','3013.0000','BOU','5700.7400','Denver International Airport','-104.52600','39.72800','1737.58555',GeometryFromText('POINT(-104.526 39.728)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TDFW','3014','3014.0000','FWD','585.3300','Dallas-Fort Worth Airport','-96.91800','33.06500','178.40858',GeometryFromText('POINT(-96.918 33.065)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TDTW','3015','3015.0000','DTX','772.3500','Detroit Metro Airport','-83.51500','42.11100','235.41228',GeometryFromText('POINT(-83.515 42.111)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TEWR','3016','3016.0000','OKX','136.1600','Newark International Airport','-74.27000','40.59300','41.50157',GeometryFromText('POINT(-74.27 40.593)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TFLL','3017','3017.0000','MFL','119.7600','Fort Lauderdale/hollywood Internatio','-80.34400','26.14300','36.50285',GeometryFromText('POINT(-80.344 26.143)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('THOU','3018','3018.0000','HGX','116.4800','Houston William P Hobby Airport','-95.24200','29.51600','35.50310',GeometryFromText('POINT(-95.242 29.516)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TIAD','3019','3019.0000','LWX','473.1200','Washington Dulles International Airp','-77.52900','39.08400','144.20698',GeometryFromText('POINT(-77.529 39.084)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TIAH','3020','3020.0000','HGX','252.9700','George Bush Intercontinental Airport','-95.56700','30.06500','77.10526',GeometryFromText('POINT(-95.567 30.065)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TICH','3021','3021.0000','ICT','1350.4600','Wichita Mid-Continent Airport','-97.43700','37.50700','411.62021',GeometryFromText('POINT(-97.437 37.507)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TIDS','3022','3022.0000','IND','847.1500','Indianapolis International Airport','-86.43600','39.63700','258.21132',GeometryFromText('POINT(-86.436 39.637)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TJFK','3023','3023.0000','OKX','111.8800','John F. Kennedy International Airpor','-73.88100','40.58900','34.10102',GeometryFromText('POINT(-73.881 40.589)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TLAS','3024','3024.0000','VEF','2057.8400','Las Vegas McCarran International Air','-115.00700','36.14400','627.22963',GeometryFromText('POINT(-115.007 36.144)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TMCI','3025','3025.0000','EAX','1089.9500','Kansas City International Airport','-94.74200','39.49800','332.21676',GeometryFromText('POINT(-94.742 39.498)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TMCO','3026','3026.0000','MLB','168.6400','Orlando International Airport','-81.32600','28.34400','51.40147',GeometryFromText('POINT(-81.326 28.344)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TMDW','3027','3027.0000','LOT','763.1600','Chicago Midway Airport','-87.73000','41.65100','232.61117',GeometryFromText('POINT(-87.73 41.651)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TMEM','3028','3028.0000','MEG','483.2900','Memphis International Airport','-89.99300','34.89600','147.30679',GeometryFromText('POINT(-89.993 34.896)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TMIA','3029','3029.0000','MFL','124.6800','Miami International Airport','-80.49100','25.75800','38.00246',GeometryFromText('POINT(-80.491 25.758)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TMKE','3030','3030.0000','MKX','933.1200','General Mitchell International Airpo','-88.04600','42.81900','284.41498',GeometryFromText('POINT(-88.046 42.819)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TMSP','3031','3031.0000','MPX','1120.4600','Minneapolis St. Paul International A','-92.93300','44.87100','341.51621',GeometryFromText('POINT(-92.933 44.871)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TMSY','3032','3032.0000','LIX','98.7600','Louis Armstrong New Orleans Internat','-90.40300','30.02200','30.10205',GeometryFromText('POINT(-90.403 30.022)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TOKC','3033','3033.0000','OUN','1308.1300','Will Rogers World Airport','-97.51000','35.27600','398.71802',GeometryFromText('POINT(-97.51 35.276)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TORD','3034','3034.0000','LOT','743.8000','Chicago O''Hare International Airport','-87.85800','41.79700','226.71024',GeometryFromText('POINT(-87.858 41.797)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TPBI','3035','3035.0000','MFL','133.2100','Palm Beach International Airport','-80.27300','26.68800','40.60241',GeometryFromText('POINT(-80.273 26.688)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TPHL','3036','3036.0000','PHI','153.2200','Philadelphia International Airport','-75.06900','39.94900','46.70146',GeometryFromText('POINT(-75.069 39.949)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TPHX','3037','3037.0000','PSR','1088.9600','Phoenix International Airport','-112.16300','33.42100','331.91501',GeometryFromText('POINT(-112.163 33.421)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TPIT','3038','3038.0000','PBZ','1386.2200','Pittsburgh International Airport','-80.48600','40.50100','422.51986',GeometryFromText('POINT(-80.486 40.501)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TRDU','3039','3039.0000','RAH','515.1200','Raleigh-Durham International Airport','-78.69700','36.00200','157.00858',GeometryFromText('POINT(-78.697 36.002)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TSDF','3040','3040.0000','LMK','731.3300','Louisville International Airport','-85.61000','38.04600','222.90938',GeometryFromText('POINT(-85.61 38.046)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TSJU','3041','3041.0000','SJU','156.8300','Luis Munoz Marin International Airpo','-66.17900','18.47400','47.80178',GeometryFromText('POINT(-66.179 18.474)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TSLC','3042','3042.0000','SLC','4294.5000','Salt Lake City International Airport','-111.93000','40.96700','1308.96360',GeometryFromText('POINT(-111.93 40.967)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TSTL','3043','3043.0000','LSX','646.6900','Lambert-St. Louis International Airp','-90.48900','38.80500','197.11111',GeometryFromText('POINT(-90.489 38.805)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TTPA','3044','3044.0000','TBW','92.5200','Tampa International Airport','-82.51800','27.86000','28.20010',GeometryFromText('POINT(-82.518 27.86)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('TTUL','3045','3045.0000','TSA','823.2000','Tulsa International Airport','-95.82700','36.07100','250.91136',GeometryFromText('POINT(-95.827 36.071)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('EERI','4105','4105.0000','CLE','1173.0000','Erie','-80.15700','42.01800','357.53040',GeometryFromText('POINT(-80.157 42.018)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('FQKW','4020','4020.0000','SEW','1513.0000','Makah','-124.67600','48.37200','461.16240',GeometryFromText('POINT(-124.676 48.372)',4326) );
|
||||
INSERT INTO "awips"."radar_spatial" ("rda_id","rpg_id_dec","immutablex","wfo_id","eqp_elv","name","lon","lat","elevmeter",the_geom) VALUES ('FQWA','4043','4043.0000','BIS','2575.0000','Watford City','-103.78100','47.67900','784.86000',GeometryFromText('POINT(-103.781 47.679)',4326) );
|
||||
END;
|
|
@ -1,125 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
#
|
||||
# A script wrapper around a UEngine call that is meant to get all available
|
||||
# raob data in the A-II database over a specified range of times. The data
|
||||
# is output to stdout as ASCII. This version can adapt to use a python
|
||||
# stub that calls the data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2gtraob.csh {p} yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm
|
||||
#
|
||||
# The literal p flag is optional. The p flag means preserve
|
||||
# the final version of the python submitted to the UEngine instead of
|
||||
# cleaning it up. The path to the finalized python is /tmp/a2gtraobNNNNN.py
|
||||
# where NNNNN is a unix process id.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Oct 10, 2014 3595 nabowle Initial modification. Fix sed call.
|
||||
# Oct 10, 2014 3595 nabowle Handle DAF version.
|
||||
#
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
if ( ! $?FXA_LOCAL_SITE ) set FXA_LOCAL_SITE = xxxx
|
||||
if ( ! $?FXA_INGEST_SITE ) set FXA_INGEST_SITE = $FXA_LOCAL_SITE
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
set stubbase = a2gtraobStub.py
|
||||
set stubpy = ./${stubbase}
|
||||
if ( $?FXA_HOME ) then
|
||||
if ( -e ./${stubbase} ) then
|
||||
set stubpy = ./${stubbase}
|
||||
else if ( -e $FXA_HOME/src/dm/raob/${stubbase} ) then
|
||||
set stubpy = $FXA_HOME/src/dm/raob/${stubbase}
|
||||
else if ( -e $FXA_HOME/bin/${stubbase} ) then
|
||||
set stubpy = $FXA_HOME/bin/${stubbase}
|
||||
endif
|
||||
endif
|
||||
|
||||
set staInf = $PWD/wmoToNameRaob.txt
|
||||
if ( $?FXA_HOME ) then
|
||||
if ( -e $FXA_HOME/data/wmoToNameRaob.txt ) \
|
||||
set staInf = $FXA_HOME/data/wmoToNameRaob.txt
|
||||
endif
|
||||
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
# Replace first field with station names substitutions in wmoToNameRaob.txt or
|
||||
# with what's stored in the database. They are similar but do not match 100%.
|
||||
/awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4" | sed -f $staInf
|
||||
# /awips2/python/bin/python $stubpy -b "$1 $2" -e "$3 $4" --use-station-name
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
set specpy = /tmp/a2gtraob${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
cat $stubpy | sed "s/BBBBB/$1 $2/g" | sed "s/EEEEE/$3 $4/g" > $specpy
|
||||
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | sed -n '2,$p' | \
|
||||
sed -f $staInf
|
||||
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
|
|
@ -1,338 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets all available raob data in the A-II database over a specified range of
|
||||
# times. The data is output to stdout as ASCII.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Oct 10, 2014 3595 nabowle Initial modification. Fix Man and SigW indices.
|
||||
# Oct 10, 2014 3595 nabowle Replace UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("-b", action="store", dest="start",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="start")
|
||||
parser.add_argument("-e", action="store", dest="end",
|
||||
help="The end of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="end")
|
||||
parser.add_argument("--use-station-name", action='store_true', default=False,
|
||||
dest="stationname", help="Output the station name instead of station id for the first output field.")
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
# The multi-dimensional parameters.
|
||||
MAN_PARAMS = set(['prMan', 'htMan', 'tpMan', 'tdMan', 'wdMan', 'wsMan'])
|
||||
TROP_PARAMS = set(['prTrop', 'tpTrop', 'tdTrop', 'wdTrop', 'wsTrop'])
|
||||
MAXW_PARAMS = set(['prMaxW', 'wdMaxW', 'wsMaxW'])
|
||||
SIGT_PARAMS = set(['prSigT', 'tpSigT', 'tdSigT'])
|
||||
SIGW_PARAMS = set(['htSigW', 'wdSigW', 'wsSigW'])
|
||||
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
start = user_args.start
|
||||
end = user_args.end
|
||||
|
||||
if not start or not end:
|
||||
print >> sys.stderr, "Start or End date not provided"
|
||||
return
|
||||
|
||||
beginRange = datetime.strptime( start + ":00.0", "%Y-%m-%d %H:%M:%S.%f")
|
||||
endRange = datetime.strptime( end + ":59.9", "%Y-%m-%d %H:%M:%S.%f")
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("bufrua")
|
||||
req.setParameters("wmoStaNum", "validTime", "rptType", "staElev", "numMand",
|
||||
"numSigT", "numSigW", "numTrop", "numMwnd", "staName")
|
||||
req.getParameters().extend(MAN_PARAMS)
|
||||
req.getParameters().extend(TROP_PARAMS)
|
||||
req.getParameters().extend(MAXW_PARAMS)
|
||||
req.getParameters().extend(SIGT_PARAMS)
|
||||
req.getParameters().extend(SIGW_PARAMS)
|
||||
|
||||
geometries = DataAccessLayer.getGeometryData(req, timerange)
|
||||
|
||||
if not geometries :
|
||||
# print "couldn't get data"
|
||||
return
|
||||
|
||||
|
||||
manGeos = []
|
||||
tropGeos = []
|
||||
maxwGeos = []
|
||||
sigtGeos = []
|
||||
sigwGeos = []
|
||||
# D-2D format files expect depression
|
||||
tdman = []
|
||||
tdsigt = []
|
||||
tdtrop = []
|
||||
msg = ""
|
||||
for geoData in geometries :
|
||||
if set(geoData.getParameters()) & MAN_PARAMS :
|
||||
manGeos.append(geoData)
|
||||
td = geoData.getNumber("tdMan")
|
||||
tp = geoData.getNumber("tpMan")
|
||||
if td >150 and td<=tp :
|
||||
tdman.append(tp-td)
|
||||
else :
|
||||
tdman.append(-9999.0)
|
||||
continue
|
||||
if set(geoData.getParameters()) & TROP_PARAMS :
|
||||
tropGeos.append(geoData)
|
||||
td = geoData.getNumber("tdTrop")
|
||||
tp = geoData.getNumber("tpTrop")
|
||||
if td>150 and td<=tp :
|
||||
tdtrop.append(tp-td)
|
||||
else :
|
||||
tdtrop.append(-9999.0)
|
||||
continue
|
||||
if set(geoData.getParameters()) & MAXW_PARAMS :
|
||||
maxwGeos.append(geoData)
|
||||
continue
|
||||
if set(geoData.getParameters()) & SIGT_PARAMS :
|
||||
sigtGeos.append(geoData)
|
||||
td = geoData.getNumber("tdSigT")
|
||||
tp = geoData.getNumber("tpSigT")
|
||||
if td>150 and td<=tp :
|
||||
tdsigt.append(tp-td)
|
||||
else :
|
||||
tdsigt.append(-9999.0)
|
||||
continue
|
||||
if set(geoData.getParameters()) & SIGW_PARAMS :
|
||||
sigwGeos.append(geoData)
|
||||
continue
|
||||
|
||||
if len(manGeos) == 0 and len(sigtGeos) == 0 and len(sigwGeos) == 0 or geoData.getNumber("rptType") > 2022 :
|
||||
manGeos = []
|
||||
tropGeos = []
|
||||
maxwGeos = []
|
||||
sigtGeos = []
|
||||
sigwGeos = []
|
||||
tdman = []
|
||||
tdsigt = []
|
||||
tdtrop = []
|
||||
continue
|
||||
|
||||
if user_args.stationname and geoData.getString("staName") :
|
||||
msg += geoData.getString("staName") + ","
|
||||
else :
|
||||
msg += geoData.getString("wmoStaNum") + ","
|
||||
msg += str(geoData.getNumber("validTime")/1000) + ","
|
||||
msg += "%.4f"%geoData.getGeometry().y + ","
|
||||
msg += "%.4f"%geoData.getGeometry().x + ","
|
||||
msg += "%.0f"%geoData.getNumber("staElev") + ","
|
||||
msg += geoData.getString("wmoStaNum") + ","
|
||||
|
||||
kk = len(manGeos)
|
||||
msg += str(kk) + ","
|
||||
if kk>0 :
|
||||
msg += "%.1f"%manGeos[0].getNumber("prMan")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%manGeos[k].getNumber("prMan")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%geoData.getNumber("staElev")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%manGeos[k].getNumber("htMan")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%manGeos[0].getNumber("tpMan")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%manGeos[k].getNumber("tpMan")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%tdman[0]
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%tdman[k];
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%manGeos[0].getNumber("wsMan")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%manGeos[k].getNumber("wsMan")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%manGeos[0].getNumber("wdMan")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%manGeos[k].getNumber("wdMan")
|
||||
k += 1
|
||||
msg += ","
|
||||
else :
|
||||
msg += ",,,,,,"
|
||||
|
||||
kk = len(sigtGeos)
|
||||
msg += str(kk) + ","
|
||||
if kk>0 :
|
||||
msg += "%.1f"%sigtGeos[0].getNumber("prSigT")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%sigtGeos[k].getNumber("prSigT")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%sigtGeos[0].getNumber("tpSigT")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%sigtGeos[k].getNumber("tpSigT")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%tdsigt[0]
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%tdsigt[k]
|
||||
k += 1
|
||||
msg += ","
|
||||
else :
|
||||
msg += ",,,"
|
||||
|
||||
kk = len(sigwGeos)
|
||||
msg += str(kk) + ","
|
||||
if kk>0 :
|
||||
msg += "%.1f"%sigwGeos[0].getNumber("htSigW")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%sigwGeos[k].getNumber("htSigW")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%sigwGeos[0].getNumber("wsSigW")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%sigwGeos[k].getNumber("wsSigW")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%sigwGeos[0].getNumber("wdSigW")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%sigwGeos[k].getNumber("wdSigW")
|
||||
k += 1
|
||||
msg += ","
|
||||
else :
|
||||
msg += ",,,"
|
||||
|
||||
kk = len(tropGeos)
|
||||
msg += str(kk) + ","
|
||||
if kk>0 :
|
||||
msg += "%.1f"%tropGeos[0].getNumber("prTrop")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%tropGeos[k].getNumber("prTrop")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%tropGeos[0].getNumber("tpTrop")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%tropGeos[k].getNumber("tpTrop")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%tdtrop[0]
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%tdtrop[k]
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%tropGeos[0].getNumber("wsTrop")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%tropGeos[k].getNumber("wsTrop")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%tropGeos[0].getNumber("wdTrop")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%tropGeos[k].getNumber("wdTrop")
|
||||
k += 1
|
||||
msg += ","
|
||||
else :
|
||||
msg += ",,,,,"
|
||||
|
||||
kk = len(maxwGeos)
|
||||
msg += str(kk) + ","
|
||||
if kk>0 :
|
||||
msg += "%.1f"%maxwGeos[0].getNumber("prMaxW")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%maxwGeos[k].getNumber("prMaxW")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%maxwGeos[0].getNumber("wsMaxW")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%maxwGeos[k].getNumber("wsMaxW")
|
||||
k += 1
|
||||
msg += ","
|
||||
|
||||
msg += "%.1f"%maxwGeos[0].getNumber("wdMaxW")
|
||||
k = 1
|
||||
while k < kk :
|
||||
msg += "|" + "%.1f"%maxwGeos[k].getNumber("wdMaxW")
|
||||
k += 1
|
||||
else :
|
||||
msg += ",,"
|
||||
msg += "\n"
|
||||
|
||||
manGeos = []
|
||||
tropGeos = []
|
||||
maxwGeos = []
|
||||
sigtGeos = []
|
||||
sigwGeos = []
|
||||
tdman = []
|
||||
tdsigt = []
|
||||
tdtrop = []
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,174 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
#
|
||||
# A script wrapper that is meant to get inventories of satellite data
|
||||
# from the A-II database. The data is output to stdout as ASCII.
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2invsat.csh {p} sector channel {satid}
|
||||
#
|
||||
# p - A literal p. (optional)
|
||||
# sector - sector id
|
||||
# channel - channel id
|
||||
# satid - (optional) satellite id
|
||||
#
|
||||
# Returns a list of times with data for the specified sector/channel.
|
||||
#
|
||||
# The ids can be either D-2D integer ids, or AWIPS-II ascii ids, in which
|
||||
# case they need to be quoted on the command line.
|
||||
#
|
||||
# Integer ids can be looked up in a2satInfo.txt, channel id corresponds to
|
||||
# the physicalElement, and satid corresponds to the creatingEntity.
|
||||
#
|
||||
# The literal p option means preserve the final version of the python
|
||||
# submitted to the UEngine instead of cleaning it up. The path to the
|
||||
# finalized python is /tmp/a2invsatNNNNN.py where NNNNN is a unix process id.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-23 3601 nabowle Initial modification. Properly calls DAF. Make a2satInfo.txt optional.
|
||||
#
|
||||
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./a2invsatStub.py ) then
|
||||
set stubpy = ./a2invsatStub.py
|
||||
else if ( -e $mydir/a2invsatStub.py ) then
|
||||
set stubpy = $mydir/a2invsatStub.py
|
||||
else if ( -e $FXA_HOME/src/dm/sat/a2invsatStub.py ) then
|
||||
set stubpy = $FXA_HOME/src/dm/sat/a2invsatStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2invsatStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2invsatStub.py
|
||||
else
|
||||
bash -c "echo could not find a2invsatStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
|
||||
#
|
||||
# Locate file containing mapping between D-2D interger ids and AWIPS-II ascii
|
||||
# ids for sectors, channels, and satellites.
|
||||
#
|
||||
if ( -e ./a2satInfo.txt ) then
|
||||
set satInf = ./a2satInfo.txt
|
||||
else if ( -e $mydir/a2satInfo.txt ) then
|
||||
set satInf = $mydir/a2satInfo.txt
|
||||
else if ( -e $FXA_HOME/src/dm/sat/a2satInfo.txt ) then
|
||||
set satInf = $FXA_HOME/src/dm/sat/a2satInfo.txt
|
||||
else if ( -e $FXA_HOME/data/a2satInfo.txt ) then
|
||||
set satInf = $FXA_HOME/data/a2satInfo.txt
|
||||
else
|
||||
set satInf = ""
|
||||
set sss = "$1"
|
||||
set ccc = "$2"
|
||||
if ( "$3" == "" ) then
|
||||
set eee = ""
|
||||
else
|
||||
set eee = "$3"
|
||||
endif
|
||||
endif
|
||||
#
|
||||
#
|
||||
if ( $satInf != "" ) then
|
||||
set sss = `grep "^ *$1|.*sectorID" $satInf | cut '-d|' -f3`
|
||||
if ( "$sss" == "" ) set sss = "$1"
|
||||
set ccc = `grep "^ *$2|.*physicalElement" $satInf | cut '-d|' -f3`
|
||||
if ( "$ccc" == "" ) set ccc = "$2"
|
||||
if ( "$3" == "" ) then
|
||||
set eee = ""
|
||||
else
|
||||
set eee = `grep "^ *$3|.*creatingEntity" $satInf | cut '-d|' -f3`
|
||||
if ( "$eee" == "" ) set eee = "$3"
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
if ( "$eee" == "" ) then
|
||||
/awips2/python/bin/python $stubpy --sectorID "$sss" --physicalElement "$ccc"
|
||||
else
|
||||
/awips2/python/bin/python $stubpy --sectorID "$sss" --physicalElement "$ccc" --creatingEntity "$eee"
|
||||
endif
|
||||
else
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
#
|
||||
# Modify the text of special tags in stub to create finalized script.
|
||||
#
|
||||
set specpy = /tmp/a2invsat${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
if ( "$eee" == "" ) then
|
||||
cat $stubpy | sed "s/SSSSS/$sss/g" | sed "s/CCCCC/$ccc/g" | \
|
||||
sed 's/^.*EEEEE.*$//g' >> $specpy
|
||||
else
|
||||
cat $stubpy | sed "s/SSSSS/$sss/g" | sed "s/CCCCC/$ccc/g" | \
|
||||
sed "s/EEEEE/$eee/g" >> $specpy
|
||||
endif
|
||||
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) |& grep attributes | cut '-d"' -f4
|
||||
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
endif
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets inventories of satellite data from the A-II database. The data is output
|
||||
# to stdout as ASCII.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 2014-10-23 3601 nabowle Initial modification. Convert to DAF.
|
||||
#
|
||||
|
||||
import argparse
|
||||
import numpy
|
||||
import sys
|
||||
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)", metavar="hostname")
|
||||
parser.add_argument("--sectorID", action="store", dest="sectorID",
|
||||
help="The sector ID.", metavar="sectorID")
|
||||
parser.add_argument("--physicalElement", action="store", dest="physicalElement",
|
||||
help="The physical element.", metavar="physicalElement")
|
||||
parser.add_argument("--creatingEntity", action="store", dest="creatingEntity",
|
||||
help="(optional) The creating entity", metavar="creatingEntity")
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("satellite")
|
||||
|
||||
if not user_args.sectorID or not user_args.physicalElement:
|
||||
print >> sys.stderr, "sectorID or physicalElement not provided"
|
||||
return
|
||||
req.setParameters(user_args.physicalElement)
|
||||
req.addIdentifier("sectorID", user_args.sectorID)
|
||||
|
||||
if user_args.creatingEntity:
|
||||
req.addIdentifier("creatingEntity", user_args.creatingEntity)
|
||||
|
||||
msg = "";
|
||||
times = DataAccessLayer.getAvailableTimes(req)
|
||||
for time in times:
|
||||
timeStr = str(time)
|
||||
msg += timeStr[0:19] + ".0" + timeStr[19:] + "\n"
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,243 +0,0 @@
|
|||
#!/bin/csh
|
||||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
#
|
||||
# A script wrapper that is meant to get data for a single satellite sector
|
||||
# from the A-II database. The result is output to stdout as ASCII.
|
||||
# The first line returned has the dimensions of the image, the time, and the
|
||||
# source satellite of the data set returned. The rest is one line per row
|
||||
# of satellite data. The data for each row undergoes second order compression
|
||||
# Each pixel value of 0 or 255 is encoded as @ or #, respectively. Otherwise
|
||||
# the first pixel on the row and any pixel that is more than 20 counts
|
||||
# different than the previous one is encoded as two hex digits. Pixels the
|
||||
# same as the previous are encoded as a period, pixels from 1 to 20 counts less
|
||||
# than the previous are encoded as G through Z, and pixels from 1 to 20 counts
|
||||
# more than the previous are encoded as g through z. There are no delimeters
|
||||
# between the encoding for each pixel.
|
||||
#
|
||||
# This version can adapt to use a python stub that calls the
|
||||
# data access framework.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# a2rdsat.csh {p} {h|i} sector channel {satid} date time {slop} {partition}
|
||||
#
|
||||
# p - (optional) A literal p.
|
||||
# h|i - (optional) A literal h or literal i.
|
||||
# Output pure undelimited hex or delimited integer values.
|
||||
# sector - sector id
|
||||
# channel - channel id
|
||||
# satid - (optional) satellite id
|
||||
# date - yyyy-mm-dd
|
||||
# time - hh:mm
|
||||
# slop - seconds of slop either side, defaults to 180
|
||||
# partition - (optional) upper case letter indicating partition to get. For
|
||||
# very large images data may need to be returned in pieces.
|
||||
# Allowable partitions are A through D.
|
||||
#
|
||||
# The ids can be either D-2D integer ids, or AWIPS-II ascii ids, in which
|
||||
# case they may need to be quoted on the command line.
|
||||
#
|
||||
# Integer ids can be looked up in a2satInfo.txt, channel id corresponds to
|
||||
# the physicalElement, and satid corresponds to the creatingEntity.
|
||||
#
|
||||
# The literal p option means preserve the final version of the python
|
||||
# submitted to the UEngine instead of cleaning it up. The path to the
|
||||
# finalized python is /tmp/a2rdsatNNNNN.py where NNNNN is a unix process id.
|
||||
# The literal n option means the first line of output is the dimension of
|
||||
# the grid returned.
|
||||
#
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Sep 29, 2014 3596 nabowle Initial modification. Handle daf conversion.
|
||||
#
|
||||
#
|
||||
#
|
||||
set rmpy = yes
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
set encoding = 2
|
||||
if ( "$1" == "h" ) then
|
||||
set encoding = 1
|
||||
shift
|
||||
endif
|
||||
if ( "$1" == "i" ) then
|
||||
set encoding = 0
|
||||
shift
|
||||
endif
|
||||
if ( "$1" == "p" ) then
|
||||
set rmpy = no
|
||||
shift
|
||||
endif
|
||||
#
|
||||
# Identify directory this script is in, will be one of the directories we
|
||||
# search for other files in.
|
||||
#
|
||||
set mydir = `dirname $0`
|
||||
set d1 = `echo $mydir | cut -c1`
|
||||
if ( "$mydir" == '.' ) then
|
||||
set mydir = $PWD
|
||||
else if ( "$d1" != "/" ) then
|
||||
set mydir = $PWD/$mydir
|
||||
endif
|
||||
set mydir = `(cd $mydir ; pwd)`
|
||||
if ( ! $?FXA_HOME ) set FXA_HOME = xxxx
|
||||
#
|
||||
# Locate python stub that we will modify to create the final python logic.
|
||||
#
|
||||
if ( -e ./a2rdsatStub.py ) then
|
||||
set stubpy = ./a2rdsatStub.py
|
||||
else if ( -e $mydir/a2rdsatStub.py ) then
|
||||
set stubpy = $mydir/a2rdsatStub.py
|
||||
else if ( -e $FXA_HOME/src/dm/sat/a2rdsatStub.py ) then
|
||||
set stubpy = $FXA_HOME/src/dm/sat/a2rdsatStub.py
|
||||
else if ( -e $FXA_HOME/bin/a2rdsatStub.py ) then
|
||||
set stubpy = $FXA_HOME/bin/a2rdsatStub.py
|
||||
else
|
||||
bash -c "echo could not find a2rdsatStub.py 1>&2"
|
||||
exit
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# Locate file containing mapping between D-2D interger ids and AWIPS-II ascii
|
||||
# ids for sectors, channels, and satellites.
|
||||
#
|
||||
if ( -e ./a2satInfo.txt ) then
|
||||
set satInf = ./a2satInfo.txt
|
||||
else if ( -e $mydir/a2satInfo.txt ) then
|
||||
set satInf = $mydir/a2satInfo.txt
|
||||
else if ( -e $FXA_HOME/src/dm/sat/a2satInfo.txt ) then
|
||||
set satInf = $FXA_HOME/src/dm/sat/a2satInfo.txt
|
||||
else if ( -e $FXA_HOME/data/a2satInfo.txt ) then
|
||||
set satInf = $FXA_HOME/data/a2satInfo.txt
|
||||
else
|
||||
set satInf = ""
|
||||
set sss = "$1"
|
||||
set ccc = "$2"
|
||||
set eee = `echo $3 | grep -v '.*-'`
|
||||
endif
|
||||
#
|
||||
#
|
||||
if ( $satInf != "" ) then
|
||||
set sss = `grep "^ *$1|.*sectorID" $satInf | cut '-d|' -f3`
|
||||
if ( "$sss" == "" ) set sss = "$1"
|
||||
set ccc = `grep "^ *$2|.*physicalElement" $satInf | cut '-d|' -f3`
|
||||
if ( "$ccc" == "" ) set ccc = "$2"
|
||||
set eee = `echo $3 | grep -v '.*-'`
|
||||
if ( "$eee" != "" ) then
|
||||
set eee = `grep "^ *$eee|.*creatingEntity" $satInf | cut '-d|' -f3`
|
||||
if ( "$eee" == "" ) set eee = "$3"
|
||||
endif
|
||||
endif
|
||||
|
||||
shift
|
||||
shift
|
||||
|
||||
if ( "$eee" != "" ) shift
|
||||
set slop = `echo $3 | grep '[0-9]'`
|
||||
if ( "$slop" == "" ) set slop = 180
|
||||
|
||||
set ppp = `echo $argv[$#argv] | grep '^[A-Z]$'`
|
||||
if ( "$ppp" == "" ) set ppp = 0
|
||||
|
||||
#
|
||||
# Determine if we are using the data access framework or the uEngine.
|
||||
#
|
||||
grep DataAccessLayer $stubpy >& /dev/null
|
||||
if ( $status == 0 ) then
|
||||
set opts = ""
|
||||
if ( "$eee" != "" ) then
|
||||
set opts = "--entity ${eee}"
|
||||
endif
|
||||
|
||||
if ( "$encoding" == "1" ) then
|
||||
set opts = "$opts --hex"
|
||||
else if ( "$encoding" == "0" ) then
|
||||
set opts = "$opts --int"
|
||||
endif
|
||||
|
||||
/awips2/python/bin/python $stubpy --sector "${sss}" --physical "${ccc}" --datetime "$1 $2" --part $ppp --slop $slop $opts
|
||||
else
|
||||
#
|
||||
# Get program that can do math with ascii time string, then use this to
|
||||
# properly encode range of times for which we look for data.
|
||||
#
|
||||
if ( -x ./gtasUtil ) then
|
||||
set gtasUtil = ./gtasUtil
|
||||
else if ( -x $mydir/gtasUtil ) then
|
||||
set gtasUtil = $mydir/gtasUtil
|
||||
else if ( -x $FXA_HOME/src/dm/point/gtasUtil ) then
|
||||
set gtasUtil = $FXA_HOME/src/dm/point/gtasUtil
|
||||
else if ( -x $FXA_HOME/bin/gtasUtil ) then
|
||||
set gtasUtil = $FXA_HOME/bin/gtasUtil
|
||||
else
|
||||
bash -c "echo could not find gtasUtil executable 1>&2"
|
||||
exit
|
||||
endif
|
||||
|
||||
#
|
||||
# Set up the environment we need to run the UEngine.
|
||||
#
|
||||
set method = "uengine"
|
||||
if ( -e ./UEngine.cshsrc ) then
|
||||
set ueenv = ./UEngine.cshsrc
|
||||
else if ( -e $mydir/UEngine.cshsrc ) then
|
||||
set ueenv = $mydir/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/src/dm/point/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/src/dm/point/UEngine.cshsrc
|
||||
else if ( -e $FXA_HOME/bin/UEngine.cshsrc ) then
|
||||
set ueenv = $FXA_HOME/bin/UEngine.cshsrc
|
||||
else
|
||||
bash -c "echo could not find UEngine.cshsrc 1>&2"
|
||||
exit
|
||||
endif
|
||||
source $ueenv
|
||||
|
||||
set aaa = `$gtasUtil = $1 $2 -$slop`
|
||||
set bbb = `$gtasUtil = $1 $2 $slop`
|
||||
|
||||
set specpy = /tmp/a2rdsat${$}.py
|
||||
rm -rf $specpy >& /dev/null
|
||||
touch $specpy
|
||||
chmod 775 $specpy
|
||||
if ( "$eee" == "" ) then
|
||||
cat $stubpy | sed "s/SSSSS/$sss/g" | sed "s/CCCCC/$ccc/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | \
|
||||
sed 's/^.*EEEEE.*$//g'| sed "s/PPPPP/$ppp/g" | \
|
||||
sed "s/XXXXX/$encoding/g" >> $specpy
|
||||
else
|
||||
cat $stubpy | sed "s/SSSSS/$sss/g" | sed "s/CCCCC/$ccc/g" | \
|
||||
sed "s/AAAAA/$aaa/g" | sed "s/BBBBB/$bbb/g" | \
|
||||
sed "s/EEEEE/$eee/g" | sed "s/PPPPP/$ppp/g" | \
|
||||
sed "s/XXXXX/$encoding/g" >> $specpy
|
||||
endif
|
||||
|
||||
cd $UE_BIN_PATH
|
||||
( uengine -r python < $specpy ) | grep -v '<' | grep -v Response
|
||||
|
||||
if ( "$rmpy" == "yes" ) rm -rf $specpy >& /dev/null
|
||||
#
|
||||
endif
|
|
@ -1,227 +0,0 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
||||
# Gets data for a single satellite sector from the A-II database. The result is
|
||||
# output to stdout as ASCII. The first line returned has the dimensions of the
|
||||
# image, the time, and the source satellite of the data set returned. The rest
|
||||
# is one line per row of satellite data. The data for each row undergoes second
|
||||
# order compression Each pixel value of 0 or 255 is encoded as @ or #,
|
||||
# respectively. Otherwise the first pixel on the row and any pixel that is more
|
||||
# than 20 counts different than the previous one is encoded as two hex digits.
|
||||
# Pixels the same as the previous are encoded as a period, pixels from 1 to 20
|
||||
# counts less than the previous are encoded as G through Z, and pixels from 1 to
|
||||
# 20 counts more than the previous are encoded as g through z. There are no
|
||||
# delimeters between the encoding for each pixel.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Sep 29, 2014 3596 nabowle Initial modification. Replace UEngine with DAF.
|
||||
#
|
||||
#
|
||||
|
||||
import a2dafcommon
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
from datetime import timedelta
|
||||
from awips.dataaccess import DataAccessLayer
|
||||
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser(conflict_handler="resolve")
|
||||
parser.add_argument("-h", action="store", dest="host",
|
||||
help="EDEX server hostname (optional)",
|
||||
metavar="hostname")
|
||||
parser.add_argument("--datetime", action="store", dest="datetime",
|
||||
help="The start of the time range in YYYY-MM-DD HH:MM",
|
||||
metavar="datetime")
|
||||
parser.add_argument("--slop", action="store", dest="slop", default=180,
|
||||
help="The amount of slop, in seconds, to allow around the datetime.",
|
||||
metavar="slop", type=int)
|
||||
parser.add_argument("--sector", action="store", dest="sector",
|
||||
help="The sector ID.", metavar="sectorID")
|
||||
parser.add_argument("--physical", action="store", dest="physical",
|
||||
help="The physical element.", metavar="physicalElement")
|
||||
parser.add_argument("--entity", action="store", dest="entity",
|
||||
help="The creating entity (optional)",
|
||||
metavar="creatingEntity")
|
||||
parser.add_argument("--partition", action="store", dest="partition",
|
||||
help="Upper case letter indicating partition to get.",
|
||||
metavar="partition", default="0")
|
||||
parser.add_argument("--hex", action='store_const', dest="encoding",
|
||||
const=1, help="Hex encoding.", metavar="encoding")
|
||||
parser.add_argument("--int", action='store_const', dest="encoding",
|
||||
const=0, help="Delimited integer encoding.",
|
||||
metavar="encoding")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
user_args = get_args()
|
||||
|
||||
if user_args.host:
|
||||
DataAccessLayer.changeEDEXHost(user_args.host)
|
||||
|
||||
slop = user_args.slop
|
||||
|
||||
dateTimeStr = user_args.datetime
|
||||
if not dateTimeStr:
|
||||
print >> sys.stderr, "DateTime not provided"
|
||||
return
|
||||
|
||||
physicalElement = user_args.physical
|
||||
if not physicalElement:
|
||||
print >> sys.stderr, "PhysicalElement not provided"
|
||||
return
|
||||
|
||||
sectorID = user_args.sector
|
||||
if not sectorID:
|
||||
print >> sys.stderr, "SectorID not provided"
|
||||
return
|
||||
|
||||
creatingEntity = user_args.entity
|
||||
part = user_args.partition
|
||||
encoding = user_args.encoding
|
||||
|
||||
dateTime = datetime.strptime(dateTimeStr, "%Y-%m-%d %H:%M")
|
||||
beginRange = dateTime - timedelta(0, slop)
|
||||
endRange = dateTime + timedelta(0, slop)
|
||||
|
||||
timerange = TimeRange(beginRange, endRange)
|
||||
|
||||
req = DataAccessLayer.newDataRequest("satellite")
|
||||
req.setParameters(physicalElement)
|
||||
req.setLocationNames(sectorID)
|
||||
|
||||
if creatingEntity:
|
||||
req.addIdentifier("creatingEntity", creatingEntity)
|
||||
|
||||
grids = DataAccessLayer.getGridData(req, timerange)
|
||||
|
||||
if not grids:
|
||||
# print "Data not available"
|
||||
return
|
||||
|
||||
grid = grids[0]
|
||||
data = grid.getRawData()
|
||||
myent = grid.getAttribute("creatingEntity")
|
||||
mytime = a2dafcommon.datatime_to_string(grid.getDataTime()) + ".0"
|
||||
|
||||
if data is None or len(data) == 0:
|
||||
# print "No data."
|
||||
return
|
||||
|
||||
yLen = len(data[0])
|
||||
xLen = len(data)
|
||||
|
||||
plus = " ghijklmnopqrstuvwxyz"
|
||||
minus = " GHIJKLMNOPQRSTUVWXYZ"
|
||||
limit = 10000000
|
||||
if encoding == 1 :
|
||||
limit = limit/2
|
||||
elif encoding == 0 :
|
||||
limit = limit/8
|
||||
|
||||
k = xLen * ( yLen / 4 )
|
||||
j = 0
|
||||
nxy = yLen*xLen
|
||||
if part=="D" :
|
||||
j = k+k+k
|
||||
elif part=="C" :
|
||||
j = k+k
|
||||
nxy = j+k
|
||||
elif part=="B" :
|
||||
j = k
|
||||
nxy = j+k
|
||||
elif part=="A" or nxy>limit :
|
||||
nxy = k
|
||||
|
||||
msg = ""
|
||||
if part<="A" :
|
||||
msg += str(xLen) + " " + str(yLen) + " "
|
||||
msg += mytime + " " + myent + "\n"
|
||||
|
||||
dataIdx = int(j / yLen)
|
||||
arrIdx = j % yLen
|
||||
arr = data[dataIdx]
|
||||
i = 0
|
||||
kk = None
|
||||
while j<nxy :
|
||||
i=0
|
||||
kk = int(arr[arrIdx])
|
||||
if kk<0 : kk += 256
|
||||
if encoding == 0 :
|
||||
msg += str(kk)
|
||||
elif encoding == 1 :
|
||||
msg += "%2.2x"%kk
|
||||
elif kk == 0 :
|
||||
msg += "@"
|
||||
elif kk == 255 :
|
||||
msg += "#"
|
||||
else :
|
||||
msg += "%2.2x"%kk
|
||||
i+=1
|
||||
arrIdx+=1
|
||||
if arrIdx >= yLen :
|
||||
arrIdx = 0
|
||||
dataIdx += 1
|
||||
if dataIdx >= xLen:
|
||||
break
|
||||
arr = data[dataIdx]
|
||||
while i<xLen :
|
||||
k = int(arr[arrIdx])
|
||||
if k<0 : k += 256
|
||||
if encoding == 0 :
|
||||
msg += " "+str(k)
|
||||
elif encoding == 1 :
|
||||
msg += "%2.2x"%k
|
||||
elif k==0 :
|
||||
msg += "@"
|
||||
elif k == 255 :
|
||||
msg += "#"
|
||||
elif k==kk :
|
||||
msg += "."
|
||||
elif k>kk+20 or k<kk-20 :
|
||||
msg += "%2.2x"%k
|
||||
elif k>kk :
|
||||
msg += plus[k-kk]
|
||||
else :
|
||||
msg += minus[kk-k]
|
||||
kk = k
|
||||
|
||||
arrIdx+=1
|
||||
i+=1
|
||||
if arrIdx >= yLen :
|
||||
arrIdx = 0
|
||||
dataIdx += 1
|
||||
if dataIdx >= xLen:
|
||||
break
|
||||
arr = data[dataIdx]
|
||||
|
||||
msg += "\n"
|
||||
j+= xLen
|
||||
|
||||
print msg.strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,2 +1,8 @@
|
|||
[metadata]
|
||||
description-file = README.rst
|
||||
source-dir = docs/source
|
||||
build-dir = docs/build
|
||||
|
||||
[versioneer]
|
||||
VCS = git
|
||||
style = pep440
|
||||
|
|
Loading…
Add table
Reference in a new issue