Merge branch 'omaha_14.2.1' into development

Conflicts:
	ncep/gov.noaa.nws.ncep.viz.ui.perspectives/plugin.xml

Former-commit-id: 55fbf9a28f [formerly f1a9ec2d1e] [formerly ae2b849157] [formerly ae2b849157 [formerly 7a156e297a]] [formerly 55fbf9a28f [formerly f1a9ec2d1e] [formerly ae2b849157] [formerly ae2b849157 [formerly 7a156e297a]] [formerly 7b59bd41eb [formerly ae2b849157 [formerly 7a156e297a] [formerly 7b59bd41eb [formerly debbd62a40cf8d27b1990d1b06f273d09dd9a981]]]]]
Former-commit-id: 7b59bd41eb
Former-commit-id: 489f3112f7 [formerly 116d836ab3] [formerly 4a379aa6e5] [formerly dff7e898a68f0389dbb73f3b62db3d0bc7541bfa [formerly 675dc12528eb749e423c405fa15dbe8b66201362] [formerly 4a379aa6e5 [formerly aa9b488963]]]
Former-commit-id: 8171be7972336d28fe2b9dab3bdddf78db7b189f [formerly 0dd75fee1d6fbdae1f20d879a1069b131d9cd16f] [formerly e6cab2a902 [formerly b9af02c0b3]]
Former-commit-id: e6cab2a902
Former-commit-id: 95a936e9dc
This commit is contained in:
Steve Harris 2014-02-03 10:29:16 -06:00
commit af1aabb56b
354 changed files with 62923 additions and 50816 deletions

View file

@ -0,0 +1,29 @@
#!/bin/bash
# DR #2581 - This update script will add the dataURI column to the lsr table
# The column needs to be there for 14.2.1.
# Only run this if you have already run dropLSRdataURI.sh, otherwise
# don't run this script or that one.
PSQL="/awips2/psql/bin/psql"
# adds the datauri constraint and column
function addDataUriLSR {
echo "INFO: Adding DataURI column to lsr"
${PSQL} -U awips -d metadata -c "ALTER TABLE lsr DROP CONSTRAINT IF EXISTS lsr_latitude_longitude_stationId_reftime_forecasttime_eventtype;"
${PSQL} -U awips -d metadata -c "ALTER TABLE lsr ADD COLUMN datauri varchar(255);"
${PSQL} -U awips -d metadata -c "ALTER TABLE lsr ADD CONSTRAINT lsr_datauri_key UNIQUE (datauri);"
if [ $? -ne 0 ]; then
echo "ERROR: Failed to repair dataURI for lsr"
echo "FATAL: The update has failed."
exit 1
fi
}
echo "INFO: Adding LSR dataURI column back in."
addDataUriLSR
echo "INFO: LSR dataURI column added successfully"

View file

