VLab Issue #4001 - NCEP EDEX and EDEX Common delivery for 14.2.1-n

GRIB config, TCM fix, and PWAT calculation for soundings

Change-Id: Ic46db6f57da1446de27693ef3d00c664af6a7431

Former-commit-id: a41d42c217 [formerly dc8043bf03] [formerly 327f39109e] [formerly a41d42c217 [formerly dc8043bf03] [formerly 327f39109e] [formerly af9384d8d7 [formerly 327f39109e [formerly 598d22b0c943c5de9fc9ab3a56cde717c374fdfe]]]]
Former-commit-id: af9384d8d7
Former-commit-id: dcfc2f649b [formerly 432f0ec253] [formerly 90bf6ddbcd96bff524c624f34d0685bbf34855c0 [formerly de62c1fa88]]
Former-commit-id: 94cf2ab391710d45c21303c93b5018e778fd49c5 [formerly 24cdac509b]
Former-commit-id: 50b88872b9
This commit is contained in:
Stephen Gilbert 2014-08-11 15:47:57 -04:00
parent e17180407b
commit 883c071717
10 changed files with 1116 additions and 773 deletions

View file

@ -0,0 +1,37 @@
<?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.
-->
<lambertConformalGridCoverage>
<name>17991059001</name>
<description>3 km LCC limited domain CONUS grid (used by HRRR)</description>
<la1>21.138</la1>
<lo1>-122.72</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>1799</nx>
<ny>1059</ny>
<dx>3.0</dx>
<dy>3.0</dy>
<spacingUnit>km</spacingUnit>
<minorAxis>6371229.0</minorAxis>
<majorAxis>6371229.0</majorAxis>
<lov>-97.5</lov>
<latin1>38.5</latin1>
<latin2>38.5</latin2>
</lambertConformalGridCoverage>

View file

@ -1094,6 +1094,16 @@
</process>
</model>
<model>
<name>hrrr</name>
<center>7</center>
<subcenter>0</subcenter>
<grid>17991059001</grid>
<process>
<id>83</id>
</process>
</model>
<model>
<name>RTMA</name>
<center>7</center>

View file

@ -211,6 +211,7 @@
<alias base="MCDC">CLDM</alias>
<alias base="MIXR">MIXR</alias>
<alias base="MMSP">MMSL</alias>
<alias base="MN2T66hr">TKMN06</alias>
<alias base="MnT">TMNK</alias>
<alias base="MnT1hr">TMNK01</alias>
<alias base="MnT3hr">TMNK03</alias>
@ -220,6 +221,7 @@
<alias base="MnT18hr">TMNK18</alias>
<alias base="MnT24hr">TMNK24</alias>
<alias base="MnT48hr">TMNK48</alias>
<alias base="MX2T66hr">TKMX06</alias>
<alias base="MxT">TMXK</alias>
<alias base="MxT1hr">TMXK01</alias>
<alias base="MxT3hr">TMXK03</alias>
@ -303,6 +305,7 @@
<alias base="TCC18hr">TCLD18</alias>
<alias base="TCC24hr">TCLD24</alias>
<alias base="TCC48hr">TCLD48</alias>
<alias base="TCWAT">TCWTR</alias>
<alias base="ThP">TSTM</alias>
<alias base="TOZNE">TOZO</alias>
<alias base="TP">APCP</alias>

View file

