diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java
index 473b5150ff..a36902dd6e 100644
--- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java
+++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java
@@ -444,18 +444,16 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements
if (null == CCCcode) {
wsfoIdTF.setText(textProd.getCccid());
} else {
- wsfoIdTF.setText(CCCcode);
+ if (textProd.getProdId().getWmoid().isEmpty()
+ && textProd.getProdId().getSite().isEmpty()) {
+ wsfoIdTF.setText(textProd.getCccid());
+ }
+ else
+ wsfoIdTF.setText(CCCcode);
}
} else {
wsfoIdTF.setText(textProd.getCccid());
}
-
- if(textProd.getProduct() != null) {
- if(textProd.getProduct().startsWith("ZCZC")) {
- wsfoIdTF.setText(textProd.getCccid());
- }
- }
-
prodCatTF.setText(textProd.getNnnid());
prodDesignatorTF.setText(textProd.getXxxid());
}
diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java
index 6908846f37..01ef20e0f5 100644
--- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java
+++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java
@@ -5748,17 +5748,14 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
int numberOfLinesOfHeaderText = 2;
int afosNnnLimit = 2; // first three characters is AFOS NNN
int afosXxxLimit = 5; // second three characters is AFOS XXX
+ String prodText = textEditor.getText();
+ if (!prodText.startsWith("ZCZC")) {
/*
* DR15610 - Make sure that if the first line of the text product is not
* a WMO heading it is treated as part of the text body.
*/
- String[] pieces = null;
- if(textEditor.getText().startsWith("ZCZC"))
- pieces = textEditor.getText().split("\r*\n", 1);
- else
- pieces = textEditor.getText().split("\r*\n", 2);
-
+ String[] pieces = textEditor.getText().split("\r*\n", 2);
if (pieces.length > 1) {
pieces[0] += "\n"; // WMOHeader expects this
}
@@ -5858,6 +5855,35 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
textEditor.setText("");
}
}
+ } else {
+ /**
+ * If the first word begins with "ZCZC", it is a two-line header at least,
+ * it is "ZCZC CCNNNXXX adr\r\r\nTTAA00 KCCC DDHHMM bbb\r\r\n"
+ */
+ int newLineIndex = prodText.indexOf("\n\n");
+ String first = prodText.substring(0, newLineIndex);
+
+ if (first.length() > 10 ) {
+ String rest = prodText.substring(newLineIndex+1);
+
+ headerTF.setText(first);
+ String cccnnnxxx = first.substring(5, 14);
+ setCurrentSiteId("");
+ setCurrentWmoId("");
+ setCurrentWsfoId(cccnnnxxx.substring(0, 3));
+ setCurrentProdCategory(cccnnnxxx.substring(3, 6));
+ setCurrentProdDesignator(cccnnnxxx.substring(6, 9));
+
+ try {
+ textEditor.setText(rest.trim());
+ textEditor.setEditable(true);
+ textEditor.setEditable(false);
+ } catch (IllegalArgumentException e) {
+ // There is no text product body, so set it to the empty string.
+ textEditor.setText("");
+ }
+ }
+ }
}
/**
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py
index 038c2178bf..f8844aac1a 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py
@@ -54,7 +54,8 @@
# 01/19/2015 #4014 dgilling Added ETSS.
# 02/24/2015 #16692 byin Added RTMA. Removed gfsLR and GWW233
# 03/19/2015 #4300 randerso Remove GUMa as it is obsolete (per Shannon White)
-
+# 03/30/2015 #17288 bhunder Added Guam-RTMA to D2D models
+# 03/31/2015 #17288 bhunder Added Weather Params for RTMA
########################################################################
#----------------------------------------------------------------------------
@@ -297,6 +298,10 @@ else:
WSpdUnc = ("WSpdUnc", SCALAR, "kts", "WSpd Anl Uncertainty", 12.0, 0.0, 0, NO)
WDirUnc = ("WDirUnc", SCALAR, "deg", "WDir Anl Uncertainty", 10.0, 0.0, 0, NO)
VisUnc = ("VisUnc", SCALAR, "SM", "Vsby Anl Uncertainty", 10.0, 0.0, 2, NO)
+# DCS 17288
+PressUnc = ("PressUnc", SCALAR, "Pa", "Press Anl Uncertainty", 110000.0, 0.0, 2, NO)
+Pressure = ("Pressure", SCALAR, "Pa", "Pressure", 110000.0, 0.0, 2, NO)
+WGustUnc = ("WGustUnc", SCALAR, "kts", "WGust Anl Uncertainty", 12.0, 0.0, 0, NO)
# NamDNG5 parms
QPF3 = ("QPF3", SCALAR, "in", "3HR QPF", 3.0, 0.0, 2, YES)
@@ -1245,6 +1250,8 @@ elif SID == "GUM":
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
('GFS20-PAC', 'GFS20'),
+ # DCS #17288
+ ('Guam-RTMA', 'RTMA'),
]
#CONUS sites
@@ -2037,16 +2044,17 @@ TPCTCM_MODEL = [([HiWind], TC3)]
# RTMA database parameter groupings
#if SID in ALASKA_SITES: - not sure if this is right
+# DCS17288
if SID in ALASKA_SITES or SID in ["HFO", "SJU"]:
- RTMAPARMS = [([Temp,Td,RH,Wind,Vis],TC1),
+ RTMAPARMS = [([Temp,Td,RH,Wind,Vis,Pressure,WindGust],TC1),
([MinT],MinTTC), ([MaxT],MaxTTC),
([MinRH],MinRHTC), ([MaxRH],MaxRHTC),
- ([TUnc,TdUnc,WSpdUnc,WDirUnc,VisUnc],TC1)]
+ ([TUnc,TdUnc,WSpdUnc,WDirUnc,VisUnc,PressUnc,WGustUnc],TC1)]
else:
- RTMAPARMS = [([Temp,Td,RH,Wind,QPE,Sky,Vis],TC1),
+ RTMAPARMS = [([Temp,Td,RH,Wind,QPE,Sky,Vis,Pressure,WindGust],TC1),
([MinT],MinTTC), ([MaxT],MaxTTC),
([MinRH],MinRHTC), ([MaxRH],MaxRHTC),
- ([TUnc,TdUnc,WSpdUnc,WDirUnc,VisUnc],TC1)]
+ ([TUnc,TdUnc,WSpdUnc,WDirUnc,VisUnc,PressUnc,WGustUnc],TC1)]
# NamDNG5 database parameter groupings
NamDNG5PARMS = [([Temp, Td, RH, Wind, Sky, WindGust, Vis], TC3),
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/HIrtmaNDFD.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/HIrtmaNDFD.xml
index 0d704cb1cc..623a64316a 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/HIrtmaNDFD.xml
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/HIrtmaNDFD.xml
@@ -172,4 +172,109 @@
FHAG2
-
+
+ p
+ pressure
+ Pa
+ pascal
+ atmP
+ 0.0
+ 110000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ perranl
+ pressure uncertainty
+ Pa
+ pascal
+ atmPerranlind
+ 0.0
+ 110000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ vis
+ visibility
+ m
+ meters
+ Vis
+ 0.0
+ 100000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ viserranl
+ visibility uncertainty
+ m
+ meters
+ Viserranlind
+ 0.0
+ 100000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ tcc
+ Total Cloud Covery
+ %
+ percent
+ toalCldCvr
+ 0.0
+ 100.0
+ -99999.0
+ 0
+ EA
+
+ EA
+
+
+
+ wgs
+ Wind Gust Speed
+ m/s
+ meter/sec
+ windGustspeed
+ -150.0
+ 150.0
+ -99999.0
+ 1
+ FHAG 10
+
+ FHAG10
+
+
+
+ wgserranl
+ wind speed uncertainty
+ m/s
+ meter/sec
+ WGSerranlind
+ -150.0
+ 150.0
+ -99999.0
+ 1
+ FHAG 10
+
+ FHAG10
+
+
+
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/PRrtmaNDFD.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/PRrtmaNDFD.xml
index 0d704cb1cc..67936a2857 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/PRrtmaNDFD.xml
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/PRrtmaNDFD.xml
@@ -172,4 +172,110 @@
FHAG2
+
+ p
+ pressure
+ Pa
+ pascal
+ atmP
+ 0.0
+ 110000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ perranl
+ pressure uncertainty
+ Pa
+ pascal
+ atmPerranlind
+ 0.0
+ 110000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ wgs
+ Wind Gust Speed
+ m/s
+ meter/sec
+ windGustSpeed
+ -150.0
+ 150.0
+ -99999.0
+ 1
+ FHAG 10
+
+ FHAG10
+
+
+
+ wgserranl
+ wind speed uncertainty
+ m/s
+ meter/sec
+ WGSerranlind
+ -150.0
+ 150.0
+ -99999.0
+ 1
+ FHAG 10
+
+ FHAG10
+
+
+
+ vis
+ visibility
+ m
+ meters
+ Vis
+ 0.0
+ 100000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ viserranl
+ visibility uncertainty
+ m
+ meters
+ Viserranlind
+ 0.0
+ 100000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ tcc
+ Total Cloud Cover
+ %
+ percent
+ totalCloudCover
+ 0.0
+ 100.0
+ -99999.0
+ 0
+ EA
+
+ EA
+
+
+
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/aKrtmaNDFD.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/aKrtmaNDFD.xml
index fd22bf5431..9358675441 100755
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/aKrtmaNDFD.xml
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/aKrtmaNDFD.xml
@@ -201,5 +201,80 @@
SFC
+
+
+ tcc
+ Total Cloud Cover
+ %
+ percent
+ totalCloudCover
+ 0.0
+ 100.0
+ -99999.0
+ 0
+ EA
+
+ EA
+
-
+
+ wgs
+ Wind Gust Speed
+ m/s
+ meter/sec
+ windGustSpeed
+ -150.0
+ 150.0
+ -99999.0
+ 1
+ FHAG 10
+
+ FHAG10
+
+
+
+ wgserranl
+ wind speed uncertainty
+ m/s
+ meter/sec
+ WGSerranlind
+ -150.0
+ 150.0
+ -99999.0
+ 1
+ FHAG 10
+
+ FHAG10
+
+
+
+ p
+ pressure
+ mPa
+ pascal
+ atmP
+ 0.0
+ 110000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
+ perranl
+ pressure uncertainty
+ Pa
+ pascal
+ atmPerranlind
+ 0.0
+ 110000.0
+ -99999.0
+ 1
+ SFC
+
+ SFC
+
+
+
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/urmaNDFD.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/urmaNDFD.xml
index d67b099eac..eb0e83beb8 100755
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/urmaNDFD.xml
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/urmaNDFD.xml
@@ -278,4 +278,49 @@
1
-
+
+ p
+ pressure
+ Pa
+ pascal
+ atmP
+ 0.0
+ 110000.0
+ -99999.0
+ SFC
+
+ SFC
+
+ 1
+
+
+ viserranl
+ visibility uncertainty
+ m
+ meters
+ Viserranlind
+ 0.0
+ 100000.0
+ -99999.0
+ SFC
+
+ SFC
+
+ 1
+
+
+ perranl
+ pressure uncertainty
+ Pa
+ pascal
+ atmPerranlind
+ 0.0
+ 110000.0
+ -99999.0
+ SFC
+
+ SFC
+
+ 1
+
+
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/RTMA.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/RTMA.py
index ca55afcf6a..f709309b83 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/RTMA.py
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/RTMA.py
@@ -35,6 +35,10 @@ class RTMAForecaster(Forecaster):
direc=wind_FHAG10[1]
newmag=self.convertMsecToKts(mag)
return (newmag,direc)
+
+ def calcWindGust(self, wgs_FHAG10):
+ newmag=self.convertMsecToKts(wgs_FHAG10)
+ return newmag
##--------------------------------------------------------------------------
## QPE - change mm to inches and clip greater than 1000mm
##--------------------------------------------------------------------------
@@ -104,6 +108,11 @@ class RTMAForecaster(Forecaster):
def calcTdUnc(self,dpterranl_FHAG2):
return dpterranl_FHAG2 * 1.8
##--------------------------------------------------------------------------
+## Pressure Analysis Uncertainty
+##--------------------------------------------------------------------------
+ def calcPressUnc(self, perranl_SFC):
+ return perranl_SFC
+##--------------------------------------------------------------------------
## Wind Analysis Uncertainty - change m/s to kts
##--------------------------------------------------------------------------
def calcWSpdUnc(self, wserranl_FHAG10):
@@ -113,7 +122,9 @@ class RTMAForecaster(Forecaster):
def calcWDirUnc(self, wderranl_FHAG10):
return wderranl_FHAG10
-
+
+ def calcWGustUnc(self, wgserranl_FHAG10):
+ return wgserranl_FHAG10
##--------------------------------------------------------------------------
## Visibility
##--------------------------------------------------------------------------
@@ -122,7 +133,12 @@ class RTMAForecaster(Forecaster):
def calcVisUnc(self, viserranl_SFC):
return self.convertMtoSM(viserranl_SFC)
-
+
+##--------------------------------------------------------------------------
+## Surface Pressure
+##--------------------------------------------------------------------------
+ def calcPressure(self, p_SFC):
+ return p_SFC
##-------------------------------------------------------------------------
## TdAft and TdMrn - simply calculate from MaxT/MinRH and MinT/MaxRH
##-------------------------------------------------------------------------
diff --git a/edexOsgi/com.raytheon.messaging.mhs/src/com/raytheon/messaging/mhs/MhsMessage.java b/edexOsgi/com.raytheon.messaging.mhs/src/com/raytheon/messaging/mhs/MhsMessage.java
index 0a12d6ab4e..de8fc1ffed 100644
--- a/edexOsgi/com.raytheon.messaging.mhs/src/com/raytheon/messaging/mhs/MhsMessage.java
+++ b/edexOsgi/com.raytheon.messaging.mhs/src/com/raytheon/messaging/mhs/MhsMessage.java
@@ -188,16 +188,10 @@ public class MhsMessage {
private String validTimeString;
/**
- * Absolute time that the sender will wait for an acknowledgment before
- * reporting a delivery error. This parameter is optional.
+ * Relative amount of time that the sender will wait for an acknowledgment
+ * before reporting a delivery error. This parameter is optional.
*/
- private Date timeoutTime;
-
- /**
- * Timeout time parameter formatted as a string (mm/dd/yyyy:HHMM). This
- * value is derived from {@link #timeoutTime} during message submission.
- */
- private String timeoutTimeString;
+ private long timeoutTime; // DR-17251 - changed from Date to long
/**
* Mailbox user name. This is used for switching messaging gateways and
@@ -272,14 +266,14 @@ public class MhsMessage {
String traceString = System.getenv(EnvMhsTrace);
showTrace = (traceString != null)
- && ((traceString.equalsIgnoreCase("yes")
- || traceString.equalsIgnoreCase("true")));
+ && ((traceString.equalsIgnoreCase("yes") || traceString
+ .equalsIgnoreCase("true")));
actionCode = code;
setRetryCount(0);
addressees = new AddresseeList();
enclosures = new EnclosureList();
- timeoutTime = null;
+ timeoutTime = 0; // DR-17251 - Changed from null to 0
validTime = null;
bodyFile = "";
productId = "";
@@ -722,8 +716,7 @@ public class MhsMessage {
* @see #addAckAddressee(String)
*/
public void setTimeoutTime(long timeoutSeconds) {
- this.timeoutTime = new Date(System.currentTimeMillis() + timeoutSeconds
- * 1000);
+ this.timeoutTime = timeoutSeconds; // DR-17251
}
/**
@@ -738,7 +731,8 @@ public class MhsMessage {
* @see #addAckAddressee(String)
*/
public void setTimeoutTime(Date timeoutTime) {
- this.timeoutTime = timeoutTime;
+
+ this.timeoutTime = (timeoutTime.getTime() - (new Date().getTime())) / 1000; // DR-17251
}
/**
@@ -750,7 +744,11 @@ public class MhsMessage {
* {@link #MaxTimeoutSeconds} in the future.
*/
public Date getTimeoutTime() {
- return timeoutTime;
+ if (this.timeoutTime == 0) { // DR-17251
+ return null;
+ } else {
+ return new Date((this.timeoutTime * 1000) + (new Date().getTime())); // DR-17251
+ }
}
/**
@@ -956,11 +954,11 @@ public class MhsMessage {
private boolean isTimeoutTimeValid() {
boolean status = true;
- if (timeoutTime != null) {
- if (timeoutTime.before(new Date())) {
+ if (timeoutTime != 0) { // DR-17251
+ if (timeoutTime < 0) { // DR-17251
status = false;
resultText = "Time out time must be in the future";
- } else if ((timeoutTime.getTime() - (new Date().getTime())) > (MaxTimeoutSeconds * 1000)) {
+ } else if (timeoutTime > MaxTimeoutSeconds) { // DR-17251
status = false;
resultText = "Time out time must be within "
+ MaxTimeoutSeconds + " seconds of now";
@@ -969,8 +967,7 @@ public class MhsMessage {
return status;
}
- private static boolean checkVars(String envdir, String envfrag,
- boolean fatal) {
+ private static boolean checkVars(String envdir, String envfrag, boolean fatal) {
String filename;
File dwbFile;
final String TEMPLATE = "/env.";
@@ -1083,17 +1080,14 @@ public class MhsMessage {
} else {
validTimeString = "";
}
- if (timeoutTime != null) {
- timeoutTimeString = dateFormat.format(timeoutTime);
- } else {
- timeoutTimeString = "";
- }
SimpleDateFormat timeStampFormat = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss.SSS");
String timeStamp = timeStampFormat.format(System.currentTimeMillis());
System.out.println(timeStamp + ": Message submitted");
+ // Submit the message by constructing a command line and
+ // execing a new msg_send process
LinkedList command = new LinkedList();
command.add("msg_send");
@@ -1144,8 +1138,8 @@ public class MhsMessage {
command.add("-e" + encList);
}
- if (!timeoutTimeString.isEmpty()) {
- command.add("-T" + timeoutTimeString);
+ if (timeoutTime > 0) {
+ command.add("-T +" + timeoutTime); // DR-17251 - use relative time instead of absolute
}
if (!validTimeString.isEmpty()) {
@@ -1210,8 +1204,9 @@ public class MhsMessage {
}
if (showTrace) {
- System.out.println("Message successfully submitted. Message ID: "
- + messageId);
+ System.out
+ .println("Message successfully submitted. Message ID: "
+ + messageId);
}
} catch (Throwable t) {
resultText = t.getMessage();