Merge branch 'omaha_14.1.1' into development_on_RHEL6

Conflicts:
	cave/build/static/common/cave/etc/gfe/userPython/utilities/CombinationsInterface.py
	cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FFG_TIR_HIRES/FFG_TIR_HIRES.xml
	cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/textformatter/CombinationsFileUtil.java
	cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java
	edexOsgi/build.edex/esb/bin/yajsw/wrapper.jar
	edexOsgi/build.edex/esb/bin/yajsw/wrapperApp.jar
	edexOsgi/com.raytheon.edex.ingestsrv/res/spring/persist-ingest.xml
	edexOsgi/com.raytheon.edex.plugin.airep/res/spring/airep-ingest.xml
	edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-common.xml
	edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml
	edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParmManager.java
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java
	edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/SmartInitRequestHandler.java
	edexOsgi/com.raytheon.edex.plugin.pirep/res/spring/pirep-ingest.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/arealFloodAdvisoryFollowup_Zones.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/arealFloodAdvisoryFollowup_Zones.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/arealFloodAdvisory_Zones.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/arealFloodAdvisory_Zones.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/arealFloodWarning_Zones.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/arealFloodWarning_Zones.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/customTemplate.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/customTemplate.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/ffwfaw.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/ffwfaw.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/flashFloodWarning_Zones.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/flashFloodWarning_Zones.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning_Zones.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning_Zones.xml
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/sws_county.vm
	edexOsgi/com.raytheon.uf.common.dataplugin.warning/utility/common_static/base/warngen/sws_county.xml
	edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/res/spring/bandwidth-datadelivery-edex-impl.xml
	edexOsgi/com.raytheon.uf.edex.ogc.common/com.raytheon.uf.edex.ogc.common.ecl
	edexOsgi/com.raytheon.uf.edex.plugin.grib.ogc/com.raytheon.uf.edex.plugin.grib.ogc.ecl
	nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so
	nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so
	ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/res/spring/ncairep-ingest.xml
	ncep/gov.noaa.nws.ncep.edex.plugin.ncpirep/res/spring/ncpirep-ingest.xml
	ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/res/spring/stormtrack-ingest.xml
	rpms/awips2.qpid/0.18/SOURCES/wrapper.conf
	rpms/awips2.qpid/0.18/SPECS/qpid-java.spec.patch0
	rpms/python.site-packages/Installer.qpid/component.spec

Former-commit-id: ab10c1dd5b [formerly bb5ef114d1] [formerly aa4ea792c1] [formerly 542f5f2349 [formerly aa4ea792c1 [formerly 606030384b5fe1eb9411d4b35d3282b15b1398b4]]]
Former-commit-id: 542f5f2349
Former-commit-id: 518cc2598c60d171ae83c427ee2062c4d7ef8025 [formerly 5d5ccb7599]
Former-commit-id: de61382dc7
This commit is contained in:
Bryan Kowal 2013-10-08 14:44:38 -05:00
commit 3534686eb5
38 changed files with 2056 additions and 1051 deletions

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NcInventoryDefinition xmlns:ns2="com.raytheon.uf.common.datadelivery.registry" xmlns:ns3="http://www.example.org/productType">
<inventoryName>FFG_TIR_HIRES</inventoryName>
<inventoryParameters>pluginName,info.ensembleId,info.secondaryId,dataTime</inventoryParameters>
<baseConstraints>
<mapping key="info.datasetId">
<constraint constraintValue="FFG-TIR" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
</baseConstraints>
</NcInventoryDefinition>

View file

@ -0,0 +1,83 @@
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<bean id="uriAggregator" class="com.raytheon.uf.edex.esb.camel.DataUriAggregator" />
<bean id="toDataURI" class="com.raytheon.uf.edex.esb.camel.ToDataURI" />
<bean id="persist" class="com.raytheon.edex.services.PersistSrv" factory-method="getInstance"/>
<bean id="index" class="com.raytheon.edex.services.IndexSrv"/>
<bean id="persistCamelRegistered" factory-bean="contextManager"
factory-method="register">
<constructor-arg ref="persist-camel"/>
</bean>
<camelContext id="persist-camel" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
<!-- Generic persist and indexing
Intended for routes that need persisting to HDF5,
Indexing but no alert processing
-->
<route id="persistIndex">
<from uri="direct-vm:persistIndex"/>
<bean ref="persist" method="persist"/>
<bean ref="index" method="index"/>
<bean ref="processUtil" method="log"/>
</route>
<!-- Generic persist, index and alert route
Intended for routes that need persisting to HDF5,
Indexing and Alerting
-->
<route id="persistIndexAlert">
<from uri="direct-vm:persistIndexAlert"/>
<bean ref="persist" method="persist"/>
<bean ref="index" method="index"/>
<bean ref="processUtil" method="log"/>
<bean ref="toDataURI" method="toDataURI"/>
<to uri="vm:stageNotification"/>
</route>
<!-- Generic index and alert route
Intended for routes that need Indexing and Alerting
-->
<route id="indexAlert">
<from uri="direct-vm:indexAlert"/>
<bean ref="index" method="index"/>
<bean ref="processUtil" method="log"/>
<bean ref="toDataURI" method="toDataURI"/>
<to uri="vm:stageNotification"/>
</route>
<route id="notificationAggregation">
<from uri="vm:stageNotification"/>
<bean ref="uriAggregator" method="addDataUris" />
<!--
<multicast>
<pipeline>
<bean ref="uriAggregator" method="addDataUris" />
</pipeline>
<pipeline>
<to uri="jms-generic:queue:subscriptions" />
</pipeline>
</multicast>
-->
</route>
<route id="notificationTimer">
<from uri="timer://notificationTimer?fixedRate=true&amp;period=5000" />
<filter>
<method bean="uriAggregator" method="hasUris" />
<bean ref="uriAggregator" method="sendQueuedUris" />
<bean ref="serializationUtil" method="transformToThrift" />
<to uri="jms-generic:topic:edex.alerts?timeToLive=60000"/>
</filter>
</route>
</camelContext>
</beans>

View file

@ -0,0 +1,70 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="airepDecoder" class="com.raytheon.edex.plugin.airep.AirepDecoder">
<constructor-arg ref="airepPluginName" />
</bean>
<bean id="airepSeparator" class="com.raytheon.edex.plugin.airep.AirepSeparator" />
<bean id="airepDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="airep" />
<constructor-arg value="jms-dist:queue:Ingest.airep"/>
</bean>
<bean id="airepCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="airep-camel"/>
</bean>
<camelContext id="airep-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<!--
<endpoint id="airepFileEndpoint" uri="file:${edex.home}/data/sbn/airep?noop=true&amp;idempotent=false" />
<route id="airepFileConsumerRoute">
<from ref="airepFileEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>airep</constant>
</setHeader>
<to uri="jms-durable:queue:Ingest.airep" />
</route>
-->
<!-- Begin airep routes -->
<route id="airepIngestRoute">
<from uri="jms-durable:queue:Ingest.airep"/>
<setHeader headerName="pluginName">
<constant>airep</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<split streaming="true">
<method bean="airepSeparator" method="separate" />
<doTry>
<pipeline>
<bean ref="airepDecoder" method="decode" />
<to uri="direct-vm:indexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:airep?level=ERROR"/>
</doCatch>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:airep?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>

View file

@ -154,20 +154,6 @@
</doTry>
</route>
<!-- Convert the topic into a queue so only one consumer gets each message and we still have competing consumers. -->
<route id="gfePurgeNotificationQueueRoute">
<from uri="jms-generic:topic:pluginPurged"/>
<doTry>
<to uri="jms-generic:queue:gfePurgeNotification"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:ifpServer?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
<bean factory-bean="clusteredCamelContextMgr" factory-method="register">
<constructor-arg ref="clusteredGfeIngestRoutes"/>

View file

@ -72,6 +72,7 @@ import com.raytheon.uf.edex.site.notify.SendSiteActivationNotifications;
* Mar 20, 2013 #1774 randerso Changed to use GFED2DDao
* May 02, 2013 #1969 randerso Moved updateDbs method into IFPGridDatabase
* Jun 13, 2013 #2044 randerso Refactored to use IFPServer
* Sep 13, 2013 2368 rjpeter Used durable jms settings.
* </pre>
*
* @author njensen

View file