@ -23,6 +23,7 @@ import java.util.Map;
* ----------- ---------- ---------- --------------------------
* 05/14/2013 #989 qzhou Initial Creation
* 06/23/2014 R4152 qzhou Touched up 3 functions
* 07/22/2014 R4152 qzhou Fixed getMedian. This func. is uesd very rare if ever
* </pre>
*
* @author qzhou
@ -534,11 +535,10 @@ public class CalcUtil {
// remove missing data
List<Float> newArray = new ArrayList<Float>();
for (int k = 0; k < arraySort.length - 1; k++)
for (int k = 0; k < arraySort.length; k++) {
if (arraySort[k] != MISSING_VAL)
newArray.add(arraySort[k]);
else
break; // to sorted arraySort
}
int size = newArray.size();
if (size % 2 == 0)

View file

@ -1,4 +1,5 @@
package gov.noaa.nws.ncep.edex.common.sounding;
/**
*
* gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile
@ -18,13 +19,13 @@ package gov.noaa.nws.ncep.edex.common.sounding;
* 09/14/2011 457 S. Gurung Renamed ObsSndType.H5UAIR to ObsSndType.NCUAIR
*10/06/2011 465 Archana Added a list of NcSoundingLayer2 objects to the sounding profile
* 02/15/2012 Chin Chen added fcsTime to support pfc sounding query
* 07/23/2014 Chin Chen Support PW
* </pre>
*
* @author Chin Chen
* @version 1.0
*/
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@ -35,220 +36,226 @@ import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class NcSoundingProfile implements ISerializableObject{
/**
public class NcSoundingProfile implements ISerializableObject {
/**
*
*/
private static final long serialVersionUID = 6858474095965608817L;
private static final long serialVersionUID = 6858474095965608817L;
@DynamicSerializeElement
@DynamicSerializeElement
public static final float MISSING = -9999.f;
public static enum PfcSndType {
public static enum PfcSndType {
NAMSND, GFSSND, RUC2SND, RUCPTYPSND, BROWSE, NONE
};
public static enum MdlSndType {
ANY, NONE
ANY, NONE
};
public static enum ObsSndType {
NCUAIR, UAIR, DROP, TAMDAR, BUFRUA //same as uair but using bufrua decoder and data is saved in HDF5
,BROWSE, NONE
public static enum ObsSndType {
NCUAIR, UAIR, DROP, TAMDAR, BUFRUA // same as uair but using bufrua
// decoder and data is saved in HDF5
, BROWSE, NONE
};
//Important Note:
//Chin: definition is based on UAIR record. stnid is string of character, stnnum is string of number
//BUFRUA has different definition. stnid is string of number which is stnnum in UAIR,
//and stnname is string of character which is stnid in UAIR..
//type conversion is done at BUFRUA code.
// Important Note:
// Chin: definition is based on UAIR record. stnid is string of character,
// stnnum is string of number
// BUFRUA has different definition. stnid is string of number which is
// stnnum in UAIR,
// and stnname is string of character which is stnid in UAIR..
// type conversion is done at BUFRUA code.
public static enum SndQueryKeyType {
LATLON, STNID, STNNUM, NONE
LATLON, STNID, STNNUM, NONE
};
@DynamicSerializeElement
private List<NcSoundingLayer> soundingLyLst;
@DynamicSerializeElement
private List<NcSoundingLayer2> soundingLyLst2;
@DynamicSerializeElement
@DynamicSerializeElement
private float stationElevation;
//@DynamicSerializeElement
//private String stationId;
// @DynamicSerializeElement
// private String stationId;
@DynamicSerializeElement
private double stationLatitude;
private double stationLatitude;
@DynamicSerializeElement
private double stationLongitude;
private double stationLongitude;
@DynamicSerializeElement
private float sfcPress;
@DynamicSerializeElement
private String stationId;
@DynamicSerializeElement
private int stationNum;
@DynamicSerializeElement
private long fcsTime;
@DynamicSerializeElement
private NcSoundingCube.QueryStatus rtnStatus = NcSoundingCube.QueryStatus.OK;
public NcSoundingCube.QueryStatus getRtnStatus() {
return rtnStatus;
}
// Support PW
@DynamicSerializeElement
private float pw = -1;
public void setRtnStatus(NcSoundingCube.QueryStatus rtnStatus) {
this.rtnStatus = rtnStatus;
}
public NcSoundingCube.QueryStatus getRtnStatus() {
return rtnStatus;
}
public String getStationId() {
return stationId;
}
public void setRtnStatus(NcSoundingCube.QueryStatus rtnStatus) {
this.rtnStatus = rtnStatus;
}
public void setStationId(String stnId) {
this.stationId = stnId;
}
public String getStationId() {
return stationId;
}
public int getStationNum() {
return stationNum;
}
public void setStationId(String stnId) {
this.stationId = stnId;
}
public void setStationNum(int stnNum) {
this.stationNum = stnNum;
}
public int getStationNum() {
return stationNum;
}
public long getFcsTime() {
return fcsTime;
}
public void setStationNum(int stnNum) {
this.stationNum = stnNum;
}
public void setFcsTime(long fcsTime) {
this.fcsTime = fcsTime;
}
public long getFcsTime() {
return fcsTime;
}
public List<NcSoundingLayer> getSoundingLyLst() {
return soundingLyLst;
}
public void setFcsTime(long fcsTime) {
this.fcsTime = fcsTime;
}
public void setSoundingLyLst(List<NcSoundingLayer> soundingLyLst) {
this.soundingLyLst = soundingLyLst;
}
public List<NcSoundingLayer> getSoundingLyLst() {
return soundingLyLst;
}
public void setSoundingLyLst(List<NcSoundingLayer> soundingLyLst) {
this.soundingLyLst = soundingLyLst;
}
/**
* @return the soundingLyLst2
*/
public List<NcSoundingLayer2> getSoundingLyLst2() {
return soundingLyLst2;
}
* @return the soundingLyLst2
*/
public List<NcSoundingLayer2> getSoundingLyLst2() {
return soundingLyLst2;
}
/**
* @param soundingLyLst2 the soundingLyLst2 to set
*/
public void setSoundingLyLst2(List<NcSoundingLayer2> soundingLyLst2) {
this.soundingLyLst2 = soundingLyLst2;
}
public float getStationElevation() {
return stationElevation;
}
/**
* @param soundingLyLst2
* the soundingLyLst2 to set
*/
public void setSoundingLyLst2(List<NcSoundingLayer2> soundingLyLst2) {
this.soundingLyLst2 = soundingLyLst2;
}
public void setStationElevation(float stationElevation) {
this.stationElevation = stationElevation;
}
public float getStationElevation() {
return stationElevation;
}
public void setStationElevation(float stationElevation) {
this.stationElevation = stationElevation;
}
public double getStationLatitude() {
return stationLatitude;
}
public double getStationLatitude() {
return stationLatitude;
}
public void setStationLatitude(double stationLatitude) {
this.stationLatitude = stationLatitude;
}
public void setStationLatitude(double stationLatitude) {
this.stationLatitude = stationLatitude;
}
public double getStationLongitude() {
return stationLongitude;
}
public double getStationLongitude() {
return stationLongitude;
}
public void setStationLongitude(double stationLongitude) {
this.stationLongitude = stationLongitude;
}
public void setStationLongitude(double stationLongitude) {
this.stationLongitude = stationLongitude;
}
public float getSfcPress() {
return sfcPress;
}
public float getSfcPress() {
return sfcPress;
}
public void setSfcPress(float sfcPress) {
this.sfcPress = sfcPress;
}
public void setSfcPress(float sfcPress) {
this.sfcPress = sfcPress;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
// TO-DO: Add station number (stationNumber)
public NcSoundingProfile(List<NcSoundingLayer2> soundingLyLst2,
List<NcSoundingLayer> soundingLyLst,
float stationElevation, String stationId, float stationLatitude,
float stationLongitude, float sfcPress, int stnNum) {
super();
this.soundingLyLst2 = soundingLyLst2;
this.soundingLyLst = soundingLyLst;
this.stationElevation = stationElevation;
this.stationId = stationId;
this.stationLatitude = stationLatitude;
this.stationLongitude = stationLongitude;
this.sfcPress = sfcPress;
this.stationNum = stnNum;
}
// TO-DO: Add station number (stationNumber)
public NcSoundingProfile(List<NcSoundingLayer2> soundingLyLst2,
List<NcSoundingLayer> soundingLyLst, float stationElevation,
String stationId, float stationLatitude, float stationLongitude,
float sfcPress, int stnNum) {
super();
this.soundingLyLst2 = soundingLyLst2;
this.soundingLyLst = soundingLyLst;
this.stationElevation = stationElevation;
this.stationId = stationId;
this.stationLatitude = stationLatitude;
this.stationLongitude = stationLongitude;
this.sfcPress = sfcPress;
this.stationNum = stnNum;
}
public NcSoundingProfile() {
super();
this.soundingLyLst = new ArrayList<NcSoundingLayer>();
this.soundingLyLst2 = new ArrayList<NcSoundingLayer2>();
this.stationElevation = MISSING;
this.stationId = "";
this.stationLatitude = MISSING;
this.stationLongitude = MISSING;
this.sfcPress = MISSING;
this.stationNum= 0;
}
public NcSoundingProfile() {
super();
this.soundingLyLst = new ArrayList<NcSoundingLayer>();
this.soundingLyLst2 = new ArrayList<NcSoundingLayer2>();
this.stationElevation = MISSING;
this.stationId = "";
this.stationLatitude = MISSING;
this.stationLongitude = MISSING;
this.sfcPress = MISSING;
this.stationNum = 0;
}
/*
@Override
protected AbstractStorageRecord cloneInternal() {
// TODO Auto-generated method stub
System.out.println("NcSoundingProfile cloneInternal()");
return null;
}
public float getPw() {
return pw;
}
@Override
public Object getDataObject() {
// TODO Auto-generated method stub
System.out.println("NcSoundingProfile getDataObject()");
return null;
}
public void setPw(float pw) {
this.pw = pw;
}
@Override
public int getSizeInBytes() {
// TODO Auto-generated method stub
System.out.println("NcSoundingProfile getSizeInBytes()");
return 0;
}
/*
* @Override protected AbstractStorageRecord cloneInternal() { // TODO
* Auto-generated method stub
* System.out.println("NcSoundingProfile cloneInternal()"); return null; }
*
* @Override public Object getDataObject() { // TODO Auto-generated method
* stub System.out.println("NcSoundingProfile getDataObject()"); return
* null; }
*
* @Override public int getSizeInBytes() { // TODO Auto-generated method
* stub System.out.println("NcSoundingProfile getSizeInBytes()"); return 0;
* }
*
* @Override public void reduce(int[] indices) { // TODO Auto-generated
* method stub System.out.println("NcSoundingProfile ()"); }
*
* @Override public boolean validateDataSet() { // TODO Auto-generated
* method stub System.out.println("NcSoundingProfile validateDataSet()");
* return false; }
*/
@Override
public void reduce(int[] indices) {
// TODO Auto-generated method stub
System.out.println("NcSoundingProfile ()");
}
@Override
public boolean validateDataSet() {
// TODO Auto-generated method stub
System.out.println("NcSoundingProfile validateDataSet()");
return false;
}
*/
}

View file

@ -0,0 +1,177 @@
package gov.noaa.nws.ncep.edex.common.sounding;
import java.util.List;
/**
*
* gov.noaa.nws.ncep.edex.common.sounding.NcSoundingTools
*
* This code has been developed by the SIB for use in the AWIPS2 system.
*
* <pre>
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------- ------- -------- -----------
* 07/24/2014 Chin Chen Initial coding
* Support PW computation
*
*
* </pre>
*
* @author Chin Chen
* @version 1.0
*/
public class NcSoundingTools {
/*************************************************************
* PRECIP_WATER Calculates the Precipitation Water in mm from Bottom level
* of layer (mb) to Top level of layer (mb)
*************************************************************/
public static float precip_water(List<NcSoundingLayer> sndlayers) {
float pw = 0;
float d1, p1, d2, p2, tot, w1, w2, wbar;
// ----- Start with interpolated bottom layer -----
// find surface layer or first layer with valid dewpoint
int sfcIndex = 0;
for (int i = 0; i < sndlayers.size(); i++) {
if (sndlayers.get(i).getDewpoint() != -9999f) {
sfcIndex = i;
break;
}
}
d1 = sndlayers.get(sfcIndex).getDewpoint(); // dewp
// in
// C
p1 = sndlayers.get(sfcIndex).getPressure(); // pressure
// n
// mb
tot = 0;
for (int i = sfcIndex + 1; i < sndlayers.size(); i++) {
/* ----- Calculate every level that reports a dwpt ----- */
d2 = sndlayers.get(i).getDewpoint(); // dewp
// in C
if (d2 == -9999f)
continue;
p2 = sndlayers.get(i).getPressure(); // pressure
// n mb
w1 = mixingRatio(d1, p1);
w2 = mixingRatio(d2, p2);
wbar = (w1 + w2) / 2;
tot = tot + wbar * (p1 - p2);
// System.out.println("p1=" + p1 + " d1=" + d1 + " p2=" + p2 +
// " d2="
// + d2);
d1 = d2;
p1 = p2;
// test the case when top level is 400 mb
// if (p2 == 400)
// break;
}
/* ----- Convert to mm (from g*mb/kg) ----- */
pw = tot * 0.00040173f * 25.4f;
return pw;
}
public static float precip_water2(List<NcSoundingLayer2> sndlayers) {
float pw = 0;
float d1, p1, d2, p2, tot, w1, w2, wbar;
// ----- Start with interpolated bottom layer -----
// find surface layer or first layer with valid dewpoint
int sfcIndex = 0;
for (int i = 0; i < sndlayers.size(); i++) {
if (sndlayers.get(i).getDewpoint().getValue().floatValue() != -9999f) {
sfcIndex = i;
break;
}
}
d1 = sndlayers.get(sfcIndex).getDewpoint().getValue().floatValue(); // dewp
// in
// C
p1 = sndlayers.get(sfcIndex).getPressure().getValue().floatValue(); // pressure
// n
// mb
tot = 0;
for (int i = sfcIndex + 1; i < sndlayers.size(); i++) {
/* ----- Calculate every level that reports a dwpt ----- */
d2 = sndlayers.get(i).getDewpoint().getValue().floatValue(); // dewp
// in C
if (d2 == -9999f)
continue;
p2 = sndlayers.get(i).getPressure().getValue().floatValue(); // pressure
// n mb
w1 = mixingRatio(d1, p1);
w2 = mixingRatio(d2, p2);
wbar = (w1 + w2) / 2;
tot = tot + wbar * (p1 - p2);
d1 = d2;
p1 = p2;
// test the case when top level is 400 mb
// if (p2 == 400)
// break;
}
/* ----- Convert to mm (from g*mb/kg) ----- */
pw = tot * 0.00040173f * 25.4f;
return pw;
}
/*
* Compute mixing ratio from DWPC and PRES. Chin: copy from
* gov.noaa.nws.ncep.edex.uengine.tasks.profile.MergeSounding
*/
private static float mixingRatio(float td, float pres) {
float vapr = vaporPressure(td);
float corr = (1.001f + ((pres - 100.f) / 900.f) * .0034f);
float e = corr * vapr;
if (e > (.5f * pres)) {
return -9999f;
} else {
return .62197f * (e / (pres - e)) * 1000.f;
}
}
/*
* Compute vapor pressure from DWPC. Chin: copy from
* gov.noaa.nws.ncep.edex.uengine.tasks.profile.MergeSounding
*/
private static float vaporPressure(float td) {
return (6.112f * (float) Math.exp((17.67 * td) / (td + 243.5)));
}
// The followings are converted from BigSharp, the computation results are
// about the same as above methods.
// private static float mixratio(float pres, float temp)
//
// {
// float x, wfw, fwesw;
//
// x = 0.02f * (temp - 12.5f + 7500.0f / pres);
// wfw = 1.0f + 0.0000045f * pres + 0.0014f * x * x;
// fwesw = wfw * vappres(temp);
// return 621.97f * (fwesw / (pres - fwesw));
// }
//
// private static float vappres(float temp)
//
// {
// double pol;
// pol = temp * (1.1112018e-17 + temp * (-3.0994571e-20));
// pol = temp * (2.1874425e-13 + temp * (-1.789232e-15 + pol));
// pol = temp * (4.3884180e-09 + temp * (-2.988388e-11 + pol));
// pol = temp * (7.8736169e-05 + temp * (-6.111796e-07 + pol));
// pol = .99999683e-00 + temp * (-9.082695e-03 + pol);
// pol = (pol * pol);
// pol = (pol * pol);
// return (6.1078f / (float) (pol * pol));
// }
}

View file

@ -4,6 +4,7 @@
* Date Ticket# Engineer Description
* __________ _______ __________ __________________________
* 10/12/2011 126 G. Hull Initial Creation
* 07/30/2014 B. Hebbard Add refTime parameter
-->
<pointDataDbDescription>
<parameter name="latitude" queryName="location.latitude" type="FLOAT" unit="°" />
@ -13,4 +14,5 @@
<parameter name="stationName" queryName="location.stationId" type="STRING" />
<parameter name="reportType" queryName="reportType" type="STRING" />
<parameter name="dataURI" queryName="dataURI" type="STRING" />
<parameter name="refTime" queryName="dataTime.refTime" numDims="1" type="LONG" unit="ms"/>
</pointDataDbDescription>

View file

@ -29,6 +29,7 @@ package gov.noaa.nws.ncep.edex.uengine.tasks.profile;
* 02/28/2012 Chin Chen modify several sounding query algorithms for better performance
* 03/28/2012 Chin Chen modify Grid data sounding query algorithms for better performance
* 06/25/2014 Chin Chen support dropsonde
* 07/23/2014 Chin Chen Support PW
* </pre>
* Python Script example to query multiple locations at one request:
* The following 3 query examples, returns same results.
@ -110,6 +111,7 @@ import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.ObsSndType;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.PfcSndType;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.SndQueryKeyType;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingStnInfoCollection;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingTools;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -145,6 +147,8 @@ public class NcSoundingDrv {
private int merge;
private int pwRequired = 0; // Support PW, 1=required, 0=Not required
private boolean useNcSoundingLayer2 = false;
private int[] dbIdList;
@ -395,6 +399,10 @@ public class NcSoundingDrv {
this.merge = merge;
}
public void setPwRequired(int pwRequired) {
this.pwRequired = pwRequired;
}
public long getRefTime() {
return refTime;
}
@ -1189,7 +1197,21 @@ public class NcSoundingDrv {
ttdd, ppaa, ppbb, ppcc, ppdd, trop_a,
trop_c, wmax_a, wmax_c,
pf.getStationElevation());
// Support PW
// System.out.println("1st merge call: lat/lon="
// + pf.getStationLatitude());
// for (int i = 0; i < sls.size(); i++) {
// NcSoundingLayer2 ncLay = sls.get(i);
// System.out.println(" temp="
// + ncLay.getTemperature() + " dewp="
// + ncLay.getDewpoint() + " press="
// + ncLay.getPressure() + " height="
// + ncLay.getGeoHeight() + " windSp="
// + ncLay.getWindSpeed() + " windDir="
// + ncLay.getWindDirection() + " omega="
// + ncLay.getOmega());
// }
// end Support PW
if (level.toUpperCase().equalsIgnoreCase("MAN")) {
pf.setSoundingLyLst2(sls);
// System.out.println("sls set to the sounding profile");
@ -1213,6 +1235,33 @@ public class NcSoundingDrv {
// + level);
}
}
// Support PW
if (pwRequired == 1) {
List<NcSoundingLayer2> sls2 = new ArrayList<NcSoundingLayer2>();
sls2 = ms.mergeUairSounding("-1", ttaa, ttbb,
ttcc, ttdd, ppaa, ppbb, ppcc, ppdd,
trop_a, trop_c, wmax_a, wmax_c,
pf.getStationElevation());
pf.setPw(NcSoundingTools.precip_water2(sls2));
// System.out.println("2nd merge call: lat/lon="
// + pf.getStationLatitude());
// for (int i = 0; i < sls2.size(); i++) {
// NcSoundingLayer2 ncLay = sls2.get(i);
// System.out.println(" temp="
// + ncLay.getTemperature() + " dewp="
// + ncLay.getDewpoint() + " press="
// + ncLay.getPressure() + " height="
// + ncLay.getGeoHeight() + " windSp="
// + ncLay.getWindSpeed()
// + " windDir="
// + ncLay.getWindDirection()
// + " omega=" + ncLay.getOmega());
// }
} else {
pf.setPw(-1);
}
// End Support PW
}
}
if (pf != null && pf.getSoundingLyLst2().size() > 0) {
@ -1356,28 +1405,36 @@ public class NcSoundingDrv {
// + (t02 - t01));
}
cube.setSoundingProfileList(soundingProfileList);
/*
* for(int i =0; i < cube.getSoundingProfileList().size();i++){
* System.out.println("lat/lon="+
* cube.getSoundingProfileList().get(i).getStationLatitude
* ()+"/"+cube.getSoundingProfileList().get(i).getStationLongitude()+
* " temp="
* +cube.getSoundingProfileList().get(i).getSoundingLyLst2().get(
* 0).getTemperature
* ()+" dewp="+cube.getSoundingProfileList().get(i).getSoundingLyLst2
* ().get(0).getDewpoint()+" press="+
* cube.getSoundingProfileList().get(i
* ).getSoundingLyLst2().get(0).getPressure() +
* " height="+cube.getSoundingProfileList
* ().get(i).getSoundingLyLst2().get(0).getGeoHeight()+
* " windSp="+cube.getSoundingProfileList
* ().get(i).getSoundingLyLst2().get
* (0).getWindSpeed()+" windDir="+cube.getSoundingProfileList
* ().get(i).getSoundingLyLst2().get(0).getWindDirection()+
* " omega="+cube
* .getSoundingProfileList().get(i).getSoundingLyLst2().get
* (0).getOmega()); }
*/
// for (int i = 0; i < cube.getSoundingProfileList().size(); i++) {
// System.out.println("lat/lon="
// + cube.getSoundingProfileList().get(i).getStationLatitude()
// + "/"
// + cube.getSoundingProfileList().get(i)
// .getStationLongitude()
// + " temp="
// + cube.getSoundingProfileList().get(i).getSoundingLyLst2()
// .get(0).getTemperature()
// + " dewp="
// + cube.getSoundingProfileList().get(i).getSoundingLyLst2()
// .get(0).getDewpoint()
// + " press="
// + cube.getSoundingProfileList().get(i).getSoundingLyLst2()
// .get(0).getPressure()
// + " height="
// + cube.getSoundingProfileList().get(i).getSoundingLyLst2()
// .get(0).getGeoHeight()
// + " windSp="
// + cube.getSoundingProfileList().get(i).getSoundingLyLst2()
// .get(0).getWindSpeed()
// + " windDir="
// + cube.getSoundingProfileList().get(i).getSoundingLyLst2()
// .get(0).getWindDirection()
// + " omega="
// + cube.getSoundingProfileList().get(i).getSoundingLyLst2()
// .get(0).getOmega());
// }
returnedObject = cube;
// long t02 = System.currentTimeMillis();
// System.out.println("getSoundingData2Generic query took "+(t02-t01)+" ms in total");
@ -1984,6 +2041,10 @@ public class NcSoundingDrv {
sls = ms.mergeUairSounding(level, ttaa, ttbb, ttcc,
ttdd, ppaa, ppbb, ppcc, ppdd, trop_a, trop_c,
wmax_a, wmax_c, pf.getStationElevation());
// PW Support test
float pw = NcSoundingTools.precip_water(sls);
pf.setPw(pw);
// end PW Support test
// System.out.println("NCUAIR Number of Layers after merge:"+sls.size()
// + " level="+level +
// " ms.isNumber(level)="+ms.isNumber(level));

View file

@ -1,3 +1,11 @@
"""
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------- ------- -------- -----------
* 09/13/2010 301 Chin Chen Initial coding
* 07/23/2014 Chin Chen Support PW
"""
from com.raytheon.uf.common.message.response import ResponseMessageGeneric
from gov.noaa.nws.ncep.edex.uengine.tasks.profile import NcSoundingDrv
@ -71,6 +79,11 @@ class NcSoundingDataRequest():
def setLevel(self, level):
self.NcSoundingDrv.setLevel(level)
# Support PW
def setPwRequired(self, pwRequired):
self.NcSoundingDrv.setPwRequired(pwRequired)
def setDbIdList(self, dbIdList):
#print dbIdList
from jep import jarray, JINT_ID