Merge branch 'master_13.3.1' (13.3.1-18) into omaha_13.3.1
Former-commit-id:2bc12f7a23
[formerly0f000f4485
] [formerly2bc12f7a23
[formerly0f000f4485
] [formerly327d05f3b5
[formerly 131cf22b16b3109fdc13a8346524fc8d2e230b7f]]] Former-commit-id:327d05f3b5
Former-commit-id:0342b648b6
[formerlyc7b9690456
] Former-commit-id:f22108c973
This commit is contained in:
commit
dc0baf57ba
7 changed files with 142 additions and 645 deletions
|
@ -43,7 +43,7 @@
|
|||
</item>
|
||||
<item>
|
||||
<key>EWW</key>
|
||||
<value>Extreme Weather Warning</value>
|
||||
<value>Extreme Wind Warning</value>
|
||||
</item>
|
||||
<item>
|
||||
<key>NOW</key>
|
||||
|
@ -137,6 +137,10 @@
|
|||
<key>FA.W</key>
|
||||
<value>FLW</value>
|
||||
</item>
|
||||
<item>
|
||||
<key>EW.W</key>
|
||||
<value>EWW</value>
|
||||
</item>
|
||||
</nnnOfIdent>
|
||||
<SegmentedNNN>WCN</SegmentedNNN>
|
||||
<SegmentedNNN>SLS</SegmentedNNN>
|
||||
|
|
|
@ -5,6 +5,14 @@ import java.util.regex.Matcher;
|
|||
import com.raytheon.viz.texteditor.util.VtecObject;
|
||||
import com.raytheon.viz.texteditor.util.VtecUtil;
|
||||
|
||||
/**
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 04/02/2013 DR 15609 Qinglu Lin Added code to prevent error message from creating
|
||||
* while nnn is SVS for Extreme Wind Warning Followup.
|
||||
*/
|
||||
|
||||
public class WmoHeaderCheck implements IQCCheck {
|
||||
|
||||
@Override
|
||||
|
@ -53,8 +61,14 @@ public class WmoHeaderCheck implements IQCCheck {
|
|||
} else if (vtec != null
|
||||
&& !QualityControl.match(nnn,
|
||||
vtec.getPhenomena() + "." + vtec.getSignificance())) {
|
||||
errorMsg += "VTEC event type (" + vtec.getPhenomena() + "."
|
||||
+ vtec.getSignificance() + ") doesn't match NNN.\n";
|
||||
if (nnn.equals("SVS") &&
|
||||
vtec.getPhenomena().equals("EW") && vtec.getSignificance().equals("W")) {
|
||||
// DR 15609. Extreme Wind Warning Followup uses SVS for nnn, as AWIPS I does.
|
||||
// Do not create error message.
|
||||
} else {
|
||||
errorMsg += "VTEC event type (" + vtec.getPhenomena() + "."
|
||||
+ vtec.getSignificance() + ") doesn't match NNN.\n";
|
||||
}
|
||||
}
|
||||
return errorMsg;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
|||
* 1-3-2013 DR 15667 M.Porricelli Made EnvironParamsLevelTable.xml
|
||||
* accessible from SITE level
|
||||
* 03/04/2013 DR 14770 D. Friedman Correct clipped grid coordinates.
|
||||
* 03/21/2013 DR 15872 D. Friedman Correct grid orientation.
|
||||
* 04/02/2013 DR 15872 D. Friedman Correct grid orientation. Ensure square grid.
|
||||
**/
|
||||
public class RPGEnvironmentalDataManager {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
|
@ -119,6 +119,8 @@ public class RPGEnvironmentalDataManager {
|
|||
|
||||
private boolean compressionEnabled = true;
|
||||
|
||||
private boolean squareGrid = true;
|
||||
|
||||
public RPGEnvironmentalDataManager() {
|
||||
try {
|
||||
initialize();
|
||||
|
@ -599,6 +601,43 @@ public class RPGEnvironmentalDataManager {
|
|||
i2 = (int) Math.round(c.x);
|
||||
j2 = maxY - (int) Math.round(c.y);
|
||||
|
||||
if (squareGrid) {
|
||||
/*
|
||||
* ORPG may have a problem with non-square grids. This will be
|
||||
* fixed in a later release of the ORPG software. For now,
|
||||
* ensure the output is square.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Try to expand one edge if needed so as to not go out of
|
||||
* bounds. If that fails, try shrinking one edge.
|
||||
*/
|
||||
int outputSpan = Math.max(i2 - i1, j2 - j1);
|
||||
boolean solved = false;
|
||||
for (int nTries = 0; !solved && nTries < 2; ++nTries) {
|
||||
solved = false;
|
||||
if (i2 - i1 != outputSpan) {
|
||||
if (i1 + outputSpan <= ge.getHigh(0)) {
|
||||
i2 = i1 + outputSpan;
|
||||
solved = true;
|
||||
} else if (i2 - outputSpan >= ge.getLow(0)) {
|
||||
i1 = i2 - outputSpan;
|
||||
solved = true;
|
||||
}
|
||||
} else if (j2 - j1 != outputSpan) {
|
||||
if (j1 + outputSpan <= ge.getHigh(1)) {
|
||||
j2 = j1 + outputSpan;
|
||||
solved = true;
|
||||
} else if (j2 - outputSpan >= ge.getLow(1)) {
|
||||
j1 = j2 - outputSpan;
|
||||
solved = true;
|
||||
}
|
||||
} else
|
||||
solved = true;
|
||||
outputSpan = Math.min(i2 - i1, j2 - j1);
|
||||
}
|
||||
}
|
||||
|
||||
if (i1 < ge.getLow(0) || i2 > ge.getHigh(0) || j1 < ge.getLow(1)
|
||||
|| j2 > ge.getHigh(1)) {
|
||||
throw new GeoInfoException(
|
||||
|
@ -1132,6 +1171,14 @@ public class RPGEnvironmentalDataManager {
|
|||
this.compressionEnabled = compressionEnabled;
|
||||
}
|
||||
|
||||
public boolean isSquareGrid() {
|
||||
return squareGrid;
|
||||
}
|
||||
|
||||
public void setSquareGrid(boolean squareGrid) {
|
||||
this.squareGrid = squareGrid;
|
||||
}
|
||||
|
||||
public String getMessages() {
|
||||
return logMessages.toString();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<!-- To send the RUC40 model to the RPG, copy this file to
|
||||
/awips2/edex/data/utility/edex_static/site/{SITE-ID}/rpgenvdata/EnvironParamsLevelTable.xml
|
||||
-->
|
||||
<configuration>
|
||||
<model name="RUC236" description="RUC 40km" />
|
||||
|
||||
<!-- <inventoryHint levelType="MB" nLevels="36" /> -->
|
||||
<inventoryHint levelType="SFC" nLevels="1" />
|
||||
<timeStepHint>3600</timeStepHint>
|
||||
|
||||
<clipRadius value="400" units="km" />
|
||||
<!-- EDEX unit is actually "gpm" -->
|
||||
<field name="GH" units="m" description="Geopotential Height">
|
||||
<level name="MB" description="Pressure Level" units="mb"
|
||||
levels="1000 950 900 850 800 750 700 650 600 550 500 450 400 350 300 250 200 150 100" />
|
||||
</field>
|
||||
<field name="RH" units="%" description="Relative Humidity">
|
||||
<level name="MB" description="Pressure Level" units="mb"
|
||||
levels="1000 950 900 850 800 750 700 650 600 550 500 450 400 350 300" />
|
||||
</field>
|
||||
<field name="T" units="K" description="Temperature">
|
||||
<level name="MB" description="Pressure Level" units="mb"
|
||||
levels="1000 950 900 850 800 750 700 650 600 550 500 450 400 350 300 250 200 150 100" />
|
||||
</field>
|
||||
<field name="uW" description="U Wind Component" units="m/s">
|
||||
<level name="MB" description="Pressure Level" units="mb"
|
||||
levels="1000 950 900 850 800 750 700 650 600 550 500 450 400 350 300 250 200 150 100" />
|
||||
</field>
|
||||
<field name="vW" description="V Wind Component" units="m/s">
|
||||
<level name="MB" description="Pressure Level" units="mb"
|
||||
levels="1000 950 900 850 800 750 700 650 600 550 500 450 400 350 300 250 200 150 100" />
|
||||
</field>
|
||||
<field name="P" units="Pa" description="Pressure">
|
||||
<level name="SFC" description="Surface Level" units="" />
|
||||
</field>
|
||||
|
||||
<parameter id="mod_name" name="Model Name" type="string" />
|
||||
<parameter id="mod_run_date" name="Model Run Date" type="string" />
|
||||
<parameter id="mod_run_time" name="Model Run Time" type="string" />
|
||||
<parameter id="val_date" name="Valid Date" type="string" />
|
||||
<parameter id="val_time" name="Valid Time" type="string" />
|
||||
<parameter id="forecast_hr" name="Forecast Hour" type="int" />
|
||||
<parameter id="coord_system" name="Coordinate System" type="string" value="Cartesian"/>
|
||||
<parameter id="proj" name="Projection" type="string" />
|
||||
<parameter id="lat_lower_left" name="Latitude Lower Left Corner" units="degrees" type="float" />
|
||||
<parameter id="lon_lower_left" name="Longitude Lower Left Corner" units="degrees" type="float" />
|
||||
<parameter id="lat_upper_right" name="Latitude Upper Right Corner" units="degrees" type="float" />
|
||||
<parameter id="lon_upper_right" name="Longitude Upper Right Corner" units="degrees" type="float" />
|
||||
<parameter id="lat_tang_pt" name="Latitude of Tangent point" units="degrees" type="float" />
|
||||
<parameter id="lon_tang_pt" name="Longitude of Tangent point" units="degrees" type="float" />
|
||||
<parameter id="numXpts" name="Number of points in X direction" type="int" />
|
||||
<parameter id="numYpts" name="Number of points in Y direction" type="int" />
|
||||
</configuration>
|
|
@ -1,183 +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.
|
||||
##
|
||||
|
||||
import glob
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
import time
|
||||
|
||||
import pupynere as netcdf
|
||||
|
||||
from java.lang import Integer
|
||||
from java.util import ArrayList
|
||||
from java.util import Date
|
||||
from com.raytheon.uf.edex.database.query import DatabaseQuery
|
||||
from com.raytheon.uf.common.dataplugin.qc import QCRecord
|
||||
from com.raytheon.uf.common.pointdata.spatial import SurfaceObsLocation
|
||||
from com.raytheon.uf.common.time import DataTime
|
||||
from com.raytheon.uf.edex.database.plugin import PluginFactory
|
||||
|
||||
import logging, UFStatusHandler
|
||||
|
||||
_logger = logging.getLogger("QCScanner")
|
||||
_logger.addHandler(UFStatusHandler.UFStatusHandler("com.raytheon.uf.edex.plugin.qc", "QCScanner", level=logging.INFO))
|
||||
_logger.setLevel(logging.INFO)
|
||||
|
||||
|
||||
# TODO: use jep.jarray
|
||||
|
||||
class NcSet(object):
|
||||
def __init__(self, path, qcType):
|
||||
self.path = path
|
||||
self.lastModTime = None
|
||||
self.qcType = qcType
|
||||
max_index = qcDao.getMaxRecordIndex(os.path.basename(path))
|
||||
if max_index >= 0:
|
||||
self.lastRecordCount = max_index + 1
|
||||
else:
|
||||
self.lastRecordCount = None
|
||||
|
||||
def incrementalScan(self, max_records = None):
|
||||
try:
|
||||
last_mod_time = os.stat(self.path).st_mtime
|
||||
except Exception, e:
|
||||
_logger.error("%s: %s", self.path, e)
|
||||
return
|
||||
if last_mod_time == self.lastModTime:
|
||||
return
|
||||
self.lastModTime = last_mod_time
|
||||
try:
|
||||
f = netcdf.NetCDFFile(self.path, 'r')
|
||||
except Exception, e:
|
||||
_logger.error("%s: %s", self.path, e, exc_info=True)
|
||||
return
|
||||
|
||||
# TODO: find last record ~
|
||||
# select ncSet, max(ncIndex) from qc group by ncNet;
|
||||
|
||||
try :
|
||||
n_records = f.variables['prevRecord'].shape[0]
|
||||
if self.lastRecordCount is None or n_records > self.lastRecordCount:
|
||||
i = self.lastRecordCount is not None and self.lastRecordCount or 0
|
||||
if max_records is not None:
|
||||
record_limit = min(i + max_records, n_records)
|
||||
else:
|
||||
record_limit = n_records
|
||||
fn = os.path.basename(self.path)
|
||||
idVariables = []
|
||||
for idVar in f.__getattribute__('idVariables').split(','):
|
||||
idVariables.append(f.variables[str(idVar)])
|
||||
timeVariables = f.__getattribute__('timeVariables').split(',')
|
||||
vObsTime = f.variables[str(timeVariables[0])]
|
||||
vObsTimeFillValue = vObsTime.__getattribute__("_FillValue")
|
||||
try :
|
||||
vObsTimeMissingValue = vObsTime.__getattribute__("missing_value")
|
||||
except AttributeError:
|
||||
vObsTimeMissingValue = vObsTimeFillValue
|
||||
vLat = f.variables['latitude']
|
||||
vLon = f.variables['longitude']
|
||||
vElev = f.variables['elevation']
|
||||
results = []
|
||||
_logger.debug("adding %d records from %s", record_limit - i, self.path)
|
||||
while i < record_limit:
|
||||
rec = QCRecord()
|
||||
rec.setPluginName("qc")
|
||||
if not vObsTime[i] == vObsTimeFillValue and not vObsTime[i] == vObsTimeMissingValue:
|
||||
rec.setDataTime(DataTime(Date(int(vObsTime[i] * 1000))))
|
||||
loc = SurfaceObsLocation()
|
||||
loc.assignLocation(float(vLat[i]), float(vLon[i]))
|
||||
loc.setElevation(Integer(int(vElev[i])))
|
||||
stationId = []
|
||||
for idVar in idVariables:
|
||||
stationId.append(''.join(idVar[i]).strip().strip('\0'))
|
||||
loc.setStationId(''.join(stationId))
|
||||
rec.setLocation(loc)
|
||||
|
||||
rec.setNcSet(fn)
|
||||
rec.setNcIndex(i)
|
||||
rec.setQcType(self.qcType)
|
||||
|
||||
rec.constructDataURI()
|
||||
results.append(rec)
|
||||
|
||||
i += 1
|
||||
|
||||
self.lastRecordCount = record_limit
|
||||
return results
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
class QCScanner(object):
|
||||
def __init__(self, dir, qcType):
|
||||
self.directory = dir
|
||||
self.qcType = qcType
|
||||
self.ncSets = { }
|
||||
|
||||
def incrementalScan(self, max_records = None):
|
||||
currentNcSets = self.findNcSetsNow()
|
||||
newSets = [ ]
|
||||
delSets = [ ]
|
||||
for ncSet in currentNcSets:
|
||||
if not self.ncSets.get(ncSet):
|
||||
newSets.append(ncSet)
|
||||
for ncSet in self.ncSets.keys():
|
||||
if ncSet not in currentNcSets:
|
||||
delSets.append(ncSet)
|
||||
if len(delSets):
|
||||
for ncSet in delSets:
|
||||
del self.ncSets[ncSet]
|
||||
if len(newSets):
|
||||
for ncSet in newSets:
|
||||
self.ncSets[ncSet] = NcSet(os.path.join(self.directory, ncSet), self.qcType)
|
||||
ncSets = self.ncSets.keys()
|
||||
ncSets.sort()
|
||||
|
||||
results = None
|
||||
for ncSet in ncSets:
|
||||
partial = self.ncSets[ncSet].incrementalScan(max_records)
|
||||
if partial is not None:
|
||||
if max_records is not None:
|
||||
max_records -= len(partial)
|
||||
if results is None:
|
||||
results = ArrayList(len(partial))
|
||||
for rec in partial:
|
||||
results.add(rec)
|
||||
|
||||
if results is None:
|
||||
results = ArrayList()
|
||||
return results
|
||||
|
||||
def findNcSetsNow(self):
|
||||
paths = glob.glob(self.directory + '/[0-9]*_[0-9]*')
|
||||
return [ os.path.basename(x) for x in paths ]
|
||||
|
||||
scanner = None
|
||||
qcDao = None
|
||||
|
||||
def init(directory, qcType):
|
||||
global scanner, qcDao
|
||||
scanner = QCScanner(directory, qcType)
|
||||
qcDao = PluginFactory.getInstance().getPluginDao("qc");
|
||||
|
||||
def scan(max_records = None):
|
||||
sys.stdout.flush()
|
||||
if scanner is not None:
|
||||
return scanner.incrementalScan(max_records)
|
|
@ -36,35 +36,9 @@
|
|||
name="Nsharp"
|
||||
restorable="false">
|
||||
</view>
|
||||
<view
|
||||
allowMultiple="false"
|
||||
category="gov.noaa.nws.ncep.ui.nsharp.view"
|
||||
class="gov.noaa.nws.ncep.ui.nsharp.palette.NsharpPaletteWindow"
|
||||
id="gov.noaa.nws.ncep.ui.nsharp.defaultview2"
|
||||
name="Nsharp"
|
||||
restorable="false">
|
||||
</view>
|
||||
</extension>
|
||||
<extension
|
||||
point="com.raytheon.uf.viz.core.resource">
|
||||
<resource
|
||||
class="gov.noaa.nws.ncep.ui.nsharp.skewt.rsc.NsharpSkewTResource"
|
||||
name="NsharpSkewT Resource"
|
||||
renderingOrderId="PLOT" />
|
||||
<resource
|
||||
class="gov.noaa.nws.ncep.ui.nsharp.skewt.rsc.NsharpBackgroundResource"
|
||||
name="NsharpSkewT Background"
|
||||
renderingOrderId="MAP_OUTLINE" />
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.editors">
|
||||
<editor
|
||||
class="gov.noaa.nws.ncep.ui.nsharp.skewt.NsharpSkewTEditor"
|
||||
default="true"
|
||||
icon="icons/skewt.gif"
|
||||
id="gov.noaa.nws.ncep.ui.nsharp.skewt.NsharpSkewTEditor"
|
||||
name="NsharpSkewt">
|
||||
</editor>
|
||||
<editor
|
||||
class="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor"
|
||||
default="true"
|
||||
|
@ -75,11 +49,6 @@
|
|||
</extension>
|
||||
<extension
|
||||
point="com.raytheon.uf.viz.core.descriptor">
|
||||
<descriptor
|
||||
class="gov.noaa.nws.ncep.ui.nsharp.skewt.NsharpSkewTDescriptor"
|
||||
editor="gov.noaa.nws.ncep.ui.nsharp.skewt.NsharpSkewTEditor"
|
||||
name="gov.noaa.nws.ncep.ui.nsharp.skewt.NsharpSkewTDescriptor">
|
||||
</descriptor>
|
||||
<descriptor
|
||||
class="gov.noaa.nws.ncep.ui.nsharp.display.NsharpSkewTPaneDescriptor"
|
||||
editor="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor"
|
||||
|
@ -97,13 +66,4 @@
|
|||
extensionFilter=".xml,.txt">
|
||||
</path>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.editors">
|
||||
<editor
|
||||
class="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor"
|
||||
default="true"
|
||||
id="gov.noaa.nws.ncep.ui.nsharp.skewt.NsharpEditor"
|
||||
name="NsharpEditor">
|
||||
</editor>
|
||||
</extension>
|
||||
</plugin>
|
||||
|
|
|
@ -1,418 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
function buildRPM()
|
||||
{
|
||||
# Arguments:
|
||||
# ${1} == the name of the rpm.
|
||||
lookupRPM "${1}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: '${1}' is not a recognized AWIPS II RPM."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/usr/bin/rpmbuild -ba \
|
||||
--define '_topdir %(echo ${AWIPSII_TOP_DIR})' \
|
||||
--define '_baseline_workspace %(echo ${WORKSPACE})' \
|
||||
--define '_uframe_eclipse %(echo ${UFRAME_ECLIPSE})' \
|
||||
--define '_awipscm_share %(echo ${AWIPSCM_SHARE})' \
|
||||
--define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \
|
||||
--define '_component_version %(echo ${AWIPSII_VERSION})' \
|
||||
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
|
||||
--define '_component_build_date %(echo ${COMPONENT_BUILD_DATE})' \
|
||||
--define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \
|
||||
--define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \
|
||||
--buildroot ${AWIPSII_BUILD_ROOT} \
|
||||
${RPM_SPECIFICATION}/component.spec
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to build RPM ${1}."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# This script will build all of the 32-bit rpms.
|
||||
# Ensure that we are on a machine with the correct architecture.
|
||||
|
||||
architecture=`uname -i`
|
||||
if [ ! "${architecture}" = "i386" ]; then
|
||||
echo "ERROR: This build can only be performed on a 32-bit Operating System."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine which directory we are running from.
|
||||
path_to_script=`readlink -f $0`
|
||||
dir=$(dirname $path_to_script)
|
||||
|
||||
common_dir=`cd ${dir}/../common; pwd;`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to find the common functions directory."
|
||||
exit 1
|
||||
fi
|
||||
# source the common functions.
|
||||
source ${common_dir}/lookupRPM.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to source the common functions."
|
||||
exit 1
|
||||
fi
|
||||
source ${common_dir}/usage.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to source the common functions."
|
||||
exit 1
|
||||
fi
|
||||
source ${common_dir}/rpms.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to source the common functions."
|
||||
exit 1
|
||||
fi
|
||||
source ${common_dir}/systemInfo.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to retrieve the system information."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# prepare the build environment.
|
||||
source ${dir}/buildEnvironment.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Unable to prepare the build environment."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export LIGHTNING=true
|
||||
# Determine if the optional '-nobinlightning' argument has been specified.
|
||||
if [ "${2}" = "-nobinlightning" ]; then
|
||||
LIGHTNING=false
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-python-qpid" ]; then
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-python-qpid"
|
||||
buildRPM "awips2-python"
|
||||
buildRPM "awips2-python-cherrypy"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-nose"
|
||||
buildRPM "awips2-python-numpy"
|
||||
buildRPM "awips2-python-h5py"
|
||||
buildRPM "awips2-python-jimporter"
|
||||
buildRPM "awips2-python-matplotlib"
|
||||
buildRPM "awips2-python-pil"
|
||||
buildRPM "awips2-python-pmw"
|
||||
buildRPM "awips2-python-pupynere"
|
||||
buildRPM "awips2-python-scientific"
|
||||
buildRPM "awips2-python-scipy"
|
||||
buildRPM "awips2-python-tables"
|
||||
buildRPM "awips2-python-thrift"
|
||||
buildRPM "awips2-python-tpg"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
buildRPM "awips2-python-werkzeug"
|
||||
buildRPM "awips2-python-pygtk"
|
||||
buildRPM "awips2-python-pycairo"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildQPID
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#buildRPM "awips2-ant"
|
||||
#unpackHttpdPypies
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
#buildRPM "awips2-httpd-pypies"
|
||||
#buildRPM "awips2-java"
|
||||
#buildRPM "awips2-ldm"
|
||||
#buildRPM "awips2-postgresql"
|
||||
#buildRPM "awips2-psql"
|
||||
#buildRPM "awips2-tools"
|
||||
buildRPM "awips2-python-shapely"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
if [ "${1}" = "-delta" ]; then
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-alertviz"
|
||||
buildEDEX
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRPM "awips2"
|
||||
buildRPM "Installer.ncep-database"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
buildRPM "awips2-python-qpid"
|
||||
|
||||
buildRPM "awips2-adapt-native"
|
||||
buildRPM "awips2-aviation-shared"
|
||||
buildRPM "awips2-cli"
|
||||
buildRPM "awips2-database"
|
||||
buildRPM "awips2-database-server-configuration"
|
||||
buildRPM "awips2-database-standalone-configuration"
|
||||
buildRPM "awips2-data.hdf5-gfe.climo"
|
||||
buildRPM "awips2-hydroapps-shared"
|
||||
buildRPM "awips2-localapps-environment"
|
||||
buildRPM "awips2-maps-database"
|
||||
buildRPM "awips2-notification"
|
||||
buildRPM "awips2-pypies"
|
||||
buildRPM "awips2-data.hdf5-topo"
|
||||
buildRPM "awips2-data.gfe"
|
||||
buildRPM "awips2-rcm"
|
||||
buildRPM "awips2-edex-environment"
|
||||
buildLocalizationRPMs
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-full" ]; then
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "Installer.ncep-database"
|
||||
buildRPM "awips2-alertviz"
|
||||
buildEDEX
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-python"
|
||||
buildRPM "awips2-python-cherrypy"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-h5py"
|
||||
buildRPM "awips2-python-jimporter"
|
||||
buildRPM "awips2-python-matplotlib"
|
||||
buildRPM "awips2-python-nose"
|
||||
buildRPM "awips2-python-numpy"
|
||||
buildRPM "awips2-python-pil"
|
||||
buildRPM "awips2-python-pmw"
|
||||
buildRPM "awips2-python-pupynere"
|
||||
buildRPM "awips2-python-qpid"
|
||||
buildRPM "awips2-python-scientific"
|
||||
buildRPM "awips2-python-scipy"
|
||||
buildRPM "awips2-python-tables"
|
||||
buildRPM "awips2-python-thrift"
|
||||
buildRPM "awips2-python-tpg"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
buildRPM "awips2-python-werkzeug"
|
||||
buildRPM "awips2-python-pygtk"
|
||||
buildRPM "awips2-python-pycairo"
|
||||
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-adapt-native"
|
||||
buildRPM "awips2-aviation-shared"
|
||||
buildRPM "awips2-cli"
|
||||
buildRPM "awips2-database"
|
||||
buildRPM "awips2-database-server-configuration"
|
||||
buildRPM "awips2-database-standalone-configuration"
|
||||
buildRPM "awips2-data.hdf5-gfe.climo"
|
||||
buildRPM "awips2-data.gfe"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-hydroapps-shared"
|
||||
buildRPM "awips2-localapps-environment"
|
||||
buildRPM "awips2-maps-database"
|
||||
buildRPM "awips2-notification"
|
||||
buildRPM "awips2-pypies"
|
||||
buildRPM "awips2-data.hdf5-topo"
|
||||
buildRPM "awips2-rcm"
|
||||
buildLocalizationRPMs
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildQPID
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRPM "awips2-ant"
|
||||
unpackHttpdPypies
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-httpd-pypies"
|
||||
buildRPM "awips2-java"
|
||||
#buildRPM "awips2-ldm"
|
||||
buildRPM "awips2-postgresql"
|
||||
buildRPM "awips2-psql"
|
||||
buildRPM "awips2-tools"
|
||||
buildRPM "awips2-edex-environment"
|
||||
buildRPM "awips2-openfire"
|
||||
buildRPM "awips2-httpd-collaboration"
|
||||
buildRPM "awips2-python-shapely"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-ade" ]; then
|
||||
buildRPM "awips2-eclipse"
|
||||
buildRPM "awips2-java"
|
||||
buildRPM "awips2-ant"
|
||||
buildRPM "awips2-python"
|
||||
buildRPM "awips2-python-cherrypy"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-h5py"
|
||||
buildRPM "awips2-python-jimporter"
|
||||
buildRPM "awips2-python-matplotlib"
|
||||
buildRPM "awips2-python-nose"
|
||||
buildRPM "awips2-python-numpy"
|
||||
buildRPM "awips2-python-pil"
|
||||
buildRPM "awips2-python-pmw"
|
||||
buildRPM "awips2-python-pupynere"
|
||||
buildRPM "awips2-python-qpid"
|
||||
buildRPM "awips2-python-scientific"
|
||||
buildRPM "awips2-python-scipy"
|
||||
buildRPM "awips2-python-tables"
|
||||
buildRPM "awips2-python-thrift"
|
||||
buildRPM "awips2-python-tpg"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
buildRPM "awips2-python-werkzeug"
|
||||
buildRPM "awips2-python-pygtk"
|
||||
buildRPM "awips2-python-pycairo"
|
||||
buildRPM "awips2-python-shapely"
|
||||
buildQPID -ade
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Package the ade.
|
||||
# Create the containing directory.
|
||||
ade_directory="awips2-ade-${AWIPSII_VERSION}-${AWIPSII_RELEASE}"
|
||||
if [ -d ${WORKSPACE}/${ade_directory} ]; then
|
||||
rm -rf ${WORKSPACE}/${ade_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
mkdir -p ${WORKSPACE}/${ade_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copy the rpms to the directory.
|
||||
cp -v ${AWIPSII_TOP_DIR}/RPMS/i386/* \
|
||||
${AWIPSII_TOP_DIR}/RPMS/noarch/* \
|
||||
${WORKSPACE}/${ade_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
awips2_ade_directory="${WORKSPACE}/rpms/awips2.ade"
|
||||
# Copy the install and uninstall script to the directory.
|
||||
cp -v ${awips2_ade_directory}/tar.ade/scripts/*.sh \
|
||||
${WORKSPACE}/${ade_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Tar the directory.
|
||||
pushd . > /dev/null 2>&1
|
||||
cd ${WORKSPACE}
|
||||
tar -cvf ${ade_directory}.tar ${ade_directory}
|
||||
popd > /dev/null 2>&1
|
||||
RC=$?
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-viz" ]; then
|
||||
buildRPM "awips2"
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-alertviz"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-edex" ]; then
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-cli"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "Installer.ncep-database"
|
||||
buildEDEX
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-qpid" ]; then
|
||||
buildQPID
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-ldm" ]; then
|
||||
# Ensure that the user has root privileges.
|
||||
if [ ! ${UID} = 0 ]; then
|
||||
echo "ERROR: You must have root privileges to build ldm."
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-ldm"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-package" ]; then
|
||||
repository_directory="awips2-repository-${AWIPSII_VERSION}-${AWIPSII_RELEASE}"
|
||||
if [ -d ${WORKSPACE}/${repository_directory} ]; then
|
||||
rm -rf ${WORKSPACE}/${repository_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
mkdir -p ${WORKSPACE}/${repository_directory}/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -r ${AWIPSII_TOP_DIR}/RPMS/* \
|
||||
${WORKSPACE}/${repository_directory}/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rpms_directory="${WORKSPACE}/rpms"
|
||||
comps_xml="${rpms_directory}/common/yum/arch.x86/comps.xml"
|
||||
cp -v ${comps_xml} ${WORKSPACE}/${repository_directory}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd . > /dev/null
|
||||
cd ${WORKSPACE}
|
||||
tar -cvf ${repository_directory}.tar ${repository_directory}
|
||||
RC=$?
|
||||
popd > /dev/null
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
usage
|
||||
exit 0
|
Loading…
Add table
Reference in a new issue