@ -195,6 +195,9 @@ public class D2DGridDatabase extends VGridDatabase {
}
}
/**
}
/**
* Retrieves DatabaseIDs for the n most recent model runs of a given
* d2dModelName

View file

@ -47,7 +47,7 @@ class TextProduct(GenericHazards.TextProduct):
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items
Definition["productName"] = "AIR QUALITY ALERT" # name of product

View file

@ -46,7 +46,7 @@ class TextProduct(GenericHazards.TextProduct):
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items

View file

@ -46,7 +46,7 @@ class TextProduct(GenericHazards.TextProduct):
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items

View file

@ -55,7 +55,7 @@ class TextProduct(GenericHazards.TextProduct):
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items
Definition["productName"] = "URGENT - FIRE WEATHER MESSAGE" # name of product

View file

@ -46,7 +46,7 @@ class TextProduct(GenericHazards.TextProduct):
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items

View file

@ -62,7 +62,7 @@ class TextProduct(GenericReport.TextProduct):
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
# product identifiers
Definition["productName"] = "SPECIAL WEATHER STATEMENT" # product name

View file

@ -65,7 +65,7 @@ if "<site>" == "AFG":
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items
#Definition["productName"] = "FIRE WEATHER PLANNING FORECAST" # name of product

View file

@ -63,7 +63,7 @@ if "<site>" == "AFG":
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
#Definition["tempLocalEffects"] = 1 # Set to 1 to enable Temp and RH local effects AFTER
# creating AboveElev and BelowElev edit areas

View file

@ -53,6 +53,6 @@ if "<site>" == "AFG":
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]

View file

@ -53,5 +53,5 @@ if "<site>" == "AFG":
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]

View file

@ -75,7 +75,7 @@ if "<site>" == "AFG":
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
#Definition["tempLocalEffects"] = 1 # Set to 1 to enable Temp and RH local effects AFTER
# creating Inland and Coastal edit areas
#Definition["windLocalEffects"] = 1 # Set to 1 to enable wind local effects AFTER

View file

@ -61,7 +61,7 @@ if "<site>" == "AFG":
elif "_<MultiPil>" == "_WCZ":
Definition["subDomainUGCs"] = ["AKZ207","AKZ208","AKZ209","AKZ210",
"AKZ211","AKZ212","AKZ213","AKZ214",
"AKZ215","AKZ216","AKZ217"]
"AKZ215","AKZ216","AKZ217","AKZ227"]
# Header configuration items
#Definition["productName"] = "ZONE FORECAST PRODUCT" # name of product

View file

@ -121,7 +121,7 @@ class MasterInterface(object):
if self.isInstantiated(moduleName):
self.__instanceMap.__delitem__(moduleName)
if sys.modules.has_key(moduleName):
self.self.clearModuleAttributes(moduleName)
self.clearModuleAttributes(moduleName)
sys.modules.pop(moduleName)
if moduleName in self.scripts:
self.scripts.remove(moduleName)

View file

@ -1 +1 @@
784523397c693c38a7319113214883d08efaf5cc
c88d3613a39e17ebcd002b7464f1f7d68c89f86a

View file

@ -1 +1 @@
784523397c693c38a7319113214883d08efaf5cc
c88d3613a39e17ebcd002b7464f1f7d68c89f86a

View file

@ -1,3 +1,10 @@
/*
* main_nc2grib.c
*
* Created on: Aug 26, 2011
* Author: snaples
*/
/************************************************************************************
*
* nc2grib - GFE NetCDF to GRIB1 translator
@ -54,11 +61,18 @@
*
* Version 4 allows users to combine all GRIB messages into one file. This becomes useful
* when dealing with a lot of files for a parameter such as 1 hour QPF or temperature that
* goes out to num_hours hours.
* goes out to 240 hours.
*
* This is still a work in progress and code can always be improved to increase efficiency.
*
* Oct 2011 - PTilles - added read of new token for defining number of days of data to process
*
* Sep 2012 -Dan Stein - The original nc2grib program assumed the first variable in the
* NetCDF file (variable[0]) would be the data variable to be converted to grib format. The
* nc2grib tool was hard-coded to only look at variable[0]. In AWIPS-II, GFE began putting
* the history variable first and the data variable last, so nc2grib never found the data
* variable. The fix I implemented searches through all the variables in the NetCDF file
* to see wheter the data variable in question is present.
**********************************************************************************************/
#include <ctype.h>
#include <stdlib.h>
@ -79,9 +93,8 @@
#include "packgrib.h"
#include "getopt.h"
#include "cmapf.h"
#include "version_info.h"
#include "cmapf.h"
#define SECINHR 3600.
#define PATH_LEN 500
@ -106,7 +119,7 @@
*/
typedef struct {
char process[11];
char GFEParameterName[11];
char gfename[20];
int processid;
int gribnum;
@ -115,14 +128,14 @@ typedef struct {
int timeunit;
} mygfe2grib;
int getAppsDefaults(const char* strToken, char* strTokenValue);
int nc_getAppsDefaults(const char* strToken, char* strTokenValue);
/************************************************************************
* This function loads token value.
* If token is not available, return -1; otherwise return 0.
************************************************************************/
int getAppsDefaults(const char* strToken, char* strTokenValue)
int nc_getAppsDefaults(const char* strToken, char* strTokenValue)
{
int tokenLen, tokenValueLen;
@ -146,7 +159,7 @@ int timet_to_userformat_ansi(time_t timet, char *ansi, char *userformat);
int basetime_ansi_to_timet(char *ansi, time_t *timet);
int main (int argc, char *argv[])
int nc2grib_main (int argc, char *argv[])
{
extern char *optarg; /* these are for the getopt C library function */
@ -192,18 +205,16 @@ int main (int argc, char *argv[])
int numgfeparms=0;
char cnum[3] = {'\0'};
int num_hours = 0; /* (num_days * 24) */
/* number of days of data to process - read from token - previously hard coded as 10 */
/* default value = 10 - if token not found then default value used */
int num_days = 0;
int numgfiles=0; /* number of grib files for combining files into one if desired */
char *gfiles[240]; /* array of char pointers for holding grib filenames if combining files */
/* for reading the NetCDF file */
int cdfid; /* Netcdf id */
int NetCDF_ID; /* Netcdf id */
int ndims; /* number of dimensions */
int nvars; /* number of variables */
int numVars; /* number of variables */
int ngatts; /* number of attributes */
int recdim;
long start[] = {0, 0, 0}; /* start at first value */
@ -251,13 +262,13 @@ int main (int argc, char *argv[])
int *gridPointLL, *gridPointUR;
double x1, y1, x2, y2, lat1, lon1, lat2, lon2;
nc_type vt_type, dn_type, ll_type, d_type, g_type;
nc_type cdfvar_type;
nc_type varDataType;
int vt_len, ll_len, d_len, g_len;
int cdfvar_id, *gridSize;
int cdfvar_ndims;
int cdfvar_dims[MAX_VAR_DIMS];
int cdfvar_natts;
char varname[MAX_NC_NAME]={'\0'};
int variableID, *gridSize;
int numberOfVariableDimensions;
int dimensionIDVector[MAX_VAR_DIMS];
int numAttributes;
char variableName[MAX_NC_NAME]={'\0'};
char dimname[MAX_NC_NAME]={'\0'};
char siteID[MAX_NC_NAME]={'\0'};
char cdfunits[MAX_NC_NAME]={'\0'};
@ -350,6 +361,8 @@ int main (int argc, char *argv[])
output_buffer = (size_t *) malloc (sizeof(size_t)*odim); /* output buffer used when writing GRIB message */
int variableFound = FALSE; /* Is the variable present in the NetCDF file? Stein Sep 2012 */
/* output_buffer = (int *) malloc (sizeof(int)*odim); /* output buffer used when writing GRIB message */
if(output_buffer==NULL)
@ -365,7 +378,7 @@ int main (int argc, char *argv[])
/* parse command line arguments */
while ((c = getopt(argc, argv, ":n:i:t:o::b:p:g:Nfrqhv1V")) != -1) {
while ((c = getopt(argc, argv, ":n:i:t:o::b:p:g:Nfrqhv1")) != -1) {
switch (c) {
@ -697,10 +710,6 @@ int main (int argc, char *argv[])
case '1': /* process only one record of NetCDF, useful for debugging */
time1flag++;
break;
case 'V':
printf("version number = %s%s\n",VERSION_NAME,VERSION_NUMBER);
exit(0);
break;
case ':': /* for options that need an operand */
if(optopt != 'o')
{
@ -728,12 +737,8 @@ int main (int argc, char *argv[])
case '?':
printf("Unrecognized program command line option: -%c\n", optopt);
errflag++;
}
} /* while c = getopt */
}
if (errflag || helpflag || argc==1 || ( iflag==0 || pflag==0) )
@ -748,26 +753,8 @@ int main (int argc, char *argv[])
return USAGE;
}
/* Print CHPS build number */
printf("version number = %s%s\n",VERSION_NAME,VERSION_NUMBER);
if(getAppsDefaults("nc2g_num_days",cnum) == -1)
{
num_days = 10;
}
else
{
num_days = atoi(cnum);
}
num_hours = num_days * 24;
//numgfiles = num_hours;
char *gfiles[num_hours]; /* array of char pointers for holding grib filenames if combining files */
printf("\n number of days to process = %d \n", num_days);
if(getAppsDefaults("nc2g_app_dir",appsdir) == -1)
if(nc_getAppsDefaults("nc2g_app_dir",appsdir) == -1)
{
fprintf(stderr," ERROR: Invalid token value for token \"nc2g_app_dir\".\n\t Program exit.\n");
status=display_usage();
@ -795,7 +782,7 @@ int main (int argc, char *argv[])
*(gribdir+PATH_LEN)='\0';
if(getAppsDefaults("fewsgrib_dir",gribdir) == -1)
if(nc_getAppsDefaults("fewsgrib_dir",gribdir) == -1)
{
printf(" ERROR: Invalid token value for token \"fewsgrib_dir\".\n\t Program exit.");
status=display_usage();
@ -824,38 +811,30 @@ int main (int argc, char *argv[])
/**************************************************************************/
/* Read one line at a time from the gfe2grib.txt configuration file. It is
* an arguable point as to whether this is necessary or even adds to the
* functionality of the program. I believe all this information can be
* derived directly from the NetCDF file. djsiii 13 Sep 2012
*/
/* NOTE - THERE IS A PROBLEM HERE WITH COMMENTS - THIS CODE ONLY CHECKS FOR
* '#' CHARACTERS AT THE BEGINNING OF THE LINE.
*/
while (fgets(fileline, LINE_MAX, fp) != NULL)
{
if(fileline[0] != '#') /* check for comments */
{
sscanf(fileline,"%s%s%d%d%d%d%d",gfe2grib.process, gfe2grib.gfename, &gfe2grib.processid,
sscanf(fileline,"%s%s%d%d%d%d%d",gfe2grib.GFEParameterName, gfe2grib.gfename, &gfe2grib.processid,
&gfe2grib.gribnum,&gfe2grib.decscale, &gfe2grib.timerange, &gfe2grib.timeunit);
if(debugflag>0)
printf(" DEBUG: Read in from gfe2grib.txt %s %s %d %d %d %d %d \n",gfe2grib.process, gfe2grib.gfename, gfe2grib.processid,
printf(" DEBUG: Read in from gfe2grib.txt %s %s %d %d %d %d %d \n",gfe2grib.GFEParameterName, gfe2grib.gfename, gfe2grib.processid,
gfe2grib.gribnum,gfe2grib.decscale, gfe2grib.timerange, gfe2grib.timeunit);
/* if (strstr(gfe2grib.process, process)!=NULL) */ /* found a problem using this. try next if instead */
/* if (strstr(gfe2grib.GFEParameterName, process)!=NULL) */ /* found a problem using this. try next if instead */
if (!(strcmp(gfe2grib.process, process)))
if (!(strcmp(gfe2grib.GFEParameterName, process)))
{
found = 1;
break;
}
} /* If not a comment */
}
}
} /* While we haven't reach the end of the gfe2grib.txt file */
if (found==0)
@ -878,6 +857,7 @@ int main (int argc, char *argv[])
{
inpath=(char *) malloc(sizeof(char)*(FILE_LEN+1));
if(inpath==NULL)
{
printf(" ERROR: Something went wrong with memory allocation for the NetCDF input directory....exiting\n");
@ -886,7 +866,7 @@ int main (int argc, char *argv[])
*(inpath+FILE_LEN)='\0';
if(getAppsDefaults("netcdf_dir",inpath) == -1)
if(nc_getAppsDefaults("netcdf_dir",inpath) == -1)
{
printf(" ERROR: Invalid token value for token \"netcdf_dir\".\n\t Program exit.");
return APSDEFERR;
@ -896,8 +876,7 @@ int main (int argc, char *argv[])
printf(" Default path for the input NetCDF file not specified...Will use the following:\n" \
" %s\n",inpath);
}
} /* if inpath is NULL */
}
/***************************************************************************/
else if(debugflag)
printf(" Will attempt to read NetCDF file from this path:\n" \
@ -912,9 +891,9 @@ int main (int argc, char *argv[])
sprintf(fn,"%s/%s",inpath,infn);
cdfid = ncopen(fn,NC_NOWRITE);
NetCDF_ID=ncopen(fn,NC_NOWRITE);
if (cdfid==-1)
if (NetCDF_ID==-1)
{
printf("\n ERROR: Could not open the netcdf file: %s\n", fn);
return CDFERR;
@ -927,7 +906,7 @@ int main (int argc, char *argv[])
/* Inquire about the Netcdf file: No.of dimensions, No.of variables,
No. of global attributes etc.*/
ncinquire (cdfid, &ndims, &nvars, &ngatts, &recdim);
ncinquire (NetCDF_ID, &ndims, &numVars, &ngatts, &recdim);
/*************************************************************************/
/* debug */
@ -935,40 +914,92 @@ if (debugflag >0)
{
printf("\n Debug option on. Debug info from reading the netcdf file follows:\n\n");
printf (" Number of dimensions for this netcdf file is: %d\n",ndims);
printf (" Number of variables for this netcdf file is: %d\n",nvars);
printf (" Number of variables for this netcdf file is: %d\n",numVars);
printf (" Number of global attributes for this netcdf file is: %d\n",ngatts);
}
/*************************************************************************/
/**************************************************************************
* Sep 2012 - Stein The utility that takes GFE data and converts it to
* NetCDF format is ifpNetCDF. To the best of my knowledge, this utility
* always puts exactly one variable and exactly one history variable into
* each NetCDF file. The section of code below originally assumed that the
* germane variable (i.e. the non-history variable) was always the first one
* in the file. It was hard-coded to look at variableID 0.
*
* For whatever reason, this order was changed in AWIPS-II so that the
* history variable showed up first and the program wouldn't work. I was
* tasked with correcting this program to make it order independent. My
* solution was to loop through all the variables to see whether the
* variable we're looking for is in the NetCDF file. If it is, variableID
* is set to it's value. If not found, the program will exit as it did
* before.
*
* In addition to inserting the section of code below, I also
* changed a few variable names to make the code more understandable.
*************************************************************************/
cdfvar_id = 0; /* this should not change for this application as the first variable will be the one
that contains the QPF, Temp, etc. */
/* Below, I loop through all the variables, checking the name of each one
* against gfe2grib.gfename.
*/
ncvarinq (cdfid, cdfvar_id, varname, &cdfvar_type, &cdfvar_ndims, cdfvar_dims, &cdfvar_natts);
variableID = 0; /* Start with the 1st variable in the NetCDF file */
variableFound = FALSE; /* We haven't found it yet */
printf ("\n NetCDF variable name = %s\n",varname);
/***********************************************************************/
if (debugflag>0)
{
printf (" Number of %s dimensions - %d\n",varname, cdfvar_ndims);
printf (" Number of %s attributes - %d\n\n",varname, cdfvar_natts);
}
/**********************************************************************/
if (strstr(varname,gfe2grib.gfename)==NULL)
while ( (variableID < numVars) && (!variableFound) )
{
printf("ERROR: The parameter name in the GFE NetCDF file, %s, doe not match the one\n" \
/* Get Information about each variable from its ID (NetCDF variable
* inquiry).
*/
ncvarinq (NetCDF_ID, variableID, variableName, &varDataType, &numberOfVariableDimensions,
dimensionIDVector, &numAttributes);
/***********************************************************************/
if (debugflag)
{
printf ("\nNetCDF variable name = %s\n",variableName);
printf (" Number of %s dimensions - %d\n", variableName, numberOfVariableDimensions);
printf (" Number of %s attributes - %d\n\n", variableName, numAttributes);
}
/**********************************************************************/
if (strcmp(variableName, gfe2grib.gfename) == 0) /* Found it! */
{
variableFound = TRUE;
}
else /* Didn't find it - try the next variable */
{
++variableID; /* Increment variableID, look at the next variable */
}
} /* while ( (variableID < numVars) && (!variableFound) ) */
if (!variableFound) /* If the variable wasn't in the NetCDF file */
{
printf("ERROR: The parameter name in the GFE NetCDF file, %s, does not match the one\n" \
"associated with the process id in the gfe2grib.txt file.\n" \
"In gfe2grib.txt process ID %s is associated with GFE parameter name %s.\n" \
"Please specify the correct process ID and try again\n\n",varname,gfe2grib.process,gfe2grib.gfename);
"Please specify the correct process ID and try again\n\n",
variableName,gfe2grib.GFEParameterName,gfe2grib.gfename);
return CDFERR;
}
if(cdfvar_ndims==3) /* in some cases, this may not be true if file is produced from MPE/DQC */
/* Sep 2012 - Stein Aside from changing some variable names, this is the
* end of the section of code that I changed.
*/
if(numberOfVariableDimensions==3) /* in some cases, this may not be true if file is produced from MPE/DQC */
{
for (i=0; i<cdfvar_ndims; i++)
for (i=0; i<numberOfVariableDimensions; i++)
{
ncdiminq(cdfid,cdfvar_dims[i],dimname,&dim_size);
ncdiminq(NetCDF_ID,dimensionIDVector[i],dimname,&dim_size);
if (i==1)
y=dim_size;
@ -978,7 +1009,7 @@ if (debugflag>0)
{
printf("\n Number of dimensions is %d, which is too many dimensions for variable %s.\n" \
" Please ensure the NetCDF file is created properly for at most three dimensions, where\n" \
" the first dimension allows the NetCDF file to contain multiple records.\n",cdfvar_ndims,varname);
" the first dimension allows the NetCDF file to contain multiple records.\n",numberOfVariableDimensions,variableName);
return CDFERR;
}
@ -991,14 +1022,14 @@ if (debugflag >0)
}
}
else if (cdfvar_ndims==2)
else if (numberOfVariableDimensions==2)
{
for (i=0; i<cdfvar_ndims; i++)
for (i=0; i<numberOfVariableDimensions; i++)
{
ncdiminq(cdfid,cdfvar_dims[i],dimname,&dim_size);
ncdiminq(NetCDF_ID,dimensionIDVector[i],dimname,&dim_size);
if (i==0)
y=dim_size;
@ -1018,7 +1049,7 @@ if (debugflag >0)
printf("\n nc2grib is not coded to handle %d number of dimensions for variable %s.\n" \
" Please ensure the NetCDF file is created properly for two or three dimensions, where\n" \
" two dimensions indicates only 1 record of the variable and three dimensions allow\n" \
" the NetCDF file to contain multiple records.\n",cdfvar_ndims,varname);
" the NetCDF file to contain multiple records.\n",numberOfVariableDimensions,variableName);
return CDFERR;
}
@ -1032,59 +1063,59 @@ if (debugflag >0)
long count[]={1,y,x};
long count1r[]={y,x};
ncattinq(cdfid,cdfvar_id,"validTimes",&vt_type,&vt_len);
ncattinq(NetCDF_ID,variableID,"validTimes",&vt_type,&vt_len);
validTimes = (long *) malloc(vt_len * nctypelen(vt_type));
ncattget(cdfid, cdfvar_id, "validTimes", validTimes);
ncattget(NetCDF_ID, variableID, "validTimes", validTimes);
ncattget(cdfid, cdfvar_id, "descriptiveName", descriptName);
ncattget(NetCDF_ID, variableID, "descriptiveName", descriptName);
ncattget(cdfid, cdfvar_id, "siteID", siteID);
ncattget(NetCDF_ID, variableID, "siteID", siteID);
ncattget(cdfid, cdfvar_id, "units", cdfunits);
ncattget(NetCDF_ID, variableID, "units", cdfunits);
ncattget(cdfid, cdfvar_id, "projectionType", projection);
ncattget(NetCDF_ID, variableID, "projectionType", projection);
ncattinq(cdfid,cdfvar_id,"latLonLL",&ll_type,&ll_len);
ncattinq(NetCDF_ID,variableID,"latLonLL",&ll_type,&ll_len);
latlonLL = (double *) malloc(ll_len * nctypelen(ll_type));
ncattget(cdfid, cdfvar_id, "latLonLL", (void *) latlonLL);
ncattget(NetCDF_ID, variableID, "latLonLL", (void *) latlonLL);
latlonUR = (double *) malloc(ll_len * nctypelen(ll_type));
ncattget(cdfid, cdfvar_id, "latLonUR", (void *) latlonUR);
ncattget(NetCDF_ID, variableID, "latLonUR", (void *) latlonUR);
ncattinq(cdfid,cdfvar_id,"domainOrigin",&d_type,&d_len);
ncattinq(NetCDF_ID,variableID,"domainOrigin",&d_type,&d_len);
domainOrigin = (double *) malloc(d_len * nctypelen(d_type));
ncattget(cdfid, cdfvar_id, "domainOrigin", (void *) domainOrigin);
ncattget(NetCDF_ID, variableID, "domainOrigin", (void *) domainOrigin);
ncattinq(cdfid,cdfvar_id,"domainExtent",&d_type,&d_len);
ncattinq(NetCDF_ID,variableID,"domainExtent",&d_type,&d_len);
domainExtent = (double *) malloc(d_len * nctypelen(d_type));
ncattget(cdfid, cdfvar_id, "domainExtent", (void *) domainExtent);
ncattget(NetCDF_ID, variableID, "domainExtent", (void *) domainExtent);
ncattinq(cdfid,cdfvar_id,"gridSize",&g_type,&g_len);
ncattinq(NetCDF_ID,variableID,"gridSize",&g_type,&g_len);
gridSize = (int *) malloc(g_len * nctypelen(g_type));
ncattget(cdfid, cdfvar_id, "gridSize", (void *) gridSize);
ncattget(NetCDF_ID, variableID, "gridSize", (void *) gridSize);
ncattinq(cdfid,cdfvar_id,"gridPointLL",&g_type,&g_len);
ncattinq(NetCDF_ID,variableID,"gridPointLL",&g_type,&g_len);
gridPointLL = (int *) malloc(g_len * nctypelen(g_type));
ncattget(cdfid, cdfvar_id, "gridPointLL", (void *) gridPointLL);
ncattget(NetCDF_ID, variableID, "gridPointLL", (void *) gridPointLL);
ncattinq(cdfid,cdfvar_id,"gridPointUR",&g_type,&g_len);
ncattinq(NetCDF_ID,variableID,"gridPointUR",&g_type,&g_len);
gridPointUR = (int *) malloc(g_len * nctypelen(g_type));
ncattget(cdfid, cdfvar_id, "gridPointUR", (void *) gridPointUR);
ncattget(NetCDF_ID, variableID, "gridPointUR", (void *) gridPointUR);
/* initialize the array to missing value */
@ -1274,7 +1305,7 @@ if (debugflag >0)
grib_lbl[41]=0;
grib_lbl[42]=0;
ncattget(cdfid, cdfvar_id, "lonOrigin", &lonOrigin);
ncattget(NetCDF_ID, variableID, "lonOrigin", &lonOrigin);
grib_lbl[34]=lonOrigin*1000.; /* longitude of grid point orientation */
@ -1291,16 +1322,16 @@ if (debugflag >0)
grib_lbl[29]=(int) x;
grib_lbl[30]=(int) y;
ncattinq(cdfid,cdfvar_id,"latLonOrigin",&ll_type,&ll_len);
ncattinq(NetCDF_ID,variableID,"latLonOrigin",&ll_type,&ll_len);
latLonOrigin = (double *) malloc(ll_len * nctypelen(ll_type));
ncattget(cdfid, cdfvar_id, "latLonOrigin", latLonOrigin);
ncattget(NetCDF_ID, variableID, "latLonOrigin", latLonOrigin);
grib_lbl[34]=(*latLonOrigin)*1000.;
ncattget(cdfid, cdfvar_id, "stdParallelOne", &stdParallelOne);
ncattget(cdfid, cdfvar_id, "stdParallelTwo", &stdParallelTwo);
ncattget(NetCDF_ID, variableID, "stdParallelOne", &stdParallelOne);
ncattget(NetCDF_ID, variableID, "stdParallelTwo", &stdParallelTwo);
grib_lbl[39]=stdParallelOne*1000;
@ -1683,14 +1714,14 @@ if (debugflag>0)
if (esth > num_hours || esth < 0)
if (esth > 240 || esth < 0)
{
printf(" The estimated/observed time period is either less than 0 or greater than %d hours.\n" \
printf(" The estimated/observed time period is either less than 0 or greater than 10 days (240 hours).\n" \
" Therefore, valid times within the input NetCDF filename may not have been generated \n" \
" correctly. Or this is actually a forecast grid and the -b option should be used so it \n" \
" will be processed correctly. Check your options and ensure this is an estimate or observed grid\n" \
" You could also try to generate the file again.\n" \
" For debug esth = %d\n",num_hours, esth);
" For debug esth = %d\n",esth);
return FILEERR;
}
@ -1753,13 +1784,13 @@ if (debugflag>0)
printf(" DEBUG: fcsth = %d timediff=%f valid time = %ld basis time_t = %ld\n",fcsth, timediff,(*(validTimes+m+1)), basetime_t);
/*************************************************************/
if (fcsth > num_hours || fcsth < 0)
if (fcsth > 240 || fcsth < 0)
{
printf(" The forecast time is either less than 0 or greater than %d hours.\n" \
printf(" The forecast time is either less than 0 or greater than 10 days (240 hours).\n" \
" Therefore, the basis time may not be specified correctly or may need to be specified \n" \
" on the command line according to guidance. Please check your command options or \n" \
" or the NetCDF file creation and try again.\n" \
" for debug fcsth = %d\n",num_hours, fcsth);
" for debug fcsth = %d\n",fcsth);
return FILEERR;
}
@ -1806,18 +1837,18 @@ if (debugflag >0)
/* Get data for this time record */
if(cdfvar_ndims==3)
if(numberOfVariableDimensions==3)
{
start[0]=(long) (m/2);
status = ncvarget(cdfid,cdfvar_id,start,count,cdfvargrid);
status = ncvarget(NetCDF_ID,variableID,start,count,cdfvargrid);
}
else if (cdfvar_ndims==2)
else if (numberOfVariableDimensions==2)
{
start1r[0]=(long) (m/2);
status = ncvarget(cdfid,cdfvar_id,start1r,count1r,cdfvargrid);
status = ncvarget(NetCDF_ID,variableID,start1r,count1r,cdfvargrid);
}
if (status != NC_NOERR)
@ -1952,10 +1983,6 @@ if (debugflag >0)
}
/*************************************************************************/
/* I'm hoping this is where the "meat" of the conversion is taking place.
* I'm also hoping that everything else above is simply parameter checking.
* djsiii 13 Sep 2012
*/
status = packgrib(grib_lbl,pds_ext,&iplen,cdfvargrid,&idim,&xmissing,
output_buffer,&odim,&length);
@ -1967,7 +1994,7 @@ if (debugflag >0)
}
else
{
if(cdfvar_ndims==3)
if(numberOfVariableDimensions==3)
printf("\n Gribbing of data successful for record %ld\n",start[0]+1);
else
printf("\n Gribbing of data successful for record %ld\n",start1r[0]+1);
@ -2299,14 +2326,14 @@ if(debugflag>0)
/********************************************************************/
if(getAppsDefaults("pproc_bin",pprocbin) == -1)
if(nc_getAppsDefaults("pproc_bin",pprocbin) == -1)
{
printf(" ERROR: Invalid token value for token \"pproc_bin\".\n\t Program exit.");
return APSDEFERR;
}
/* fortran routine copygb_main_ */
sprintf(file_path,"%s/copygb.LX",pprocbin);
sprintf(tmpNPVUfn,"%s/%s",gribdir,"tmpNPVU.grb");
@ -2320,15 +2347,18 @@ if(debugflag>0)
/* the -X here causes copygb to print out expanded information about its operation */
sprintf(command,"%s -xg218 -X %s %s",file_path, outfn, tmpNPVUfn);
/* sprintf(command,"%s -xg218 -X %s %s",file_path, outfn, tmpNPVUfn); */
sprintf(command,"-xg218 -X %s %s", outfn, tmpNPVUfn);
else
sprintf(command,"%s -xg218 %s %s",file_path, outfn, tmpNPVUfn);
/* sprintf(command,"%s -xg218 %s %s",file_path, outfn, tmpNPVUfn); */
sprintf(command,"-xg218 %s %s", outfn, tmpNPVUfn);
/* first write out the main GRIB file using the copygb command without the header determined above
to a temporary holding file. This file will now contain the QPF forecast on GRID218 at 10km
resolution */
status = system(command);
copygb_main_(command);
/* status = system(command); */
}
else
{
@ -2654,7 +2684,7 @@ if (debugflag >0)
}
ncclose(cdfid);
ncclose(NetCDF_ID);
/* if user desires only 1 GRIB file, must combine all into one */
@ -2907,7 +2937,7 @@ int display_usage(void)
/* ============== Statements containing RCS keywords: */
{static char rcs_id1[] = "$Source: /fs/hseb/ob9d/ohd/pproc/src/nc2grib/RCS/main_nc2grib.c,v $";
static char rcs_id2[] = "$Id: main_nc2grib.c,v 1.3 2011/10/26 14:49:35 pst Exp $";}
static char rcs_id2[] = "$Id: main_nc2grib.c,v 1.2 2010/06/14 15:04:32 millerd Exp $";}
/* =================================================== */
}

View file

@ -0,0 +1,60 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="gpdDecoder" class="gov.noaa.nws.ncep.edex.plugin.gpd.decoder.GenericPointDataDecoder">
<property name="pluginName" value="gpd" />
</bean>
<bean id="gpdDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="gpd" />
<constructor-arg value="jms-dist:queue:ingest.gpd" />
</bean>
<bean id="gpdCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="gpd-camel"/>
</bean>
<camelContext id="gpd-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="gpdEndpoint" uri="file:${edex.home}/data/sbn/gpd?noop=true&amp;idempotent=false" />
<route id="gpdFileConsumerRoute">
<from ref="gpdEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>gpd</constant>
</setHeader>
<to uri="jms-generic:queue:ingest.gpd" />
</route>
<route id="gpdIngestRoute">
<from uri="jms-generic:queue:ingest.gpd" />
<setHeader headerName="pluginName">
<constant>gpd</constant>
</setHeader>
<bean ref="stringToFile" />
<doTry>
<pipeline>
<bean ref="gpdDecoder" method="decodeGempakProdFmSbn" />
<!-- multicast>
<to uri="directvm:persistIndexAlert" />
</multicast-->
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:ncuair?level=ERROR" />
</doCatch>
</doTry>
</route>
</camelContext>
</beans>

View file

@ -284,7 +284,8 @@ import org.apache.log4j.Logger;
//This method is much faster comparing to doBatchSeparate1. Only several header search is needed.
private void doBatchSeparate(byte[] data ) {
/* Regex used for separate the bulletins */
System.out.println("Ncuair doBatchSeparate: input file size is " + data.length);
int dataLen = data.length;
//System.out.println("Ncuair doBatchSeparate: input file size is " + dataLen);
final String BULLSEPARATOR = "\\x01\\r\\r\\n\\d{3} \\r\\r\\n"+ WMO_HEADER;
Pattern bullPattern;
bullPattern = Pattern.compile(BULLSEPARATOR);
@ -293,40 +294,58 @@ import org.apache.log4j.Logger;
String msg ;
int batchSize = 230000; //separate data to batch size around 230000
String batchStr;
while(charCount < data.length){
//int count=0;
while(charCount < dataLen){
lastCharCount = charCount;
charCount = charCount+ batchSize;
if(charCount < data.length){
//count++;
if(charCount < dataLen){
//System.out.println("1st substring begin @"+charCount);
msg = message.substring(charCount);
try {
// data bulletin is not ended at exactly 2300000 bytes for each batch
// therefore, find the next header of bulletin and chop batch data at there
Matcher bullMatcher = bullPattern.matcher(msg);
if (bullMatcher.find()) {
int start = bullMatcher.start();
charCount = charCount+ start;
batchStr= new String();
//System.out.println("2nd substring begin @"+lastCharCount+ " end @"+charCount);
batchStr = message.substring(lastCharCount,charCount);
records.add(batchStr);
}
else{
// no header find, should be the end of the data
batchStr= new String();
batchStr = message.substring(lastCharCount,data.length);
//System.out.println("3rd substring begin @"+lastCharCount+ " end @"+(dataLen-1));
batchStr = message.substring(lastCharCount,dataLen-1);
records.add(batchStr);
break;
}
}
catch (Exception e) {
if ( log.isInfoEnabled()) {
log.info ("doBatchSeparate exception !");
log.info ("doBatchSeparate exception !" + e);
}
break;
}
}
else{
// should be the last batch of the data, just add them without search next header
msg = message.substring(lastCharCount,data.length);
try{
//System.out.println("4th substring begin @"+lastCharCount+ " end @"+(dataLen-1));
msg = message.substring(lastCharCount,dataLen-1);
records.add(msg);
}
catch (Exception e) {
if ( log.isInfoEnabled()) {
log.info ("doBatchSeparate last batch exception !"+e);
}
}
break;
}
}

View file

@ -0,0 +1,223 @@
package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
/**
*
*
* This code has been developed by the NCEP-SIB for use in the AWIPS2 system.
*
* <pre>
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------- ------- -------- -----------
* 09/2013 Chin Chen Initial coding
*
* </pre>
*
* @author Chin Chen
* @version 1.0
*/
import java.awt.Color;
import java.util.ArrayList;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.drawables.IDescriptor;
import com.raytheon.uf.viz.core.drawables.IShadedShape;
import com.raytheon.uf.viz.core.drawables.IWireframeShape;
import com.raytheon.uf.viz.core.drawables.PaintProperties;
import com.raytheon.viz.ui.color.IBackgroundColorChangedListener.BGColorMode;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.linearref.LengthIndexedLine;
import gov.noaa.nws.ncep.ui.pgen.display.DisplayElementFactory;
import gov.noaa.nws.ncep.ui.pgen.display.FillDisplayElement;
import gov.noaa.nws.ncep.ui.pgen.display.IDisplayable;
import gov.noaa.nws.ncep.ui.pgen.display.IVector;
import gov.noaa.nws.ncep.ui.pgen.display.LineDisplayElement;
/*
* Chin Note: This class extends from PGEN's DisplayElementFactory. Its purpose is only for
* Nsharp to draw wind barb in SkewT display. As skewT has its own log scale coordination.
* The key word, CHANGED, is used to mark changes from original PGEN code.
*/
public class NsharpDisplayElementFactory extends DisplayElementFactory {
public NsharpDisplayElementFactory(IGraphicsTarget target,
IDescriptor iDescriptor) {
super(target, iDescriptor);
// TODO Auto-generated constructor stub
}
@SuppressWarnings("deprecation")
private ArrayList<IDisplayable> createWindBarb(IVector vect) {
double sfactor = deviceScale * vect.getSizeScale() * 10.;
IWireframeShape mask = null;
Color bgColor = new Color(0,0,0); // default black
/*
* Create the List to be returned, and wireframe shape
*/
ArrayList<IDisplayable> slist = new ArrayList<IDisplayable>();
IWireframeShape barb = target.createWireframeShape(false, iDescriptor);
IShadedShape flags = target.createShadedShape(false, iDescriptor, false);
if ( vect.hasBackgroundMask() ) {
mask = target.createWireframeShape(false, iDescriptor);
RGB bg = backgroundColor.getColor(BGColorMode.EDITOR);
bgColor = new Color(bg.red, bg.green, bg.blue);
}
/*
* Get color for creating displayables.
*/
Color dspClr = getDisplayColor( vect.getColor() );
/*
* CHANGED: these 2 lines changed
*/
double[] start = { vect.getLocation().x, vect.getLocation().y, 0.0 };
//double[] start = iDescriptor.worldToPixel(tmp);
/*
* If calm wind, draw circle
*/
if ( vect.getSpeed() < 0.5 ) {
double[][] pts = calculateCircle(start,sfactor*0.1);
if ( vect.hasBackgroundMask() ) {
mask.addLineSegment(pts);
mask.compile();
slist.add( new LineDisplayElement(mask, bgColor, vect.getLineWidth() + (float)deviceScale) );
}
barb.addLineSegment(pts);
barb.compile();
slist.add( new LineDisplayElement(barb, dspClr, vect.getLineWidth()) );
return slist;
}
/*
* Compute the number of flags, whole barbs and half barbs
* needed to represent the wind speed.
*/
int speed = (int)Math.floor(vect.getSpeed() + 2.5);
int numflags = speed / 50;
int remainder = speed % 50;
int numbarbs = remainder / 10;
remainder = remainder % 10;
int halfbarbs = remainder / 5;
double MAX_SEGMENTS = 6.0; // Maximum number of segments on original size barb
int numsegs = (2 * numflags) + numbarbs + halfbarbs;
double segmentSpacing = sfactor / MAX_SEGMENTS;
double windLength = segmentSpacing * Math.max( MAX_SEGMENTS, numsegs);
double barbLength = sfactor /3.0;
/*
* find the end point of the wind barb
*/
//CHANGED:this line changed
double angle = -90.0 + vect.getDirection();
double[] end = new double[3];
end[0] = start[0] + (windLength * Math.cos(Math.toRadians(angle)) );
end[1] = start[1] + (windLength * Math.sin(Math.toRadians(angle)) );
end[2] = 0.0;
//System.out.println("X0="+start[0]+" Y0="+start[1]+" X1="+end[0]+" Y1="+ end[1]);
barb.addLineSegment(new double[][] {start, end});
if ( vect.hasBackgroundMask() ) mask.addLineSegment(new double[][] {start, end});
/*
* Create a LengthIndexedLine used to reference points along the path
* at specific distances
*/
LineString[] ls = toLineString(new Coordinate[] {new Coordinate(start[0],start[1]),
new Coordinate(end[0], end[1]) } );
LengthIndexedLine lil = new LengthIndexedLine(ls[0]);
double currentLoc = lil.getEndIndex(); // start from tail end
//TODO - orientation issues
double BARB_ANGLE = 70.0;
double barbAngle = angle + BARB_ANGLE;
if ( vect.getLocation().y < 0.0 ) barbAngle = angle - BARB_ANGLE;
double cosineBarbAngle = Math.cos(Math.toRadians(barbAngle));
double sineBarbAngle = Math.sin(Math.toRadians(barbAngle));
/*
* Process flags
*/
for ( int j=0; j<numflags; j++) {
Coordinate coords[] = new Coordinate[4];
coords[0] = lil.extractPoint(currentLoc);
coords[1] = lil.extractPoint(currentLoc-segmentSpacing);
double xtip = coords[1].x + ( barbLength * cosineBarbAngle );
double ytip = coords[1].y + ( barbLength * sineBarbAngle );
coords[2] = new Coordinate(xtip,ytip);
coords[3] = coords[0];
LineString[] oneFlag = toLineString(coords);
flags.addPolygonPixelSpace(oneFlag, new RGB( dspClr.getRed(), dspClr.getGreen(), dspClr.getBlue()));
if ( vect.hasBackgroundMask() ) mask.addLineSegment(toDouble(coords));
currentLoc -= 2 * segmentSpacing;
}
/*
* Process barbs
*/
for ( int j=0; j<numbarbs; j++) {
Coordinate coords[] = new Coordinate[2];
coords[0] = lil.extractPoint(currentLoc);
double xtip = coords[0].x + ( barbLength * cosineBarbAngle );
double ytip = coords[0].y + ( barbLength * sineBarbAngle );
coords[1] = new Coordinate(xtip,ytip);
double[][] pts = toDouble(coords);
barb.addLineSegment(pts);
if ( vect.hasBackgroundMask() ) mask.addLineSegment(pts);
currentLoc -= segmentSpacing;
}
/*
* Process half barbs
*/
for ( int j=0; j<halfbarbs; j++) {
Coordinate coords[] = new Coordinate[2];
coords[0] = lil.extractPoint(currentLoc);
double xtip = coords[0].x + ( 0.5 * barbLength * cosineBarbAngle );
double ytip = coords[0].y + ( 0.5 * barbLength * sineBarbAngle );
coords[1] = new Coordinate(xtip,ytip);
double[][] pts = toDouble(coords);
barb.addLineSegment(pts);
if ( vect.hasBackgroundMask() ) mask.addLineSegment(pts);
currentLoc -= segmentSpacing;
}
if ( vect.hasBackgroundMask() ) {
mask.compile();
slist.add( new LineDisplayElement(mask, bgColor, vect.getLineWidth() + (float)deviceScale) );
}
/*
*
*/
flags.compile();
FillDisplayElement fde = new FillDisplayElement(flags, vect.getColor().getAlpha());
slist.add(fde);
/*
* add shaft wireframe to return list
*/
barb.compile();
slist.add( new LineDisplayElement(barb, dspClr, vect.getLineWidth()) );
return slist;
}
@Override
//CHANGED from original PGEN code to just handle wind barbs creation
public ArrayList<IDisplayable> createDisplayElements(IVector vect,
PaintProperties paintProps) {
setScales(paintProps);
ArrayList<IDisplayable> slist = createWindBarb(vect);
return slist;
}
}

View file

@ -351,12 +351,15 @@ public class NsharpResourceHandler {
int stnIndex = stnElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(stnIndex).get(currentTimeElementListIndex).get(currentSndElementListIndex);
if(stnTmElm!=null){
stnTmElm.setCompColorIndex(colorIndex++);
stnTmElm.setCompColorIndex(colorIndex);
//if(colorIndex > NsharpConstants.LINE_COMP10)
// colorIndex = NsharpConstants.LINE_COMP1;
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
setCurSndProfileProp();
setCurrentSoundingLayerInfo();
resetData();
@ -387,12 +390,15 @@ public class NsharpResourceHandler {
int sndIndex = sndElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(currentStnElementListIndex).get(currentTimeElementListIndex).get(sndIndex);
if(stnTmElm!=null){
stnTmElm.setCompColorIndex(colorIndex++);
stnTmElm.setCompColorIndex(colorIndex);
//if(colorIndex > NsharpConstants.LINE_COMP10)
// colorIndex = NsharpConstants.LINE_COMP1;
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
setCurSndProfileProp();
setCurrentSoundingLayerInfo();
resetData();
@ -425,12 +431,15 @@ public class NsharpResourceHandler {
int tmIndex = timeElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(currentStnElementListIndex).get(tmIndex).get(currentSndElementListIndex);
if(stnTmElm!=null){
stnTmElm.setCompColorIndex(colorIndex++);
stnTmElm.setCompColorIndex(colorIndex);
//if(colorIndex > NsharpConstants.LINE_COMP10)
// colorIndex = NsharpConstants.LINE_COMP1;
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
setCurSndProfileProp();
setCurrentSoundingLayerInfo();
resetData();
@ -1201,6 +1210,9 @@ public class NsharpResourceHandler {
currentInsetPage = 1;
currentParcel = NsharpNativeConstants.PARCELTYPE_MOST_UNSTABLE;
currentParcelLayerPressure = NsharpNativeConstants.MU_LAYER;
currentTimeElementListIndex = -1;
currentStnElementListIndex = -1;
currentSndElementListIndex = -1;
resetData();
}
@ -1409,12 +1421,12 @@ public class NsharpResourceHandler {
Set<String> keyset= new HashSet<String>(soundMap.keySet());
for(String key: keyset) {
List<NcSoundingLayer> sndLy = soundMap.remove(key);
String newkey= key.replace("NAMS", "GOOGLE");
String newkey= key.replace("NCUAIR", "gpduair");
//String newkey= key.replace("GFSS", "NAMS");
//newkey = newkey.replace("KSLN", "KFSD");
//String newkey = key.replace("OAK", "KFSD");
soundMap.put(newkey, sndLy);
}
stnInfo.setSndType(stnInfo.getSndType().replace("NAMS", "GOOGLE"));
stnInfo.setSndType(stnInfo.getSndType().replace("NCUAIR", "gpduair"));
//stnInfo.setSndType(stnInfo.getSndType().replace("GFSS", "NAMS"));
}//*/
@ -1803,6 +1815,9 @@ public class NsharpResourceHandler {
case FIRST: //the oldest time, set to dataTimelineList.length, so in while loop, it starts from dataTimelineList.length-1
targetIndex = timeElementList.size();
break;
default:
break;
}
int counter=0;
@ -1824,6 +1839,8 @@ public class NsharpResourceHandler {
targetIndex--;
targetIndex = targetIndex % this.timeElementList.size();
break;
default:
break;
}
counter++;
if(counter >= timeElementList.size())
@ -1860,12 +1877,15 @@ public class NsharpResourceHandler {
int stnIndex = stnElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(stnIndex).get(targetIndex).get(currentSndElementListIndex);
if(stnTmElm != null){
stnTmElm.setCompColorIndex(colorIndex++);
stnTmElm.setCompColorIndex(colorIndex);
//if(colorIndex > NsharpConstants.LINE_COMP10)
// colorIndex = NsharpConstants.LINE_COMP1;
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
//no matter we find current stn or not
//we should get out of here
break;
@ -1897,12 +1917,12 @@ public class NsharpResourceHandler {
continue;
int sndIndex = sndElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(currentStnElementListIndex).get(targetIndex).get(sndIndex);
if(stnTmElm !=null){
stnTmElm.setCompColorIndex(colorIndex++);
if(stnTmElm!=null){
stnTmElm.setCompColorIndex(colorIndex);
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
//no matter we find current snd type for this stn or not
@ -1943,6 +1963,9 @@ public class NsharpResourceHandler {
currentStnElementListIndex++;
currentStnElementListIndex = currentStnElementListIndex % this.stnElementList.size();
break;
default:
break;
}
counter++;
//System.out.println("counter = "+ counter);
@ -1981,14 +2004,15 @@ public class NsharpResourceHandler {
continue;
int tmIndex = timeElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(currentStnElementListIndex).get(tmIndex).get(currentSndElementListIndex);
if(stnTmElm != null){
stnTmElm.setCompColorIndex(colorIndex++);
if(stnTmElm!=null){
stnTmElm.setCompColorIndex(colorIndex);
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
//no matter we find current time line for this stn or not
//we should get out of here
break;
@ -2020,12 +2044,12 @@ public class NsharpResourceHandler {
continue;
int sndIndex = sndElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(currentStnElementListIndex).get(currentTimeElementListIndex).get(sndIndex);
if(stnTmElm !=null){
stnTmElm.setCompColorIndex(colorIndex++);
if(stnTmElm!=null){
stnTmElm.setCompColorIndex(colorIndex);
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
//no matter we find current snd type for this stn or not
@ -2065,6 +2089,9 @@ public class NsharpResourceHandler {
currentSndElementListIndex++;
currentSndElementListIndex = currentSndElementListIndex % this.sndElementList.size();
break;
default:
break;
}
counter++;
//System.out.println("counter = "+ counter);
@ -2103,12 +2130,12 @@ public class NsharpResourceHandler {
continue;
int tmIndex = timeElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(currentStnElementListIndex).get(tmIndex).get(currentSndElementListIndex);
if(stnTmElm != null){
stnTmElm.setCompColorIndex(colorIndex++);
if(stnTmElm!=null){
stnTmElm.setCompColorIndex(colorIndex);
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
//no matter we find current time line for this stn or not
@ -2140,11 +2167,13 @@ public class NsharpResourceHandler {
for(NsharpOperationElement elm: stnElementList) {
int stnIndex = stnElementList.indexOf(elm);
NsharpSoundingElementStateProperty stnTmElm = stnTimeSndTable.get(stnIndex).get(currentTimeElementListIndex).get(currentSndElementListIndex);
if(stnTmElm != null){
stnTmElm.setCompColorIndex(colorIndex++);
if(stnTmElm!=null){
stnTmElm.setCompColorIndex(colorIndex);
}
colorIndex++;
if(colorIndex > NsharpConstants.LINE_COMP10)
colorIndex = NsharpConstants.LINE_COMP1;
}
}
}
//no matter we find current stn or not

View file

@ -861,7 +861,8 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{
Color[] colors = new Color[1];
Color color = new Color(icolor.red, icolor.green, icolor.blue);
colors[0]= color;
DisplayElementFactory df = new DisplayElementFactory (target, this.descriptor);
//DisplayElementFactory df = new DisplayElementFactory (target, this.descriptor);
NsharpDisplayElementFactory df = new NsharpDisplayElementFactory (target, this.descriptor);
ArrayList<IDisplayable> elements = new ArrayList<IDisplayable> ();
float wbSize = graphConfigProperty.getWindBarbSize();
@ -909,7 +910,6 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{
Vector vect= new Vector();
vect.setVectorType(VectorType.WIND_BARB);
vect.setArrowHeadSize(1.0);
dir= (dir+180.0f)%360.0f;
vect.setDirection(dir);
vect.setSpeed(spd);
vect.setSizeScale(curWbSize);

View file

@ -551,7 +551,7 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{
if(numStnToShow <1)
numStnToShow=1;
}
int startIndex = (rscHandler.getCurStnIdPage()-1) * numStnToShow;
int startIndex = (rscHandler.getCurSndPage()-1) * numStnToShow;
if(startIndex<0)
startIndex =0;
int colorIndex;

View file

@ -99,7 +99,8 @@ import com.vividsolutions.jts.geom.Polygon;
* 03/12 #676 Q. Zhou Added Issue Office dropdown list.
* 08/12 #612 S. Gurung Fixed issue related to conversion of phenom Lat/Lon to prepended format
* 03/13 #928 B. Yin Made the button bar smaller.
* 04/29 #977 S. Gilbert PGEN Database support
* 04/13 #977 S. Gilbert PGEN Database support
* 09/13 TTR656 J. Wu Display for INTL_SIGMET converted from VGF.
* </pre>
*
* @author gzhang
@ -1395,9 +1396,13 @@ public class SigmetAttrDlg extends AttrDlg implements ISigmet {
final Coordinate[] coors = (elSelected == null) ? null : elSelected
.getPoints().toArray(new Coordinate[] {});
/*
* Added "trim()" since SIGMETs VGFs has no "editableAttrFromLine" and it is
* defaulted as " " when converted into XML - (J. Wu).
*/
if (coors != null) {
if (editableAttrFromLine == null
|| editableAttrFromLine.equals("")) {
|| editableAttrFromLine.trim().equals("")) {
coorsLatLon.append(getLatLonStringPrepend2(coors,
AREA.equals(((Sigmet) elSelected).getType())));
resetText(coorsLatLon.toString(), txtInfo);

View file

@ -7,6 +7,50 @@
*/
package gov.noaa.nws.ncep.ui.pgen.display;
import gov.noaa.nws.ncep.common.staticdata.SPCCounty;
import gov.noaa.nws.ncep.edex.common.stationTables.Station;
import gov.noaa.nws.ncep.ui.pgen.PgenUtil;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.CcfpAttrDlg;
import gov.noaa.nws.ncep.ui.pgen.contours.ContourCircle;
import gov.noaa.nws.ncep.ui.pgen.contours.ContourLine;
import gov.noaa.nws.ncep.ui.pgen.contours.ContourMinmax;
import gov.noaa.nws.ncep.ui.pgen.display.ArrowHead.ArrowHeadType;
import gov.noaa.nws.ncep.ui.pgen.display.CornerPatternApplicator.CornerPattern;
import gov.noaa.nws.ncep.ui.pgen.display.FillPatternList.FillPattern;
import gov.noaa.nws.ncep.ui.pgen.display.IAvnText.AviationTextType;
import gov.noaa.nws.ncep.ui.pgen.display.IText.DisplayType;
import gov.noaa.nws.ncep.ui.pgen.display.IText.FontStyle;
import gov.noaa.nws.ncep.ui.pgen.display.IText.TextJustification;
import gov.noaa.nws.ncep.ui.pgen.display.IText.TextRotation;
import gov.noaa.nws.ncep.ui.pgen.display.PatternSegment.PatternType;
import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent;
import gov.noaa.nws.ncep.ui.pgen.elements.Arc;
import gov.noaa.nws.ncep.ui.pgen.elements.ComboSymbol;
import gov.noaa.nws.ncep.ui.pgen.elements.DECollection;
import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement;
import gov.noaa.nws.ncep.ui.pgen.elements.Line;
import gov.noaa.nws.ncep.ui.pgen.elements.Symbol;
import gov.noaa.nws.ncep.ui.pgen.elements.SymbolLocationSet;
import gov.noaa.nws.ncep.ui.pgen.elements.Text;
import gov.noaa.nws.ncep.ui.pgen.elements.tcm.ITcm;
import gov.noaa.nws.ncep.ui.pgen.elements.tcm.ITcmFcst;
import gov.noaa.nws.ncep.ui.pgen.elements.tcm.ITcmWindQuarter;
import gov.noaa.nws.ncep.ui.pgen.elements.tcm.TcmFcst;
import gov.noaa.nws.ncep.ui.pgen.gfa.Gfa;
import gov.noaa.nws.ncep.ui.pgen.gfa.GfaClip;
import gov.noaa.nws.ncep.ui.pgen.gfa.IGfa;
import gov.noaa.nws.ncep.ui.pgen.sigmet.AbstractSigmet;
import gov.noaa.nws.ncep.ui.pgen.sigmet.CcfpInfo;
import gov.noaa.nws.ncep.ui.pgen.sigmet.ISigmet;
import gov.noaa.nws.ncep.ui.pgen.sigmet.SigmetInfo;
import gov.noaa.nws.ncep.ui.pgen.sigmet.VaaInfo;
import gov.noaa.nws.ncep.ui.pgen.sigmet.Volcano;
import gov.noaa.nws.ncep.ui.pgen.tca.BPGeography;
import gov.noaa.nws.ncep.ui.pgen.tca.ITca;
import gov.noaa.nws.ncep.ui.pgen.tca.TropicalCycloneAdvisory;
import gov.noaa.nws.ncep.ui.pgen.tca.WaterBreakpoint;
import gov.noaa.nws.ncep.viz.common.SnapUtil;
import java.awt.Color;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
@ -28,45 +72,6 @@ import org.eclipse.swt.graphics.Rectangle;
import org.geotools.referencing.GeodeticCalculator;
import org.geotools.referencing.datum.DefaultEllipsoid;
import gov.noaa.nws.ncep.common.staticdata.SPCCounty;
import gov.noaa.nws.ncep.edex.common.stationTables.Station;
import gov.noaa.nws.ncep.ui.pgen.PgenUtil;
import gov.noaa.nws.ncep.ui.pgen.display.CornerPatternApplicator.CornerPattern;
import gov.noaa.nws.ncep.ui.pgen.display.FillPatternList.FillPattern;
import gov.noaa.nws.ncep.ui.pgen.display.IAvnText.AviationTextType;
import gov.noaa.nws.ncep.ui.pgen.display.IText.DisplayType;
import gov.noaa.nws.ncep.ui.pgen.display.IText.FontStyle;
import gov.noaa.nws.ncep.ui.pgen.display.IText.TextJustification;
import gov.noaa.nws.ncep.ui.pgen.display.IText.TextRotation;
import gov.noaa.nws.ncep.ui.pgen.display.ArrowHead.ArrowHeadType;
import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent;
import gov.noaa.nws.ncep.ui.pgen.elements.Arc;
import gov.noaa.nws.ncep.ui.pgen.elements.ComboSymbol;
import gov.noaa.nws.ncep.ui.pgen.elements.DECollection;
import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement;
import gov.noaa.nws.ncep.ui.pgen.elements.Line;
import gov.noaa.nws.ncep.ui.pgen.elements.Symbol;
import gov.noaa.nws.ncep.ui.pgen.elements.SymbolLocationSet;
import gov.noaa.nws.ncep.ui.pgen.elements.Text;
import gov.noaa.nws.ncep.ui.pgen.elements.tcm.ITcm;
import gov.noaa.nws.ncep.ui.pgen.elements.tcm.ITcmFcst;
import gov.noaa.nws.ncep.ui.pgen.elements.tcm.TcmFcst;
import gov.noaa.nws.ncep.ui.pgen.elements.tcm.ITcmWindQuarter;
import gov.noaa.nws.ncep.ui.pgen.gfa.Gfa;
import gov.noaa.nws.ncep.ui.pgen.gfa.GfaClip;
import gov.noaa.nws.ncep.ui.pgen.gfa.IGfa;
import gov.noaa.nws.ncep.ui.pgen.tca.BPGeography;
import gov.noaa.nws.ncep.ui.pgen.tca.ITca;
import gov.noaa.nws.ncep.ui.pgen.tca.TropicalCycloneAdvisory;
import gov.noaa.nws.ncep.ui.pgen.tca.WaterBreakpoint;
import gov.noaa.nws.ncep.ui.pgen.sigmet.*;//SigmetInfo;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.CcfpAttrDlg;
import gov.noaa.nws.ncep.ui.pgen.display.PatternSegment.PatternType;
import gov.noaa.nws.ncep.ui.pgen.contours.ContourLine;
import gov.noaa.nws.ncep.ui.pgen.contours.ContourMinmax;
import gov.noaa.nws.ncep.ui.pgen.contours.ContourCircle;
import gov.noaa.nws.ncep.viz.common.SnapUtil;
import com.raytheon.uf.common.geospatial.util.WorldWrapCorrector;
import com.raytheon.uf.viz.core.DrawableString;
import com.raytheon.uf.viz.core.IExtent;
@ -76,21 +81,19 @@ import com.raytheon.uf.viz.core.IGraphicsTarget.TextStyle;
import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment;
import com.raytheon.uf.viz.core.PixelExtent;
import com.raytheon.uf.viz.core.data.IRenderedImageCallback;
import com.raytheon.uf.viz.core.data.prep.IODataPreparer;
import com.raytheon.uf.viz.core.drawables.IDescriptor;
import com.raytheon.uf.viz.core.drawables.IFont;
import com.raytheon.uf.viz.core.drawables.IFont.Style;
import com.raytheon.uf.viz.core.drawables.IImage;
import com.raytheon.uf.viz.core.drawables.IShadedShape;
import com.raytheon.uf.viz.core.drawables.IWireframeShape;
import com.raytheon.uf.viz.core.drawables.PaintProperties;
import com.raytheon.uf.viz.core.drawables.IFont.Style;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.map.IMapDescriptor;
import com.raytheon.viz.core.rsc.jts.JTSCompiler;
import com.raytheon.viz.core.rsc.jts.JTSCompiler.PointStyle;
import com.raytheon.viz.ui.color.BackgroundColor;
import com.raytheon.viz.ui.color.IBackgroundColorChangedListener.BGColorMode;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryCollection;
@ -105,6 +108,7 @@ import com.vividsolutions.jts.linearref.LengthLocationMap;
import com.vividsolutions.jts.linearref.LinearLocation;
import com.vividsolutions.jts.linearref.LocationIndexedLine;
import com.vividsolutions.jts.operation.distance.DistanceOp;
//SigmetInfo;
/**
* This factory class is used to create IDisplayable elements from IMultiPoint
@ -132,6 +136,8 @@ import com.vividsolutions.jts.operation.distance.DistanceOp;
* 11/12 #901/917 J. Wu Set the symbol in GFA text box in proper location/size
* 05/13 Chin Chen use IDescriptor instead of IMapDescriptor for used by Nsharp wind barb drawing
* 07/13 #988 Archana added createDisplayElements() to add all symbols in the same color to a single wire-frame.
* 09/23/13 Chin Chen changed several private variables/methods to protected, for NsharpDisplayElementFactory now extend from
* this class
* </pre>
*
* @author sgilbert
@ -147,12 +153,12 @@ public class DisplayElementFactory {
/**
* Graphics Target used to create the Wireframe and Shaded shapes
*/
private IGraphicsTarget target;
protected IGraphicsTarget target;
/**
* Map Descriptor used for Lat/Lon to pixel coordinate transformations
*/
private IDescriptor/*IMapDescriptor*/ iDescriptor;
protected IDescriptor/*IMapDescriptor*/ iDescriptor;
private GeometryFactory gf;
/**
@ -167,7 +173,7 @@ public class DisplayElementFactory {
private IWireframeShape sym;
private ILine elem;
private double deviceScale = 25.0; // default scale factor for GL device
protected double deviceScale = 25.0; // default scale factor for GL device
private double symbolScale = 0.65;
private double screenToExtent = 1.0;
double screenToWorldRatio = 1.0;
@ -181,7 +187,7 @@ public class DisplayElementFactory {
private Color layerColor = null;
private Boolean layerFilled = false;
private BackgroundColor backgroundColor = BackgroundColor.getActivePerspectiveInstance();
protected BackgroundColor backgroundColor = BackgroundColor.getActivePerspectiveInstance();
class SymbolImageCallback implements IRenderedImageCallback {
private String patternName;
@ -3106,7 +3112,7 @@ public class DisplayElementFactory {
* @param coords - input data points
* @return data points in new format
*/
private double[][] toDouble( Coordinate[] coords) {
protected double[][] toDouble( Coordinate[] coords) {
double[][] dpts = new double[coords.length][3];
@ -3123,7 +3129,7 @@ public class DisplayElementFactory {
* @param coords - input data points
* @return data points in new format
*/
private LineString[] toLineString ( Coordinate[] coords ) {
protected LineString[] toLineString ( Coordinate[] coords ) {
LineString[] ls = new LineString[] { gf.createLineString(coords) };
return ls;
@ -3134,7 +3140,7 @@ public class DisplayElementFactory {
* @param coords - input data points
* @return data points in new format
*/
private LineString[] toLineString ( double[][] points ) {
protected LineString[] toLineString ( double[][] points ) {
Coordinate[] coords = new Coordinate[points.length];
for ( int j=0; j<points.length; j++) {
@ -3240,7 +3246,7 @@ public class DisplayElementFactory {
* the size of something from screen relative to pixel relative
* @param props The paint properties associated with the target
*/
private void setScales(PaintProperties props) {
protected void setScales(PaintProperties props) {
/*
* Sets the device scale factor based on the current pixel extent
@ -4031,7 +4037,7 @@ public class DisplayElementFactory {
}
private double[][] calculateCircle(double[] center, double radius) {
protected double[][] calculateCircle(double[] center, double radius) {
int numpts = 16;
double[][] arcpts =new double[numpts+1][3];
@ -4095,7 +4101,7 @@ public class DisplayElementFactory {
/**
* Get the colors for displaying an element.
*/
private Color[] getDisplayColors( Color[] clr ) {
protected Color[] getDisplayColors( Color[] clr ) {
Color[] newClr = new Color[ clr.length ];
@ -4115,7 +4121,7 @@ public class DisplayElementFactory {
/**
* Get the colors for displaying an element.
*/
private Color getDisplayColor( Color clr ) {
protected Color getDisplayColor( Color clr ) {
if ( layerMonoColor && layerColor != null ) {
return layerColor;

View file

@ -12,7 +12,7 @@ import gov.noaa.nws.ncep.ui.pgen.PgenUtil;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.AttrSettings;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.GfaAttrDlg;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.OutlookAttrDlg;
import gov.noaa.nws.ncep.ui.pgen.controls.PgenFileManageDialog;
import gov.noaa.nws.ncep.ui.pgen.controls.StoreActivityDialog;
import gov.noaa.nws.ncep.ui.pgen.elements.Layer;
import gov.noaa.nws.ncep.ui.pgen.elements.Product;
import gov.noaa.nws.ncep.ui.pgen.elements.ProductInfo;
@ -71,6 +71,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
* unless the user selects them.
* 06/12 TTR559 B. Yin Link the layer name to Outlook type
* 12/12 #937 J. Wu Update G_Airmet layers/hazard - "C&V"
* 09/13 ? J. Wu Use new "StoreActivityDialog" at exit.
*
* </pre>
*
@ -1274,18 +1275,17 @@ public class ProductManageDialog extends ProductDialog {
if ( confirmDlg.getReturnCode() == MessageDialog.OK ) {
PgenFileManageDialog file_dlg = null;
if ( file_dlg == null ) {
StoreActivityDialog storeDlg = null;
if ( storeDlg == null ) {
try {
file_dlg = new PgenFileManageDialog( shell, "Save" );
storeDlg = new StoreActivityDialog( shell, "Save As" );
}
catch (VizException e) {
e.printStackTrace();
}
}
if ( file_dlg != null ) file_dlg.open();
if ( storeDlg != null ) storeDlg.open();
}

View file

@ -74,6 +74,9 @@ import com.vividsolutions.jts.geom.Point;
* 04/13 #927 B. Yin Moved from the PgenSelectingTool class
* 05/13 #994 J. Wu Removed "DEL" - make it same as "Ctrl+X"
* 07/13 ? J. Wu Set the "otherTextLastUsed for GFA.
* 09/13 ? J. Wu Call buildVortext for GFA when mouse is
* down since GFA converted from VGF does not
* have vorText set.
*
* </pre>
*
@ -406,6 +409,10 @@ public class PgenSelectHandler extends InputHandlerDefaultImpl {
} else if(attrDlg instanceof GfaAttrDlg){
((GfaAttrDlg)attrDlg).setOtherTextLastUsed( elSelected.getForecastHours() );
((GfaAttrDlg)attrDlg).redrawHazardSpecificPanel();
if ( ((Gfa)elSelected).getGfaVorText() == null ||
((Gfa)elSelected).getGfaVorText().length() < 1 ) {
((Gfa)elSelected).setGfaVorText( Gfa.buildVorText( (Gfa)elSelected ) );
}
attrDlg.setAttrForDlg( elSelected );
((GfaAttrDlg)attrDlg).enableMoveTextBtn(true);
}

View file

@ -5,7 +5,7 @@
<resourceCategory>RADAR</resourceCategory>
<resourceParameters>
pluginName=radar
format=Radial,Raster,Graphic
format=Radial,Raster
legendColor=RGB {200, 200, 200}
</resourceParameters>
<rscImplementation>LocalRadar</rscImplementation>

View file

@ -47,7 +47,12 @@ wrapper.search.java.classpath.2=${QPID_HOME}/lib/opt/qpid-deps
# garbage collection settings
wrapper.java.additional.gc.1=-XX:+UseConcMarkSweepGC
wrapper.java.additional.gc.2=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.gc.2=-XX:+CMSIncrementalMode
wrapper.java.additional.gc.3=-XX:NewSize=400m
wrapper.java.additional.gc.4=-XX:MaxNewSize=400m
wrapper.java.additional.gc.5=-XX:SurvivorRatio=4
wrapper.java.additional.gc.6=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.gc.7=-XX:HeapDumpPath=/data/fxa/qpid
# the main qpid java class that will be started
wrapper.java.app.mainclass=org.apache.qpid.server.Main
@ -95,7 +100,7 @@ wrapper.console.format=M
wrapper.logfile=${QPID_HOME}/log/qpid-wrapper-YYYYMMDD.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=M
wrapper.logfile.format=LTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO

View file

@ -85,28 +85,28 @@ if [ "${2}" = "-nobinlightning" ]; then
fi
if [ "${1}" = "-python-qpid" ]; then
# buildRPM "awips2"
# buildRPM "awips2-python-qpid"
# buildRPM "awips2-python"
# buildRPM "awips2-python-cherrypy"
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"
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
@ -360,11 +360,9 @@ if [ "${1}" = "-ade" ]; then
fi
if [ "${1}" = "-viz" ]; then
buildRPM "awips2"
buildRPM "awips2-common-base"
# buildRPM "awips2-rcm"
buildRPM "awips2-rcm"
buildRPM "awips2-hydroapps-shared"
# buildRPM "awips2-notification"
buildCAVE
if [ $? -ne 0 ]; then
exit 1
@ -375,13 +373,11 @@ if [ "${1}" = "-viz" ]; then
fi
if [ "${1}" = "-edex" ]; then
#buildRPM "awips2"
#buildRPM "awips2-common-base"
buildRPM "awips2-common-base"
buildRPM "awips2-adapt-native"
#buildRPM "awips2-python-qpid"
# buildRPM "awips2-cli"
buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server"
buildRPM "awips2-edex-environment"
# buildRPM "awips2-ncep-database"
# buildRPM "awips2-python-dynamicserialize"
buildEDEX
@ -417,6 +413,19 @@ if [ "${1}" = "-ldm" ]; then
exit 0
fi
if [ "${1}" = "-awips2" ]; then
buildRPM "awips2"
exit 0
fi
# Use the custom flag for selecting specific rpms to build
if [ "${1}" = "-custom" ]; then
#buildRPM "awips2-ldm"
exit 0
fi
if [ "${1}" = "-package" ]; then
repository_directory="awips2-repository-${AWIPSII_VERSION}-${AWIPSII_RELEASE}"
if [ -d ${WORKSPACE}/${repository_directory} ]; then

View file

@ -0,0 +1,456 @@
#!/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-tools"
buildRPM "awips2-python-shapely"
exit 0
fi
if [ "${1}" = "-postgres" ]; then
buildRPM "awips2-postgres"
buildRPM "awips2-database-server-configuration"
buildRPM "awips2-database-standalone-configuration"
buildRPM "awips2-database"
buildRPM "awips2-maps-database"
buildRPM "awips2-pgadmin3"
buildRPM "awips2-data.hdf5-gfe.climo"
buildRPM "awips2-data.hdf5-topo"
buildRPM "awips2-notification"
buildRPM "awips2-tools"
exit 0
fi
if [ "${1}" = "-delta" ]; then
buildRPM "awips2-common-base"
buildCAVE
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-alertviz"
buildEDEX
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2"
buildRPM "awips2-ncep-database"
buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server"
buildRPM "awips2-python"
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
buildRPM "awips2-common-base"
buildCAVE
if [ $? -ne 0 ]; then
exit 1
fi
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-ncep-database"
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"
buildJava
buildRPM "awips2-groovy"
#buildRPM "awips2-ldm"
buildRPM "awips2-postgres"
buildRPM "awips2-pgadmin3"
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"
buildJava
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-common-base"
buildRPM "awips2-rcm"
buildRPM "awips2-hydroapps-shared"
buildCAVE
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-alertviz"
exit 0
fi
if [ "${1}" = "-edex" ]; then
buildRPM "awips2-common-base"
buildRPM "awips2-adapt-native"
buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server"
buildRPM "awips2-edex-environment"
# buildRPM "awips2-ncep-database"
# buildRPM "awips2-python-dynamicserialize"
buildEDEX
if [ $? -ne 0 ]; then
exit 1
fi
exit 0
fi
if [ "${1}" = "-localization" ]; then
buildLocalizationRPMs
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
buildRPM "awips2-ldm"
exit 0
fi
if [ "${1}" = "-awips2" ]; then
buildRPM "awips2"
exit 0
fi
# Use the custom flag for selecting specific rpms to build
if [ "${1}" = "-custom" ]; then
#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