@ -35,29 +35,31 @@ fi
if [ -z $7 ] ; then
PGBINDIR=''
PSQLBINDIR=''
else
PGBINDIR=${7}/bin/
PSQLBINDIR=/awips2/psql/bin/
fi
echo " Importing `basename ${SHAPEFILE}` into ${SCHEMA}.${TABLE} ..."
if [ -n "$LOGFILE" ] ; then
${PGBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
${PSQLBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
DELETE FROM public.geometry_columns WHERE f_table_schema = '${SCHEMA}' AND f_table_name = '${TABLE}';
DROP TABLE IF EXISTS ${SCHEMA}.${TABLE}
" >> $LOGFILE 2>&1
${PGBINDIR}shp2pgsql -s 4326 -I ${SHAPEFILE} ${SCHEMA}.${TABLE} 2>> $LOGFILE | ${PGBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -f - >> $LOGFILE 2>&1
${PGBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
${PGBINDIR}shp2pgsql -s 4326 -g the_geom -I ${SHAPEFILE} ${SCHEMA}.${TABLE} 2>> $LOGFILE | ${PSQLBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -f - >> $LOGFILE 2>&1
${PSQLBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
SELECT AddGeometryColumn('${SCHEMA}','${TABLE}','the_geom_0','4326',(SELECT type FROM public.geometry_columns WHERE f_table_schema='${SCHEMA}' and f_table_name='${TABLE}' and f_geometry_column='the_geom'),2);
UPDATE ${SCHEMA}.${TABLE} SET the_geom_0=ST_Segmentize(the_geom,0.1);
CREATE INDEX ${TABLE}_the_geom_0_gist ON ${SCHEMA}.${TABLE} USING gist(the_geom_0);
" >> $LOGFILE 2>&1
else
${PGBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
${PSQLBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
DELETE FROM public.geometry_columns WHERE f_table_schema = '${SCHEMA}' AND f_table_name = '${TABLE}';
DROP TABLE IF EXISTS ${SCHEMA}.${TABLE}
"
${PGBINDIR}shp2pgsql -s 4326 -I ${SHAPEFILE} ${SCHEMA}.${TABLE} | ${PGBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -f -
${PGBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
${PGBINDIR}shp2pgsql -s 4326 -g the_geom -I ${SHAPEFILE} ${SCHEMA}.${TABLE} | ${PSQLBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -f -
${PSQLBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
SELECT AddGeometryColumn('${SCHEMA}','${TABLE}','the_geom_0','4326',(SELECT type FROM public.geometry_columns WHERE f_table_schema='${SCHEMA}' and f_table_name='${TABLE}' and f_geometry_column='the_geom'),2);
UPDATE ${SCHEMA}.${TABLE} SET the_geom_0=ST_Segmentize(the_geom,0.1);
CREATE INDEX ${TABLE}_the_geom_0_gist ON ${SCHEMA}.${TABLE} USING gist(the_geom_0);
@ -73,12 +75,12 @@ if [ -n "$SIMPLEVS" ] ; then
SUFFIX=
for x in $LEV ; do SUFFIX=${SUFFIX}_${x} ; done
if [ -n "$LOGFILE" ] ; then
${PGBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
${PSQLBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
SELECT AddGeometryColumn('${SCHEMA}','${TABLE}','the_geom${SUFFIX}','4326',(SELECT type FROM public.geometry_columns WHERE f_table_schema='${SCHEMA}' and f_table_name='${TABLE}' and f_geometry_column='the_geom'),2);
UPDATE ${SCHEMA}.${TABLE} SET the_geom${SUFFIX}=ST_Segmentize(ST_Multi(ST_SimplifyPreserveTopology(the_geom,${LEV})),0.1);
CREATE INDEX ${TABLE}_the_geom${SUFFIX}_gist ON ${SCHEMA}.${TABLE} USING gist(the_geom${SUFFIX});" >> $LOGFILE 2>&1
else
${PGBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
${PSQLBINDIR}psql -d ncep -U ${PGUSER} -q -p ${PGPORT} -c "
SELECT AddGeometryColumn('${SCHEMA}','${TABLE}','the_geom${SUFFIX}','4326',(SELECT type FROM public.geometry_columns WHERE f_table_schema='${SCHEMA}' and f_table_name='${TABLE}' and f_geometry_column='the_geom'),2);
UPDATE ${SCHEMA}.${TABLE} SET the_geom${SUFFIX}=ST_Segmentize(ST_Multi(ST_SimplifyPreserveTopology(the_geom,${LEV})),0.1);
CREATE INDEX ${TABLE}_the_geom${SUFFIX}_gist ON ${SCHEMA}.${TABLE} USING gist(the_geom${SUFFIX});"

View file

@ -38,7 +38,7 @@
<camelContext id="gfe-camel-spring" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
<route id="SPCWatch">
<from uri="vm:edex.spcWatch"/>
<from uri="vm:gfe.spcWatch"/>
<doTry>
<bean ref="spcWatch" method="handleSpcWatch"/>
<doCatch>
@ -50,7 +50,7 @@
</route>
<route id="TPCWatch">
<from uri="vm:edex.tpcWatch"/>
<from uri="vm:gfe.tpcWatch"/>
<doTry>
<bean ref="tpcWatch" method="handleTpcWatch"/>
<doCatch>
@ -63,7 +63,14 @@
<route id="WCLWatch">
<from uri="direct-vm:wclWatch"/>
<doTry>
<bean ref="wclWatch" method="handleWclWatch"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:gfeWatch?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="smartInitTrigger">

View file

@ -628,12 +628,17 @@ NDFD_Oceanic_10K = ('NDFD_Oceanic_10km', MERCATOR,
(-230.094, -30.4192), (10.71, 80.01),
(0.0, 0.0), 0.0, 0.0, (1, 1), (2517, 1793), 0.0, -109.962, 0.0)
# Add a new domain for NHC purposes
GridForNHA = ('GridForNHA', LAMBERT_CONFORMAL,
(-97.647915, 7.783091), (-38.900400, 52.092726),
(-95.0, 25.0), 25.0, 25.0, (1, 1), (894,1176), 0.0, 0.0, 0.0)
# list of all projections
allProjections = [Grid201, Grid202, Grid203, Grid204, Grid205, Grid206,
Grid207, Grid208, Grid209, Grid210, Grid211, Grid212, Grid213, Grid214,
Grid214AK, Grid215, Grid216, Grid217, Grid218, Grid219, Grid221, Grid222,
Grid225, Grid226, Grid227, Grid228, Grid229, Grid230, Grid231, Grid232,
Grid233, Grid234, Grid235, HRAP, NDFD_Oceanic_10K]
Grid233, Grid234, Grid235, HRAP, NDFD_Oceanic_10K, GridForNHA]
#---------------------------------------------------------------------------
#
@ -838,6 +843,7 @@ SITES = {
#National Centers
'HAK' : ( [825,553], ( 1.0, 1.0), (103.0, 69.0), 'EST5EDT', Grid214AK, "nc"),
'HUS' : ([1073,689], (19.0, 8.0), ( 67.0, 43.0), 'EST5EDT', Grid211, "nc"),
'NHA' : ([894,1176], (0.0,0.0), (894.0, 1176.0), 'EST5EDT', GridForNHA, "nc"),
}

View file

@ -6810,6 +6810,8 @@
</grib1Parameter>
<!-- ECMWF -->
<grib1Parameter>
<center>98</center>
<grib1TableVersion>128</grib1TableVersion>
@ -6891,6 +6893,26 @@
<grib2Value>255</grib2Value>
</grib1Parameter>
<!-- Below added for ECENSMEAN by BradS 03-20-12 -->
<grib1Parameter>
<center>98</center>
<grib1TableVersion>128</grib1TableVersion>
<grib1Value>15</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>0</grib2category>
<grib2Value>4</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>98</center>
<grib1TableVersion>128</grib1TableVersion>
<grib1Value>16</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>0</grib2category>
<grib2Value>5</grib2Value>
</grib1Parameter>
<!-- Above added for ECENSMEAN by BradS 03-20-12 -->
<grib1Parameter>
<center>98</center>
<grib1TableVersion>128</grib1TableVersion>
@ -8741,4 +8763,251 @@
<grib2category>0</grib2category>
<grib2Value>13</grib2Value>
</grib1Parameter>
<!-- end fnmocWave -->
<!-- ukmetHR -->
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>1</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>3</grib2category>
<grib2Value>0</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>2</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>3</grib2category>
<grib2Value>1</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>5</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>3</grib2category>
<grib2Value>3</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>7</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>3</grib2category>
<grib2Value>5</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>11</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>0</grib2category>
<grib2Value>0</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>15</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>0</grib2category>
<grib2Value>4</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>16</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>0</grib2category>
<grib2Value>5</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>20</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>19</grib2category>
<grib2Value>0</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>33</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>2</grib2category>
<grib2Value>2</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>34</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>2</grib2category>
<grib2Value>3</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>40</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>2</grib2category>
<grib2Value>9</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>51</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>1</grib2category>
<grib2Value>0</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>52</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>1</grib2category>
<grib2Value>1</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>59</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>1</grib2category>
<grib2Value>7</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>61</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>1</grib2category>
<grib2Value>8</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>72</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>6</grib2category>
<grib2Value>2</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>73</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>6</grib2category>
<grib2Value>3</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>74</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>6</grib2category>
<grib2Value>4</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>75</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>6</grib2category>
<grib2Value>5</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>111</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>4</grib2category>
<grib2Value>0</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>128</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>3</grib2category>
<grib2Value>1</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>138</grib1Value>
<grib2discipline>255</grib2discipline>
<grib2category>255</grib2category>
<grib2Value>255</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>143</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>1</grib2category>
<grib2Value>195</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>144</grib1Value>
<grib2discipline>2</grib2discipline>
<grib2category>0</grib2category>
<grib2Value>192</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>146</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>6</grib2category>
<grib2Value>15</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>147</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>3</grib2category>
<grib2Value>16</grib2Value>
</grib1Parameter>
<grib1Parameter>
<center>74</center>
<grib1TableVersion>3</grib1TableVersion>
<grib1Value>149</grib1Value>
<grib2discipline>0</grib2discipline>
<grib2category>2</grib2category>
<grib2Value>14</grib2Value>
</grib1Parameter>
<!-- end ukmetHR -->
</grib1ParameterSet>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>108162001</name>
<description>UKMet HiRes tile - Northern Hemisphere
Longitude range 341.25E - 70.416E </description>
<la1>0.279</la1>
<lo1>341.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>108</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>89.722</la2>
<lo2>70.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>108162002</name>
<description>UKMet HiRes tile - Northern Hemisphere
Longitude range 71.25E - 160.416E </description>
<la1>0.279</la1>
<lo1>71.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>108</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>89.722</la2>
<lo2>160.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>108162003</name>
<description>UKMet HiRes tile - Northern Hemisphere
Longitude range 161.25E - 250.416E </description>
<la1>0.279</la1>
<lo1>161.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>108</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>89.722</la2>
<lo2>250.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>108162004</name>
<description>UKMet HiRes tile - Northern Hemisphere
Longitude range 251.25E - 340.416E </description>
<la1>0.279</la1>
<lo1>251.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>108</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>89.722</la2>
<lo2>340.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>108162005</name>
<description>UKMet HiRes tile - Southern Hemisphere
Longitude range 341.25E - 70.416E </description>
<la1>-89.721</la1>
<lo1>341.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>108</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>-0.278</la2>
<lo2>70.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>108162006</name>
<description>UKMet HiRes tile - Southern Hemisphere
Longitude range 71.25E - 160.416E </description>
<la1>-89.721</la1>
<lo1>71.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>108</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>-0.278</la2>
<lo2>160.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>108162007</name>
<description>UKMet HiRes tile - Southern Hemisphere
Longitude range 161.25E - 250.416E </description>
<la1>-89.721</la1>
<lo1>161.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>108</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>-0.278</la2>
<lo2>250.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>108162008</name>
<description>UKMet HiRes tile - Southern Hemisphere
Longitude range 251.25E - 340.416E </description>
<la1>-89.721</la1>
<lo1>251.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>108</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>-0.278</la2>
<lo2>340.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>864162001</name>
<description>UKMet HiRes combined - Northern Hemisphere
Longitude range 71.25E - 70.416E </description>
<la1>0.279</la1>
<lo1>71.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>864</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>89.722</la2>
<lo2>70.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>864162002</name>
<description>UKMet HiRes combined - Southern Hemisphere
Longitude range 71.25E - 70.416E </description>
<la1>-89.721</la1>
<lo1>71.25</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>864</nx>
<ny>162</ny>
<dx>0.833</dx>
<dy>0.556</dy>
<spacingUnit>degree</spacingUnit>
<la2>-0.278</la2>
<lo2>70.416</lo2>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>115001</name>
<description> SWPC IRGF C </description>
<la1>38.0</la1>
<lo1>250.0</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>11</nx>
<ny>5</ny>
<dx>1</dx>
<dy>1</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>18060001</name>
<description> SWPC Enlil C </description>
<la1>59.0</la1>
<lo1>1.0</lo1>
<firstGridPointCorner>UpperLeft</firstGridPointCorner>
<nx>180</nx>
<ny>60</ny>
<dx>2</dx>
<dy>2</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>18090001</name>
<description> SWPC XRAY C </description>
<la1>89.0</la1>
<lo1>178.0</lo1>
<firstGridPointCorner>UpperLeft</firstGridPointCorner>
<nx>180</nx>
<ny>90</ny>
<dx>2</dx>
<dy>2</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>2090001</name>
<description> SWPC Conductivity C </description>
<la1>-90.0</la1>
<lo1>180.0</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>20</nx>
<ny>90</ny>
<dx>18</dx>
<dy>2</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>2091001</name>
<description> SWPC Ion Temperature C </description>
<la1>-90.0</la1>
<lo1>0.0</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>20</nx>
<ny>91</ny>
<dx>18</dx>
<dy>2</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>360180001</name>
<description> SWPC SXI C </description>
<la1>90.0</la1>
<lo1>0.0</lo1>
<firstGridPointCorner>UpperLeft</firstGridPointCorner>
<nx>360</nx>
<ny>180</ny>
<dx>1</dx>
<dy>1</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>3636001</name>
<description> SWPC SOLAR FLUX C </description>
<la1>87.5</la1>
<lo1>185.0</lo1>
<firstGridPointCorner>UpperLeft</firstGridPointCorner>
<nx>36</nx>
<ny>36</ny>
<dx>10</dx>
<dy>5</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>9050001</name>
<description> SWPC Ovation C </description>
<la1>40.0</la1>
<lo1>0.0</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>90</nx>
<ny>50</ny>
<dx>4</dx>
<dy>1</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<latLonGridCoverage>
<name>9090001</name>
<description> SWPC DRAP20 C </description>
<la1>89.0</la1>
<lo1>182.0</lo1>
<firstGridPointCorner>UpperLeft</firstGridPointCorner>
<nx>90</nx>
<ny>90</ny>
<dx>4</dx>
<dy>2</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -11,6 +11,20 @@
<gribModelSet>
<!-- SUBCENTER 0 -->
<model>
<name>ecens</name>
<center>98</center>
<subcenter>0</subcenter>
<grid>360181001</grid>
<process>
<id>141</id>
<id>142</id>
<id>143</id>
<id>144</id>
<id>145</id>
</process>
</model>
<model>
<name>ecmwfP25</name>
<center>98</center>

View file

@ -2879,6 +2879,7 @@
<name>HPCGuide</name>
<center>7</center>
<subcenter>5</subcenter>
<grid>197</grid>
<process>
<id>183</id>
</process>
@ -3131,6 +3132,16 @@
</process>
</model>
<model>
<name>AK-RTMA-HR</name>
<center>7</center>
<subcenter>4</subcenter>
<grid>1023</grid>
<process>
<id>109</id>
</process>
</model>
<model>
<name>GFSLAMPTstorm</name>
<center>7</center>
@ -3184,4 +3195,90 @@
<!-- END SUBCENTER 14: NWS METEOROLOGICAL DEVELOPMENT LABORATORY -->
<!-- SUBCENTER 16: SPACE WEATHER PREDICTION CENTER -->
<model>
<name>Conductivity</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>2090001</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>SXI</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>360180001</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>DRAP20</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>9090001</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>ENLIL</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>18060001</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>EPFlux</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>3636001</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>SolarFlux</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>18090001</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>IonTemperature</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>2091001</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>IRGF</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>115001</grid>
<process>
<id>255</id>
</process>
</model>
<model>
<name>Ovation</name>
<center>7</center>
<subcenter>16</subcenter>
<grid>9050001</grid>
<process>
<id>255</id>
</process>
</model>
<!-- END SUBCENTER 16: SPACE WEATHER PREDICTION CENTER -->
</gribModelSet>

View file

@ -5,7 +5,10 @@
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. -->
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for further_licensing_information.
History:
F.Achorn/OPC 10/15/13 Added Ukmet HR tiles 1-8
-->
<gribModelSet>
@ -182,6 +185,100 @@
</process>
</model>
<!-- END SUBCENTER 0 -->
<!-- UKMET HiRes Tiles -->
<model>
<name>UkmetHR-1</name>
<center>74</center>
<subcenter>0</subcenter>
<grid>108162001</grid>
<process>
<id>15</id>
<id>44</id>
<id>45</id>
</process>
</model>
<model>
<name>UkmetHR-2</name>
<center>74</center>
<subcenter>0</subcenter>
<grid>108162002</grid>
<process>
<id>15</id>
<id>44</id>
<id>45</id>
</process>
</model>
<model>
<name>UkmetHR-3</name>
<center>74</center>
<subcenter>0</subcenter>
<grid>108162003</grid>
<process>
<id>15</id>
<id>44</id>
<id>45</id>
</process>
</model>
<model>
<name>UkmetHR-4</name>
<center>74</center>
<subcenter>0</subcenter>
<grid>108162004</grid>
<process>
<id>15</id>
<id>44</id>
<id>45</id>
</process>
</model>
<model>
<name>UkmetHR-5</name>
<center>74</center>
<subcenter>0</subcenter>
<grid>108162005</grid>
<process>
<id>15</id>
<id>44</id>
<id>45</id>
</process>
</model>
<model>
<name>UkmetHR-6</name>
<center>74</center>
<subcenter>0</subcenter>
<grid>108162006</grid>
<process>
<id>15</id>
<id>44</id>
<id>45</id>
</process>
</model>
<model>
<name>UkmetHR-7</name>
<center>74</center>
<subcenter>0</subcenter>
<grid>108162007</grid>
<process>
<id>15</id>
<id>44</id>
<id>45</id>
</process>
</model>
<model>
<name>UkmetHR-8</name>
<center>74</center>
<subcenter>0</subcenter>
<grid>108162008</grid>
<process>
<id>15</id>
<id>44</id>
<id>45</id>
</process>
</model>
</gribModelSet>

View file

@ -0,0 +1,5 @@
#Code Table 0.0: Discipline of processed data in the GRIB message, number of GRIB Master table
3:3:Satellite remote sensing products
4:4:Space Weather Products
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,5 @@
# CODE TABLE 3.2, Shape of the reference system
10:10:Earth model assumed WGS84 with corrected geomagnetic coordinates (latitude and longitude) defined by Gustafsson et al., 1992
11:11:Sun assumed spherical with radius = 695,990,000 m (Allen, C.W., 1976 Astrophysical Quantities (3rd Ed.; London: Athlone) and Stonyhurst latitude and longitude system with origin at the intersection of the solar central meridian (as seen from Earth) and the solar equator (Thompson, W, Coordinate systems for solar image data, A&A 449, 791803 (2006))
# 192- 254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,15 @@
# CODE TABLE 4.1, Parameter category by product discipline
0:0:Temperature
1:1:Momentum
2:2:Charged particle mass and number
3:3:Electric and magnetic fields
4:4:Energetic particles
5:5:Waves
6:6:Solar electromagnetic emissions
7:7:Terrestrial electromagnetic emissions
8:8:Imagery
9:9:Ion-neutral coupling
#10-191 Reserved
#192-254 Reserved for Local Use
255:255:Missing

View file

@ -0,0 +1,10 @@
# Product Discipline 4: Space Weather Products, Parameter Category 0: Temperature
0:0:Temperature:K:TMPSWP
1:1:Electron Temperature:K:ELECTMP
2:2:Proton Temperature:K:PROTTMP
3:3:Ion Temperature:K:IONTMP
4:4:Parallel Temperature:K:PRATMP
5:5:Perpendicular Temperature:K:PRPTMP
# 6-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,8 @@
# Product Discipline 4: Space Weather Products, Parameter Category 1: Momentum
0:0:Velocity Magnitude (Speed):m*s^1:SPEED
1:1:1st Vector Component of Velocity (Coordinate system dependent):m*s^1:VEL1
2:2:2nd Vector Component of Velocity (Coordinate system dependent):m*s^1:VEL2
3:3:3rd Vector Component of Velocity (Coordinate system dependent):m*s^1:VEL3
# 4-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,17 @@
# Product Discipline 4: Space Weather Products, Parameter Category 2: Charged Particle Mass and Number
0:0:Particle Number Density:m^3:PLSMDEN
1:1:Electron Density:m^3:ELCDEN
2:2:Proton Density:m^3:PROTDEN
3:3:Ion Density:m^3:IONDEN
4:4:Vertical Electron Content:m^2:VTEC
5:5:HF Absorption Frequency:Hz:ABSFRQ
6:6:HF Absorption:dB:ABSRB
7:7:Spread F:m:SPRDF
8:8:h'F:m:HPRIMF
9:9:Critical Frequency:Hz:CRTFRQ
10:10:Scintillation:Numeric:SCINT
# 11-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,12 @@
# Product Discipline 4: Space Weather Products, Parameter Category 3: Electric and Magnetic Fields
0:0:Magnetic Field Magnitude:T:BTOT
1:1:1st Vector Component of Magnetic Field:T:BVEC1
2:2:2nd Vector Component of Magnetic Field:T:BVEC2
3:3:3rd Vector Component of Magnetic Field:T:BVEC3
4:4:Electric Field Magnitude:V*m^1:ETOT
5:5:1st Vector Component of Electric Field:V*m^1:EVEC1
6:6:2nd Vector Component of Electric Field:V*m^1:EVEC2
7:7:3rd Vector Component of Electric Field:V*m^1:EVEC3
# 8-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,11 @@
# Product Discipline 4: Space Weather Products, Parameter Category 4: Energetic Particles
0:0:Proton Flux (Differential):(m^2*s*sr*eV)^1:DIFPFLUX
1:1:Proton Flux (Integral):(m^2*s*sr)^1:INTPFLUX
2:2:Electron Flux (Differential):(m^2*s*sr*eV)^1:DIFEFLUX
3:3:Electron Flux (Integral):(m^2*s*sr)^1:INTEFLUX
4:4:Heavy Ion Flux (Differential):((m^2*s*sr*eV)/nuc)^1:DIFIFLUX
5:5:Heavy Ion Flux (iIntegral):(m^2*s*sr)^1:INTIFLUX
6:6:Cosmic Ray Neutron Flux:h^1:NTRNFLUX
# 7-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,4 @@
# Product Discipline 4: Space Weather Products, Parameter Category 5: Waves
# 0-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,13 @@
# Product Discipline 4: Space Weather Products, Parameter Category 6: Solar Electromagnetic Emissions
0:0:Integrated Solar Irradiance:W*m^2:TSI
1:1:Solar X-ray Flux (XRS Long):W*m^2:XLONG
2:2:Solar X-ray Flux (XRS Short):W*m^2:XSHRT
3:3:Solar EUV Irradiance:W*m^2:EUVIRR
4:4:Solar Spectral Irradiance:W*m^2*n*m^1:SPECIRR
5:5:F10.7:W*m^2*H*z^1:F107
6:6:Solar Radio Emissions:W*m^2*Hz^1:SOLRF
# 7-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,10 @@
# Product Discipline 4: Space Weather Products, Parameter Category 7: Terrestrial electromagnetic emissions
0:0:Limb Intensity:J*m^2*s^1:LMBINT
1:1:Disk Intensity:j*m^2*s^1:DSKINT
2:2:Disk Intensity Day:J*m^2*s^1:DSKDAY
3:3:Disk Intensity Night:J*m^2*s^1:DSKNGT
# 4-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,14 @@
# Product Discipline 4: Space Weather Products, Parameter Category 8: Imagery
0:0:X-Ray Radiance:W*s*r^1*m^2:XRAYRAD
1:1:EUV Radiance:W*s*r^1*m^2:EUVRAD
2:2:H-Alpha Radiance:W*s*r^1*m^2:HARAD
3:3:White Light Radiance:W*s*r^1*m^2:WHTRAD
4:4:CaII-K Radiance:W*s*r^1*m^2:CAIIRAD
5:5:White Light Coronagraph Radiance:W*s*r^1*m^2:WHTCOR
6:6:Heliospheric Radiance:W*s*r^1*m^2:HELCOR
7:7:Thematic Mask:Numeric:MASK
# 8-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,7 @@
# Product Discipline 4: Space Weather Products, Parameter Category 9: Ion-Neutral Coupling
0:0:Pedersen Conductivity:S*m^1:SIGPED
1:1:Hall Conductivity:S*m^1:SIGHAL
2:2:Parallel Conductivity:S*m^1:SIGPAR
# 3-191 Reserved
# 192-254 Reserved for local use
255:255:Missing

View file

@ -0,0 +1,48 @@
# Code:table:4.5: Fixed surface types and units
170:170:Ionospheric D-region level::IDRL
171:171:Ionospheric E-region level::IERL
172:172:Ionospheric F1-region level::IF1RL
173:173:Ionospheric F2-region level::IF2RL
174:174:Specified radius from the center of the Sun:m:SRCS
175:175:Solar photosphere::SP
#192-254 Reserved for local use
200:200:Entire Atmosphere::EATM:EA
201:201:Entire Ocean::EOCN
204:204:Highest Tropospheric Freezing Level::HTFL
206:206:Grid Scale Cloud Bottom Level::GCBL
207:207:Grid Scale Cloud Top Level::GCTL
209:209:Boundary Layer Cloud Bottom Level::BCBL
210:210:Boundary Layer Cloud Top Level::BCTL
211:211:Boundary Layer Cloud Layer::BCY
212:212:Low Cloud Bottom Level::LCBL
213:213:Low Cloud Top Level::LCTL
214:214:Low Cloud Layer::LCY
215:215:Cloud Ceiling::CLG
220:220:Planetary Boundary Layer:: BLD
221:221:Layer Between Two Hybrid Levels::LBTHL
222:222:Middle Cloud Bottom Level::MCBL
223:223:Middle Cloud Top Level::MCTL
224:224:Middle Cloud Layer::MCY
232:232:High Cloud Bottom Level::HCBL
233:233:High Cloud Top Level::HCTL
234:234:High Cloud Layer::HCL
235:235:Ocean Isotherm Level:1/10 ℃:OITL
236:236:Layer Between Two Depths Below Ocean Surface::OLYR
237:237:Bottom of Ocean Mixed Layer (m):m:OBML
238:238:Bottom of Ocean Isothermal Layer:m:OBIL
239:239:Layer Ocean Surface and 26C Ocean Isothermal Level::LOS
240:240:Ocean Mixed Layer::OML
241:241:Ordered Sequence of Data::OSD
242:242:Convective Cloud Bottom Level::CCBL
243:243:Convective Cloud Top Level::CCTL
244:244:Convective Cloud::CCY
245:245:Lowest Level of the Wet Bulb Zero::WBZ
246:246:Maximum Equivalent Potential Temperature level::MTHE:MEPT
247:247:Equilibrium Level::EHLT:EL
248:248:Shallow Convective Cloud Bottom Level::SCBL
249:249:Shallow Convective Cloud Top Level::SCTL
251:251:Deep Convective Cloud Bottom Level::DCBL
252:252:Deep Convective Cloud Top Level::DCTL
253:253:Lowest Bottom Level of Supercooled Liquid Water Layer::LSCLW
254:254:Highest Top Level of Supercooled Liquid Water Layer::HSCLW
255:255:Missing

View file

@ -0,0 +1,5 @@
# Product Discipline 2: Land surface products, Parameter Category 0: Vegetation/Biomass
#192-254 Reserved for local use
192:192:Volumetric soil moisture content:Proportion:SOILW
255:255:Missing

View file

@ -0,0 +1,26 @@
<?xml version="2.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<compositeModel>
<modelName>UkmetHR-NorthernHemisphere</modelName>
<grid>864162001</grid>
<componentModels>UkmetHR-2:UkmetHR-3:UkmetHR-4:UkmetHR-1</componentModels>
</compositeModel>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<compositeModel>
<modelName>UkmetHR-SouthernHemisphere</modelName>
<grid>864162002</grid>
<componentModels>UkmetHR-6:UkmetHR-7:UkmetHR-8:UkmetHR-5</componentModels>
</compositeModel>

View file

@ -137,4 +137,8 @@
<alias base="GCBL">GCBL</alias>
<alias base="SCBL">SCBL</alias>
<alias base="SCTL">SCTL</alias>
<alias base="SP">SPXX</alias>
<alias base="IDRL">IDRL</alias>
<alias base="SRCS">SRCS</alias>
<alias base="NTAT">NTAT</alias>
</aliasList>

View file

@ -37,6 +37,7 @@ import java.util.Map;
* Jan 03, 2014 2581 njensen Added coastal flood
* Jan 13, 2014 2581 njensen Added debris flow
* Jan 17, 2014 2581 njensen Added blowing snow
* Jan 30, 2014 2581 njensen Added rain
*
* </pre>
*
@ -89,7 +90,8 @@ public enum LSREventType {
FREEZINGDRIZZLE("FREEZING DRIZZLE", 40, LSRUnits.NOUNITS),
COASTALFLOOD("COASTAL FLOOD", 41, LSRUnits.NOUNITS),
DEBRISFLOW("DEBRIS FLOW", 42, LSRUnits.NOUNITS),
BLOWINGSNOW("BLOWING SNOW", 43, LSRUnits.NOUNITS);
BLOWINGSNOW("BLOWING SNOW", 43, LSRUnits.NOUNITS),
RAIN("RAIN", 44, LSRUnits.NOUNITS);
// TODO contemplate storing the event type as a string in the database instead of an enum/integer

View file

@ -30,6 +30,8 @@ import javax.measure.quantity.Velocity;
import javax.measure.unit.NonSI;
import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
@ -70,6 +72,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Oct 14, 2013 2361 njensen Removed XML annotations and IDecoderGettable
* Dec 10, 2013 2581 njensen Removed dataURI column
* Jan 15, 2014 2581 njensen Changed constraint to use officeId instead of stationId
* Jan 30, 2014 2581 njensen Added dataURI column back in
*
* </pre>
*
@ -79,8 +82,8 @@ import com.vividsolutions.jts.geom.Geometry;
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "lsrseq")
@Table(name = "lsr", uniqueConstraints = { @UniqueConstraint(columnNames = {
"latitude", "longitude", "officeId", "refTime", "forecastTime",
"eventType" }) })
// "latitude", "longitude", "officeId", "refTime", "forecastTime", "eventType"
"dataURI" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
@ -509,4 +512,11 @@ public class LocalStormReport extends PersistablePluginDataObject implements
public String getPluginName() {
return "lsr";
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
}

View file

@ -91,7 +91,7 @@
<alias base="CICEP18hr">WXTP18</alias>
<alias base="CICEP24hr">WXTP24</alias>
<alias base="CICEP48hr">WXTP48</alias>
<alias base="CIn">CINH</alias>
<alias base="CIn">CINS</alias>
<alias base="CLWMR">CLWMR</alias>
<alias base="CP">ACPCP</alias>
<alias base="CP1hr">C01M</alias>
@ -294,15 +294,15 @@
<alias base="T24hr">TMPK24</alias>
<alias base="T48hr">TMPK48</alias>
<alias base="Ta">TMPKA</alias>
<alias base="TCC">CLD</alias>
<alias base="TCC1hr">CLD01</alias>
<alias base="TCC3hr">CLD03</alias>
<alias base="TCC6hr">CLD06</alias>
<alias base="TCC9hr">CLD09</alias>
<alias base="TCC12hr">CLD12</alias>
<alias base="TCC18hr">CLD18</alias>
<alias base="TCC24hr">CLD24</alias>
<alias base="TCC48hr">CLD48</alias>
<alias base="TCC">TCLD</alias>
<alias base="TCC1hr">TCLD01</alias>
<alias base="TCC3hr">TCLD03</alias>
<alias base="TCC6hr">TCLD06</alias>
<alias base="TCC9hr">TCLD09</alias>
<alias base="TCC12hr">TCLD12</alias>
<alias base="TCC18hr">TCLD18</alias>
<alias base="TCC24hr">TCLD24</alias>
<alias base="TCC48hr">TCLD48</alias>
<alias base="ThP">TSTM</alias>
<alias base="TOZNE">TOZO</alias>
<alias base="TP">APCP</alias>

View file

@ -63,7 +63,7 @@ def execute_ingest_at(incomingRecords, activeTable, atName, ztime, makeBackups,
results = None
try:
results = MergeVTEC.merge(activeTable, atName, incomingRecords, ztime, makeBackups,
logging.getLogger('MergeVTEC'))
logger)
except:
logger.exception("MergeVTEC fail:")
return results

View file

@ -8,7 +8,7 @@
<bean id="modelsoundingProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" ref="modelsoundingPluginName" />
<property name="pluginFQN" value="com.raytheon.uf.edex.plugin.modelsounding" />
<property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.modelsounding" />
<property name="dao" value="com.raytheon.uf.edex.plugin.modelsounding.dao.ModelSoundingDAO" />
<property name="record" value="com.raytheon.uf.common.dataplugin.modelsounding.SoundingSite" />
</bean>

View file

@ -14,8 +14,8 @@
* 12/2009 144 T. Lee Migrated to TO11D6
* 01/2010 201 M. Li Split into dataplugin project
* 05/2010 144 L. Lin Migration to TO11DR11.
* 11/2013 1066 G. Hull call constructCRSfromWKT
* Nov 14, 2013 2393 bclement added getGridGeometry()
*
* </pre>
*/
@ -24,8 +24,6 @@ package gov.noaa.nws.ncep.common.dataplugin.mcidas;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import java.awt.geom.Rectangle2D;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -69,16 +67,18 @@ import com.vividsolutions.jts.geom.Polygon;
@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class McidasMapCoverage extends PersistableDataObject implements ISpatialObject {
public class McidasMapCoverage extends PersistableDataObject implements
ISpatialObject {
private static final long serialVersionUID = 1;
@Id
private int pid;
/**
* The projection of the map coverage 1 = Mercator, 3 = Lambert Conformal or TANC
* 5 = Polar Stereographic
* 7585 = native satellite navigation e.g. GVAR, ...
* The projection of the map coverage 1 = Mercator, 3 = Lambert Conformal or
* TANC 5 = Polar Stereographic 7585 = native satellite navigation e.g.
* GVAR, ...
*/
@Column
@XmlAttribute
@ -116,10 +116,11 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
private Float clon;
/**
* The standard latitude 1. For the Lambert Conformal projection this is the latitude
* of the proection cone intersects the earth. For the Polar Stereographic this is the
* latitude at which projection plan intersects the earth. For Mercator this is the
* latitude at which the Mercator projection cylinder intersects the earth.
* The standard latitude 1. For the Lambert Conformal projection this is the
* latitude of the proection cone intersects the earth. For the Polar
* Stereographic this is the latitude at which projection plan intersects
* the earth. For Mercator this is the latitude at which the Mercator
* projection cylinder intersects the earth.
*/
@Column
@XmlAttribute
@ -127,8 +128,8 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
private Float stdlat1;
/**
* The standard latitude 2 is the second latitude of a secant cone which intersects the
* earth for the Lambert Conformal projection.
* The standard latitude 2 is the second latitude of a secant cone which
* intersects the earth for the Lambert Conformal projection.
*/
@Column
@XmlAttribute
@ -245,9 +246,10 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
* @param geometry
* The geometry
*/
public McidasMapCoverage(Integer projection, Integer nx, Integer ny, Float dx,
Float dy, Float clon, Float stdlat1, Float stdlat2, Float lllat, Float lllon,
Float urlat,Float urlon, CoordinateReferenceSystem crs, Geometry geometry) {
public McidasMapCoverage(Integer projection, Integer nx, Integer ny,
Float dx, Float dy, Float clon, Float stdlat1, Float stdlat2,
Float lllat, Float lllon, Float urlat, Float urlon,
CoordinateReferenceSystem crs, Geometry geometry) {
this.projection = projection;
this.nx = nx;
this.ny = ny;
@ -274,14 +276,22 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
* Constructs a new SatMapCoverage Object for native satellite navigation
*
* @param mapProjection
* @param nx The number of horizontal scan lines
* @param ny The number vertical scan lines
* @param reflon Reference Longitude
* @param upperLeftElement image element coordinate of area line 0, element 0
* @param upperLeftLine image line coordinate of area line 0, element 0
* @param xres Element resolution
* @param yres Line resolution
* @param crs The coordinate reference system
* @param nx
* The number of horizontal scan lines
* @param ny
* The number vertical scan lines
* @param reflon
* Reference Longitude
* @param upperLeftElement
* image element coordinate of area line 0, element 0
* @param upperLeftLine
* image line coordinate of area line 0, element 0
* @param xres
* Element resolution
* @param yres
* Line resolution
* @param crs
* The coordinate reference system
* @param geometry
*/
public McidasMapCoverage(Integer projection, Integer nx, Integer ny,
@ -342,39 +352,9 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
if (crsObject == null) {
try {
crsObject = CRS.parseWKT(crsWKT);
// ReferencingFactoryFinder.getCRSFactory(null).createFromWKT(crsWKT);
} catch (Exception e) {
/*
* parseWKT() doesn't recognize PROJCS PARAMETERS whose value is a "String" (it
* assumes all PARAMETER values are doubles.)
* If this crsWKT is a MCIDAS NAV, use McidasSpatialFactory instead.
*/
//e.printStackTrace();
Pattern p = Pattern.compile("PROJCS\\[\"MCIDAS\\sAREA\\s(.*)\"");
Matcher m = p.matcher(crsWKT);
m.find();
if ( m.groupCount() == 1 ) {
String type = m.group(1);
//System.out.println("FOUND PROJCS:"+m.group(0)+":"+type);
p = Pattern.compile("\\[\"NAV_BLOCK_BASE64\",\\s\"(.*)\"\\]");
m = p.matcher(crsWKT);
boolean found = m.find();
//System.out.println(m.group());
//System.out.println(m.groupCount()+m.group(1));
if ( found ) {
String navBlock = m.group(1);
crsObject = McidasSpatialFactory.getInstance().constructCRS(type, navBlock);
}
else {
crsObject = null;
}
}
else {
crsObject = null;
}
crsObject = McidasSpatialFactory.getInstance()
.constructCRSfromWKT(crsWKT);
}
}
return crsObject;
@ -541,7 +521,6 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
this.ny = ny;
}
/**
* @return the upperLeftElement
*/
@ -550,7 +529,8 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
}
/**
* @param upperLeftElement the upperLeftElement to set
* @param upperLeftElement
* the upperLeftElement to set
*/
public void setUpperLeftElement(int upperLeftElement) {
this.upperLeftElement = upperLeftElement;
@ -564,7 +544,8 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
}
/**
* @param upperLeftLine the upperLeftLine to set
* @param upperLeftLine
* the upperLeftLine to set
*/
public void setUpperLeftLine(int upperLeftLine) {
this.upperLeftLine = upperLeftLine;
@ -578,7 +559,8 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
}
/**
* @param elementRes the elementRes to set
* @param elementRes
* the elementRes to set
*/
public void setElementRes(int elementRes) {
this.elementRes = elementRes;
@ -592,7 +574,8 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
}
/**
* @param lineRes the lineRes to set
* @param lineRes
* the lineRes to set
*/
public void setLineRes(int lineRes) {
this.lineRes = lineRes;
@ -603,8 +586,10 @@ public class McidasMapCoverage extends PersistableDataObject implements ISpatial
}
public void setCrsWKT(String crsWKT) {
//TODO new 2.6 version of geotools adds \r\n to long String parameters in WKT format
// this temp hack removes the extraneous characters, but we may want to investigate
// TODO new 2.6 version of geotools adds \r\n to long String parameters
// in WKT format
// this temp hack removes the extraneous characters, but we may want to
// investigate
// using a specific formatter to keep this consistent and in our control
this.crsWKT = crsWKT.replaceAll("\r\n", "");
// this.crsWKT = crsWKT;

View file

@ -9,6 +9,7 @@
* ------------ ---------- ----------- --------------------------
* 10/2009 144 T. Lee Created
* 12/2009 144 T. Lee Migrated to TO11D6
* 11/2013 1066 G. Hull constructCRSfromWKT (from McidasMapCoverage)
*
* </pre>
*
@ -18,6 +19,9 @@
package gov.noaa.nws.ncep.common.dataplugin.mcidas;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import gov.noaa.nws.ncep.common.dataplugin.mcidas.dao.McidasMapCoverageDao;
import org.apache.commons.codec.binary.Base64;
@ -28,6 +32,7 @@ import org.geotools.referencing.operation.DefaultMathTransformFactory;
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchIdentifierException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.operation.MathTransform;
@ -408,6 +413,30 @@ public class McidasSpatialFactory {
return new String(coded);
}
public ProjectedCRS constructCRSfromWKT( String crsWKT) {
Pattern p = Pattern.compile("PROJCS\\[\"MCIDAS\\sAREA\\s(.*)\"");
Matcher m = p.matcher(crsWKT);
m.find();
ProjectedCRS crsObject=null;
if ( m.groupCount() == 1 ) {
String type = m.group(1);
//System.out.println("FOUND PROJCS:"+m.group(0)+":"+type);
p = Pattern.compile("\\[\"NAV_BLOCK_BASE64\",\\s\"(.*)\"\\]");
m = p.matcher(crsWKT);
boolean found = m.find();
//System.out.println(m.group());
//System.out.println(m.groupCount()+m.group(1));
if ( found ) {
String navBlock = m.group(1);
crsObject = McidasSpatialFactory.getInstance().constructCRS(type, navBlock);
}
}
return crsObject;
}
public ProjectedCRS constructCRS(String type, String encoded) {
ParameterValueGroup pvg = null;

View file

@ -167,6 +167,6 @@ public class NcscatRecord extends PersistablePluginDataObject {
@Override
public String getPluginName() {
return "ncsat";
return "ncscat";
}
}

View file

@ -3,25 +3,21 @@
*/
package gov.noaa.nws.ncep.edex.common.metparameters.parameterconversion;
import java.util.Comparator;
import java.util.List;
import gov.noaa.nws.ncep.edex.common.metparameters.Amount;
import gov.noaa.nws.ncep.edex.common.metparameters.PressureLevel;
import gov.noaa.nws.ncep.edex.common.metparameters.WetBulbPotentialTemp;
import gov.noaa.nws.ncep.edex.common.metparameters.parameterconversion.PRLibrary.InvalidValueException;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer2;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javax.measure.unit.NonSI;
import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import gov.noaa.nws.ncep.edex.common.metparameters.AirTemperature;
import gov.noaa.nws.ncep.edex.common.metparameters.Amount;
import gov.noaa.nws.ncep.edex.common.metparameters.DewPointTemp;
import gov.noaa.nws.ncep.edex.common.metparameters.PressureLevel;
import gov.noaa.nws.ncep.edex.common.metparameters.WetBulbPotentialTemp;
////import gov.noaa.nws.ncep.edex.common.metparameters.parameterconversion.PRLibrary.InvalidRangeException;
import gov.noaa.nws.ncep.edex.common.metparameters.parameterconversion.PRLibrary.InvalidValueException;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer2;
/**
* @author archana
*
@ -30,10 +26,13 @@ public final class PSLibrary {
/**
* Computes the cross totals index
* @param td850 - dewpoint at 850 mb ( in Celsius )
* @param t500 - temperature at 500 mb ( in Celsius )
* @return the difference between the dewpoint and the temperature if neither of them are missing
* and RMISSD ( -9999 ) otherwise.
*
* @param td850
* - dewpoint at 850 mb ( in Celsius )
* @param t500
* - temperature at 500 mb ( in Celsius )
* @return the difference between the dewpoint and the temperature if
* neither of them are missing and RMISSD ( -9999 ) otherwise.
* @throws InvalidValueException
* @throws NullPointerException
*/
@ -41,33 +40,37 @@ public final class PSLibrary {
public final static Amount psCtot(Amount td850, Amount t500) {
/*
* Compute the cross totals index by subtracting 500 mb
* temperature from the 850 mb dewpoint.
* Compute the cross totals index by subtracting 500 mb temperature from
* the 850 mb dewpoint.
*/
if (!PRLibrary.checkNullOrInvalidValue(td850)
|| !PRLibrary.checkNullOrInvalidValue(t500)) {
return new Amount(Unit.ONE);
}
Amount psCtot = new Amount( td850.getValue().floatValue() - t500.getValue().floatValue() , Unit.ONE );
Amount psCtot = new Amount(td850.getValue().floatValue()
- t500.getValue().floatValue(), Unit.ONE);
return psCtot;
}
/**
* Computes low, middle, and high elevation Haines indices
* from the temperature and the dewpoint.
* @param tc1 - temperature ( in Celsius )
* @param tc2 - temperature ( in Celsius )
* @param dwpc - dewpoint ( in Celsius )
* @param itype - Haines index:
* 1- Low
* 2 - Middle
* 3 - High
* Computes low, middle, and high elevation Haines indices from the
* temperature and the dewpoint.
*
* @param tc1
* - temperature ( in Celsius )
* @param tc2
* - temperature ( in Celsius )
* @param dwpc
* - dewpoint ( in Celsius )
* @param itype
* - Haines index: 1- Low 2 - Middle 3 - High
*
* @return
* @throws InvalidValueException
* @throws NullPointerException
*/
public static Amount psHans ( Amount tc1Amt, Amount tc2Amt, Amount dwpcAmt, Amount itypeAmt) {
public static Amount psHans(Amount tc1Amt, Amount tc2Amt, Amount dwpcAmt,
Amount itypeAmt) {
Amount pshans = new Amount();
if (!PRLibrary.checkNullOrInvalidValue(tc1Amt)
|| !PRLibrary.checkNullOrInvalidValue(tc2Amt)
@ -84,12 +87,10 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
if (itype == 1) {
a = ((tc2 - tc1) - 3) * (2 / 5) + 1;
b = ((tc1 - dwpc) - 5) * (2 / 5) + 1;
}
else if ( itype == 2 ) {
} else if (itype == 2) {
a = ((tc1 - tc2) - 5) * (2 / 6) + 1;
b = ((tc1 - dwpc) - 5) * (2 / 8) + 1;
}
else if ( itype == 3 ) {
} else if (itype == 3) {
a = ((tc1 - tc2) - 17) * (2 / 5) + 1;
b = ((tc1 - dwpc) - 14) * (2 / 7) + 1;
}
@ -106,17 +107,24 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
/**
*
* Computes the 'K' index
* @param t850 - 850 mb temperature ( in Celsius )
* @param t700 - 700 mb temperature ( in Celsius )
* @param t500 - 500 mb temperature ( in Celsius )
* @param td850 - 850 mb dewpoint ( in Celsius )
* @param td700 - 700 mb dewpoint ( in Celsius )
*
* @param t850
* - 850 mb temperature ( in Celsius )
* @param t700
* - 700 mb temperature ( in Celsius )
* @param t500
* - 500 mb temperature ( in Celsius )
* @param td850
* - 850 mb dewpoint ( in Celsius )
* @param td700
* - 700 mb dewpoint ( in Celsius )
* @return returns the 'K' index if all the input values are valid and
* RMISSD ( -9999 ) otherwise
* @throws InvalidValueException
* @throws NullPointerException
*/
public final static Amount pskinx ( Amount t850, Amount t700, Amount t500, Amount td850, Amount td700) {
public final static Amount pskinx(Amount t850, Amount t700, Amount t500,
Amount td850, Amount td700) {
Amount pskinx = new Amount();
if (!PRLibrary.checkNullOrInvalidValue(t850)
|| !PRLibrary.checkNullOrInvalidValue(t700)
@ -124,22 +132,30 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
|| !PRLibrary.checkNullOrInvalidValue(td850)
|| !PRLibrary.checkNullOrInvalidValue(td700))
return new Amount(Unit.ONE);
pskinx = new Amount ( ( t850.getValue().floatValue() - t500.getValue().floatValue() )
+ td850.getValue().floatValue() - ( t700.getValue().floatValue() - td700.getValue().floatValue() ) , Unit.ONE);
pskinx = new Amount(
(t850.getValue().floatValue() - t500.getValue().floatValue())
+ td850.getValue().floatValue()
- (t700.getValue().floatValue() - td700.getValue()
.floatValue()), Unit.ONE);
return pskinx;
}
/**
* Computes the Showalter index
* @param t850 - 850 mb temperature ( in Celsius )
* @param td850 - 850 mb dewpoint ( in Celsius )
* @param t500 - 500 mb temperature ( in Celsius )
* @return the Showalter index if all the three input parameters are valid and the parcel temperature is computed correctly.
* Otherwise, it returns RMISSD (-9999).
*
* @param t850
* - 850 mb temperature ( in Celsius )
* @param td850
* - 850 mb dewpoint ( in Celsius )
* @param t500
* - 500 mb temperature ( in Celsius )
* @return the Showalter index if all the three input parameters are valid
* and the parcel temperature is computed correctly. Otherwise, it
* returns RMISSD (-9999).
*/
public final static Amount psShow ( Amount t850Amt, Amount td850Amt, Amount t500Amt ) {
public final static Amount psShow(Amount t850Amt, Amount td850Amt,
Amount t500Amt) {
float psshow = GempakConstants.RMISSD;
if (!PRLibrary.checkNullOrInvalidValue(t850Amt)
@ -153,22 +169,27 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
* Find equivalent potential temperature at the LCL using 850 mb
* temperature and dewpoint.
*/
Amount thtlcl = PRLibrary.prThte ( new Amount ( p850, NcUnits.MILLIBAR ), t850Amt, td850Amt );
Amount thtlcl = PRLibrary.prThte(new Amount(p850, NcUnits.MILLIBAR),
t850Amt, td850Amt);
if (!PRLibrary.checkNullOrInvalidValue(thtlcl))
return new Amount(Unit.ONE);
/*Find parcel temperature along pseudoadiabat at 500 mb.
* The parcel temperature tp is the temperature in Celsius at 500 mb of a parcel,
/*
* Find parcel temperature along pseudoadiabat at 500 mb. The parcel
* temperature tp is the temperature in Celsius at 500 mb of a parcel,
* which lies on the moist adiabat determined by the sounding at 850 mb
*/
Amount tp = PRLibrary.prTmst(thtlcl,
new Amount( p500, NcUnits.MILLIBAR ),
new Amount ( 0, Unit.ONE ) );
new Amount(p500, NcUnits.MILLIBAR), new Amount(0, Unit.ONE));
/*Subtract the parcel temperature from the temperature at 500 mb, is the parcel temperature is valid*/
/*
* Subtract the parcel temperature from the temperature at 500 mb, is
* the parcel temperature is valid
*/
if (!PRLibrary.checkNullOrInvalidValue(tp))
return new Amount(Unit.ONE);
t500Amt = PRLibrary.checkAndConvertInputAmountToExpectedUnits(t500Amt, SI.KELVIN);
t500Amt = PRLibrary.checkAndConvertInputAmountToExpectedUnits(t500Amt,
SI.KELVIN);
float t500 = t500Amt.getValue().floatValue();
psshow = t500 - tp.getValue().floatValue();
@ -177,10 +198,14 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
/**
* Computes the vertical totals index
* @param t850 - 850 mb temperature ( in Celsius )
* @param t500 - 500 mb temperature ( in Celsius )
* @return the vertical totals index as a difference of the temperature at 850 mb and the temperature at 500 mb, if neither value is missing.
* Else it returns RMISSD (-9999)
*
* @param t850
* - 850 mb temperature ( in Celsius )
* @param t500
* - 500 mb temperature ( in Celsius )
* @return the vertical totals index as a difference of the temperature at
* 850 mb and the temperature at 500 mb, if neither value is
* missing. Else it returns RMISSD (-9999)
* @throws InvalidValueException
* @throws NullPointerException
*/
@ -189,17 +214,22 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
|| !PRLibrary.checkNullOrInvalidValue(t500))
return new Amount(Unit.ONE);
return new Amount ( t850.getValue().floatValue() - t500.getValue().floatValue() , Unit.ONE );
return new Amount(t850.getValue().floatValue()
- t500.getValue().floatValue(), Unit.ONE);
}
/**
* Computes the total Totals index from the temperature and dewpoint at 850 mb and the temperature at 500 mb
* Computes the total Totals index from the temperature and dewpoint at 850
* mb and the temperature at 500 mb
*
* @param t850 - 850 mb temperature ( in Celsius )
* @param td850 - 850 mb dewpoint ( in Celsius )
* @param t500 - 500 mb temperature ( in Celsius )
* @return the total totals index if none of the input parameters are missing and
* RMISSD (-9999) otherwise
* @param t850
* - 850 mb temperature ( in Celsius )
* @param td850
* - 850 mb dewpoint ( in Celsius )
* @param t500
* - 500 mb temperature ( in Celsius )
* @return the total totals index if none of the input parameters are
* missing and RMISSD (-9999) otherwise
* @throws InvalidValueException
* @throws NullPointerException
*/
@ -227,20 +257,28 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
/**
* Computes the SWEAT index. Winds must be input in m/sec
* @param t850 - 850 mb temperature
* @param td850 - 850 mb dewpoint
* @param t500 - 500 mb temperature
* @param spd850 - 850 mb windspeed ( in m/sec )
* @param spd500 - 500 mb windspeed ( in m/sec )
* @param dir850 - 850 mb wind direction
* @param dir500 - 500 mb wind direction
* @return the SWEAT index if none of the inputs are missing and RMISSD ( -9999 ) otherwise
*
* @param t850
* - 850 mb temperature
* @param td850
* - 850 mb dewpoint
* @param t500
* - 500 mb temperature
* @param spd850
* - 850 mb windspeed ( in m/sec )
* @param spd500
* - 500 mb windspeed ( in m/sec )
* @param dir850
* - 850 mb wind direction
* @param dir500
* - 500 mb wind direction
* @return the SWEAT index if none of the inputs are missing and RMISSD (
* -9999 ) otherwise
* @throws InvalidValueException
* @throws NullPointerException
*/
public final static Amount psSwet(Amount t850, Amount td850, Amount t500,
Amount spd850, Amount spd500,
Amount dir850, Amount dir500 ) {
Amount spd850, Amount spd500, Amount dir850, Amount dir500) {
float pssweat = GempakConstants.RMISSD;
if (!PRLibrary.checkNullOrInvalidValue(t500)
|| !PRLibrary.checkNullOrInvalidValue(td850)
@ -251,14 +289,15 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
|| !PRLibrary.checkNullOrInvalidValue(dir500))
return new Amount(Unit.ONE);
/*
* (Non-Javadoc):
* All computations are from
* Miller, R.C., 1972: Notes on Severe Storm Forecasting Procedures of
* the Air Force Global Weather Central, AWS Tech. Report 200
* (Non-Javadoc): All computations are from Miller, R.C., 1972: Notes on
* Severe Storm Forecasting Procedures of the Air Force Global Weather
* Central, AWS Tech. Report 200
*/
/* Convert meters per second to knots */
Amount skt850 = PRLibrary.checkAndConvertInputAmountToExpectedUnits(spd850, NonSI.KNOT) ;
Amount skt500 = PRLibrary.checkAndConvertInputAmountToExpectedUnits(spd500, NonSI.KNOT) ;
Amount skt850 = PRLibrary.checkAndConvertInputAmountToExpectedUnits(
spd850, NonSI.KNOT);
Amount skt500 = PRLibrary.checkAndConvertInputAmountToExpectedUnits(
spd500, NonSI.KNOT);
/* Compute the total totals index. If < 49, set term to zero. */
float total = psTotl(t850, td850, t500).getValue().floatValue();
@ -268,7 +307,8 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
/* Compute shear term. */
float dif = dir500.getValue().floatValue() - dir850.getValue().floatValue();
float dif = dir500.getValue().floatValue()
- dir850.getValue().floatValue();
float s = (float) (Math.sin(dif * GempakConstants.DTR));
float shear = 125 * (s + 0.2f);
@ -298,37 +338,58 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
}
/**
* Finds the most unstable level of a sounding from the surface to the input pressure level.
* @param listOfNcSoundingLayer - the list of NcSoundingLayer to search
* @param plev - input pressure level
* @return the most unstable level of a sounding from the surface to the input pressure level (plev),
* if plev is not -1 and all computations fall through correctly.Else it returns an empty NcSoundingLayer object
* Finds the most unstable level of a sounding from the surface to the input
* pressure level.
*
* @param listOfNcSoundingLayer
* - the list of NcSoundingLayer to search
* @param plev
* - input pressure level
* @return the most unstable level of a sounding from the surface to the
* input pressure level (plev), if plev is not -1 and all
* computations fall through correctly.Else it returns an empty
* NcSoundingLayer object
* @throws Exception
*/
public static NcSoundingLayer2 psUstb(List<NcSoundingLayer2> listOfNcSoundingLayer, PressureLevel plev ) throws Exception{
public static NcSoundingLayer2 psUstb(
List<NcSoundingLayer2> listOfNcSoundingLayer, PressureLevel plev)
throws Exception {
// System.out.println(" PSLibrary/psUstb !!!!!!!!! ");
// TODO: update to find pressure value between 2 levels
NcSoundingLayer2 outputNcSoundingLayer = new NcSoundingLayer2();
class PressureComparator implements Comparator<NcSoundingLayer2> {
public int compare(NcSoundingLayer2 n1, NcSoundingLayer2 n2) {
return Float.compare(n2.getPressure().getValue().floatValue(), n1.getPressure().getValue().floatValue());
return Float.compare(n2.getPressure().getValue().floatValue(),
n1.getPressure().getValue().floatValue());
}
}
// System.out.println(" PSLibrary/psUstb 1 ");
if (listOfNcSoundingLayer != null && listOfNcSoundingLayer.size() > 0) {
if (listOfNcSoundingLayer.size() > 1)
Collections.sort(listOfNcSoundingLayer, new PressureComparator() );
Collections.sort(listOfNcSoundingLayer,
new PressureComparator());
// System.out.println(" PSLibrary/psUstb 2 ");
NcSoundingLayer2 surfaceLevelNcSoundingLayer = listOfNcSoundingLayer.get( 0 );
PressureLevel pressureAtSurfaceLevel = surfaceLevelNcSoundingLayer.getPressure();
NcSoundingLayer2 topLevelNcSoundingLayer = PCLibrary.pcFtop( listOfNcSoundingLayer );
PressureLevel pressureAtTopLevel = topLevelNcSoundingLayer.getPressure();
NcSoundingLayer2 surfaceLevelNcSoundingLayer = listOfNcSoundingLayer
.get(0);
PressureLevel pressureAtSurfaceLevel = surfaceLevelNcSoundingLayer
.getPressure();
NcSoundingLayer2 topLevelNcSoundingLayer = PCLibrary
.pcFtop(listOfNcSoundingLayer);
PressureLevel pressureAtTopLevel = topLevelNcSoundingLayer
.getPressure();
float plevVal = plev.getValue().floatValue();
float presAtSurfaceLevelValue = pressureAtSurfaceLevel.getValue().floatValue();
float presAtTopLevelVal = pressureAtTopLevel.getValue().floatValue();
float presAtSurfaceLevelValue = pressureAtSurfaceLevel.getValue()
.floatValue();
float presAtTopLevelVal = pressureAtTopLevel.getValue()
.floatValue();
if (plevVal > presAtSurfaceLevelValue)
return outputNcSoundingLayer;
else if (plevVal == -1 || plevVal <= presAtTopLevelVal)
plev = pressureAtTopLevel;
// System.out.println(" PSLibrary/psUstb 3 ");
int sizeOfList = listOfNcSoundingLayer.size();
boolean done = false;
@ -336,55 +397,96 @@ if ( !PRLibrary.checkNullOrInvalidValue( td850 )
float eps = GempakConstants.RMISSD;
while (!done && lev < sizeOfList) {
NcSoundingLayer2 currNcSoundingLayer = listOfNcSoundingLayer.get( lev );
NcSoundingLayer2 currNcSoundingLayer = listOfNcSoundingLayer
.get(lev);
// System.out.println(" PSLibrary/psUstb 4 ");
Amount pressure = new Amount ( currNcSoundingLayer.getPressure().getValue(), NcUnits.MILLIBAR );
Amount tmpc = new Amount ( currNcSoundingLayer.getTemperature().getValue(), SI.CELSIUS );
Amount dwpc = new Amount ( currNcSoundingLayer.getDewpoint().getValue(), SI.CELSIUS );
if ( pressure.hasValidValue() && tmpc.hasValidValue() && dwpc.hasValidValue() ){
Amount pressure = new Amount(currNcSoundingLayer.getPressure()
.getValue(), NcUnits.MILLIBAR);
Amount tmpc = new Amount(currNcSoundingLayer.getTemperature()
.getValue(), SI.CELSIUS);
Amount dwpc = new Amount(currNcSoundingLayer.getDewpoint()
.getValue(), SI.CELSIUS);
if (pressure.hasValidValue() && tmpc.hasValidValue()
&& dwpc.hasValidValue()) {
WetBulbPotentialTemp thwc = new WetBulbPotentialTemp();
// System.out.println(" PSLibrary/thwc " +
// thwc.doubleValue()
// + " pressure " + pressure.doubleValue() + " tmpc "
// + tmpc.doubleValue() + " dwpc "
// + dwpc.doubleValue());
thwc.setValue(PRLibrary.prThwc(pressure, tmpc, dwpc));
if ( thwc.getValue().floatValue() > eps && ( pressure.getValue().floatValue() >= plevVal ) ){
if (thwc.getValue().floatValue() > eps
&& (pressure.getValue().floatValue() >= plevVal)) {
eps = thwc.getValue().floatValue();
outputNcSoundingLayer.setPressure( currNcSoundingLayer.getPressure() );
outputNcSoundingLayer.setTemperature( currNcSoundingLayer.getTemperature() );
outputNcSoundingLayer.setDewpoint( currNcSoundingLayer.getDewpoint() );
outputNcSoundingLayer.setWindSpeed( currNcSoundingLayer.getWindSpeed() );
outputNcSoundingLayer.setWindDirection( currNcSoundingLayer.getWindDirection() );
outputNcSoundingLayer.setWindU( currNcSoundingLayer.getWindU() );
outputNcSoundingLayer.setWindV( currNcSoundingLayer.getWindV() );
outputNcSoundingLayer.setGeoHeight( currNcSoundingLayer.getGeoHeight() );
outputNcSoundingLayer.setOmega( currNcSoundingLayer.getOmega() );
outputNcSoundingLayer.setSpecificHumidity( currNcSoundingLayer.getSpecificHumidity() );
outputNcSoundingLayer.setPressure(currNcSoundingLayer
.getPressure());
outputNcSoundingLayer
.setTemperature(currNcSoundingLayer
.getTemperature());
outputNcSoundingLayer.setDewpoint(currNcSoundingLayer
.getDewpoint());
outputNcSoundingLayer.setWindSpeed(currNcSoundingLayer
.getWindSpeed());
outputNcSoundingLayer
.setWindDirection(currNcSoundingLayer
.getWindDirection());
outputNcSoundingLayer.setWindU(currNcSoundingLayer
.getWindU());
outputNcSoundingLayer.setWindV(currNcSoundingLayer
.getWindV());
outputNcSoundingLayer.setGeoHeight(currNcSoundingLayer
.getGeoHeight());
outputNcSoundingLayer.setOmega(currNcSoundingLayer
.getOmega());
outputNcSoundingLayer
.setSpecificHumidity(currNcSoundingLayer
.getSpecificHumidity());
// System.out.println("Outdat: "
// + outputNcSoundingLayer.getPressure().getValueAs( NcUnits.MILLIBAR ).floatValue() + " "
// + outputNcSoundingLayer.getTemperature().getValueAs( SI.CELSIUS ).floatValue() + " "
// + outputNcSoundingLayer.getDewpoint().getValueAs( SI.CELSIUS ).floatValue() + " "
// + outputNcSoundingLayer.getWindSpeed().getValueAs( SI.METERS_PER_SECOND ).floatValue() + " "
// + outputNcSoundingLayer.getWindDirection().getValueAs( NonSI.DEGREE_ANGLE ).floatValue() + " "
// + outputNcSoundingLayer.getGeoHeight().getValueAs( SI.METER ).floatValue() );
// + outputNcSoundingLayer.getPressure().getValueAs(
// NcUnits.MILLIBAR ).floatValue() + " "
// + outputNcSoundingLayer.getTemperature().getValueAs(
// SI.CELSIUS ).floatValue() + " "
// + outputNcSoundingLayer.getDewpoint().getValueAs(
// SI.CELSIUS ).floatValue() + " "
// + outputNcSoundingLayer.getWindSpeed().getValueAs(
// SI.METERS_PER_SECOND ).floatValue() + " "
// +
// outputNcSoundingLayer.getWindDirection().getValueAs(
// NonSI.DEGREE_ANGLE ).floatValue() + " "
// + outputNcSoundingLayer.getGeoHeight().getValueAs(
// SI.METER ).floatValue() );
}
}
// System.out.println("Pressure value is " + pressure.getValue().floatValue() + " " + pressure.getUnit().toString() );
// System.out.println("Pressure value is " +
// pressure.getValue().floatValue() + " " +
// pressure.getUnit().toString() );
// System.out.println("lev is " + lev );
lev++;
if ( pressure.hasValidValue() && pressure.getValue().floatValue() <= plevVal ){
if (pressure.hasValidValue()
&& pressure.getValue().floatValue() <= plevVal) {
done = true;
break;
}
}
}
System.out.println("From PS_USTB Outdat: "
+ outputNcSoundingLayer.getPressure().getValue().floatValue() + " "
+ outputNcSoundingLayer.getTemperature().getValue().floatValue() + " "
+ outputNcSoundingLayer.getDewpoint().getValue().floatValue() + " "
+ outputNcSoundingLayer.getWindSpeed().getValue().floatValue() + " "
+ outputNcSoundingLayer.getWindDirection().getValue().floatValue() + " "
+ outputNcSoundingLayer.getGeoHeight().getValue().floatValue() );
//System.out.println("PSLibrary/psUstb Outdat: "
// + outputNcSoundingLayer.getPressure().getValue().floatValue()
// + " "
// + outputNcSoundingLayer.getTemperature().getValue()
// .floatValue()
// + " "
// + outputNcSoundingLayer.getDewpoint().getValue().floatValue()
// + " "
// + outputNcSoundingLayer.getWindSpeed().getValue().floatValue()
// + " "
// + outputNcSoundingLayer.getWindDirection().getValue()
// .floatValue() + " "
// + outputNcSoundingLayer.getGeoHeight().getValue().floatValue());
return outputNcSoundingLayer;
}
}

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NcInventoryDefinition xmlns:ns2="group" xmlns:ns3="http://www.example.org/productType">
<inventoryName>QSCT</inventoryName>
<inventoryParameters>pluginName,dataTime</inventoryParameters>
<baseConstraints>
<mapping key="reportType">
<constraint constraintValue="quikscat%" constraintType="LIKE"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="ncscat" constraintType="EQUALS"/>
</mapping>
</baseConstraints>
</NcInventoryDefinition>

View file

@ -615,6 +615,18 @@
<wfo></wfo>
</station>
<station>
<stid>TRV</stid>
<stnnum>000276</stnnum>
<stnname>TREASURE</stnname>
<state>FL</state>
<country>US</country>
<latitude>27.68</latitude>
<longitude>-80.49</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- RENAMED TO TRV (ABOVE); KEEP VRB ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>VRB</stid>
<stnnum>000276</stnnum>
<stnname>VERO_BEACH</stnname>
@ -759,6 +771,18 @@
<wfo></wfo>
</station>
<station>
<stid>RSW</stid>
<stnnum>000104</stnnum>
<stnname>LEE_COUNTY</stnname>
<state>FL</state>
<country>US</country>
<latitude>26.53</latitude>
<longitude>-81.78</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station><!-- REPLACED BY RSW (ABOVE); KEEP FMY ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>FMY</stid>
<stnnum>000104</stnnum>
<stnname>FT_MEYERS</stnname>
@ -1011,6 +1035,18 @@
<wfo></wfo>
</station>
<station>
<stid>PZD</stid>
<stnnum>000004</stnnum>
<stnname>PECAN</stnname>
<state>GA</state>
<country>US</country>
<latitude>31.66</latitude>
<longitude>-84.29</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- REPLACED BY PZD (ABOVE); KEEP ABY ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>ABY</stid>
<stnnum>000004</stnnum>
<stnname>ALBANY</stnname>
@ -1131,6 +1167,18 @@
<wfo></wfo>
</station>
<station>
<stid>IIU</stid>
<stnnum>000159</stnnum>
<stnname>LOUISVILLE</stnname>
<state>KY</state>
<country>US</country>
<latitude>38.10</latitude>
<longitude>-85.58</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- RENAMED TO IIU (ABOVE); KEEP LOU ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>LOU</stid>
<stnnum>000159</stnnum>
<stnname>LOUISVILLE</stnname>
@ -1395,6 +1443,18 @@
<wfo></wfo>
</station>
<station>
<stid>AXC</stid>
<stnnum>000070</stnnum>
<stnname>ADDERS</stnname>
<state>IL</state>
<country>US</country>
<latitude>39.74</latitude>
<longitude>-88.86</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- RENAMED TO AXC (ABOVE); KEEP DEC ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>DEC</stid>
<stnnum>000070</stnnum>
<stnname>DECATUR</stnname>
@ -1491,6 +1551,18 @@
<wfo></wfo>
</station>
<station>
<stid>MHZ</stid>
<stnnum>000142</stnnum>
<stnname>MAGNOLIA</stnname>
<state>MS</state>
<country>US</country>
<latitude>32.43</latitude>
<longitude>-90.10</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- REPLACED BY MHZ (ABOVE); KEEP JAN ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>JAN</stid>
<stnnum>000142</stnnum>
<stnname>JACKSON</stnname>
@ -1503,6 +1575,18 @@
<wfo></wfo>
</station>
<station>
<stid>HRV</stid>
<stnnum>000195</stnnum>
<stnname>HARVEY</stnname>
<state>LA</state>
<country>US</country>
<latitude>29.85</latitude>
<longitude>-90.00</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- REPLACED BY HRV (ABOVE); KEEP MSY ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>MSY</stid>
<stnnum>000195</stnnum>
<stnname>NEW_ORLEANS</stnname>
@ -1887,6 +1971,18 @@
<wfo></wfo>
</station>
<station>
<stid>MCI</stid>
<stnnum>000177</stnnum>
<stnname>KANSAS_CITY</stnname>
<state>MO</state>
<country>US</country>
<latitude>39.29</latitude>
<longitude>-94.74</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- REPLACED BY MCI (ABOVE); KEEP MKC ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>MKC</stid>
<stnnum>000177</stnnum>
<stnname>KANSAS_CITY</stnname>
@ -2055,6 +2151,18 @@
<wfo></wfo>
</station>
<station>
<stid>TTT</stid>
<stnnum>000072</stnnum>
<stnname>MAVERICK</stnname>
<state>TX</state>
<country>US</country>
<latitude>32.87</latitude>
<longitude>-97.04</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- REPLACED BY TTT (ABOVE); KEEP DFW ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>DFW</stid>
<stnnum>000072</stnnum>
<stnname>DALLAS-FT_WORTH</stnname>
@ -2175,6 +2283,18 @@
<wfo></wfo>
</station>
<station>
<stid>CWK</stid>
<stnnum>000020</stnnum>
<stnname>CENTEX</stnname>
<state>TX</state>
<country>US</country>
<latitude>30.38</latitude>
<longitude>-97.53</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- REPLACED BY CWK (ABOVE); KEEP AUS ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>AUS</stid>
<stnnum>000020</stnnum>
<stnname>AUSTIN</stnname>
@ -2295,6 +2415,18 @@
<wfo></wfo>
</station>
<station>
<stid>MMB</stid>
<stnnum>000110</stnnum>
<stnname>MITBEE</stnname>
<state>OK</state>
<country>US</country>
<latitude>36.34</latitude>
<longitude>-99.88</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- RENAMED TO MMB (ABOVE); KEEP GAG ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>GAG</stid>
<stnnum>000110</stnnum>
<stnname>GAGE</stnname>
@ -2679,6 +2811,18 @@
<wfo></wfo>
</station>
<station>
<stid>CME</stid>
<stnnum>000233</stnnum>
<stnname>CHISUM</stnname>
<state>NM</state>
<country>US</country>
<latitude>33.34</latitude>
<longitude>-104.62</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- RENAMED TO CME (ABOVE); KEEP ROW ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>ROW</stid>
<stnnum>000233</stnnum>
<stnname>ROSWELL</stnname>
@ -2727,6 +2871,18 @@
<wfo></wfo>
</station>
<station>
<stid>FTI</stid>
<stnnum>000163</stnnum>
<stnname>FT_UNION</stnname>
<state>NM</state>
<country>US</country>
<latitude>35.66</latitude>
<longitude>-105.14</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- RENAMED TO FTI (ABOVE); KEEP LVS ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>LVS</stid>
<stnnum>000163</stnnum>
<stnname>LAS_VEGAS</stnname>
@ -2919,6 +3075,18 @@
<wfo></wfo>
</station>
<station>
<stid>RSK</stid>
<stnnum>000103</stnnum>
<stnname>RATTLESNAKE</stnname>
<state>NM</state>
<country>US</country>
<latitude>36.75</latitude>
<longitude>-108.10</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- RENAMED TO RSK (ABOVE); KEEP FMN ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>FMN</stid>
<stnnum>000103</stnnum>
<stnname>FARMINGTON</stnname>
@ -3759,6 +3927,18 @@
<wfo></wfo>
</station>
<station>
<stid>HUH</stid>
<stnnum>000035</stnnum>
<stnname>WHATCOM</stnname>
<state>WA</state>
<country>US</country>
<latitude>48.95</latitude>
<longitude>-122.58</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station> <!-- RENAMED TO HUH (ABOVE); KEEP BLI ENTRY ONLY AS LONG AS NEEDED TO DECODE LEGACY PRODUCTS, THEN DISCARD -->
<stid>BLI</stid>
<stnnum>000035</stnnum>
<stnname>BELLINGHAM</stnname>
@ -4658,138 +4838,6 @@
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>RSW</stid>
<stnnum>0</stnnum>
<stnname>LEE_COUNTY</stnname>
<state>FL</state>
<country>US</country>
<latitude>26.53</latitude>
<longitude>-81.78</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>PZD</stid>
<stnnum>0</stnnum>
<stnname>PECAN</stnname>
<state>GA</state>
<country>US</country>
<latitude>31.66</latitude>
<longitude>-84.29</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>IIU</stid>
<stnnum>0</stnnum>
<stnname>LOUISVILLE</stnname>
<state>KY</state>
<country>US</country>
<latitude>38.10</latitude>
<longitude>-85.58</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>HRV</stid>
<stnnum>0</stnnum>
<stnname>HARVEY</stnname>
<state>LA</state>
<country>US</country>
<latitude>29.85</latitude>
<longitude>-90.00</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>MCI</stid>
<stnnum>0</stnnum>
<stnname>KANSAS_CITY</stnname>
<state>MO</state>
<country>US</country>
<latitude>39.29</latitude>
<longitude>-94.74</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>TTT</stid>
<stnnum>0</stnnum>
<stnname>MAVERICK</stnname>
<state>TX</state>
<country>US</country>
<latitude>32.87</latitude>
<longitude>-97.04</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>CWK</stid>
<stnnum>0</stnnum>
<stnname>CENTEX</stnname>
<state>TX</state>
<country>US</country>
<latitude>30.38</latitude>
<longitude>-97.53</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>CME</stid>
<stnnum>0</stnnum>
<stnname>CHISUM</stnname>
<state>NM</state>
<country>US</country>
<latitude>33.34</latitude>
<longitude>-104.62</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>FTI</stid>
<stnnum>0</stnnum>
<stnname>FT_UNION</stnname>
<state>NM</state>
<country>US</country>
<latitude>35.66</latitude>
<longitude>-105.14</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>RSK</stid>
<stnnum>0</stnnum>
<stnname>RATTLESNAKE</stnname>
<state>NM</state>
<country>US</country>
<latitude>36.75</latitude>
<longitude>-108.10</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>HUH</stid>
<stnnum>0</stnnum>
<stnname>WHATCOM</stnname>
<state>WA</state>
<country>US</country>
<latitude>48.95</latitude>
<longitude>-122.58</longitude>
<elevation>0</elevation>
<priority>0</priority>
<wfo></wfo>
</station>
<station>
<stid>ASRF</stid>
<stnnum>948640</stnnum>

View file

@ -18,6 +18,7 @@ import com.raytheon.edex.plugin.AbstractDecoder;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.edex.decodertools.core.DecoderTools;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
/**
@ -261,7 +262,10 @@ public class McidasDecoder extends AbstractDecoder {
record.setAreaName(areaName);
String fileName = "";
if (headers != null) {
fileName = (String) headers.get("traceId");
// fileName = (String) headers.get("traceId");
File ingestFile = new File(
(String) headers.get(DecoderTools.INGEST_FILE_NAME));
fileName = ingestFile.getName();
}
record.setInputFileName(fileName);

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<requestPatterns xmlns:ns2="group">
<regex>^MANUAL INGEST.*</regex>
<regex>^MOSAIC.*</regex>
</requestPatterns>

View file

@ -2,6 +2,10 @@
<ncgribModelNameMap>
<mapping>
<entry>
<key>ecavg_.*</key>
<value>ecensDerv</value>
</entry>
<entry>
<key>gens_cmce.*_cmc_geavg.*</key>
<value>cmceDerv</value>

View file

@ -15,7 +15,7 @@
<bean id="ncscatDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="ncscat" />
<constructor-arg value="jms-dist:queue:Ingest.ncscat" />
<constructor-arg value="jms-dist:queue:Ingest.Ncscat" />
</bean>
<bean id="ncscatCamelRegistered" factory-bean="contextManager"

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<requestPatterns xmlns:ns2="group">
<regex>^NCSCAT.*</regex>
</requestPatterns>

View file

@ -12,6 +12,7 @@
* 02/2010 210 T. Lee Fixed TTCC tropopause
* 09/2011 Chin Chen add batch parsing methods for better performance
* 09/2011 457 S. Gurung Renamed H5 to Nc and h5 to nc
* 12/2013 T. Lee Fixed TTCC Wmax pressure off by factor of 10
*
* </pre>
*
@ -25,33 +26,49 @@ package gov.noaa.nws.ncep.edex.plugin.ncuair.util;
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairLiftedIndex;
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairMaxWind;
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairObsLevels;
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairTropopause;
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairRecord;
import gov.noaa.nws.ncep.edex.plugin.ncuair.util.NcUairWindGroup;
import gov.noaa.nws.ncep.common.dataplugin.ncuair.NcUairTropopause;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.*;
import com.raytheon.edex.exception.DecoderException;
public class NcUairParser {
// UU is data from ship; XX is data from mobile
public static final int TTAA = 1;
public static final int TTBB = 2;
public static final int TTCC = 3;
public static final int TTDD = 4;
public static final int PPAA = 5;
public static final int PPBB = 6;
public static final int PPCC = 7;
public static final int PPDD = 8;
public static final int UUAA = 1;
public static final int UUBB = 2;
public static final int UUCC = 3;
public static final int UUDD = 4;
public static final int XXAA = 1;
public static final int XXBB = 2;
public static final int XXCC = 9;
public static final int XXDD = 10;
/**
@ -63,7 +80,8 @@ public class NcUairParser {
/**
* Return the dataType with format "(TT|PP|XX|UU)(AA|BB|CC|DD)"
*
* @param theReport The input upper air data report
* @param theReport
* The input upper air data report
* @return
*/
public static String getDataType(String theReport) {
@ -83,7 +101,8 @@ public class NcUairParser {
/**
* Return the station Number
*
* @param theReport The input upper air data report
* @param theReport
* The input upper air data report
* @return
*/
public static String getStationNumber(String theReport) {
@ -100,14 +119,16 @@ public class NcUairParser {
/** Regular expression for stationNumber */
final String STATIONNUMBER2 = "(TT|PP)(AA|BB|CC|DD) (\\d{5}) NIL";
Pattern stationNumberPattern2 = Pattern.compile(STATIONNUMBER2);
Matcher stationNumberMatcher2 = stationNumberPattern2.matcher(theReport);
Matcher stationNumberMatcher2 = stationNumberPattern2
.matcher(theReport);
if (stationNumberMatcher2.find()) {
retStationNumber = stationNumberMatcher2.group(3);
} else {
/** Regular expression for stationNumber */
final String STATIONNUMBER3 = "(TT|PP)(AA|BB|CC|DD) (/////) (\\d{5}) NIL";
Pattern stationNumberPattern3 = Pattern.compile(STATIONNUMBER3);
Matcher stationNumberMatcher3 = stationNumberPattern3.matcher(theReport);
Matcher stationNumberMatcher3 = stationNumberPattern3
.matcher(theReport);
if (stationNumberMatcher3.find()) {
retStationNumber = stationNumberMatcher3.group(4);
}
@ -119,7 +140,8 @@ public class NcUairParser {
/**
* Get the correction indicator from WMO header.
*
* @param theReport The input upper air data report
* @param theReport
* The input upper air data report
* @return a String for corIndicator
*/
public static String findCorIndicator(String theReport) {
@ -139,10 +161,10 @@ public class NcUairParser {
}
/**
* From a given dataType returns an integer to represent
* that dataType.
* From a given dataType returns an integer to represent that dataType.
*
* @param dataType The input dataType
* @param dataType
* The input dataType
* @return an integer for that dataType
*/
public static Integer getUairType(String dataType) {
@ -172,15 +194,17 @@ public class NcUairParser {
}
/**
* Parse the entire code message and interpret to
* observation level information according its data
* type.
* Parse the entire code message and interpret to observation level
* information according its data type.
*
* @param codeMessage The input upper air code groups
* @param record The in and out Uair record
* @param codeMessage
* The input upper air code groups
* @param record
* The in and out Uair record
* @return
*/
static int exceptionCount = 0;
public static void getLevels(String codeMessage, NcUairRecord record) {
Boolean windKnot = false;
@ -189,11 +213,14 @@ public class NcUairParser {
int uairType = getUairType(dataType);
// System.out.println("getLEvel uair datatype="+dataType);
String[] codeGroupAr;//Chin, do not use fix array size, it will cause exception when size is over 500 = new String[500];
String[] codeGroupAr;// Chin, do not use fix array size, it will cause
// exception when size is over 500 = new
// String[500];
List<String> codeGpList = new ArrayList<String>();
// System.out.println("codeMessage...\n" + codeMessage);
if ( dataType.substring(0,2).equals("XX") || dataType.substring(0,2).equals("UU") ) {
if (dataType.substring(0, 2).equals("XX")
|| dataType.substring(0, 2).equals("UU")) {
windKnot = NcUairShipMobile.getWindKnot();
} else {
windKnot = NcUairTimeGroup.getWindKnot();
@ -254,15 +281,18 @@ public class NcUairParser {
}
}
/**
* Decodes a Pres/height, temperature, and wind fields in the
* forms PPhhh and TTTdd and DDDff for TTAA/CC.'
* Decodes a Pres/height, temperature, and wind fields in the forms PPhhh
* and TTTdd and DDDff for TTAA/CC.'
*
* @param codeGroupAr The input uppair code group array
* @param cgSize The input cgSize is the size of the code group array
* @param windKnot The input windKnot is flag to indicate wind in knot or not.
* @param record The in and out Uair record
* @param codeGroupAr
* The input uppair code group array
* @param cgSize
* The input cgSize is the size of the code group array
* @param windKnot
* The input windKnot is flag to indicate wind in knot or not.
* @param record
* The in and out Uair record
* @return
*/
public static void processTTAACC(String[] codeGroupAr, int cgSize,
@ -282,7 +312,8 @@ public class NcUairParser {
if (dataType.substring(2, 4).equals("CC")) {
above = true;
}
if ( dataType.substring(0,2).equals("XX") || dataType.substring(0,2).equals("UU") ) {
if (dataType.substring(0, 2).equals("XX")
|| dataType.substring(0, 2).equals("UU")) {
topwind = NcUairShipMobile.getTopwind();
if (dataType.substring(0, 2).equals("XX")) {
drop = true;
@ -342,7 +373,8 @@ public class NcUairParser {
// NO tropopause data
i++;
} else {
processTropopause(codeGroupAr, i, topwindFlag, windKnot, record, above);
processTropopause(codeGroupAr, i, topwindFlag,
windKnot, record, above);
if (topwindFlag) {
i = i + 2;
} else {
@ -355,7 +387,8 @@ public class NcUairParser {
// NO maximum wind data
i++;
} else {
processMaximumWindShear(codeGroupAr, i, cgSize, windKnot, record);
processMaximumWindShear(codeGroupAr, i, cgSize,
windKnot, above, record);
i = i + 3;
}
}
@ -367,7 +400,9 @@ public class NcUairParser {
int range = i + 2;
if (range < cgSize) {
// Decode TTAA normal report -pressure and height
NcUairPressureHeightGroup.PressureHeightField(codeGroupAr[i], above, level, stationNumber, dataType, record);
NcUairPressureHeightGroup.PressureHeightField(
codeGroupAr[i], above, level, stationNumber,
dataType, record);
pres = NcUairPressureHeightGroup.getPressure();
height = NcUairPressureHeightGroup.getHeight();
@ -391,7 +426,8 @@ public class NcUairParser {
}
// Add level
addLevels(record, pres, height, temp, dewpTemp, wdir, wspeed);
addLevels(record, pres, height, temp, dewpTemp, wdir,
wspeed);
}
i = i + 3;
level++;
@ -401,17 +437,21 @@ public class NcUairParser {
}
/**
* Decodes a pressure/height, temperature, and wind fields in the
* forms PPhhh and TTTdd and DDDff for TTBB/DD.
* Decodes a pressure/height, temperature, and wind fields in the forms
* PPhhh and TTTdd and DDDff for TTBB/DD.
*
* @param codeGroupAr The input uppair code group array
* @param cgSize The input cgSize is the size of the code group array
* @param windKnot The input windKnot is flag to indicate wind in knot or not.
* @param record The in and out Uair record
* @param codeGroupAr
* The input uppair code group array
* @param cgSize
* The input cgSize is the size of the code group array
* @param windKnot
* The input windKnot is flag to indicate wind in knot or not.
* @param record
* The in and out Uair record
* @return
*/
public static void processTTBBDD(String[] codeGroupAr,
int cgSize, Boolean windKnot, NcUairRecord record) {
public static void processTTBBDD(String[] codeGroupAr, int cgSize,
Boolean windKnot, NcUairRecord record) {
Boolean above = false;
Boolean endrpt = false;
@ -485,7 +525,8 @@ public class NcUairParser {
}
// Add level
addLevels(record, pres, height, temp, dewpTemp, wdir, wspeed);
addLevels(record, pres, height, temp, dewpTemp, wdir,
wspeed);
}
i = i + 2;
@ -494,14 +535,17 @@ public class NcUairParser {
}
/**
* Decodes a pressure/height and temperature fields for PPAACC.
* These reports contain wind data at mandatory
* levels below 100 mb.
* Decodes a pressure/height and temperature fields for PPAACC. These
* reports contain wind data at mandatory levels below 100 mb.
*
* @param codeGroupAr The input uppair code group array
* @param cgSize The input cgSize is the size of the code group array
* @param windKnot The input windKnot is flag to indicate wind in knot or not.
* @param record The in and out Uair record
* @param codeGroupAr
* The input uppair code group array
* @param cgSize
* The input cgSize is the size of the code group array
* @param windKnot
* The input windKnot is flag to indicate wind in knot or not.
* @param record
* The in and out Uair record
* @return
*/
public static void processPPAACC(String[] codeGroupAr, int cgSize,
@ -543,17 +587,18 @@ public class NcUairParser {
/* chin, fix bug, when a non-number char is decoded */
int onetothree = 0;
try {
onetothree = Integer.parseInt(codeGroupAr[i].substring(2,3));
onetothree = Integer.parseInt(codeGroupAr[i].substring(
2, 3));
} catch (NumberFormatException e) {
onetothree = 0;
}
if (onetothree > 0 && onetothree <= 3) {
// Decode the pressure
float[] presArr = { IDecoderConstantsN.UAIR_FLOAT_MISSING,
float[] presArr = {
IDecoderConstantsN.UAIR_FLOAT_MISSING,
IDecoderConstantsN.UAIR_FLOAT_MISSING,
};
IDecoderConstantsN.UAIR_FLOAT_MISSING, };
presArr = getPressureFromPPAACC(codeGroupAr[i], above);
i++;
@ -569,18 +614,19 @@ public class NcUairParser {
// Decode wind group
if (i < cgSize) {
NcUairWindGroup.WindField(codeGroupAr[i], windKnot);
NcUairWindGroup.WindField(codeGroupAr[i],
windKnot);
wspeed = NcUairWindGroup.getSped();
wdir = NcUairWindGroup.getDrct();
}
// Add level
addLevels(record, pres, height, temp, dewpTemp, wdir, wspeed);
addLevels(record, pres, height, temp, dewpTemp,
wdir, wspeed);
i++;
}
}
else {
} else {
// no pressure group
i++;
}
@ -592,7 +638,8 @@ public class NcUairParser {
// NO maximum wind and wind shear data
i++;
} else {
processMaximumWindShear(codeGroupAr, i, cgSize, windKnot, record);
processMaximumWindShear(codeGroupAr, i, cgSize, windKnot,
above, record);
i = i + 3;
}
} else {
@ -603,13 +650,17 @@ public class NcUairParser {
}
/**
* Decodes a pressure/height and temperature fields for PPBBDD.
* These reports contain significant wind data above 100 mb.
* Decodes a pressure/height and temperature fields for PPBBDD. These
* reports contain significant wind data above 100 mb.
*
* @param codeGroupAr The input uppair code group array
* @param cgSize The input cgSize is the size of the code group array
* @param windKnot The input windKnot is flag to indicate wind in knot or not.
* @param record The in and out Uair record
* @param codeGroupAr
* The input uppair code group array
* @param cgSize
* The input cgSize is the size of the code group array
* @param windKnot
* The input windKnot is flag to indicate wind in knot or not.
* @param record
* The in and out Uair record
* @return
*/
public static void processPPBBDD(String[] codeGroupAr, int cgSize,
@ -636,7 +687,6 @@ public class NcUairParser {
float wdir = IDecoderConstantsN.UAIR_FLOAT_MISSING;
float wspeed = IDecoderConstantsN.UAIR_FLOAT_MISSING;
if (codeGroupAr[i].equals("21212")) {
pressflag = true;
i++;
@ -647,7 +697,8 @@ public class NcUairParser {
break;
}
if ( codeGroupAr[i].equals("51515") || codeGroupAr[i].equals("41414")) {
if (codeGroupAr[i].equals("51515")
|| codeGroupAr[i].equals("41414")) {
endrpt = true;
// System.out.println("got end group 51515 41414 in PP BBDD - BREAK \n");
break;
@ -667,7 +718,8 @@ public class NcUairParser {
break;
}
// Decode height; invalid height if returns FLOAT_MISSING.
// Decode height; invalid height if returns
// FLOAT_MISSING.
height = getHeightFromPPBBDD(codeGroupAr[i], index);
if (height == IDecoderConstantsN.UAIR_FLOAT_MISSING) {
i++;
@ -676,13 +728,15 @@ public class NcUairParser {
int range = i + noWind + 1;
if (range < cgSize) {
// Decode wind group.
NcUairWindGroup.WindField(codeGroupAr[i+noWind+1], windKnot);
NcUairWindGroup.WindField(codeGroupAr[i + noWind
+ 1], windKnot);
wspeed = NcUairWindGroup.getSped();
wdir = NcUairWindGroup.getDrct();
}
// Add level
addLevels(record, pres, height, temp, dewpTemp, wdir, wspeed);
addLevels(record, pres, height, temp, dewpTemp, wdir,
wspeed);
noWind++;
}
@ -700,35 +754,34 @@ public class NcUairParser {
i = i + 2;
}
}
}
catch(Exception e) {
} catch (Exception e) {
}
}
/**
* Decodes a pressure field for mandatory wind
* reports (PPAA or PPCC). The pressures reporting are returned.
* Decodes a pressure field for mandatory wind reports (PPAA or PPCC). The
* pressures reporting are returned.
*
* @param presGroup The input pressure code group
* @param above The input above is flag
* @param presGroup
* The input pressure code group
* @param above
* The input above is flag
* @return pressure
*/
public static float[] getPressureFromPPAACC(String presGroup, Boolean above) {
float pressure[] = { IDecoderConstantsN.UAIR_FLOAT_MISSING,
IDecoderConstantsN.UAIR_FLOAT_MISSING,
IDecoderConstantsN.UAIR_FLOAT_MISSING
};
IDecoderConstantsN.UAIR_FLOAT_MISSING };
String bpres[] = { "00", "92", "85", "70", "50", "40",
"30", "25", "20", "15", "10" };
String bpres[] = { "00", "92", "85", "70", "50", "40", "30", "25",
"20", "15", "10" };
String apres[] = { "70", "50", "30", "20", "10",
"07", "05", "03", "02", "01" };
String apres[] = { "70", "50", "30", "20", "10", "07", "05", "03",
"02", "01" };
int rbprs[] = { 1000, 925, 850, 700, 500, 400,
300, 250, 200, 150, 100 };
int rbprs[] = { 1000, 925, 850, 700, 500, 400, 300, 250, 200, 150, 100 };
int raprs[] = { 70, 50, 30, 20, 10, 7, 5, 3, 2, 1 };
@ -781,14 +834,16 @@ public class NcUairParser {
}
/**
* Decodes the height from a significant wind field from reports (PPBB or PPDD).
* The field is of the form atuuu where a is 1 if the height is
* above 100000 feet and 9 or 8 otherwise. t is the ten-thousands
* digit of the height and the u's are up to three thousands-of-feet
* fields. The heights are converted from feet to meters.
* Decodes the height from a significant wind field from reports (PPBB or
* PPDD). The field is of the form atuuu where a is 1 if the height is above
* 100000 feet and 9 or 8 otherwise. t is the ten-thousands digit of the
* height and the u's are up to three thousands-of-feet fields. The heights
* are converted from feet to meters.
*
* @param heightGroup The input heightGroup contains the height code group.
* @param index The input index is the current position in the code group.
* @param heightGroup
* The input heightGroup contains the height code group.
* @param index
* The input index is the current position in the code group.
* @return pressure
*/
public static float getHeightFromPPBBDD(String heightGroup, int index) {
@ -814,19 +869,21 @@ public class NcUairParser {
}
/**
* Decodes a pressure field from a group reports (TTBB or TTDD).
* The pressures reporting are returned.
* Decodes a pressure field from a group reports (TTBB or TTDD). The
* pressures reporting are returned.
*
* @param presGroup The input pressure code group
* @param above The input above is flag
* @param presGroup
* The input pressure code group
* @param above
* The input above is flag
* @return pressure
*/
public static float getPressureFromTTBBDD(String presGroup, Boolean above) {
float pressure = IDecoderConstantsN.UAIR_FLOAT_MISSING;
String clev[] = { "00", "11", "22", "33", "44",
"55", "66", "77", "88", "99" };
String clev[] = { "00", "11", "22", "33", "44", "55", "66", "77", "88",
"99" };
if (presGroup.length() == 5) {
String pp = presGroup.substring(0, 2);
@ -859,18 +916,25 @@ public class NcUairParser {
}
/**
* Decodes data for the tropopause level from the TTAA reports.
* The output data are ordered PRES TEMP DWPT DRCT SPED.
* Decodes data for the tropopause level from the TTAA reports. The output
* data are ordered PRES TEMP DWPT DRCT SPED.
*
* @param codeGroupAr The input uppair code group array
* @param index The input index is the current position of the code group array
* @param topwindFlag the input index is the flag to indicate top wind
* @param windKnot The input windKnot is flag to indicate wind in knot or not.
* @param record The in and out Uair record
* @param codeGroupAr
* The input uppair code group array
* @param index
* The input index is the current position of the code group
* array
* @param topwindFlag
* the input index is the flag to indicate top wind
* @param windKnot
* The input windKnot is flag to indicate wind in knot or not.
* @param record
* The in and out Uair record
* @return
*/
public static void processTropopause(String[] codeGroupAr, int index,
Boolean topwindFlag, Boolean windKnot, NcUairRecord record, Boolean above) {
Boolean topwindFlag, Boolean windKnot, NcUairRecord record,
Boolean above) {
float pres = IDecoderConstantsN.UAIR_FLOAT_MISSING;
float temp = IDecoderConstantsN.UAIR_FLOAT_MISSING;
@ -907,18 +971,24 @@ public class NcUairParser {
}
/**
* Decodes data for the maximum wind level(s) and wind shear from the TTAA reports.
* The output data are ordered PRES DRCT SPED.
* Decodes data for the maximum wind level(s) and wind shear from the TTAA
* reports. The output data are ordered PRES DRCT SPED.
*
* @param codeGroupAr The input uppair code group array
* @param index The input index is the current position of the code group array
* @param cgSize the input cgSize is the size of the codeGroupAr.
* @param windKnot The input windKnot is flag to indicate wind in knot or not.
* @param record The in and out Uair record
* @param codeGroupAr
* The input uppair code group array
* @param index
* The input index is the current position of the code group
* array
* @param cgSize
* the input cgSize is the size of the codeGroupAr.
* @param windKnot
* The input windKnot is flag to indicate wind in knot or not.
* @param record
* The in and out Uair record
* @return
*/
public static void processMaximumWindShear(String[] codeGroupAr,
int index, int cgSize, Boolean windKnot, NcUairRecord record) {
public static void processMaximumWindShear(String[] codeGroupAr, int index,
int cgSize, Boolean windKnot, Boolean above, NcUairRecord record) {
float pres = IDecoderConstantsN.UAIR_FLOAT_MISSING;
float wdir = IDecoderConstantsN.UAIR_FLOAT_MISSING;
@ -934,8 +1004,12 @@ public class NcUairParser {
if (ppIndicator.equals("77") || ppIndicator.equals("66")) {
// Decode pressure and height
if (!hhh.substring(1, 3).equals("//")) {
if (above) {
pres = Integer.parseInt(hhh) / 10.f;
} else {
pres = Integer.parseInt(hhh);
}
}
// Decode wind group
NcUairWindGroup.WindField(codeGroupAr[i + 1], windKnot);
@ -969,18 +1043,23 @@ public class NcUairParser {
}
/**
* Decodes data for the lifted index group from the TTAA reports.
* The output data are ordered liTemp, wdirSurface, wspeedSurface,
* wdirAbove, wspeedAbove
* Decodes data for the lifted index group from the TTAA reports. The output
* data are ordered liTemp, wdirSurface, wspeedSurface, wdirAbove,
* wspeedAbove
*
* @param codeGroupAr The input uppair code group array
* @param index The input index is the current position of the code group array
* @param windKnot The input windKnot is flag to indicate wind in knot or not.
* @param record The in and out Uair record
* @param codeGroupAr
* The input uppair code group array
* @param index
* The input index is the current position of the code group
* array
* @param windKnot
* The input windKnot is flag to indicate wind in knot or not.
* @param record
* The in and out Uair record
* @return
*/
public static void processLiftedIndex(String[] codeGroupAr,
int index, Boolean windKnot, NcUairRecord record) {
public static void processLiftedIndex(String[] codeGroupAr, int index,
Boolean windKnot, NcUairRecord record) {
float liTemp = IDecoderConstantsN.UAIR_FLOAT_MISSING;
float wdirSurface = IDecoderConstantsN.UAIR_FLOAT_MISSING;
@ -997,8 +1076,8 @@ public class NcUairParser {
}
int isign = ittt % 2;
/*
* If the integer is even, the liTemp is positive.
* Otherwise, the liTemp is negative.
* If the integer is even, the liTemp is positive. Otherwise, the
* liTemp is negative.
*/
if (isign == 1) {
liTemp = -ittt;
@ -1032,12 +1111,14 @@ public class NcUairParser {
}
/**
* Compute the top pressure reporting wind data.
* If topwind is missing, set return top wind to a large value so that
* all the winds will be assumed to be missing.
* Compute the top pressure reporting wind data. If topwind is missing, set
* return top wind to a large value so that all the winds will be assumed to
* be missing.
*
* @param topwind The input topwind
* @param above The input above is flag to indicate above 100mb.
* @param topwind
* The input topwind
* @param above
* The input above is flag to indicate above 100mb.
* @return an int for topWind.
*/
public static int getTopWind(int topwind, Boolean above) {
@ -1067,17 +1148,24 @@ public class NcUairParser {
/**
* Add levels to record.
*
* @param record The in and out Uair record
* @param pres The input pressure
* @param hght The input geopotential height
* @param temp The input temperature
* @param dwpt The input dew point temperature.
* @param drct The input wind direction
* @param sped The input wind speed
* @param record
* The in and out Uair record
* @param pres
* The input pressure
* @param hght
* The input geopotential height
* @param temp
* The input temperature
* @param dwpt
* The input dew point temperature.
* @param drct
* The input wind direction
* @param sped
* The input wind speed
* @return
*/
public static void addLevels(NcUairRecord record, float pres, float geoHeight,
float temp, float dwpt, float drct, float sped) {
public static void addLevels(NcUairRecord record, float pres,
float geoHeight, float temp, float dwpt, float drct, float sped) {
NcUairObsLevels level = null;
level = new NcUairObsLevels();
@ -1094,16 +1182,22 @@ public class NcUairParser {
/**
* Add tropopause to record.
*
* @param record The in and out Uair record
* @param pres The input pressure
* @param temp The input temperature
* @param dwpt The input dew point temperature.
* @param drct The input wind direction
* @param sped The input wind speed
* @param record
* The in and out Uair record
* @param pres
* The input pressure
* @param temp
* The input temperature
* @param dwpt
* The input dew point temperature.
* @param drct
* The input wind direction
* @param sped
* The input wind speed
* @return
*/
public static void addTrop(NcUairRecord record, float pres,
float temp, float dwpt, float drct, float sped) {
public static void addTrop(NcUairRecord record, float pres, float temp,
float dwpt, float drct, float sped) {
NcUairTropopause trop = null;
trop = new NcUairTropopause();

View file

@ -13,7 +13,7 @@
<bean id="ntransDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="ntrans" />
<constructor-arg value="jms-dist:queue:Ingest.ntrans" />
<constructor-arg value="jms-dist:queue:Ingest.Ntrans" />
</bean>
<bean id="ntransCamelRegistered" factory-bean="contextManager"

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<requestPatterns xmlns:ns2="group">
<regex>^NTRANS.*</regex>
</requestPatterns>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<requestPatterns xmlns:ns2="group">
<regex>^SXI_*</regex>
<regex>^SIMPLE*</regex>
</requestPatterns>

View file

@ -1,191 +0,0 @@
ADDSTN YES
AFOSFL
AIRM
ANOTLN
ANOTYP
AWPSFL
ANLYSS 4/2;2;2;2
AREA @dca;iad;bwi
ATCF
BORDER 1
BOXLIN
BUFRFIL
CENTER
CINT 0
CLEAR YES
CLRBAR
CNTRFL
COLORS 1
COLUMN 1
CONTUR 0
CPYFIL
CSIG
CTLFLG YES
CTYPE C
CURVE 2
CXSTNS
DATTIM 18-20
DELTAN
DELTAX
DELTAY
DEVICE XW
DTAAREA
EDGEOPTS
ENCY
EXTEND 2;2;2;2
FHOUR
FILTER YES
FINT 0
FLINE 10-20
FXYTBL
GAMMA 0.3
GAREA WV
IJSKIP
GBDIAG
GBFILE
GBTBLS
GDATTIM LAST
GDEFIL GDLIST.FIL
GDFILE $GEMDATA/HRCBOB.GRD
GDNUM LIST
GDOUTF
GDPFUN TMPC
GFUNC TMPC
GGLIMS
GGVGF
GLEVEL 500
GPACK
GPOINT IAD
GRDAREA
GRDHDR
GRDLBL 0
GRDNAM
GRDTYP S
GSKIP
GUESS
GUESFUN
GVCORD PRES
GVECT WND
G2DIAG
G2DRT
G2IDS
G2IS
G2PDT
G2TBLS
HILO
HISTGRD NO
HLSYM
HRCN
IDNTYP STID
IMCBAR
INDXFL
INFO
ISIG
KXKY 10;10
LAT
LATLON
LEVELS 500
LINE 3
LOCI
LON
LSTALL YES
LSTPRM
LTNG
LUTFIL
MAP 1
$MAPFIL HIPOWO.CIA
MARKER 0
MAXGRD 200
MIXRLN 0
MSCALE 0
MRGDAT YES
NCON
NPASS 2
NTRACE 5
OUTFIL
OUTPUT t
OVERWR NO
PANEL 0
PDSEXT NO
PIXRES 1
PLUS
POSN 0
PRBTYP
PROJ MER
PTYPE LOG
QCNTL
QSCT
RADFIL
REGION VIEW
REFVEC
$RESPONDYES
SATFIL
FAXFIL
SAVFIL
SCALE 999
SEARCH 20
SFEFIL SFLIST.FIL
SFFILE /export-2/cdbbkp/ldmcdb/data/decoders/hrly/20110530.hrly
SFFSRC
SFOUTF
SFPARM dset
SFPRMF METAR.PACK
SHAPE
SHIPFL NO
SHRTTL
SKIP 0
SKPMIS y
SNBUFR
SNEFIL SNLIST.FIL
SNFILE $GEMDATA/HRCBOB.SND
SNOUTF
SNPARM ;TMPC;;HGHT;DWPC;BRBM
SNPRMF SNMERG.PACK
SOURCE SF
STATION BWI
STNCOL 1
STNDEX SHOW
STNFIL SFSTNS.TBL
STNPLT
STNTYP A
STREAM
STRMID
SVRL
TAXIS
TCMG
TEXT 1
THTALN 0
THTELN 0
TIMSTN 1/0
TITLE 1
TRACE1 TMPF;DWPF:3/2;3
TRACE2 PMSL/4
TRACE3 SKNT;GUST;DARR/1
TRACE4 VSBY/7
TRACE5 CLDS;;WSYM/6
TRAK1
TRAK2
TRAKE
TXTCOL
TXTFIL
TXTLOC
TXTYPE
TYPE C
UKAFIL
VCOORD PRES
VGFILE
WARN
WATCH
WIND BM1
WINPOS 1
WSTM
XAXIS
YAXIS
WOU
WCN
WCP
WSAT
FHR
TAG
STAT
ASCT

View file

@ -1,7 +0,0 @@
SFFILE /export-2/cdbbkp/ldmcdb/data/decoders/hrly/20110530.hrly
AREA @dca;iad;bwi
DATTIM 18-20
OUTPUT t
SKPMIS y
IDNTYP STID
SFPARM dset

View file

@ -259,6 +259,9 @@ public class FINT {
public static List<Double> parseFINT(String fint, int zoomLevelIndex, float minValue, float maxValue) {
if (fint.equals("0"))
fint = "";
List<Double> fvalues = null;
Double fmin = new Double(minValue);
Double fmax = new Double(maxValue);

View file

@ -5,6 +5,7 @@ import gov.noaa.nws.ncep.gempak.parameters.core.util.StringUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
/**
*<pre>
* SOFTWARE HISTORY
@ -30,18 +31,23 @@ import java.util.regex.Pattern;
* a list of Color objects instead of integers.
*/
/**
* <code>FLine</code> supplies the color and pattern information for filling a contour.
* A string containing the color and/or pattern information is entered as an input
* to the constructor.
* The input can be given in either one of the formats listed below:<p>
* color1;color2;...;colorn/type1;...typen<p>
* color1-colorn<p>
* (Note: The second format is used to generate a list of colors from color1 to colorn).<p>
* The status of the parse operation can be tested using the method <code>isFLineStringParsed()</code>.
* The colors are stored as a list of Integers and can be retrieved using the method
* <code>getFillColorList()</code>.
* The patterns are also stored as a list of Integers and can be retrieved using the method
* <code>getFillTypeList()</code>.
* <code>FLine</code> supplies the color and pattern information for filling a
* contour. A string containing the color and/or pattern information is entered
* as an input to the constructor. The input can be given in either one of the
* formats listed below:
* <p>
* color1;color2;...;colorn/type1;...typen
* <p>
* color1-colorn
* <p>
* (Note: The second format is used to generate a list of colors from color1 to
* colorn).
* <p>
* The status of the parse operation can be tested using the method
* <code>isFLineStringParsed()</code>. The colors are stored as a list of
* Integers and can be retrieved using the method
* <code>getFillColorList()</code>. The patterns are also stored as a list of
* Integers and can be retrieved using the method <code>getFillTypeList()</code>.
*/
public class FLine {
@ -49,7 +55,10 @@ public class FLine {
/** A boolean flag to indicate if the input string was parsed */
private boolean isFLineStringParsed;
/**The input string that contains the color and pattern information for filling the contour*/
/**
* The input string that contains the color and pattern information for
* filling the contour
*/
private String fLineString;
/** The Error Message */
@ -73,12 +82,16 @@ public class FLine {
/** The default fill pattern */
private Integer defaultFillType;
/**A regular expression to represent repeating groups in a list of color/pattern values*/
/**
* A regular expression to represent repeating groups in a list of
* color/pattern values
*/
private String LIST_OF_INTEGERS = "(-?;?\\d;*)*";
/**The default constructor generates 2 lists:
* The list of fill colors contains 1 element set to 0, to indicate no color.<p>
/**
* The default constructor generates 2 lists: The list of fill colors
* contains 1 element set to 0, to indicate no color.
* <p>
* Currently, the color list is a list of integers.
*/
@ -93,19 +106,29 @@ public class FLine {
setStartColorRange(defaultFillColor);
setEndColorRange(defaultFillColor);
}
/**
* @param String fLineStringInput
* @param String
* fLineStringInput
* <p>
* The input string containing the color and/or pattern information
* is parsed when the constructor invokes the private method
* <code>parseFLineString()</code>.
* The input string containing the color and/or pattern
* information is parsed when the constructor invokes the private
* method <code>parseFLineString()</code>.
*/
public FLine(String fLineStringInput) {
// if the input string contains "-" as well as "/", ignore the fill type
// list after "/"
// e.g.: 0;20-32/1;2;3 => parse 0-20-32 and ignore the rest
String[] fLineTmpstr = { fLineStringInput };
if (fLineStringInput.trim().contains("-")
&& fLineStringInput.trim().contains("/")) {
fLineTmpstr = fLineStringInput.trim().split("/");
fLineStringInput = fLineTmpstr[0];
}
// process '-'
String newFline = null;
String[] tmpstr = fLineStringInput.trim().split(";");
@ -119,12 +142,14 @@ public class FLine {
if (start < end) {
for (int j = start + 1; j <= end; j++) {
newstr = newstr.concat(String.valueOf(j));
if (j != end) newstr = newstr + ";";
if (j != end)
newstr = newstr + ";";
}
} else {
for (int j = start - 1; j >= end; j--) {
newstr = newstr.concat(String.valueOf(j));
if (j != end) newstr = newstr + ";";
if (j != end)
newstr = newstr + ";";
}
}
@ -136,12 +161,11 @@ public class FLine {
else
newFline = newFline.concat(tmpstr[i]);
if ( i != (tmpstr.length - 1) ) newFline = newFline + ";";
if (i != (tmpstr.length - 1))
newFline = newFline + ";";
}
fLineStringInput = newFline;
/* Set default values and initialize instance variables */
setIsFLineStringParsed(false);
@ -159,48 +183,62 @@ public class FLine {
setEndColorRange(defaultFillColor);
/*
* If the input string is not empty or null, the method parseFLineString()
* is invoked to parse it.
* The boolean value returned by this method is used to set the boolean
* state variable isFLineStringParsed.
* If the input string is not empty or null, the method
* parseFLineString() is invoked to parse it. The boolean value returned
* by this method is used to set the boolean state variable
* isFLineStringParsed.
*/
if(((fLineStringInput != null)) && (!fLineStringInput.trim().isEmpty())){
if (((fLineStringInput != null))
&& (!fLineStringInput.trim().isEmpty())) {
this.setFLineString(fLineStringInput);
if (fLineStringInput.contains(" ")) {
String inputStringWithoutBlanks = StringUtil.removeBlanksWithinString(fLineStringInput);
setIsFLineStringParsed(this.parseFLineString(inputStringWithoutBlanks));
String inputStringWithoutBlanks = StringUtil
.removeBlanksWithinString(fLineStringInput);
setIsFLineStringParsed(this
.parseFLineString(inputStringWithoutBlanks));
} else {
setIsFLineStringParsed(this.parseFLineString(fLineStringInput));
}
/*If both the colors and the patterns have been parsed, update the list of
*patterns to matcht the number of colors*/
if(this.getFillTypeList().size() > 0 && this.getFillColorList().size() > 0){
this.setMissingAttributes(this.getFillColorList(),this.getFillTypeList());
/*
* If both the colors and the patterns have been parsed, update the
* list ofpatterns to matcht the number of colors
*/
if (this.getFillTypeList().size() > 0
&& this.getFillColorList().size() > 0) {
this.setMissingAttributes(this.getFillColorList(),
this.getFillTypeList());
}
/*Else, if only the colors were entered as input and parsed, set the default pattern to
*SOLID (i.e the Integer 1) and repeat it to match the number of colors*/
else if(this.getFillTypeList().size() == 0 && this.getFillColorList().size() > 0){
/*
* Else, if only the colors were entered as input and parsed, set
* the default pattern toSOLID (i.e the Integer 1) and repeat it to
* match the number of colors
*/
else if (this.getFillTypeList().size() == 0
&& this.getFillColorList().size() > 0) {
this.getFillTypeList().add(defaultFillType);
this.setMissingAttributes(this.getFillColorList(),this.getFillTypeList());
this.setMissingAttributes(this.getFillColorList(),
this.getFillTypeList());
}
} else {
/*
* If the input string is empty or null, then the color list is created with
* a single element - the default color (integer object set to 1)
* If the input string is empty or null, then the color list is
* created with a single element - the default color (integer object
* set to 1)
*/
fillColorList.add(defaultFillColor);
/*
*Set the default pattern variable to SOLID and add it to the list of patterns
**/
* Set the default pattern variable to SOLID and add it to the list
* of patterns
*/
fillTypeList.add(defaultFillType);
}
}
}
}
/**
* @return String fLineString
*/
@ -221,6 +259,7 @@ public class FLine {
public List<Integer> getFillColorList() {
return fillColorList;
}
/**
*
* @return List of Integer fillTypeList
@ -229,7 +268,6 @@ public class FLine {
return fillTypeList;
}
/**
* @return Integer startColorRange
*/
@ -244,12 +282,14 @@ public class FLine {
public Integer getEndColorRange() {
return endColorRange;
}
/**
* @param boolean isFLineStringParsed
*/
public void setIsFLineStringParsed(boolean isFLineStringParsed) {
this.isFLineStringParsed = isFLineStringParsed;
}
/**
* @return boolean isFLineStringParsed
*/
@ -258,45 +298,57 @@ public class FLine {
}
/**
* @param String lineString
* @param String
* lineString
*/
private void setFLineString(String lineString) {
fLineString = lineString;
}
/**
* @param String errorMessage
* @param String
* errorMessage
*/
private void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
/**
* @param List (of Integer) lineColorList
* @param List
* (of Integer) lineColorList
*/
private void setFillColorList(List<Integer> lineColorList) {
fillColorList = lineColorList;
}
/**
* @param List of Integer fillPatternsList
* @param List
* of Integer fillPatternsList
*/
private void setFillTypeList(List<Integer> fillPatternsList) {
fillTypeList = fillPatternsList;
}
/**
* @param Integer startColorRange
* @param Integer
* startColorRange
*/
private void setStartColorRange(Integer startColorRange) {
this.startColorRange = startColorRange;
}
/**
* @param Integer endColorRange
* @param Integer
* endColorRange
*/
private void setEndColorRange(Integer endColorRange) {
this.endColorRange = endColorRange;
}
/**
*
* @param String fLineStringInput
* @param String
* fLineStringInput
* @return boolean isFLineStringParsedCorrectly
*/
private boolean parseFLineString(String fLineStringInput) {
@ -307,68 +359,85 @@ public class FLine {
/* It is checked if both the colors and the patterns are entered */
if (fLineStringInput.contains("/")) {
/*If yes, then the colors and patterns are parsed into tokens using the delimiter character "/" */
/*
* If yes, then the colors and patterns are parsed into tokens using
* the delimiter character "/"
*/
fLineTokens = fLineStringInput.split("/");
/*If the token contains only 1 element, it is checked if a list of colors have been
* entered*/
/*
* If the token contains only 1 element, it is checked if a list of
* colors have been entered
*/
if (fLineTokens.length >= 1) {
/*If the token matches the regular expression for a list of integers
*it is construed to be a list of color values.
*The integer values for the colors are then extracted and stored in the list of colors.*/
/*
* If the token matches the regular expression for a list of
* integersit is construed to be a list of color values.The
* integer values for the colors are then extracted and stored
* in the list of colors.
*/
if (Pattern.matches(LIST_OF_INTEGERS, fLineTokens[0])) {
isColorToken = true;
isFLineStringParsedCorrectly = this.parseColorOrPatternTokens(fLineTokens[0], isColorToken);
isFLineStringParsedCorrectly = this
.parseColorOrPatternTokens(fLineTokens[0],
isColorToken);
}
}
/*If the token contains two elements, the second element is
/*
* If the token contains two elements, the second element is
* processed as the list of patterns
**/
*/
isColorToken = false;
if (fLineTokens.length == 2) {
if (Pattern.matches(LIST_OF_INTEGERS, fLineTokens[1])) {
isFLineStringParsedCorrectly = this.parseColorOrPatternTokens
(fLineTokens[1], isColorToken);
isFLineStringParsedCorrectly = this
.parseColorOrPatternTokens(fLineTokens[1],
isColorToken);
}
}
}
/*
* Else it is checked if a range of colors have been entered.
* If so, the method parseRangeOfColors() is invoked to process
* the string tokens generated by splitting the input
* string into tokens using the character '-' as a delimiter.
* Else it is checked if a range of colors have been entered. If so, the
* method parseRangeOfColors() is invoked to process the string tokens
* generated by splitting the input string into tokens using the
* character '-' as a delimiter.
*/
else if (fLineStringInput.contains("-")) {
fLineTokens = fLineStringInput.split("-");
isFLineStringParsedCorrectly = this.parseRangeOfColors(fLineTokens);
}
else{
/*It is checked if only a list of color values (colr1;..;colrn) have been entered.
*If so, then the method parseColorOrPatternTokens() is invoked to
*process the color tokens generated by splitting the input string using
*the '-' character as a delimiter.s
* */
} else {
/*
* It is checked if only a list of color values (colr1;..;colrn)
* have been entered.If so, then the method
* parseColorOrPatternTokens() is invoked toprocess the color tokens
* generated by splitting the input string usingthe '-' character as
* a delimiter.s
*/
if (Pattern.matches(LIST_OF_INTEGERS, fLineStringInput.trim())) {
isColorToken = true;
isFLineStringParsedCorrectly = this.parseColorOrPatternTokens
(fLineStringInput, isColorToken);
isFLineStringParsedCorrectly = this.parseColorOrPatternTokens(
fLineStringInput, isColorToken);
}
}
return isFLineStringParsedCorrectly;
}
/**
*@param String inputToken
* @param String
* inputToken
* @param boolean isColorToken
* @return boolean isTokenParsed
* <p>
*The method <code>parseColorOrPatternTokens()</code> can be used to process the string tokens
*containing either the list of colors or the list of patterns.
*It returns true if the parse operation was successful.
* The method <code>parseColorOrPatternTokens()</code> can be used
* to process the string tokens containing either the list of colors
* or the list of patterns. It returns true if the parse operation
* was successful.
*/
private boolean parseColorOrPatternTokens(String inputToken, boolean isColorToken){
private boolean parseColorOrPatternTokens(String inputToken,
boolean isColorToken) {
boolean isTokenParsed = false;
boolean multipleTokensFound = false;
String[] tokenStringArray;
@ -380,48 +449,54 @@ public class FLine {
if (inputToken.contains(";")) {
tokenStringArray = inputToken.split(";");
/*
* If more than one token is generated as a result of the split operation
* a boolean flag multipleTokensFound is set to true.
* If more than one token is generated as a result of the split
* operation a boolean flag multipleTokensFound is set to true.
*/
if (tokenStringArray.length > 1) {
multipleTokensFound = true;
} else {
/*
* Else it is assumed that a single token containing a single integer
* was generated.
* Else it is assumed that a single token containing a single
* integer was generated.
*/
try {
/*
* An attempt is made to extract the integer from the string and
* store it.
* An attempt is made to extract the integer from the string
* and store it.
*/
integerTokenList.add(Integer.parseInt(tokenStringArray[0]));
isTokenParsed = true;
/*
* If the input boolean isColorToken is set to true, then the
* extracted integer is stored in the color list.
* If the input boolean isColorToken is set to true, then
* the extracted integer is stored in the color list.
*/
if (isColorToken) {
//TODO: check the single Integer in the list for valid color values?
this.setFillColorList(integerTokenList);
}
else{
// TODO: check the single Integer in the list for valid
// color values?
this.setFillColorList(removeInvalidColors(integerTokenList));
} else {
this.setFillTypeList(integerTokenList);
}
} catch (Exception e) {
integerTokenList.add(0);/*A blank input string token represents no color or no pattern */
integerTokenList.add(0);/*
* A blank input string token
* represents no color or no pattern
*/
this.setErrorMessage("INVALID STRING FORMAT");
}
}
/*
* If several tokens are generated, then using a for-loop,,
* an attempt is made to extract an integer from each string token.
* If it is successful, then integers are added one by one to a list of integers.
* If several tokens are generated, then using a for-loop,, an
* attempt is made to extract an integer from each string token. If
* it is successful, then integers are added one by one to a list of
* integers.
*/
if (multipleTokensFound) {
for (int currentIndex = 0; currentIndex < tokenStringArray.length; currentIndex++) {
try {
integerTokenList.add(Integer.parseInt(tokenStringArray[currentIndex]));
integerTokenList.add(Integer
.parseInt(tokenStringArray[currentIndex]));
isTokenParsed = true;
} catch (Exception e) {
integerTokenList.add(0);
@ -431,27 +506,28 @@ public class FLine {
}
/*If it is a color token, the list of integers extracted is stored as a list of colors.
**/
/*
* If it is a color token, the list of integers extracted is stored
* as a list of colors.
*/
if (isColorToken) {
// TODO: check each Integer in the list for valid color values?
this.setFillColorList(integerTokenList);
}
else{
this.setFillColorList(removeInvalidColors(integerTokenList));
} else {
// TODO
/*It is a list of patterns -
*check if each integer in the list belongs to one of the valid pattern
*values and if so, add it to the list of patterns.
* */
/*
* It is a list of patterns -check if each integer in the list
* belongs to one of the valid patternvalues and if so, add it
* to the list of patterns.
*/
this.setFillTypeList(integerTokenList);
}
}
/*
* Else, if the input string token does not contain the ';' delimiter,
* it is assumed that it contains a single integer and an attempt is made to
* extract this integer.
* Of the attempt is successful, then the integer is stored as a single member
* of the list of colors.
* it is assumed that it contains a single integer and an attempt is
* made to extract this integer. Of the attempt is successful, then the
* integer is stored as a single member of the list of colors.
*/
else {
try {
@ -461,8 +537,7 @@ public class FLine {
if (isColorToken) {
// TODO: check the single Integer for valid color values?
this.setFillColorList(integerTokenList);
}
else{
} else {
this.setFillTypeList(integerTokenList);
}
} catch (NumberFormatException e) {
@ -473,14 +548,16 @@ public class FLine {
}
/**
* @param String[] colorRangeStringTokens
* @param String
* [] colorRangeStringTokens
* @return boolean isColorRangeStringParsed
* <p>
* The method <code>parseRangeOfColors</code> accepts as input a string array containing
* two tokens - the starting and ending values of the color range, in that order.
* If the two integer values are successfully parsed from the string tokens,
* the method <code>generateColorRange()</code> is invoked to populate the list with
* all the color values in the range.
* The method <code>parseRangeOfColors</code> accepts as input a
* string array containing two tokens - the starting and ending
* values of the color range, in that order. If the two integer
* values are successfully parsed from the string tokens, the method
* <code>generateColorRange()</code> is invoked to populate the list
* with all the color values in the range.
*/
private boolean parseRangeOfColors(String[] colorRangeStringTokens) {
@ -489,9 +566,11 @@ public class FLine {
for (int currentIndex = 0; currentIndex <= 1; currentIndex++) {
try {
colorValue = Integer.parseInt(colorRangeStringTokens[currentIndex]);
colorValue = Integer
.parseInt(colorRangeStringTokens[currentIndex]);
if (currentIndex == 0) {
/*TODO: Check if colorValue lies in the permissible range
/*
* TODO: Check if colorValue lies in the permissible range
* for color values
*/
this.setStartColorRange(colorValue);
@ -513,33 +592,43 @@ public class FLine {
}
/**
* @param Integer startColorValue
* @param Integer endColorValue
* The method <code>generateColorRange()</code> accepts as input, two integers that represent
* the starting and ending values of the color range.
* A loop is used to generate every integer (representing a color value) in between the range.
* @param Integer
* startColorValue
* @param Integer
* endColorValue The method <code>generateColorRange()</code>
* accepts as input, two integers that represent the starting and
* ending values of the color range. A loop is used to generate
* every integer (representing a color value) in between the
* range.
*/
private void generateColorRange(Integer startColorValue, Integer endColorValue){
private void generateColorRange(Integer startColorValue,
Integer endColorValue) {
int currentIndex = 0;
/*If the starting and ending color values in the range are equal
*only a single element - the starting color value of the range is added to the list.
**/
/*
* If the starting and ending color values in the range are equalonly a
* single element - the starting color value of the range is added to
* the list.
*/
if (startColorValue == endColorValue) {
this.getFillColorList().add(startColorValue);
}
/*Else if the starting color value in the range is less than ending color value,
*a loop is used to generate all the intermediate color values from the starting value
*to the ending value by incrementing the loop counter
/*
* Else if the starting color value in the range is less than ending
* color value,a loop is used to generate all the intermediate color
* values from the starting valueto the ending value by incrementing the
* loop counter
*/
else if (startColorValue < endColorValue) {
for (currentIndex = startColorValue; currentIndex <= endColorValue; currentIndex++) {
this.getFillColorList().add(currentIndex);
}
}
/*Else if the starting color value in the range is greater than ending color value,
*a loop is used to generate all the intermediate color values from the starting value
*to the ending value by decrementing the loop counter
/*
* Else if the starting color value in the range is greater than ending
* color value,a loop is used to generate all the intermediate color
* values from the starting valueto the ending value by decrementing the
* loop counter
*/
else {
for (currentIndex = startColorValue; currentIndex >= endColorValue; currentIndex--) {
@ -549,31 +638,40 @@ public class FLine {
}
/**
* The method <code>setMissingAttributes</code>checks if the list of the list of patterns is
* less than that of the colors. If so, it invokes the method <code>setMissingPatterns</code>
* to repeat the patterns in the list till both the lists have the same number of elements
* @param List of Integer - colorsList
* @param List of Integer - patternsList
* The method <code>setMissingAttributes</code>checks if the list of the
* list of patterns is less than that of the colors. If so, it invokes the
* method <code>setMissingPatterns</code> to repeat the patterns in the list
* till both the lists have the same number of elements
*
* @param List
* of Integer - colorsList
* @param List
* of Integer - patternsList
*/
private void setMissingAttributes(List<Integer> colorsList,List<Integer> patternsList){
private void setMissingAttributes(List<Integer> colorsList,
List<Integer> patternsList) {
int colorsListSize = colorsList.size();
int patternsListSize = patternsList.size();
int numElementsToAdd = 0;
if (patternsListSize < colorsListSize) {
numElementsToAdd = colorsListSize - patternsListSize;
this.setMissingPatterns(patternsList, numElementsToAdd);
}
}
/**
*The method <code>setMissingPatterns</code> uses the input integer <code>numElementsToAdd</code>
*to decide how many elements to add, so as to repeat the patterns in the input list of patterns.
* @param List of Integer - patternsList
* The method <code>setMissingPatterns</code> uses the input integer
* <code>numElementsToAdd</code> to decide how many elements to add, so as
* to repeat the patterns in the input list of patterns.
*
* @param List
* of Integer - patternsList
* @param int numElementsToAdd
*/
private void setMissingPatterns(List<Integer> patternsList,int numElementsToAdd){
private void setMissingPatterns(List<Integer> patternsList,
int numElementsToAdd) {
int currentIndex = 0;
int count = 1;
while (count <= numElementsToAdd) {
@ -584,26 +682,20 @@ public class FLine {
this.setFillTypeList(patternsList);
}
private List<Integer> removeInvalidColors(List<Integer> integerList) {
// Only allow integers 0 through 32 so that it does not exceed
// the number of colors available (refer to class GempakColor)
List<Integer> newIntegerList = new ArrayList<Integer>();
int size = (integerList != null) ? integerList.size() : 0;
for (int i = 0; i < size; i++) {
int tmp = integerList.get(i);
if (tmp >= 0 && tmp <= 32)
newIntegerList.add(tmp);
}
return newIntegerList;
}
}

View file

@ -8,7 +8,7 @@ package gov.noaa.nws.ncep.gempak.parameters.intext;
* TEXT is the size, font, text width and hardware/software flag for
* graphics text separated with slashes:
*
* text size / font / width / hw flag
* text size / font / width/ border / rotation / justification / / hw flag
*
* The size may be a real number multiplier for the default text
* size. If the size is zero or unspecified, the current size
@ -107,11 +107,12 @@ package gov.noaa.nws.ncep.gempak.parameters.intext;
* ------------ ---------- ----------- --------------------------
* Nov 30,2010 363 X. Guo Initial Creation
* Dec 06,2010 X. Guo Add symbol size
* Sep 09, 2013 1036 S. Gurung Added border, justification, rotation and textStyle
*
* </pre>
* @author xguo
* @version 1
* @see $GEMPAK/help/hlx/txt.hl2 */
* @see $GEMPAK/help/hlx/text.hl2 */
public class TextStringParser {
@ -133,12 +134,36 @@ public class TextStringParser {
//Text HW flag
private String hwflg;
//Text border
private int border;
//Text justification
private char justification;
//Text rotation
private char rotation;
//Text style (normal/bold/italic)
private int textStyle;
//Parse Flag
private boolean isTextStringParsed;
//expression
private String textExpre = "((-|\\+)?[0-9]+(\\.[0-9]+)?)+";
//font expression
private String fontExpre = "[1-3]+";
//border expression
private String borderExpre = "[1-2][1-3][1]";
//rotation expression
private String rotExpre = "s|n|S|N";
//justification expression
private String justExpre = "c|C|r|R|l|L";
/**
* The default constructor <code>HILOStringParser</code> generates a single
**/
@ -184,7 +209,7 @@ public class TextStringParser {
String textStr = txtStr + "/";
/*
* check and see if the input string with 4 strings separated by slashes
* check and see if the input string with 4 or 7 strings separated by slashes
*/
while (( pos = textStr.indexOf("/", start)) >= 0 ) {
if ( pos != start ) {
@ -198,22 +223,46 @@ public class TextStringParser {
}
}
else if ( cnt == 1 ) { //parse font
if ( tmp.matches(textExpre) ) {
if ( tmp.matches(fontExpre) ) {
if (tmp.length()==1){
setTextFont (checkFontSize(Integer.valueOf(tmp)));
}
else {
setTextFont (checkFontSize(Integer.valueOf(tmp.substring(1,2))));
setTextStyle(Integer.valueOf(tmp.substring(0,1)));
}
}
else {
setTextFont (1);
}
}
else if ( cnt == 2 ) { //parse width
if ( tmp.matches(textExpre) ) {
setTextWidth (Integer.valueOf(tmp));
setTextWidth (Math.round(Float.valueOf(tmp)));
}
else {
setTextWidth (2);
}
}
else if ( cnt == 3 ) { // parse hw flag
else if (cnt == 3 && (tmp.equalsIgnoreCase("HW") || tmp.equalsIgnoreCase("SW"))) { // parse hw flag for HLSYM
setTextHWFlag (tmp);
}
else if ( cnt == 3 ) { // parse border
if ( tmp.matches(borderExpre) && tmp.length() == 3) {
setTextBorder (Integer.valueOf(tmp));
}
}
else if ( cnt == 4 ) { // parse rotation
if ( tmp.matches(rotExpre) && tmp.length() == 1) {
setTextRotation (tmp.toUpperCase().charAt(0));
}
}
else if ( cnt == 5 ) { // parse justification
if ( tmp.matches(justExpre) && tmp.length() == 1) {
setTextJustification (tmp.toUpperCase().charAt(0));
}
}
else if ( cnt == 6 ) { // parse hw flag
setTextHWFlag (tmp);
}
else {
@ -236,6 +285,10 @@ public class TextStringParser {
font = 1;
width = 2;
hwflg = "HW";
border = 000;
rotation = 'S';
justification = 'C';
textStyle = 0;
}
/**
@ -307,6 +360,51 @@ public class TextStringParser {
public String getTextHWFlag () {
return hwflg;
}
/**
* Set Text border
*/
private void setTextBorder ( int border ) {
this.border = border;
}
/**
* Get Text border
*/
public int getTextBorder () {
return border;
}
/**
* Set Text justification
*/
private void setTextJustification ( char justification ) {
this.justification = justification;
}
/**
* Get Text justification
*/
public char getTextJustification () {
return justification;
}
/**
* Set Text rotation
*/
private void setTextRotation ( char rotation ) {
this.rotation = rotation;
}
/**
* Get Text rotation
*/
public char getTextRotation () {
return rotation;
}
/**
* Get parse status
*/
@ -320,6 +418,26 @@ public class TextStringParser {
public String getInputTextString () {
return inputTxtStr;
}
/**
* Get textStyle
*
* 0 Normal
* 1 Italic
* 2 Bold
* 3 Italic-Bold
*/
public int getTextStyle() {
return textStyle;
}
/**
* Set textStyle
*/
public void setTextStyle(int textStyle) {
this.textStyle = textStyle;
}
/**
* Convert size name to CAVE number
* Name GEMPAK Size CAVE Size
@ -338,8 +456,7 @@ public class TextStringParser {
float [] range = {0.714f, 0.857f, 1.000f, 1.286f, 1.714f, 2.429f };
String [] name = {"TINY","SMALL","MEDIUM","LARGE","HUGE","GIANT"};
for ( int i = 0; i < fontsize.length-1; i ++ ) {
for ( int i = 0; i <= fontsize.length-1; i ++ ) {
String txtName1 = textName.substring(0, 1);
String name1 = name[i].substring(0, 1);
if ( textName.toUpperCase().compareTo(name[i]) == 0 ||
@ -371,7 +488,31 @@ public class TextStringParser {
float [] range = {0.714f, 0.857f, 1.000f, 1.286f, 1.714f, 2.429f };
int len = range.length;
for ( int i = 0; i < len-1; i ++ ) {
if ( value <= range[len-1] ) {
if ( ( range[i] <= value ) && ( value <= range[i+1]) ) {
if ( ( value - range[i] ) <= ( range[i+1] - value ) ) {
sizev = fontsize[i] ;
sizes = range[i] ;
}
else {
sizev = fontsize[i+1] ;
sizes = range[i+1] ;
}
break;
}
} else if (value == fontsize[i]) {
sizev = fontsize[i];
sizes = range[i];
break;
} else {
sizev = fontsize[len-1] ;
sizes = range[len-1] ;
}
}
/*if ( value <= range[len-1] ) {
for ( int i = 0; i < len-1; i ++ ) {
if ( ( range[i] <= value ) && ( value <= range[i+1]) ) {
if ( ( value - range[i] ) <= ( range[i+1] - value ) ) {
@ -389,7 +530,7 @@ public class TextStringParser {
else {
sizev = fontsize[len-1] ;
sizes = range[len-1] ;
}
}*/
setTextSize (sizev );
setSymbolMarkerSize (sizes);
}

View file

@ -126,9 +126,8 @@ void mean_wind(float pbot, float ptop, float *mnu, float *mnv,
/* mnv - V-Component of mean wind (kt) */
/*************************************************************/
{
float pinc, usum, vsum, wgt, w1, num, p, ix1;
float pinc, usum, vsum, wgt, w1, num, i, ix1, p;
float sfctemp, sfcdwpt, sfcpres, lower, upper;
int i;
Parcel pcl;
*wdir = RMISSD;
@ -204,9 +203,8 @@ void mean_wind_npw(float pbot, float ptop, float *mnu, float *mnv,
/* mnv - V-Component of mean wind (kt) */
/*************************************************************/
{
float pinc, usum, vsum, wgt, w1, num, p, ix1;
float pinc, usum, vsum, wgt, w1, num, i, ix1;
float sfctemp, sfcdwpt, sfcpres, lower, upper;
int i;
Parcel pcl;
*wdir = RMISSD;
@ -246,19 +244,17 @@ void mean_wind_npw(float pbot, float ptop, float *mnu, float *mnv,
}
else {
num = wgt = usum = vsum = 0;
p = pbot;
for (i = 0; i <= 20; i++) {
w1 = p;
usum = usum + i_wndu(p, I_PRES);
vsum = vsum + i_wndv(p, I_PRES);
p -= pinc;
wgt = wgt + w1;
for (i = pbot; i >= ptop; i -= pinc) {
w1 = 1;
usum = usum + i_wndu(i, I_PRES);
vsum = vsum + i_wndv(i, I_PRES);
//wgt = wgt + w1;
num++;
}
}
*mnu = (usum / wgt);
*mnv = (vsum / wgt);
*mnu = (usum / num);
*mnv = (vsum / num);
if (qc(*mnu) && qc(*mnv)) {
*wdir = angle(*mnu, *mnv);
@ -283,9 +279,8 @@ void sr_wind(float pbot, float ptop, float stdir, float stspd,
/* mnv - V-Component of mean wind (kt) */
/*************************************************************/
{
float pinc, usum, vsum, wgt, w1, num, ix1, stu, stv, p;
float pinc, usum, vsum, wgt, w1, num, i, ix1, stu, stv;
short idx;
int i;
/* ----- Calculate Storm motion vectors ----- */
stu = ucomp(stdir, stspd);
@ -312,16 +307,20 @@ void sr_wind(float pbot, float ptop, float stdir, float stspd,
((i_wndu(ptop, I_PRES) - stu) * ptop);
vsum = ((i_wndv(pbot, I_PRES) - stv) * pbot) +
((i_wndv(ptop, I_PRES) - stv) * ptop);
/*usum = ((ucomp(i_wdir(pbot, I_PRES), i_wspd(pbot, I_PRES)) - stu) * pbot) +
((ucomp(i_wdir(ptop, I_PRES), i_wspd(ptop, I_PRES)) - stu) * ptop);
vsum = ((vcomp(i_wdir(pbot, I_PRES), i_wspd(pbot, I_PRES)) - stv) * pbot) +
((vcomp(i_wdir(ptop, I_PRES), i_wspd(ptop, I_PRES)) - stv) * ptop);*/
wgt = pbot + ptop;
}
else {
num = wgt = usum = vsum = 0;
p = pbot;
for (i = 0; i <= 20 ; i++) {
w1 = p;
usum = usum + ((i_wndu(p, I_PRES) - stu) * w1);
vsum = vsum + ((i_wndv(p, I_PRES) - stv) * w1);
p -= pinc;
for (i = pbot; i >= ptop; i -= pinc) {
w1 = i;
usum = usum + ((i_wndu(i, I_PRES) - stu) * w1);
vsum = vsum + ((i_wndv(i, I_PRES) - stv) * w1);
/*usum = usum + ((ucomp(i_wdir(i, I_PRES), i_wspd(i, I_PRES)) - stu) * w1);
vsum = vsum + ((vcomp(i_wdir(i, I_PRES), i_wspd(i, I_PRES)) - stv) * w1);*/
wgt = wgt + w1;
num++;
}
@ -377,6 +376,10 @@ void wind_shear(float pbot, float ptop, float *shu, float *shv,
/* 10/9/07 RLT edit */
ubot = i_wndu(pbot, I_PRES);
vbot = i_wndv(pbot, I_PRES);
/*ubot = ucomp((i_wdir(pbot, I_PRES)), (i_wspd(pbot, I_PRES)));
vbot = vcomp((i_wdir(pbot, I_PRES)), (i_wspd(pbot, I_PRES)));
printf("\n ubot = %7.1f vbot = %7.1f\n", ubot, vbot);*/
}
if (ptop == -1) { ptop = i_pres(agl(3000.0)); }
@ -387,6 +390,15 @@ void wind_shear(float pbot, float ptop, float *shu, float *shv,
/* ----- Calculate Vector Difference ----- */
*shu = i_wndu(ptop, I_PRES) - ubot;
*shv = i_wndv(ptop, I_PRES) - vbot;
/* *shu = ucomp((i_wdir(ptop, I_PRES)), (i_wspd(ptop, I_PRES))) - ubot;
*shv = vcomp((i_wdir(ptop, I_PRES)), (i_wspd(ptop, I_PRES))) - vbot; */
/*printf( "TOP: %7.1f %7.1f %7.1f %7.1f %7.1f\nBOT: %7.1f %7.1f %7.1f %7.1f %7.1f\nANS: %7.1f %7.1f %7.1f %7.1f\n",
ptop, i_wdir(ptop, I_PRES), i_wspd(ptop, I_PRES), i_wndu(ptop, I_PRES), i_wndv(ptop, I_PRES), pbot,
angle(ubot, vbot), speed(ubot, vbot), i_wndu(pbot, I_PRES), i_wndv(pbot, I_PRES), angle(*shu, *shv),
speed(*shu, *shv), *shu, *shv);*/
if (qc(*shu) && qc(*shv)) {
*sdir = angle(*shu, *shv);
*smag = speed(*shu, *shv);
@ -503,12 +515,10 @@ float helicity(float lower, float upper, float sdir, float sspd,
srv2 = kt_to_mps(vcomp(sndg[i][idxd], sndg[i][idxs]) - cy);
lyrh = (sru2 * srv1) - (sru1 * srv2);
if (lyrh > 0.0) {
if (lyrh > 0.0)
*phel += lyrh;
}
else {
else
*nhel += lyrh;
}
sru1 = sru2;
srv1 = srv2;
}
@ -519,12 +529,15 @@ float helicity(float lower, float upper, float sdir, float sspd,
srv2 = kt_to_mps(i_wndv(i_pres(msl(upper)), I_PRES) - cy);
lyrh = (sru2 * srv1) - (sru1 * srv2);
if (lyrh > 0.0) {
if (lyrh > 0.0)
*phel += lyrh;
}
else {
else
*nhel += lyrh;
}
/*
fprintf(stderr, "helicity: layer: %.1f:%.1f phel: %.1f nhel: %.1f\n",
lower, upper, *phel, *nhel);
*/
return (*phel + *nhel);
}

View file

@ -72,6 +72,7 @@ public class NsharpWxMath {
*/
public static double getPressureYFromTemp(double temp, double tempX) {
double pressureY;
temp -= tempOffset; //TT605593
pressureY = (tempX - (temp * 0.54))/0.90692;
return pressureY;
}

View file

@ -540,6 +540,7 @@ public class NsharpSkewTPaneBackground extends NsharpGenericPaneBackground {
double xmax = ext.getMaxX(); //Extent's viewable envelope min x and y
double ymax = ext.getMaxY();
double ymin = ext.getMinY();
//System.out.println(" xmin="+xmin+ " xmax="+ xmax+ " ymax="+ymax+" ymin="+ymin);
double dispX = xmin + 20 * currentZoomLevel;
double dispY = ymax - 20 * currentZoomLevel;
//We are getting Y (pressure) level for plotting Temp number, therefore dispX here is not important for the
@ -567,10 +568,9 @@ public class NsharpSkewTPaneBackground extends NsharpGenericPaneBackground {
tempGap= 5;
else if(currentZoomLevel <=0.75)
tempGap= 8;
/*tempGap = (int) ((currentZoomLevel * 10) /1);
if((currentZoomLevel * 10) %1 != 0)
tempGap++;*/
for (int i = /*70*/(int)lowTempMax+tempOffset; i >= /*-70+*/(int)lowTempMin+tempOffset; i -= tempGap) {
//TT605593 assume temp range is from -100 to 100 at ground level
for (int i = 100; i >= -100; i -= tempGap) {
// for (int i = /*70*/(int)lowTempMax+tempOffset; i >= /*-70+*/(int)lowTempMin+tempOffset; i -= tempGap) {
Coordinate coorS = NsharpWxMath.getSkewTXY(dispPressure, i);
double startX1 = world.mapX(coorS.x);
double startY1 = world.mapY(coorS.y);
@ -591,8 +591,12 @@ public class NsharpSkewTPaneBackground extends NsharpGenericPaneBackground {
if((dispPressure -NsharpConstants.MIN_PRESSURE) <10)
dispPressure = NsharpConstants.MIN_PRESSURE+5*currentZoomLevel;
// top temp number
for (int i = (int)topTempMax+tempOffset; i >= (int)topTempMin+tempOffset; i -= tempGap) {
// top temp number.TT605593
//Chin: without zooming, highest level temp is assume around 70 degree lower than ground
// Also, to make sure top temp number is in sync with lower temp number, when consider tempGap
int topTMax = 100- (( 70 / tempGap ) +1) * tempGap;
for (int i = topTMax; i >= topTMax - 200; i -= tempGap) {
//for (int i = (int)topTempMax+tempOffset; i >= (int)topTempMin+tempOffset; i -= tempGap) {
Coordinate coorEnd1 = NsharpWxMath.getSkewTXY(dispPressure, i);
double endX1 = world.mapX(coorEnd1.x);
double endY1 = world.mapY(coorEnd1.y);
@ -613,24 +617,25 @@ public class NsharpSkewTPaneBackground extends NsharpGenericPaneBackground {
Coordinate coorEnd = NsharpWxMath.getSkewTXY(100, i);
dispX=world.mapX(coorEnd.x);
dispY=world.mapY(coorEnd.y);
//System.out.println("temp x="+dispX+" y="+dispY);
if(dispX>xmax){
// when temp line's top point's x coordinate is greater than view xman, the line will not be plotted.
// Can not find a solution for that now.
// therefore, we have to find this temp line's top point's Y coordinate at xman position.
// In other words, find the intersection point of temp line with skewT rectangle's right side line.
dispX = xmax-5;
coorEnd = world.unMap(dispX, 0);
dispX = xmax-20; // need to minus some number. Otherwise, it wont be plotted.
//TT605593
coorEnd = world.unMap(xmax, 0);
double py= NsharpWxMath.getPressureYFromTemp(i, coorEnd.x);
dispY = world.mapY(py);
}
double [][] tlines = {{world.mapX(coorStart.x), world.mapY(coorStart.y)},
{dispX, dispY}};
//System.out.println("temp="+i+" "+world.mapX(coorStart.x)+ "," +world.mapY(coorStart.y)+ " ;"
// +dispX+ "," + dispY);
//System.out.println("temp="+i+" wLx="+world.mapX(coorStart.x)+" sLx="+coorStart.x+ ",wLy=" +world.mapY(coorStart.y)+ " ;wHx="
// +dispX+" sHx="+coorEnd.x+",wHy=" + dispY);
temperatureLineShape.addLineSegment(tlines);
}
temperatureLineShape.compile();
//System.out.println("lower min"+ lowTempMin+ " lower nax "+ lowTempMax+ " upper min "+ topTempMin + " topTempMax "+ topTempMax);
}
//@SuppressWarnings("deprecation")
@ -666,6 +671,7 @@ public class NsharpSkewTPaneBackground extends NsharpGenericPaneBackground {
target.drawWireframeShape(tempNumbersShape, NsharpConstants.color_white, 1, LineStyle.DEFAULT, smallFont);
drawPressureLineNumber(target);
target.clearClippingPlane();
}
//this function is used for printing
public void paintForPrint( WGraphics world, GC gc){

View file

@ -13,7 +13,8 @@
* 03/16/2010 229 Chin Chen Initial coding
* 03/11/2013 972 Greg Hull NatlCntrsEditor
* 09/03/2013 1031 Greg Hull try 5 times to initialize the inventory.
*
* 01/08/2014 Chin Chen Only initializing inventory when in NCP
* 01/13/2014 Chin Chen TTR829- when interpolation, edit graph is allowed
* </pre>
*
* @author Chin Chen
@ -193,8 +194,8 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
compareSndBtn.setText(COMP_SND_OFF);
compareStnBtn.setText(COMP_STN_OFF);
if (interpolateIsOn) {
graphEditBtn.setEnabled(false);
dataEditBtn.setEnabled(false);
//TTR829 graphEditBtn.setEnabled(false);
//dataEditBtn.setEnabled(false);
compareTmBtn.setEnabled(false);
compareSndBtn.setEnabled(false);
compareStnBtn.setEnabled(false);
@ -362,10 +363,13 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
public NsharpPaletteWindow() {
super();
instance = this;
boolean imD2d=false; //fixMark:NcInventory
if (VizPerspectiveListener.getCurrentPerspectiveManager() != null) {
if (VizPerspectiveListener.getCurrentPerspectiveManager()
.getPerspectiveId().equals(D2D5Pane.ID_PERSPECTIVE))
.getPerspectiveId().equals(D2D5Pane.ID_PERSPECTIVE)){
d2dInstance = this;
imD2d = true;//fixMark:NcInventory
}
else if (VizPerspectiveListener.getCurrentPerspectiveManager()
.getPerspectiveId()
.equals(NmapCommon.NatlCntrsPerspectiveID))
@ -384,7 +388,7 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
NsharpGraphProperty graphConfigProperty = configStore
.getGraphProperty();
paneConfigurationName = graphConfigProperty.getPaneConfigurationName();
if(!imD2d){//fixMark:NcInventory
for( int a=1 ; a<=5 ; a++ ) {
if( NsharpGridInventory.getInstance().isInitialized() ) {
break;
@ -412,7 +416,7 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
errDlg.open();
try {
NsharpGridInventory.getInstance().createInventory();
NsharpGridInventory.createInventory();
}
catch (VizException e) {
errDlg = new MessageDialog(
@ -423,6 +427,7 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
}
}
}
}
/**
* Invoked by the workbench to initialize this View.
@ -795,8 +800,8 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
if (interpolateIsOn == false) {
interpolateIsOn = true;
interpBtn.setText(INTP_ON);
graphEditBtn.setEnabled(false);
dataEditBtn.setEnabled(false);
//TTR829 graphEditBtn.setEnabled(false);
//dataEditBtn.setEnabled(false);
compareTmBtn.setEnabled(false);
compareSndBtn.setEnabled(false);
compareStnBtn.setEnabled(false);
@ -804,8 +809,8 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
} else {
interpolateIsOn = false;
interpBtn.setText(INTP_OFF);
if (currentGraphMode == NsharpConstants.GRAPH_SKEWT) {
graphEditBtn.setEnabled(true);
if (currentGraphMode == NsharpConstants.GRAPH_SKEWT && editGraphOn == false) {
//TTR829 graphEditBtn.setEnabled(true);
dataEditBtn.setEnabled(true);
compareTmBtn.setEnabled(true);
compareSndBtn.setEnabled(true);
@ -1097,21 +1102,23 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
if (editGraphOn) {
editGraphOn = false;
graphEditBtn.setText(EDIT_GRAPH_OFF);
if(interpolateIsOn == false){ //TTR829
graphModeBtnIcing.setEnabled(true);
graphModeBtnTurb.setEnabled(true);
dataEditBtn.setEnabled(true);
interpBtn.setEnabled(true);
//interpBtn.setEnabled(true);TTR829
compareTmBtn.setEnabled(true);
compareSndBtn.setEnabled(true);
compareStnBtn.setEnabled(true);
overlayBtn.setEnabled(true);
}
} else {
editGraphOn = true;
graphEditBtn.setText(EDIT_GRAPH_ON);
graphModeBtnIcing.setEnabled(false);
graphModeBtnTurb.setEnabled(false);
dataEditBtn.setEnabled(false);
interpBtn.setEnabled(false);
//interpBtn.setEnabled(false);
compareTmBtn.setEnabled(false);
compareSndBtn.setEnabled(false);
compareStnBtn.setEnabled(false);
@ -1542,6 +1549,13 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
@Override
public void partClosed(IWorkbenchPart part) {
//System.out.println("view closed ");
/*FixMark:SwapPaneShowText
NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess();
if(textarea != null){
textarea.close();
}//end FixMark:SwapPaneShowText */
}
@Override
@ -1551,10 +1565,9 @@ public class NsharpPaletteWindow extends ViewPart implements SelectionListener,
IContextService ctxSvc = (IContextService) PlatformUI
.getWorkbench().getService(IContextService.class);
ctxSvc.deactivateContext(context);
// System.out.println("Deactivated " + context.getContextId());
//System.out.println("view Deactivated " + context.getContextId());
context = null;
}
}
@Override

View file

@ -13,8 +13,8 @@
-->
<CcfpTimes>
<Time issue="1500" valid1="1700" valid2="1900" valid3="2100" />
<Time issue="1900" valid1="2100" valid2="2300" valid3="0100" />
<Time issue="2300" valid1="0100" valid2="0300" valid3="0500" />
<Time issue="0300" valid1="0500" valid2="0700" />
<Time issue="1500" valid1="1900" valid2="2100" valid3="2300" />
<Time issue="1900" valid1="2300" valid2="0100" valid3="0300" />
<Time issue="2300" valid1="0300" valid2="0500" valid3="0700" />
<Time issue="0300" valid1="0700" valid2="0900" />
</CcfpTimes>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This xml file is used to provide Contours attributes information, including
the parameter name, level, and forecast hour.
the parameter name, level, forecast hour, and cint.
It is also used to select a list of symbols/markers that will show up
in the Contours attributes GUI for quick access. The first 15 symbols/markers
@ -40,6 +40,48 @@
<label text="f072"/>
</contoursInfo>
<!--
CINT for a given parameter and/or level, in format of:
(1) contourInterval/minimumContourValue/maximumContourValue OR
(2) contourVal1;contourVal2;...;contourValn
See $GEMPAK/help/hlx/cint.hl2
When in format (1), the number of decimal points is decided by the maximum number of
decimal points found in the cint, e.g., if cint = 10/0/100, then the all contour
value will be integer; if cint = 10/0/100.00, then the all contour value will have two
decimal points (0.00, 10.00, ....)
You can specify a cint value for a parm for all its levels with {level = ""}.
-->
<contoursInfo name="Cint">
<cint parm="HGMT" level="" value="10/0/100" />
<cint parm="HGMT" level="1000" value="10/0/100" />
<cint parm="HGMT" level="850" value="10/0/100" />
<cint parm="HGMT" level="700" value="10/0/100" />
<cint parm="HGMT" level="500" value="10/0/100" />
<cint parm="HGMT" level="300" value="10/0/100" />
<cint parm="HGMT" level="200" value="10/0/100" />
<cint parm="HGMT" level="100" value="10/0/100" />
<!-- -->
<cint parm="TEMP" value="10/0/100" />
<cint parm="TEMP" level="1000" value="10/0/100" />
<cint parm="TEMP" level="850" value="10/0/100" />
<cint parm="TEMP" level="700" value="10/0/100" />
<cint parm="TEMP" level="500" value="10/0/100" />
<cint parm="TEMP" level="300" value="10/0/100" />
<cint parm="TEMP" level="200" value="10/0/100" />
<cint parm="TEMP" level="100" value="10/0/100" />
<!-- -->
<cint parm="PRES" level="1000" value="10/0/100" />
<cint parm="PRES" level="850" value="10/0/100" />
<cint parm="PRES" level="700" value="10/0/100" />
<cint parm="PRES" level="500" value="10/0/100" />
<cint parm="PRES" level="300" value="10/0/100" />
<cint parm="PRES" level="200" value="10/0/100" />
<cint parm="PRES" level="100" value="10/0/100" />
</contoursInfo>
<!-- The following are symbols and markers defined in pgen/plugin.xml.
Change the value of "quickAccess" to "true" if you want it to appear on the

View file

@ -382,6 +382,14 @@
<patternId>LINE_SOLID</patternId>
<linePattern hasArrowHead="false" name="Solid Line"/>
</patternEntry>
<patternEntry>
<patternId>KINK_LINE_1</patternId>
<linePattern hasArrowHead="false" name="Kink Line with open arrow head"/>
</patternEntry>
<patternEntry>
<patternId>KINK_LINE_2</patternId>
<linePattern hasArrowHead="false" name="Kink Line with filled arrow head"/>
</patternEntry>
<patternEntry>
<patternId>STORM_TRACK</patternId>
<linePattern hasArrowHead="false" name="Storm Track"/>

View file

@ -10094,19 +10094,19 @@
<ns3:Name>Outlook</ns3:Name>
</ns3:PgenObjects>
</ns3:PgenClass>
<ns3:PgenLayer Name="hail" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=HAIL" Name="hail" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="torn" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=TORN" Name="torn" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="wind" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=WIND" Name="wind" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="catg" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=OUTLOOK" Name="catg" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="pr2cat" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=OUTLOOK;outlook format flag=false" Name="pr2cat" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenSave outputFile="Convective_Outlook.DDMMYYYY.HH.xml" saveLayers="false" autoSave="true" autoSaveFreq="5"/>
@ -10186,16 +10186,16 @@
<ns3:Name>Outlook</ns3:Name>
</ns3:PgenObjects>
</ns3:PgenClass>
<ns3:PgenLayer Name="fire" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=FIREOUTL" Name="fire" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="cat" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=EXT_FIRE" Name="cat" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="dryt" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=TSTMOLK" Name="dryt" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="wind" OnOff="false" MonoColor="false" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=WIND" Name="wind" OnOff="false" MonoColor="false" Filled="false">
<ns3:Color blue="0" red="255" green="255" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenSave outputFile="Fire_Weather_Outlook.DDMMYYYY.HH.xml" saveLayers="false" autoSave="true" autoSaveFreq="5"/>
@ -10233,6 +10233,7 @@
<ns3:Name>Add Point Alt</ns3:Name>
<ns3:Name>Distance</ns3:Name>
<ns3:Name>IncDec</ns3:Name>
<ns3:Name>Clip</ns3:Name>
</ns3:PgenActions>
<ns3:PgenClass Name="Any">
<ns3:PgenObjects/>
@ -10247,10 +10248,13 @@
<ns3:Name>Outlook</ns3:Name>
</ns3:PgenObjects>
</ns3:PgenClass>
<ns3:PgenLayer Name="FIRE" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=FIREOUTL" Name="FIRE" OnOff="true" MonoColor="true" Filled="true">
<ns3:Color blue="139" red="139" green="0" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenSave outputFile="Fire_Weather_Outlook.Day1.DDMMYYYY.HH.xml" saveLayers="false" autoSave="true" autoSaveFreq="5"/>
<ns3:ClipFlag>false</ns3:ClipFlag>
<ns3:ClipBoundsTable>cpcus_bnd</ns3:ClipBoundsTable>
<ns3:ClipBoundsName>CPC_US</ns3:ClipBoundsName>
</ns3:ProductType>
<ns3:ProductType Name="" Type="Fire Weather Outlook" Subtype="Day2">
<ns3:PgenControls>
@ -10300,7 +10304,7 @@
<ns3:Name>Outlook</ns3:Name>
</ns3:PgenObjects>
</ns3:PgenClass>
<ns3:PgenLayer Name="FIRE" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=FIREOUTL" Name="FIRE" OnOff="true" MonoColor="true" Filled="true">
<ns3:Color blue="139" red="139" green="0" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenSave outputFile="Fire_Weather_Outlook.Day2.DDMMYYYY.HH.xml" saveLayers="false" autoSave="true" autoSaveFreq="5"/>
@ -10353,10 +10357,10 @@
<ns3:Name>Outlook</ns3:Name>
</ns3:PgenObjects>
</ns3:PgenClass>
<ns3:PgenLayer Name="FIRE D1" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=FIREOUTL" Name="FIRE D1" OnOff="true" MonoColor="true" Filled="true">
<ns3:Color blue="139" red="139" green="0" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="FIRE D2" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=FIREOUTL" Name="FIRE D2" OnOff="true" MonoColor="true" Filled="true">
<ns3:Color blue="139" red="139" green="0" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenSave outputFile="Fire_Weather_Outlook.Day1-2.DDMMYYYY.HH.xml" saveLayers="false" autoSave="true" autoSaveFreq="5"/>
@ -10409,25 +10413,25 @@
<ns3:Name>Outlook</ns3:Name>
</ns3:PgenObjects>
</ns3:PgenClass>
<ns3:PgenLayer Name="D3" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=OUTLOOK" Name="D3" OnOff="false" MonoColor="true" Filled="true">
<ns3:Color blue="255" red="255" green="0" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="D4" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=OUTLOOK" Name="D4" OnOff="false" MonoColor="true" Filled="true">
<ns3:Color blue="0" red="255" green="0" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="D5" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=OUTLOOK" Name="D5" OnOff="false" MonoColor="true" Filled="true">
<ns3:Color blue="238" red="145" green="44" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="D6" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=OUTLOOK" Name="D6" OnOff="false" MonoColor="true" Filled="true">
<ns3:Color blue="0" red="0" green="139" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="D7" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=OUTLOOK" Name="D7" OnOff="false" MonoColor="true" Filled="true">
<ns3:Color blue="139" red="16" green="78" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="D8" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=OUTLOOK" Name="D8" OnOff="false" MonoColor="true" Filled="true">
<ns3:Color blue="38" red="139" green="71" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenLayer Name="CAT" OnOff="false" MonoColor="true" Filled="false">
<ns3:PgenLayer MetaInfo="outlook type=EXT_FIRE" Name="CAT" OnOff="false" MonoColor="true" Filled="true">
<ns3:Color blue="139" red="139" green="0" alpha="255"/>
</ns3:PgenLayer>
<ns3:PgenSave outputFile="Fire_Weather_Outlook.Day3-8.DDMMYYYY.HH.xml" saveLayers="false" autoSave="true" autoSaveFreq="5"/>

View file

@ -313,6 +313,16 @@
<Point Lat="19.282701554968984" Lon="-112.48852999239747"/>
<Point Lat="19.853243101176776" Lon="-108.33312442667157"/>
</Line>
<Line pgenType="KINK_LINE_1" pgenCategory="Lines" lineWidth="2.0" sizeScale="1.0" smoothFactor="0" closed="false" filled="false" fillPattern="SOLID" flipSide="false" arrowHeadType="OPEN" kinkPosition="0.5">
<Color red="255" green="0" blue="0" alpha="255"/>
<Point Lat="42.216395906820196" Lon="-110.94870254887984"/>
<Point Lat="40.16867459395568" Lon="-100.55653112449869"/>
</Line>
<Line pgenType="KINK_LINE_2" pgenCategory="Lines" lineWidth="2.0" sizeScale="1.0" smoothFactor="0" closed="false" filled="false" fillPattern="SOLID" flipSide="false" arrowHeadType="FILLED" kinkPosition="0.5">
<Color red="255" green="0" blue="0" alpha="255"/>
<Point Lat="37.577991351665105" Lon="-111.39813436950983"/>
<Point Lat="36.413201252941406" Lon="-99.82243392673534"/>
</Line>
<Symbol pgenCategory="Symbol" pgenType="PRESENT_WX_088" lineWidth="2.0" sizeScale="1.0" clear="true">
<Color red="0" green="255" blue="0" alpha="255"/>
<Color red="0" green="255" blue="0" alpha="255"/>

View file

@ -9,13 +9,13 @@
Change Log:
B. Yin/Chugach 04/10 Initial Coding
B. Yin/SGT 11/13 Remove leading space at each line (TTR884)
-->
<xsl:variable name="newline"><xsl:text>
</xsl:text></xsl:variable>
<xsl:template match="Outlook">
<xsl:value-of select="$newline"/>
<xsl:value-of select="@days"/>
<xsl:value-of select="$newline"/>
<xsl:value-of select="@forecaster"/>

View file

@ -12,13 +12,11 @@ SUMMIT ELEV: </xsl:text>
<xsl:text>
ADVISORY NR: </xsl:text>
<xsl:value-of select="@year"/><xsl:if test="string-length(@year) > 0">/</xsl:if><xsl:value-of select="@advNum"/><xsl:text>&#13;&#10;</xsl:text>
INFO SOURCE: <xsl:if test="not(contains( @infoSource, 'NOT AVBL'))" ><xsl:value-of select="substring-after(@infoSource,':::')"/><xsl:text>&#xA0;</xsl:text></xsl:if><xsl:text>&#13;&#10;</xsl:text>
ERUPTION DETAILS: <xsl:if test="not(contains( @erupDetails, 'NOT AVBL'))" ><xsl:value-of select="translate(substring-after(@erupDetails,':::'), $smallcase, $uppercase)"/><xsl:text>&#13;&#10;</xsl:text></xsl:if>
INFO SOURCE: <xsl:value-of select="substring-before(@infoSource,':::')"/><xsl:text>&#xA0;</xsl:text><xsl:value-of select="translate(@addInfoSource, $smallcase, $uppercase)"/><xsl:text>&#13;&#10;</xsl:text>
ERUPTION DETAILS: <xsl:value-of select="translate(substring-before(@erupDetails,':::'), $smallcase, $uppercase)"/><xsl:text>&#13;&#10;</xsl:text>
RMK: <xsl:value-of select="substring-after(@remarks,':::')"/><xsl:text>&#13;&#10;</xsl:text>
NXT ADVISORY: <xsl:value-of select="substring-after(@nextAdv,':::')"/><xsl:text>&#13;&#10;</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View file

@ -83,7 +83,11 @@
<xsl:value-of select="$newline"/>
<xsl:value-of select="$newline"/>
<xsl:text>TORNADOES...HAIL TO </xsl:text>
<xsl:if test="@watchType = 'TORNADO'">
<xsl:text>TORNADOES...</xsl:text>
</xsl:if>
<xsl:text>HAIL TO </xsl:text>
<xsl:value-of select="@hailSize"/>
<xsl:text> INCHES IN DIAMETER...THUNDERSTORM WIND</xsl:text>
@ -102,7 +106,9 @@
<xsl:text>TEST </xsl:text>
</xsl:if>
<xsl:text>TORNADO WATCH AREA IS APPROXIMATELY ALONG AND </xsl:text>
<xsl:value-of select="@watchType"/>
<xsl:text>WATCH AREA IS APPROXIMATELY ALONG AND </xsl:text>
<xsl:value-of select="@halfWidthSm"/>
<xsl:text> STATUTE</xsl:text>
<xsl:value-of select="$newline"/>
@ -197,7 +203,9 @@
<xsl:value-of select="$newline"/>
<xsl:value-of select="$newline"/>
<xsl:text>REMEMBER...A TORNADO WATCH MEANS CONDITIONS ARE FAVORABLE FOR</xsl:text>
<xsl:text>REMEMBER...A </xsl:text>
<xsl:value-of select="@watchType"/>
<xsl:text> WATCH MEANS CONDITIONS ARE FAVORABLE FOR</xsl:text>
<xsl:value-of select="$newline"/>
<xsl:text>TORNADOES AND SEVERE THUNDERSTORMS IN AND CLOSE TO THE WATCH</xsl:text>
<xsl:value-of select="$newline"/>
@ -228,7 +236,11 @@
<xsl:value-of select="$newline"/>
<xsl:value-of select="$newline"/>
<xsl:text>AVIATION...TORNADOES AND A FEW SEVERE THUNDERSTORMS WITH HAIL</xsl:text>
<xsl:text>AVIATION...</xsl:text>
<xsl:if test="@watchType = 'TORNADO'">
<xsl:text>TORNADOES AND </xsl:text>
</xsl:if>
<xsl:text>A FEW SEVERE THUNDERSTORMS WITH HAIL</xsl:text>
<xsl:value-of select="$newline"/>
<xsl:text>SURFACE AND ALOFT TO </xsl:text>
<xsl:value-of select="@hailSize"/>

View file

@ -12,6 +12,8 @@
Change Log:
B. Yin/Chugach 03/10 Initial Coding
B. Yin/SGT 12/13 TTR 904 change county list string
-->
<xsl:variable name="newline"><xsl:text>
@ -34,7 +36,8 @@
<xsl:text> TEST </xsl:text>
</xsl:if>
<xsl:text>TORNADO WATCH #</xsl:text>
<xsl:value-of select="@watchType"/>
<xsl:text> WATCH #</xsl:text>
<xsl:value-of select="@watchNumber"/>
<xsl:text> HAS BEEN ISSUED BY THE NWS STORM PREDICTION CENTER</xsl:text>
@ -63,8 +66,14 @@
<xsl:value-of select="$newline"/>
<xsl:text>. </xsl:text>
<xsl:value-of select="$stName"/>
<xsl:choose>
<xsl:when test="$stName='LOUISIANA'">
<xsl:text> PARISHES INCLUDED ARE </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> COUNTIES INCLUDED ARE </xsl:text>
<xsl:value-of select="$newline"/>
</xsl:otherwise>
</xsl:choose> <xsl:value-of select="$newline"/>
<xsl:value-of select="$newline"/>
<xsl:call-template name="getCountiesInState">
<xsl:with-param name="state" select="."/>

View file

@ -38,8 +38,8 @@
<xsl:if test="@issueStatus = 'Test'">
<xsl:text>TEST...</xsl:text>
</xsl:if>
<xsl:text>TORNADO WATCH OUTLINE UPDATE FOR WT </xsl:text>
<xsl:value-of select="@watchType"/>
<xsl:text> WATCH OUTLINE UPDATE FOR WT </xsl:text>
<xsl:value-of select="@watchNumber"/>
<xsl:if test="@issueStatus = 'Test'">
<xsl:text>...TEST</xsl:text>
@ -52,7 +52,8 @@
<xsl:value-of select="$newline"/>
<xsl:value-of select="$newline"/>
<xsl:text>TORNADO WATCH </xsl:text>
<xsl:value-of select="@watchType"/>
<xsl:text> WATCH </xsl:text>
<xsl:value-of select="@watchNumber"/>
<xsl:text> IS IN EFFECT UNTIL </xsl:text>
<xsl:value-of select="@expTime"/>

View file

@ -10,6 +10,8 @@
Change Log:
B. Yin/Chugach 03/10 Initial Coding
B. Yin/SGT 12/13 TTR 904 change county list string
-->
<xsl:variable name="newline"><xsl:text>
@ -124,7 +126,7 @@
<xsl:text> UGC State County Name Lat/Lon FIPS WFO </xsl:text>
<xsl:value-of select="$newline"/>
<xsl:for-each select="Counties">
<xsl:value-of select="."/>
<xsl:value-of select="substring(.,1,56)"/>
<xsl:value-of select="$newline"/>
</xsl:for-each>

View file

@ -12,6 +12,7 @@
Change Log:
B. Yin/Chugach 05/10 Initial Coding
B. Yin/SGT 12/13 TTR 904 change county list string
-->
<xsl:template name="getCoastalWaters">
@ -20,7 +21,7 @@
<xsl:for-each select="/Products/Product/Layer/DrawableElement/DECollection/DrawableElement/WatchBox/Counties[substring(.,8,2) = $state]">
<xsl:value-of select="$newline"/>
<!-- get the county string -->
<xsl:variable name="zonestr" select="substring(.,52)"/>
<xsl:variable name="zonestr" select="substring(.,57)"/>
<xsl:call-template name="wrapText">
<xsl:with-param name="str" select="$zonestr"/>
<xsl:with-param name="charPerLine" select="65"/>

View file

@ -12,6 +12,8 @@
Change Log:
B. Yin/Chugach 03/10 Initial Coding
B. Yin/SGT 12/13 TTR 904 change county list string
-->
<xsl:template name="getStateLine">
@ -20,12 +22,9 @@
<xsl:value-of select="$state"/>
<xsl:text>C</xsl:text>
<xsl:for-each select="/Products/Product/Layer/DrawableElement/WatchBox/Counties[substring(.,8,2) = $state]">
<xsl:for-each select="/Products/Product/Layer/DrawableElement/DECollection/DrawableElement/WatchBox/Counties[substring(.,8,2) = $state]">
<xsl:value-of select="substring(.,4,3)"/>
<xsl:text>-</xsl:text>
<xsl:if test="position() mod 14 = 0 and not(position() = last())">
<xsl:value-of select="$newline"/>
</xsl:if>
</xsl:for-each>
</xsl:template>

View file

@ -24,6 +24,11 @@
id="gov.noaa.nws.ncep.ui.pgen.rsc.PgenDualDraw"
name="Pgen Dual Point Drawing">
</command>
<command
categoryId="gov.noaa.nws.ncep.viz.ui.modalTool"
id="gov.noaa.nws.ncep.ui.pgen.rsc.PgenKinkLineDraw"
name="Pgen Kink Line Drawing">
</command>
<command
categoryId="gov.noaa.nws.ncep.viz.ui.modalTool"
id="gov.noaa.nws.ncep.ui.pgen.rsc.PgenMultiDraw"
@ -328,6 +333,10 @@
class="gov.noaa.nws.ncep.ui.pgen.tools.PgenDualPointDrawingTool"
commandId="gov.noaa.nws.ncep.ui.pgen.rsc.PgenDualDraw">
</handler>
<handler
class="gov.noaa.nws.ncep.ui.pgen.tools.PgenKinkLineDrawingTool"
commandId="gov.noaa.nws.ncep.ui.pgen.rsc.PgenKinkLineDraw">
</handler>
<handler
class="gov.noaa.nws.ncep.ui.pgen.tools.PgenMultiPointDrawingTool"
commandId="gov.noaa.nws.ncep.ui.pgen.rsc.PgenMultiDraw">
@ -2963,6 +2972,18 @@
className="Arc"
commandId="gov.noaa.nws.ncep.ui.pgen.rsc.PgenDualDraw"
icon="icons/cirsolid.gif" />
<object
name="KINK_LINE_1"
label="Kink_Line_Open"
className="Lines"
commandId="gov.noaa.nws.ncep.ui.pgen.rsc.PgenKinkLineDraw"
icon="icons/kinkln1.gif" />
<object
name="KINK_LINE_2"
label="Kink_Line_Fill"
className="Lines"
commandId="gov.noaa.nws.ncep.ui.pgen.rsc.PgenKinkLineDraw"
icon="icons/kinkln2.gif" />
<object
name="Arrow"
label="Arrow"

View file

@ -27,7 +27,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*
* @see
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
public void start(BundleContext context) throws Exception {
super.start(context);
@ -36,7 +39,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*
* @see
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
@ -52,7 +58,9 @@ public class Activator extends AbstractUIPlugin {
return plugin;
}
/* (non-Javadoc)
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
*/
@Override
@ -63,14 +71,21 @@ public class Activator extends AbstractUIPlugin {
*/
if (myprefs == null) {
myprefs = super.getPreferenceStore();
myprefs.setDefault( PgenPreferences.P_OPR_DIR, PgenPreferences.V_OPR_DIR);
myprefs.setDefault( PgenPreferences.P_WORKING_DIR, PgenPreferences.V_WORKING_DIR);
myprefs.setDefault( PgenPreferences.P_RECOVERY_DIR, PgenPreferences.V_RECOVERY_DIR);
myprefs.setDefault(PgenPreferences.P_OPR_DIR,
PgenPreferences.V_OPR_DIR);
myprefs.setDefault(PgenPreferences.P_WORKING_DIR,
PgenPreferences.V_WORKING_DIR);
myprefs.setDefault(PgenPreferences.P_RECOVERY_DIR,
PgenPreferences.V_RECOVERY_DIR);
myprefs.setDefault(PgenPreferences.P_AUTO_FREQ, 5);
myprefs.setDefault(PgenPreferences.P_MAX_DIST, 30);
myprefs.setDefault( PgenPreferences.P_PGEN_MODE, PgenMode.SINGLE.toString() );
myprefs.setDefault(PgenPreferences.P_PGEN_MODE,
PgenMode.SINGLE.toString());
myprefs.setDefault(PgenPreferences.P_LAYER_LINK, false);
myprefs.setDefault( PgenPreferences.P_COMP_COORD, PgenPreferences.CED_COMP_COORD);
myprefs.setDefault(PgenPreferences.P_COMP_COORD,
PgenPreferences.CED_COMP_COORD);
myprefs.setDefault(PgenPreferences.P_AUTOPLACE_TEXT, false);
myprefs.setDefault(PgenPreferences.P_LAYER_MERGE, 4);
}
return myprefs;

View file

@ -0,0 +1,453 @@
/*
* gov.noaa.nws.ncep.ui.pgen
*
* November 2013
*
* This code has been developed by the NCEP/SIB for use in the AWIPS2 system.
*/
package gov.noaa.nws.ncep.ui.pgen;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryCollection;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.geom.LinearRing;
import com.vividsolutions.jts.geom.Point;
import com.vividsolutions.jts.geom.Polygon;
import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
/**
* A utility class used to place a text box and its associated point arrow
* in/around its associated polygon without intersecting the polygon and other
* geometries on the visible screen.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 4, 2013 TTR 752 jwu Initial creation
*
* </pre>
*
* @author jwu
* @version 1.0
*/
public class PgenAutoPlacement {
private static final double START_ANGLE = 45.0;;
private PgenRangeRecord textBox;
private PgenRangeRecord polygonBox;
private PgenRangeRecord arrowBox;
private List<PgenRangeRecord> activeRanges;
private PgenRangeRecord screenBox;
private boolean checkCenter;
private double angleIncrement;
private double distIncrement;
private GeometryFactory gf;
/**
* @param textBox
* @param arrowBox
* @param activeRanges
* @param screenBox
* @param checkCenter
* @param angleIncrement
* @param distIncrement
*/
public PgenAutoPlacement(PgenRangeRecord textBox,
PgenRangeRecord polygonBox, PgenRangeRecord arrowBox,
List<PgenRangeRecord> activeRanges, PgenRangeRecord screenBox,
boolean checkCenter, double angleIncrement, double distIncrement) {
super();
this.textBox = textBox;
this.polygonBox = polygonBox;
this.arrowBox = arrowBox;
this.activeRanges = activeRanges;
this.screenBox = screenBox;
this.checkCenter = checkCenter;
this.angleIncrement = angleIncrement;
this.distIncrement = distIncrement;
gf = new GeometryFactory();
}
/**
* @param textBox
* the textBox to set
*/
public void setTextBox(PgenRangeRecord textBox) {
this.textBox = textBox;
}
/**
* @param polygonBox
* the polygonBox to set
*/
public void setPolygonBox(PgenRangeRecord polygonBox) {
this.polygonBox = polygonBox;
}
/**
* @param activeRanges
* the activeRanges to set
*/
public void setActiveRanges(List<PgenRangeRecord> activeRanges) {
this.activeRanges = activeRanges;
}
/**
* @param screenBox
* the screenBox to set
*/
public void setScreenBox(PgenRangeRecord screenBox) {
this.screenBox = screenBox;
}
/**
* @param checkCenter
* the checkCenter to set
*/
public void setCheckCenter(boolean checkCenter) {
this.checkCenter = checkCenter;
}
/**
* @param angleIncrement
* the angleIncrement to set
*/
public void setAngleIncrement(double angleIncrement) {
this.angleIncrement = angleIncrement;
}
/**
* @param distIncrement
* the distIncrement to set
*/
public void setDistIncrement(double distIncrement) {
this.distIncrement = distIncrement;
}
/**
* Generate a JTS polygon from a set of points.
*
* @param points
* array of points
* @return
*/
public static Geometry pointsToGeometry(Coordinate[] points,
boolean closed, GeometryFactory gf) {
Geometry geom;
if (points == null || points.length == 0) {
geom = null;
} else if (points.length == 1) {
CoordinateArraySequence cas = new CoordinateArraySequence(points);
geom = new Point(cas, new GeometryFactory());
} else if (points.length == 2) {
geom = pointsToLineString(points, gf);
} else {
if (closed) {
geom = pointsToPolygon(points, gf);
} else {
geom = pointsToLineString(points, gf);
}
}
return geom;
}
/**
* Generate a JTS polygon from a set of points.
*
* @param pots
* list of points
* @return
*/
public static Geometry pointsToGeometry(List<Coordinate> pts,
boolean closed, GeometryFactory gf) {
if (pts == null || pts.size() == 0)
return null;
Coordinate[] points = new Coordinate[pts.size()];
pts.toArray(points);
return pointsToGeometry(points, closed, gf);
}
/**
* Generate a JTS LineString from a set of points.
*
* @param points
* array of points
* @return
*/
public static Geometry pointsToLineString(Coordinate[] points,
GeometryFactory gf) {
CoordinateArraySequence cas = new CoordinateArraySequence(points);
return new LineString(cas, gf);
}
/**
* Generate a JTS polygon from a set of points.
*
* It is assumed that the first point is not repeated at the end in the
* input array of point.
*
* @param points
* array of points
* @return
*/
public static Polygon pointsToPolygon(Coordinate[] points,
GeometryFactory gf) {
Coordinate[] coords = Arrays.copyOf(points, points.length + 1);
coords[coords.length - 1] = coords[0];
CoordinateArraySequence cas = new CoordinateArraySequence(coords);
LinearRing ring = new LinearRing(cas, gf);
Polygon polygon = new Polygon(ring, null, gf);
return polygon;
}
/**
* Find a location to place the text box so the box won't intersect its
* linked polygon and all other geometries.
*
* @param points
* array of points
* @return PgenRangeRecord
*/
public PgenRangeRecord[] placeTextBox() {
PgenRangeRecord[] newrr = new PgenRangeRecord[2];
Geometry textgeo = pointsToGeometry(textBox.getExtent(), true, gf);
Geometry textgeo1 = pointsToGeometry(textBox.getExtentWithoutBuffer(),
true, gf);
// Geometry ccfpbox = pointsToGeometry(polygonBox.getExtent(), gf);
Geometry ccfpgeo = pointsToGeometry(polygonBox.getPoints(), true, gf);
GeometryCollection gc = buildGC(activeRanges, gf);
// Place the text in the centroid of the CCFP polygon.
newrr[0] = this.textBox;
newrr[1] = new PgenRangeRecord(); // no arrow needed.
if (checkCenter && textgeo1.within(ccfpgeo)) {
if (gc == null || (gc != null && !gc.intersects(textgeo1))) {
// newrr[0] = this.textBox;
// newrr[1] = new PgenRangeRecord(); // no arrow needed.
return newrr;
}
}
// Start from the center direction to find the first location.
double screenWidth = screenBox.getExtent().get(1).x
- screenBox.getExtent().get(0).x;
// remember the start location (center)
PgenRangeRecord startLoc = textBox.copy();
// angleIncrement = 5.0;
// distIncrement = 1.25;
double unit = screenWidth * distIncrement / 100;
// Find how many round of horizontal increments needed to reach the
// farest of the screen.
double maxDist = textBox.maxExtention(screenBox);
int nrounds = (int) (maxDist / unit) + 1;
// Find the number of trials in one round.
int numOfRotations = (int) (360 / angleIncrement + 0.05);
double radius = 0;
double ang, xdir, ydir;
boolean firstAvailable = false;
for (int jj = 0; jj < nrounds; jj++) {
radius = unit + jj * unit; // distance increment
for (int ii = 0; ii < numOfRotations; ii++) {
ang = Math.toRadians(START_ANGLE - ii * angleIncrement); // anti-clockwise
xdir = radius * Math.cos(ang);
ydir = radius * Math.sin(ang);
// Move box and make sure it is visible in screen.
PgenRangeRecord newBox = moveTextBox(startLoc, xdir, ydir);
PgenRangeRecord newArrow = new PgenRangeRecord(); // no arrow
// needed.;
if (!newBox.within(screenBox))
continue;
/*
* check if the box intersects the polygon and then check if it
* intersects all other geometries. Remember the first box that
* found outside of the polygon.
*/
textgeo = pointsToGeometry(newBox.getExtent(), true, gf);
boolean insideCcfp = textgeo.within(ccfpgeo);
if (insideCcfp || !textgeo.intersects(ccfpgeo)) {
// if ( !textgeo.intersects(ccfpgeo)) {
if (!insideCcfp) {
newArrow = findArrow(newBox, ccfpgeo, gc);
}
// Remember the first one.
if (!firstAvailable) {
newrr[0] = newBox.copy();
newrr[1] = newArrow.copy();
firstAvailable = true;
}
if (gc == null || (gc != null && !gc.intersects(textgeo))) {
/*
* to do - let's check if the arrow does not intersect
* with other geometries, except the CCFP polygon and
* the text box?
*/
if (!insideCcfp
&& (gc != null && gc.getNumGeometries() > 0)) {
Geometry arrowgeo = pointsToGeometry(
newArrow.getPoints(), false, gf);
boolean validArrow = true;
for (int kk = 0; kk < gc.getNumGeometries(); kk++) {
if (arrowgeo.intersects(gc.getGeometryN(kk))) {
validArrow = false;
break;
}
}
if (!validArrow) {
continue;
}
}
newrr[0] = newBox;
newrr[1] = newArrow;
return newrr;
}
}
}
}
return newrr;
}
/*
* Move the text box (range record) as specified.
*/
private PgenRangeRecord moveTextBox(PgenRangeRecord rr, double xinc,
double yinc) {
PgenRangeRecord newrr = rr.copy();
for (Coordinate pt : newrr.getExtent()) {
pt.x += xinc;
pt.y += yinc;
}
for (Coordinate pt : newrr.getPoints()) {
pt.x += xinc;
pt.y += yinc;
}
return newrr;
}
/*
* Put all geometries that need to be checked agaist into a
* GeometryCollection.
*/
private GeometryCollection buildGC(List<PgenRangeRecord> ranges,
GeometryFactory gf) {
GeometryCollection ngc = null;
List<Geometry> rangeGeos = new ArrayList<Geometry>();
for (PgenRangeRecord rr : ranges) {
if (rr.getPoints() != null && rr.getPoints().size() > 0) {
if (rr.getPoints().size() > 1) {
rangeGeos.add(pointsToGeometry(rr.getPoints(),
rr.isClosed(), gf));
} else {
Geometry ego = pointsToGeometry(rr.getExtent(), true, gf);
if (ego != null) {
rangeGeos
.add(pointsToGeometry(rr.getExtent(), true, gf));
}
}
}
}
if (rangeGeos.size() > 0) {
ngc = new GeometryCollection(
rangeGeos.toArray(new Geometry[rangeGeos.size()]), gf);
}
return ngc;
}
/*
* Find an arrow that will not intersect with a list of geometries.
*/
private PgenRangeRecord findArrow(PgenRangeRecord textBox,
Geometry polygonGeo, GeometryCollection gc) {
// First use arrow from text centroid to polygon centroid.
List<Coordinate> arrow = new ArrayList<Coordinate>();
Point polyCenter = polygonGeo.getCentroid();
Coordinate textCenter = textBox.getPoints().get(0);
arrow.add(textCenter);
arrow.add(new Coordinate(polyCenter.getX(), polyCenter.getY()));
// Now starts from the intersection point of the arrow with the text
Geometry arrowGeo = pointsToGeometry(arrow, false, gf);
Geometry textGeo = pointsToGeometry(textBox.getExtentWithoutBuffer(),
true, gf);
Geometry interPt = arrowGeo.intersection(textGeo);
arrow.remove(0);
if (interPt.getNumPoints() > 1) {
arrow.add(0, interPt.getCoordinates()[1]);
} else {
arrow.add(0, interPt.getCoordinates()[0]);
}
Geometry firstArrowGeo = pointsToGeometry(arrow, false, gf);
return new PgenRangeRecord(firstArrowGeo.getCoordinates(), false);
// if (gc == null
// || (gc != null && gc.getNumGeometries() > 0 && firstArrowGeo
// .intersects(gc))) {
// return new PgenRangeRecord(firstArrowGeo.getCoordinates());
// } else {
// return new PgenRangeRecord(firstArrowGeo.getCoordinates());
// }
}
}

View file

@ -37,7 +37,9 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
* 02/11 #405 J. Wu Added P_WORKING_DIR.
* 05/11 ? J. Wu Added P_COMP_COORD
* 08/11 #335 J. Wu Added P_BASE_DIR
* 04/29 #977 S. Gilbert PGEN Database support
* 04/12 #977 S. Gilbert PGEN Database support
* 11/13 TTR752 J. Wu Added P_AUTOPLACE_TEXT
* 12/13 TTR776 J. Wu Added P_LAYER_MERGE
*
* </pre>
*
@ -77,6 +79,13 @@ public class PgenPreferences extends FieldEditorPreferencePage implements
// public final static String CED_COMP_COORD = "ced/0;0;0|KS+";
public final static String STR_COMP_COORD = "str/90;-97;0|19.00;-119.00;47.00;-56.00";
// Preference to place text box automatically (CCFP);
public final static String P_AUTOPLACE_TEXT = "PGEN_AUTOPLACE_TEXT";
private BooleanFieldEditor autoPlaceText;
public final static String P_LAYER_MERGE = "P_LAYER_MERGE";
private BooleanFieldEditor layerLink;
public PgenPreferences() {
@ -132,6 +141,21 @@ public class PgenPreferences extends FieldEditorPreferencePage implements
getFieldEditorParent());
this.addField(projCombo);
autoPlaceText = new BooleanFieldEditor(P_AUTOPLACE_TEXT,
"&Text Auto Placement (where applicable)",
BooleanFieldEditor.DEFAULT, getFieldEditorParent());
this.addField(autoPlaceText);
ComboFieldEditor layerMerge = new ComboFieldEditor(P_LAYER_MERGE,
"&Default Action for PGEN Layer Merge:", new String[][] {
{ "Take no action", "0" },
{ "Add all as new layers", "2" },
{ "Replace all like name layers", "3" },
{ "Merge all like name layers", "4" },
{ "Merge all into active layer", "5" }, },
getFieldEditorParent());
this.addField(layerMerge);
}
/*
@ -170,7 +194,15 @@ public class PgenPreferences extends FieldEditorPreferencePage implements
}
}
} else if (event.getSource() instanceof ComboFieldEditor) {
String prefname = ((ComboFieldEditor) event.getSource())
.getPreferenceName();
if (prefname.equals(P_COMP_COORD)) {
GfaClip.getInstance().updateGfaBoundsInGrid();
} else if (prefname.equals(P_LAYER_MERGE)) {
String nvalue = event.getNewValue().toString();
Activator.getDefault().getPreferenceStore()
.setValue(prefname, Integer.parseInt(nvalue));
}
} else if (event.getSource() instanceof IntegerFieldEditor) {
IntegerFieldEditor iField = (IntegerFieldEditor) event.getSource();
if (iField.getPreferenceName().equals(P_AUTO_FREQ)) {

View file

@ -0,0 +1,323 @@
/*
* gov.noaa.nws.ncep.ui.pgen
*
* November 2013
*
* This code has been developed by the NCEP/SIB for use in the AWIPS2 system.
*/
package gov.noaa.nws.ncep.ui.pgen;
import java.util.ArrayList;
import java.util.List;
import com.vividsolutions.jts.geom.Coordinate;
/**
* Class used to hold the range record for a PGEN element.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 11/13 J. Wu Initial Creation.
*
* </pre>
*
* @author J. Wu
* @version 0.1
*/
public class PgenRangeRecord {
public static final double RANGE_OFFSET = 10;
private List<Coordinate> points;
private List<Coordinate> extent;
private boolean closed;
/**
* @param extent
* @param points
*/
public PgenRangeRecord() {
super();
this.extent = new ArrayList<Coordinate>();
this.points = new ArrayList<Coordinate>();
this.closed = false;
}
/**
* @param extent
* @param points
*/
public PgenRangeRecord(List<Coordinate> points, boolean closed) {
super();
this.points = new ArrayList<Coordinate>();
this.extent = new ArrayList<Coordinate>();
if (points != null && points.size() > 0) {
for (Coordinate cc : points) {
this.points.add(new Coordinate(cc.x, cc.y));
}
this.extent.addAll(buildRangeBox(this.points, RANGE_OFFSET));
}
this.closed = closed;
}
/**
* @param extent
* @param points
*/
public PgenRangeRecord(Coordinate[] points, boolean closed) {
super();
this.points = new ArrayList<Coordinate>();
this.extent = new ArrayList<Coordinate>();
if (points != null && points.length > 0) {
for (Coordinate cc : points) {
this.points.add(new Coordinate(cc.x, cc.y));
}
this.extent.addAll(buildRangeBox(this.points, RANGE_OFFSET));
}
this.closed = closed;
}
/**
* @param extent
* @param points
*/
public PgenRangeRecord(List<Coordinate> extent, List<Coordinate> points,
boolean closed) {
super();
this.extent = extent;
this.points = points;
this.closed = closed;
}
/**
* @return the extent
*/
public List<Coordinate> getExtent() {
return extent;
}
/**
* @return the extent
*/
public List<Coordinate> getExtentWithoutBuffer() {
List<Coordinate> rngBox = new ArrayList<Coordinate>();
rngBox.add(new Coordinate(this.extent.get(0).x + RANGE_OFFSET,
this.extent.get(0).y - PgenRangeRecord.RANGE_OFFSET));
rngBox.add(new Coordinate(this.extent.get(1).x - RANGE_OFFSET,
this.extent.get(1).y - RANGE_OFFSET));
rngBox.add(new Coordinate(this.extent.get(2).x - RANGE_OFFSET,
this.extent.get(2).y + RANGE_OFFSET));
rngBox.add(new Coordinate(this.extent.get(3).x + RANGE_OFFSET,
this.extent.get(3).y + RANGE_OFFSET));
return rngBox;
}
/**
* @param extent
* the extent to set
*/
public void setExtent(List<Coordinate> extent) {
this.extent = extent;
}
/**
* @param extent
* @param points
*/
public void setRange(List<Coordinate> extent, List<Coordinate> points,
boolean closed) {
this.extent = extent;
this.points = points;
this.closed = closed;
}
/**
* @return the points
*/
public List<Coordinate> getPoints() {
return points;
}
/**
* @param points
* the points to set
*/
public void setPoints(List<Coordinate> points) {
this.points = points;
}
/**
* @return the closed flag
*/
public boolean isClosed() {
return closed;
}
/**
* @param closed
* the closed to set
*/
public void setClosed(boolean closed) {
this.closed = closed;
}
/**
* @param points
* the points to set
*/
public void setPointsOnly(List<Coordinate> points, boolean closed) {
if (points != null) {
if (points != null && points.size() > 0) {
for (Coordinate cc : points) {
this.points.add(new Coordinate(cc.x, cc.y));
}
this.extent.addAll(buildRangeBox(this.points, RANGE_OFFSET));
}
}
this.closed = closed;
}
/**
* @param extent
* @param points
*/
public static List<Coordinate> buildRangeBox(List<Coordinate> points,
double buffer) {
List<Coordinate> rangeBox = new ArrayList<Coordinate>();
// Find the extent in x, y direction.
double max_x = points.get(0).x;
double max_y = points.get(0).y;
double min_x = points.get(0).x;
double min_y = points.get(0).y;
for (Coordinate pp : points) {
max_x = Math.max(max_x, pp.x);
min_x = Math.min(min_x, pp.x);
max_y = Math.max(max_y, pp.y);
min_y = Math.min(min_y, pp.y);
}
// Add buffer
max_x += buffer;
min_x -= buffer;
max_y += buffer;
min_y -= buffer;
// Build a rectangle (start from lower_left, go counter clockwise.
rangeBox.add(new Coordinate(min_x, max_y));
rangeBox.add(new Coordinate(max_x, max_y));
rangeBox.add(new Coordinate(max_x, min_y));
rangeBox.add(new Coordinate(min_x, min_y));
return rangeBox;
}
/**
* @return the max in x direction
*/
public double getMaxx() {
if (extent != null && extent.size() > 2) {
return Math.max(extent.get(0).x, extent.get(2).x);
} else {
return Double.NaN;
}
}
/**
* @return the min in x direction
*/
public double getMinx() {
if (extent != null && extent.size() > 2) {
return Math.min(extent.get(0).x, extent.get(2).x);
} else {
return Double.NaN;
}
}
/**
* @return the max in y direction
*/
public double getMaxy() {
if (extent != null && extent.size() > 2) {
return Math.max(extent.get(0).y, extent.get(2).y);
} else {
return Double.NaN;
}
}
/**
* @return the min in y direction
*/
public double getMiny() {
if (extent != null && extent.size() > 2) {
return Math.min(extent.get(0).y, extent.get(2).y);
} else {
return Double.NaN;
}
}
/**
* Check if this record is within another record.
*/
public boolean within(PgenRangeRecord rr) {
return (this.getMaxx() < rr.getMaxx() && this.getMinx() > rr.getMinx()
&& this.getMaxy() < rr.getMaxy() && this.getMiny() > rr
.getMiny());
}
/**
* Get the farest distance this record can placed within another record.
*/
public double maxExtention(PgenRangeRecord rr) {
double maxd = Double.MIN_VALUE;
for (int ii = 0; ii < extent.size(); ii++) {
maxd = Math.max(
maxd,
(extent.get(ii).x - rr.getExtent().get(ii).x)
* (extent.get(ii).x - rr.getExtent().get(ii).x)
+ (extent.get(ii).y - rr.getExtent().get(ii).y)
* (extent.get(ii).y - rr.getExtent().get(ii).y));
}
return Math.sqrt(maxd);
}
/**
* Deep copy
*/
public PgenRangeRecord copy() {
PgenRangeRecord newprr = new PgenRangeRecord();
if (this.points != null && this.points.size() > 0) {
for (Coordinate cc : this.points) {
newprr.getPoints().add(new Coordinate(cc.x, cc.y));
}
}
if (this.extent != null && this.extent.size() > 0) {
for (Coordinate cc : this.extent) {
newprr.getExtent().add(new Coordinate(cc.x, cc.y));
}
}
newprr.closed = closed;
return newprr;
}
}

View file

@ -8,9 +8,23 @@
package gov.noaa.nws.ncep.ui.pgen.attrdialog;
import java.util.ArrayList;
import java.awt.Color;
import gov.noaa.nws.ncep.ui.pgen.PgenUtil;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.VaaCloudDlg;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.VolcanoVaaAttrDlg;
import gov.noaa.nws.ncep.ui.pgen.display.IAttribute;
import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent;
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.Jet;
import gov.noaa.nws.ncep.ui.pgen.rsc.PgenResource;
import gov.noaa.nws.ncep.ui.pgen.sigmet.AbstractSigmet;
import gov.noaa.nws.ncep.ui.pgen.sigmet.Sigmet;
import java.awt.Color;
import java.util.ArrayList;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
@ -21,26 +35,14 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.viz.ui.editor.AbstractEditor;
import gov.noaa.nws.ncep.ui.pgen.PgenUtil;
import gov.noaa.nws.ncep.ui.pgen.rsc.PgenResource;
import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent;
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.display.IAttribute;
import gov.noaa.nws.ncep.ui.pgen.elements.Jet;
//import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor;
import gov.noaa.nws.ncep.ui.pgen.sigmet.*;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.*;
/**
* This class is the abstract class that all PGEN attribute dialogs
* extend from.
* This class is the abstract class that all PGEN attribute dialogs extend from.
*
* <pre>
* SOFTWARE HISTORY
@ -72,34 +74,41 @@ import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.*;
public abstract class AttrDlg extends Dialog implements IAttribute {
public static int ctrlBtnWidth = 70;
public static int ctrlBtnHeight = 28;
// public static int ctrlBtnWidth = 90;
// public static int ctrlBtnHeight = 30;
/**
* A handler to the current PGEN drawing layer, which is used to
* get the selected element.
* A handler to the current PGEN drawing layer, which is used to get the
* selected element.
*/
protected PgenResource drawingLayer = null;
/**
* A handler to the current map editor. The map editor is used to
* redraw the drawing layer when user click on 'OK'.
* A handler to the current map editor. The map editor is used to redraw the
* drawing layer when user click on 'OK'.
*/
// protected NCMapEditor mapEditor = null;
protected AbstractEditor mapEditor = null;
protected String pgenCategory = null;
protected String pgenType = null;
protected static final int CHK_WIDTH = 16;
protected static final int CHK_HEIGHT = 28;
protected static String mouseHandlerName = null;
protected static AbstractDrawableComponent de = null;
protected Point shellLocation;
/**
* AttrDlg constructor
*
* @param parShell
* @throws VizException
*/
@ -119,8 +128,10 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
this.getButton(IDialogConstants.CANCEL_ID).setEnabled(false);
this.getButton(IDialogConstants.OK_ID).setEnabled(false);
this.getButton(IDialogConstants.CANCEL_ID).setLayoutData( new GridData(ctrlBtnWidth,ctrlBtnHeight));
this.getButton(IDialogConstants.OK_ID).setLayoutData( new GridData(ctrlBtnWidth,ctrlBtnHeight));
this.getButton(IDialogConstants.CANCEL_ID).setLayoutData(
new GridData(ctrlBtnWidth, ctrlBtnHeight));
this.getButton(IDialogConstants.OK_ID).setLayoutData(
new GridData(ctrlBtnWidth, ctrlBtnHeight));
}
@ -138,6 +149,7 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
/*
* Called when "X" button on window is clicked.
*
* @see org.eclipse.jface.window.Window#handleShellCloseEvent()
*/
@Override
@ -152,6 +164,7 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
/**
* Sets the PGEN drawing layer
*
* @param dl
*/
public void setDrawingLayer(PgenResource dl) {
@ -162,6 +175,7 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
/**
* Sets the map editor
*
* @param me
*/
// public void setMapEditor( NCMapEditor me ){
@ -179,65 +193,73 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
* separated from those that can be multi-selected.
*/
DrawableElement de = drawingLayer.getSelectedDE();
if ( de != null &&
( de instanceof Jet.JetBarb ||
de instanceof Jet.JetHash ||
de instanceof Jet.JetText ||
de instanceof Jet.JetLine ) ){
if (de != null
&& (de instanceof Jet.JetBarb || de instanceof Jet.JetHash
|| de instanceof Jet.JetText || de instanceof Jet.JetLine)) {
DrawableElement newEl = (DrawableElement) de.copy();
// for jet barb, we need replace the whole jet for undo working
if (de instanceof Jet.JetBarb) {
DECollection wind = (DECollection) de.getParent();
if ( wind != null && wind.getCollectionName().equalsIgnoreCase("WindInfo")){
if (wind != null
&& wind.getCollectionName()
.equalsIgnoreCase("WindInfo")) {
DECollection parent = (DECollection) wind.getParent();
if( parent != null && parent.getCollectionName().equalsIgnoreCase("jet")){
if (parent != null
&& parent.getCollectionName().equalsIgnoreCase(
"jet")) {
Jet oldJet = (Jet) parent;
Jet newJet = oldJet.copy();
DECollection newWind = wind.copy();
newJet.replace(newJet.getNearestComponent(((Jet.JetBarb)de).getLocation()), newWind);
newJet.replace(newJet
.getNearestComponent(((Jet.JetBarb) de)
.getLocation()), newWind);
drawingLayer.replaceElement(oldJet, newJet);
newWind.replace(newWind.getNearestComponent(((Jet.JetBarb)de).getLocation()), newEl);
newWind.replace(newWind
.getNearestComponent(((Jet.JetBarb) de)
.getLocation()), newEl);
if (newEl instanceof Jet.JetBarb) {
newEl.update(this);
((Jet.JetBarb) newEl).setSpeed(((Jet.JetBarb)newEl).getSpeed());
JetAttrDlg.getInstance(this.getShell()).updateBarbTemplate( (Jet.JetBarb)newEl );
((Jet.JetBarb) newEl)
.setSpeed(((Jet.JetBarb) newEl).getSpeed());
JetAttrDlg.getInstance(this.getShell())
.updateBarbTemplate((Jet.JetBarb) newEl);
}
}
}
}
else {
} else {
newEl.update(this);
drawingLayer.replaceElement(de, newEl);
// reset the jet line attributes
if (de instanceof Jet.JetLine) {
AbstractDrawableComponent adc = AttrSettings.getInstance().getSettings().get( "JET" );
AbstractDrawableComponent adc = AttrSettings.getInstance()
.getSettings().get("JET");
if (adc instanceof Jet) {
((Jet) adc).getJetLine().update(this);
}
}
else if ( de instanceof Jet.JetHash ){
JetAttrDlg.getInstance(this.getShell()).updateHashTemplate((Jet.JetHash)newEl );
}
else if ( de instanceof Jet.JetText ){
JetAttrDlg.getInstance(this.getShell()).updateFlTemplate((Jet.JetText)newEl );
} else if (de instanceof Jet.JetHash) {
JetAttrDlg.getInstance(this.getShell()).updateHashTemplate(
(Jet.JetHash) newEl);
} else if (de instanceof Jet.JetText) {
JetAttrDlg.getInstance(this.getShell()).updateFlTemplate(
(Jet.JetText) newEl);
}
}
drawingLayer.removeSelected();
drawingLayer.setSelected(newEl);
}
else {
} else {
ArrayList<AbstractDrawableComponent> adcList = null;
ArrayList<AbstractDrawableComponent> newList = new ArrayList<AbstractDrawableComponent>();
// get the list of selected elements
if (drawingLayer != null) {
adcList = (ArrayList<AbstractDrawableComponent>) drawingLayer.getAllSelected();
adcList = (ArrayList<AbstractDrawableComponent>) drawingLayer
.getAllSelected();
}
if (adcList != null && !adcList.isEmpty()) {
@ -255,14 +277,14 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
// Update the new Element with these current attributes
newEl.update(this);
if ( adc instanceof DECollection && el.getParent() == adc ){
if (adc instanceof DECollection
&& el.getParent() == adc) {
// for collections
DECollection dec = (DECollection) adc.copy();
dec.remove(dec.getPrimaryDE());
dec.add(0, newEl);
newList.add(dec);
}
else {
} else {
newList.add(newEl);
}
}
@ -272,7 +294,8 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
AttrSettings.getInstance().setSettings(newEl);
}
ArrayList<AbstractDrawableComponent> oldList = new ArrayList<AbstractDrawableComponent>(adcList);
ArrayList<AbstractDrawableComponent> oldList = new ArrayList<AbstractDrawableComponent>(
adcList);
drawingLayer.replaceElements(null, oldList, newList);
}
@ -311,20 +334,28 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
this.create();
}
if (shellLocation == null) {
this.getShell().setLocation(this.getShell().getParent().getLocation());
this.getShell().setLocation(
this.getShell().getParent().getLocation());
} else {
getShell().setLocation(shellLocation);
}
final Shell shell = this.getShell();
// When the editor pane is being activated, the tool manager will re-activate all tools and thus
// the PGEN attribute dialog will re-open. However if the PGEN palette gets activated by a mouse
// click (or mouse over) before the attribute dialog is open, you will get an exception that
// activates PGEN palette in the middle of activating the editor. The reason why this happens is that
// the shell open() method forces the display to dispatch the click event on PGEN palette, which
// When the editor pane is being activated, the tool manager will
// re-activate all tools and thus
// the PGEN attribute dialog will re-open. However if the PGEN palette
// gets activated by a mouse
// click (or mouse over) before the attribute dialog is open, you will
// get an exception that
// activates PGEN palette in the middle of activating the editor. The
// reason why this happens is that
// the shell open() method forces the display to dispatch the click
// event on PGEN palette, which
// activates the PGEN palette.
// To prevent this happens, the super.open() method must be invoked after the editor has been activated.
// We put super.open() in the UI thread, which is the same thread the activation is running, so that
// To prevent this happens, the super.open() method must be invoked
// after the editor has been activated.
// We put super.open() in the UI thread, which is the same thread the
// activation is running, so that
// it is invoked after the activation. --bingfan 8/10/12
Display.getDefault().asyncExec(new Runnable() {
@Override
@ -332,7 +363,9 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
// while (Display.getDefault().readAndDispatch()) {
// wait for events to finish before continue
// }
if (!( shell == null || shell.isDisposed() )) { // make sure the dialog is not closed
if (!(shell == null || shell.isDisposed())) { // make sure the
// dialog is not
// closed
AttrDlg.super.open();
}
}
@ -363,8 +396,9 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
}
/**
* Sets the Pgen type, which will be used when creating an new
* element from the 'Place symbol' button
* Sets the Pgen type, which will be used when creating an new element from
* the 'Place symbol' button
*
* @param pgenType
*/
public void setPgenType(String pgenType) {
@ -374,8 +408,9 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
}
/**
* Sets the Pgen type, which will be used when creating an new
* element from the 'Place symbol' button
* Sets the Pgen type, which will be used when creating an new element from
* the 'Place symbol' button
*
* @param pgenType
*/
public void setPgenCategory(String pgenCategory) {
@ -383,6 +418,7 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
this.pgenCategory = pgenCategory;
}
/**
* Common interface for ISinglePoint and IMultiPoint.
*/
@ -425,7 +461,8 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
DrawableElement de = (DrawableElement) adc;
if ("INTL_SIGMET".equals(pgenType)) {
((SigmetAttrDlg) this).setSigmet(de);
((SigmetAttrDlg)this).copyEditableAttrToSigmetAttrDlg((Sigmet)de);
((SigmetAttrDlg) this)
.copyEditableAttrToSigmetAttrDlg((Sigmet) de);
} else if ("VOLC_SIGMET".equals(pgenType)) {
((VolcanoVaaAttrDlg) this).setVolcano(de);
} else if ("VACL_SIGMET".equals(pgenType)) {
@ -433,18 +470,18 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
} else if ("SIGMET".equalsIgnoreCase(pgenCategory)) {
if ("CCFP_SIGMET".equals(pgenType)) {
((gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.CcfpAttrDlg)this).setAbstractSigmet(de);
((gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.CcfpAttrDlg) this)
.setAbstractSigmet(de);
return;
}
((SigmetCommAttrDlg) this).setAbstractSigmet(de);
((SigmetCommAttrDlg)this).copyEditableAttrToSigmetAttrDlg((AbstractSigmet)de);
}
else {
((SigmetCommAttrDlg) this)
.copyEditableAttrToSigmetAttrDlg((AbstractSigmet) de);
} else {
AttrDlg.de = de;
}
}
else {
} else {
AttrDlg.de = adc;
}
}
@ -458,7 +495,8 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
*/
public void setDefaultAttr() {
AbstractDrawableComponent adc = AttrSettings.getInstance().getSettings().get( pgenType );
AbstractDrawableComponent adc = AttrSettings.getInstance()
.getSettings().get(pgenType);
if (adc != null) {
setAttr(adc);
}
@ -476,6 +514,7 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
/**
* check if it is in 'add line' mode (for labeled lines)
*
* @return
*/
public boolean isAddLineMode() {
@ -501,7 +540,8 @@ public abstract class AttrDlg extends Dialog implements IAttribute {
* marginWidth, horizontalSpacing, and verticalSpacing
*/
protected GridLayout getGridLayout(int numCol, boolean equal_width,
int marginHeight, int marginWidth, int horizontalSpacing, int verticalSpacing) {
int marginHeight, int marginWidth, int horizontalSpacing,
int verticalSpacing) {
GridLayout gl = new GridLayout(numCol, equal_width);
gl.marginHeight = marginHeight;

View file

@ -8,8 +8,9 @@
package gov.noaa.nws.ncep.ui.pgen.attrdialog;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.VaaCloudDlg;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.VolcanoVaaAttrDlg;
import gov.noaa.nws.ncep.ui.pgen.elements.Track;
import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.*;
import org.eclipse.swt.widgets.Shell;
@ -40,6 +41,7 @@ import org.eclipse.swt.widgets.Shell;
* 02/11 #318 S. Gilbert Added Distance Display Options Dialog
* 08/11 #? B. Yin Added Pgen Inc/Dec
* 06/12 #734 J. Zeng Add SPENES
* 11/13 #1065 J. Wu Added kink lines.
* </pre>
*
* @author B. Yin
@ -50,38 +52,45 @@ public class AttrDlgFactory {
/**
* Creates attribute dialog by invoking the getInstance() method.
*
* @param pgenCategory Category corresponding to the DE's pgenCategory specifying a
* @param pgenCategory
* Category corresponding to the DE's pgenCategory specifying a
* class in the Pgen Palette.
* @param parShell parent Shell
* @param parShell
* parent Shell
* @return
*/
public static AttrDlg createAttrDlg( String pgenCategory, String pgenType, Shell parShell ){
public static AttrDlg createAttrDlg(String pgenCategory, String pgenType,
Shell parShell) {
if (pgenCategory == null) {
return null;
}
if ((pgenCategory.equalsIgnoreCase("Lines")) ||
// (pgenCategory.equalsIgnoreCase("Front")) ||
((pgenType != null) && pgenType.equalsIgnoreCase("STATUS_LINE"))) {
if ((pgenCategory.equalsIgnoreCase("Lines"))
|| ((pgenType != null) && pgenType
.equalsIgnoreCase("STATUS_LINE"))) {
if ((pgenType != null)
&& (pgenType.equalsIgnoreCase("KINK_LINE_1") || pgenType
.equalsIgnoreCase("KINK_LINE_2"))) {
return KinkLineAttrDlg.getInstance(parShell);
} else {
return LineAttrDlg.getInstance(parShell);
}
else if (pgenCategory.equalsIgnoreCase("Front")) {
} else if (pgenCategory.equalsIgnoreCase("Front")) {
return FrontAttrDlg.getInstance(parShell);
}
else if ((pgenCategory.equalsIgnoreCase("Marker")) ||
(pgenCategory.equalsIgnoreCase("Symbol")) ||
(pgenCategory.equalsIgnoreCase("Combo")) ) {
else if ((pgenCategory.equalsIgnoreCase("Marker"))
|| (pgenCategory.equalsIgnoreCase("Symbol"))
|| (pgenCategory.equalsIgnoreCase("Combo"))) {
if (pgenType != null && (pgenType.equalsIgnoreCase("PRESENT_WX_201"))){
if (pgenType != null
&& (pgenType.equalsIgnoreCase("PRESENT_WX_201"))) {
return VolcanoAttrDlg.getInstance(parShell);
}
else {
} else {
AttrDlg symDlg = LabeledSymbolAttrDlg.getInstance(parShell);
symDlg.setPgenCategory(pgenCategory);
symDlg.setPgenType(pgenType);
@ -94,11 +103,10 @@ public class AttrDlgFactory {
if (pgenType != null && pgenType.equalsIgnoreCase("AVIATION_TEXT")) {
return AvnTextAttrDlg.getInstance(parShell);
}
else if ( pgenType != null && pgenType.equalsIgnoreCase("MID_LEVEL_CLOUD") ) {
} else if (pgenType != null
&& pgenType.equalsIgnoreCase("MID_LEVEL_CLOUD")) {
return MidLevelCloudAttrDlg.getInstance(parShell);
}
else {
} else {
return TextAttrDlg.getInstance(parShell);
}
@ -108,136 +116,124 @@ public class AttrDlgFactory {
return ArcAttrDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase(Track.TRACK_PGEN_CATEGORY) ) {
} else if (pgenCategory.equalsIgnoreCase(Track.TRACK_PGEN_CATEGORY)) {
return TrackAttrDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase(Track.TRACK_INFO_DLG_CATEGORY_NAME) ) {
} else if (pgenCategory
.equalsIgnoreCase(Track.TRACK_INFO_DLG_CATEGORY_NAME)) {
return TrackExtrapPointInfoDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase( "Vector" ) ) {
} else if (pgenCategory.equalsIgnoreCase("Vector")) {
return VectorAttrDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase( "Extrap" ) ) {
} else if (pgenCategory.equalsIgnoreCase("Extrap")) {
return PgenExtrapDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase( "Interp" ) ) {
} else if (pgenCategory.equalsIgnoreCase("Interp")) {
return PgenInterpDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase( "IncDec" ) ) {
} else if (pgenCategory.equalsIgnoreCase("IncDec")) {
return IncDecDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase( "Distance" ) ) {
} else if (pgenCategory.equalsIgnoreCase("Distance")) {
return PgenDistanceDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase( "From" ) ) {
} else if (pgenCategory.equalsIgnoreCase("From")) {
return FromAttrDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase( "Cycle" ) ) {
} else if (pgenCategory.equalsIgnoreCase("Cycle")) {
return CycleDlg.getInstance(parShell);
}
else if ( pgenCategory.equalsIgnoreCase( "Prod_AIRMET" ) ) {
} else if (pgenCategory.equalsIgnoreCase("Prod_AIRMET")) {
return GfaFormatAttrDlg.getInstance(parShell);
}
else if (pgenType != null && pgenType.equalsIgnoreCase("Jet")){
} else if (pgenType != null && pgenType.equalsIgnoreCase("Jet")) {
return JetAttrDlg.getInstance(parShell);
}
else if (pgenType != null && pgenType.equalsIgnoreCase("Outlook")){
} else if (pgenType != null && pgenType.equalsIgnoreCase("Outlook")) {
return OutlookAttrDlg.getInstance(parShell);
}
else if ( pgenType != null && pgenType.equalsIgnoreCase("TCA") ) {
} else if (pgenType != null && pgenType.equalsIgnoreCase("TCA")) {
return TcaAttrDlg.getInstance(parShell);
}
else if ( pgenType != null && pgenType.equalsIgnoreCase("WatchBox") ) {
} else if (pgenType != null && pgenType.equalsIgnoreCase("WatchBox")) {
return WatchBoxAttrDlg.getInstance(parShell);
}
else if ((pgenType != null) && pgenType.equalsIgnoreCase("SPENES")) {
} else if ((pgenType != null) && pgenType.equalsIgnoreCase("SPENES")) {
return SpenesAttrDlg.getInstance(parShell);
}
else if ( pgenType != null && pgenType.equalsIgnoreCase("TCM") ) {
} else if (pgenType != null && pgenType.equalsIgnoreCase("TCM")) {
return TcmAttrDlg.getInstance(parShell);
}
else if ( pgenType != null && pgenType.equalsIgnoreCase("Cloud") ) {
} else if (pgenType != null && pgenType.equalsIgnoreCase("Cloud")) {
return CloudAttrDlg.getInstance(parShell);
}
else if ( pgenType != null && pgenType.equalsIgnoreCase("Turbulence") ) {
} else if (pgenType != null && pgenType.equalsIgnoreCase("Turbulence")) {
return TurbAttrDlg.getInstance(parShell);
}
else if ( pgenType != null && pgenType.equalsIgnoreCase("Contours") ) {
} else if (pgenType != null && pgenType.equalsIgnoreCase("Contours")) {
return ContoursAttrDlg.getInstance(parShell);
}
else if(pgenCategory.equalsIgnoreCase("SIGMET") ){
} else if (pgenCategory.equalsIgnoreCase("SIGMET")) {
if (pgenType != null && pgenType.equalsIgnoreCase("INTL_SIGMET")) {
SigmetAttrDlg sigAttrDlg = SigmetAttrDlg.getInstance(parShell);
sigAttrDlg.setPgenCategory(pgenCategory);
sigAttrDlg.setPgenType(pgenType);
return sigAttrDlg;
}else if(pgenType != null && pgenType.equalsIgnoreCase("VOLC_SIGMET")){
VolcanoVaaAttrDlg vaaDlg = VolcanoVaaAttrDlg.getInstance(parShell);
} else if (pgenType != null
&& pgenType.equalsIgnoreCase("VOLC_SIGMET")) {
VolcanoVaaAttrDlg vaaDlg = VolcanoVaaAttrDlg
.getInstance(parShell);
vaaDlg.setPgenCategory(pgenCategory);
vaaDlg.setPgenType(pgenType);
vaaDlg.setFromSelection(true);
return vaaDlg;
}else if(pgenType != null && pgenType.equalsIgnoreCase("VACL_SIGMET")){
} else if (pgenType != null
&& pgenType.equalsIgnoreCase("VACL_SIGMET")) {
VaaCloudDlg vacDlg = VaaCloudDlg.getInstance(parShell);
vacDlg.setPgenCategory(pgenCategory);
vacDlg.setPgenType(pgenType);
return vacDlg;
}else if(pgenType != null && pgenType.equalsIgnoreCase("CCFP_SIGMET")){
gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.CcfpAttrDlg sigAttrDlg =
gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.CcfpAttrDlg.getInstance( parShell );
} else if (pgenType != null
&& pgenType.equalsIgnoreCase("CCFP_SIGMET")) {
gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.CcfpAttrDlg sigAttrDlg = gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.CcfpAttrDlg
.getInstance(parShell);
sigAttrDlg.setPgenCategory(pgenCategory);
sigAttrDlg.setPgenType(pgenType);
return sigAttrDlg;
}else {//(pgenType != null && pgenType.equalsIgnoreCase("CONV_SIGMET")) {
SigmetCommAttrDlg sigAttrDlg = SigmetCommAttrDlg.getInstance( parShell );
} else {// (pgenType != null &&
// pgenType.equalsIgnoreCase("CONV_SIGMET")) {
SigmetCommAttrDlg sigAttrDlg = SigmetCommAttrDlg
.getInstance(parShell);
sigAttrDlg.setPgenCategory(pgenCategory);
sigAttrDlg.setPgenType(pgenType);
return sigAttrDlg;
}
}
else if ("GFA".equalsIgnoreCase(pgenType)){
} else if ("GFA".equalsIgnoreCase(pgenType)) {
return GfaAttrDlg.getInstance(parShell);
}
else return null;
else
return null;
}

View file

@ -10,6 +10,12 @@ package gov.noaa.nws.ncep.ui.pgen.attrdialog;
import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider;
import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent;
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.Layer;
import gov.noaa.nws.ncep.ui.pgen.elements.Line;
import gov.noaa.nws.ncep.ui.pgen.elements.Outlook;
import gov.noaa.nws.ncep.ui.pgen.elements.Product;
import gov.noaa.nws.ncep.ui.pgen.elements.Text;
import gov.noaa.nws.ncep.ui.pgen.elements.Track;
import gov.noaa.nws.ncep.ui.pgen.file.FileTools;
@ -20,6 +26,7 @@ import gov.noaa.nws.ncep.ui.pgen.productmanage.ProductConfigureDialog;
import java.io.File;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.TimeZone;
@ -41,7 +48,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
* 08/11 ? B. Yin Put current time for Storm Track
* 11/11 ? B. Yin Load settings for different Activity Type.
* 09/12 B. Hebbard Merge changes by RTS OB12.9.1 (format only, this file)
*
* 10/13 TTR768 J. Wu Load/set default attributes for outlook labels (Text).
* </pre>
*
* @author J. Wu
@ -51,12 +58,19 @@ public class AttrSettings {
private static AttrSettings INSTANCE = null;
/**
* General Settings.
*/
private static HashMap<String, AbstractDrawableComponent> settings = null;
private static String settingsTblLocal = "." + File.separator;
public static String settingsFileName = "settings_tbl.xml";
/**
* Settings for outlook.
*/
public static String outlookSettingsFileName = "outlooksettings.xml";
private static HashMap<String, AbstractDrawableComponent> outlookLineSettings = null;
private static HashMap<String, AbstractDrawableComponent> outlookLabelSettings = null;
/**
* Private constructor
*
@ -66,6 +80,8 @@ public class AttrSettings {
super();
settings = new HashMap<String, AbstractDrawableComponent>();
loadSettingsTable();
loadOutlookSettings();
}
/**
@ -97,6 +113,20 @@ public class AttrSettings {
return settings;
}
/**
* Gets the default line settings for outlook loaded from the outlooksettings.xml.
*/
public HashMap<String, AbstractDrawableComponent> getOutlookLineSettings() {
return outlookLineSettings;
}
/**
* Gets the default label (text) settings for outlook loaded from the outlooksettings.xml.
*/
public HashMap<String, AbstractDrawableComponent> getOutlookLabelSettings() {
return outlookLabelSettings;
}
/**
* @param value
* the DrawableElement to set gilbert: noticed this wasn't being
@ -125,8 +155,7 @@ public class AttrSettings {
}
/**
* Load default settings from settings_tbl.xml First try to load from user's
* local directory; if not found, load the base directory.
* Load default settings from settings_tbl.xml from localization.
*/
private void loadSettingsTable() {
@ -144,6 +173,9 @@ public class AttrSettings {
loadPgenSettings( settingsFile.getAbsolutePath() );
}
/**
* Load default settings defined for an PGEN activity.
*/
public void loadProdSettings( String prodName ){
if ( prodName == null || prodName.isEmpty() ){
@ -171,6 +203,9 @@ public class AttrSettings {
}
}
/**
* Read in a settings file from the input file.
*/
public boolean loadPgenSettings( String fileName ){
boolean ret = false;
@ -233,4 +268,69 @@ public class AttrSettings {
return ret;
}
/**
* Load default settings from outlooksettings.xml
*
* Setting is a hash map with outlook type and label string as keys.
*/
private static void loadOutlookSettings() {
if ( outlookLineSettings == null ) {
outlookLineSettings = new HashMap<String, AbstractDrawableComponent>();
}
if ( outlookLabelSettings == null ) {
outlookLabelSettings = new HashMap<String, AbstractDrawableComponent>();
}
String settingFile = PgenStaticDataProvider.getProvider().getFileAbsolutePath(
PgenStaticDataProvider.getProvider().getPgenLocalizationRoot() + outlookSettingsFileName );
gov.noaa.nws.ncep.ui.pgen.file.Products products = FileTools.read( settingFile );
if ( products != null ){
List<Product> prds;
prds = ProductConverter.convert( products );
for ( Product p:prds ) {
for ( Layer layer:p.getLayers() ) {
Iterator<AbstractDrawableComponent> it = layer.getComponentIterator();
while( it.hasNext()){
AbstractDrawableComponent adc = it.next();
if ( adc.getName().equalsIgnoreCase("OUTLOOK")) {
Iterator<AbstractDrawableComponent> itLn = ((Outlook)adc).getComponentIterator();
while ( itLn.hasNext() ){
AbstractDrawableComponent lnGrp = itLn.next();
if ( lnGrp.getName().equalsIgnoreCase(Outlook.OUTLOOK_LABELED_LINE) ) {
String key = null;
Line ln = null;
Text txt = null;
Iterator<DrawableElement> itDe = ((DECollection)lnGrp).createDEIterator();
while( itDe.hasNext() ){
DrawableElement de = itDe.next();
if( de instanceof Text ){
txt = (Text)de;
key = ((Outlook)adc).getOutlookType() + txt.getText()[0];
}
else if ( de instanceof Line ){
ln = (Line) de;
}
}
if ( key != null && ln != null ){
outlookLineSettings.put( key, ln );
outlookLabelSettings.put( key, txt );
}
}
}
}
}
}
}
}
}
}

View file

@ -8,19 +8,18 @@
package gov.noaa.nws.ncep.ui.pgen.attrdialog;
import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider;
import gov.noaa.nws.ncep.ui.pgen.contours.IContours;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.TimeZone;
import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider;
import gov.noaa.nws.ncep.ui.pgen.contours.IContours;
import org.dom4j.Document;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@ -47,6 +46,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* ------------ ---------- ----------- --------------------------
* 10/09 #167 J. Wu Initial Creation.
* 07/11 #450 G. Hull NcPathManager
* 12/13 1084 J. Wu Add table-control for Cint in contoursInfo.xml
*
* </pre>
*
@ -63,24 +63,32 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
private Composite top = null;
private Combo parmCombo = null;
private Text parmTxt = null;
private Combo levelCombo1 = null;
private Text levelTxt1 = null;
private Combo levelCombo2 = null;
private Text levelTxt2 = null;
private Combo fcsthrCombo = null;
private Text fcsthrTxt = null;
private Text cintTxt = null;
private AttrDlg contoursAttrDlg = null;
private DateTime date1 = null;
private DateTime time1 = null;
private DateTime date2 = null;
private DateTime time2 = null;
private DateTime time1 = null;
private DateTime date2 = null;
private DateTime time2 = null;
/*
* Constructor
@ -95,8 +103,10 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
@Override
public void createButtonsForButtonBar(Composite parent) {
createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
true);
createButton(parent, IDialogConstants.CANCEL_ID,
IDialogConstants.CANCEL_LABEL, true);
}
@ -157,6 +167,7 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
parmCombo.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
updateComboText(parmCombo, parmTxt, parmCombo.getText());
updateCintText();
}
});
@ -181,6 +192,7 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
levelCombo1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
updateComboText(levelCombo1, levelTxt1, levelCombo1.getText());
updateCintText();
}
});
@ -266,6 +278,7 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
cintTxt.setLayoutData(new GridData(100, 15));
cintTxt.setEditable(true);
cintTxt.setText("");
updateCintText();
updateContourInfoSelection((IContours) contoursAttrDlg);
@ -409,7 +422,6 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
return contoursAttrDlg;
}
/**
* update the attributes of the associated ContoursAttrDlg.
*/
@ -417,14 +429,12 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
if (contoursAttrDlg instanceof ContoursAttrDlg) {
((ContoursAttrDlg) contoursAttrDlg).setAttributes(this);
}
else if ( contoursAttrDlg instanceof OutlookAttrDlg ) {
} else if (contoursAttrDlg instanceof OutlookAttrDlg) {
((OutlookAttrDlg) contoursAttrDlg).setAttributes(this);
}
}
/**
* update the attribute selections in this dialog.
*/
@ -467,14 +477,18 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
/**
* Read contours information document
*
* @return - contours info document
*/
public static final Document readInfoTbl() {
if (contoursInfoTbl == null) {
try {
String cntrInfoFile = PgenStaticDataProvider.getProvider().getFileAbsolutePath(
PgenStaticDataProvider.getProvider().getPgenLocalizationRoot() + "contoursInfo.xml" );
String cntrInfoFile = PgenStaticDataProvider.getProvider()
.getFileAbsolutePath(
PgenStaticDataProvider.getProvider()
.getPgenLocalizationRoot()
+ "contoursInfo.xml");
SAXReader reader = new SAXReader();
contoursInfoTbl = reader.read(cntrInfoFile);
@ -488,6 +502,7 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
/**
* Read contours information document
*
* @return - contours info document
*/
public static Document readInfoTbl1() {
@ -505,7 +520,9 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
/**
* Get inputs for Contours info - such as parm, level, forecaster hour
* @param type - name for the info
*
* @param type
* - name for the info
* @return
*/
private static List<String> getContourParms(String type) {
@ -526,7 +543,6 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
return lbls;
}
/**
* Updates the Combo/text to a selected item.
*/
@ -552,22 +568,82 @@ public class ContoursInfoDlg extends CaveJFACEDialog implements IContours {
index++;
}
if (found) {
cmb.select(index + 1);
if (sel.equalsIgnoreCase("Other")) {
txt.setText("");
txt.setEnabled(true);
}
else {
} else {
txt.setEnabled(false);
}
}
else {
} else {
cmb.select(cmb.getItemCount() - 1);
txt.setEnabled(true);
}
}
/**
* Get a list of cint values for different parms and/or levels.
*
* @param
* @return LinkedHashMap<String, String>
*/
public static LinkedHashMap<String, String> getCints() {
LinkedHashMap<String, String> cints = new LinkedHashMap<String, String>();
String xpath = ContoursInfoDlg.CNTRINFO_XPATH + "[@name='Cint']";
Document dm = ContoursInfoDlg.readInfoTbl();
if (dm != null) {
Node cntrInfo = dm.selectSingleNode(xpath);
List<Node> nodes = cntrInfo.selectNodes("cint");
for (Node node : nodes) {
String parm = node.valueOf("@parm");
String level = node.valueOf("@level");
String value = node.valueOf("@value");
String ckey = "";
if (parm != null && parm.trim().length() > 0) {
ckey += parm;
if (level != null && level.trim().length() > 0) {
ckey += "-" + level;
}
if (value != null && value.trim().length() > 0) {
cints.put(ckey, value);
}
}
}
}
return cints;
}
/**
* Updates the cint based on the selection of parm and/or level.
*
* First try to find a value for "parm-level"; if not, try to find a value
* for "parm".
*
*/
private void updateCintText() {
String parm = getParm();
String level = levelTxt1.getText();
String key = "";
if (parm != null && parm.trim().length() > 0) {
key += parm;
if (level != null && level.trim().length() > 0) {
key += "-" + level;
}
}
String cint = getCints().get(key);
if (cint != null && cint.trim().length() > 0) {
cintTxt.setText(cint);
}
}
}

Some files were not shown because too many files have changed in this diff Show more