@@ -1729,10 +1729,20 @@ int pcode_radial( ByteBuffer bos, int hoff, int hedsiz, boolean isZ, byte[] dat
1729
1729
addParameter (vName , lName , ncfile , dims1 , att , DataType .DOUBLE , "milliseconds since 1970-01-01 00:00 UTC"
1730
1730
,hoff , hedsiz , isZ , 0 );
1731
1731
//add RAW, BRIT variables for all radial variable
1732
- if (pcode == 182 || pcode == 99 || pcode == 180 ) {
1733
- levels = getTDWRLevels (nlevel , threshold );
1734
- iscale = 10 ;
1735
- } else if (pcode == 186 || pcode == 94 ) {
1732
+ if (pcode == 182 || pcode == 99 || pcode == 180 || pcode == 154 ) {
1733
+ levels = getTDWRLevels (nlevel , threshold );
1734
+ iscale = 10 ;
1735
+ } else if (pcode == 155 ) {
1736
+ // ICD v19 3-34
1737
+ // "For product 155, data levels 129 through 152
1738
+ // denote data values starting from the minimum data value in even data increments."
1739
+ // Let's compute the correct offset based on the fact that the levels start at 129
1740
+ // and not 0. We need 129 to correspond to what was in threshold 0 when the scale is applied
1741
+ // First two levels are missing and range folded (set in getTDWRLevels), so we use 127, not 129.
1742
+ threshold [0 ] += -127 * threshold [1 ];
1743
+ levels = getTDWRLevels (nlevel , threshold );
1744
+ iscale = 10 ;
1745
+ } else if (pcode == 186 || pcode == 94 || pcode == 153 ) {
1736
1746
threshold [0 ] = -320 ;
1737
1747
threshold [1 ] = 5 ;
1738
1748
threshold [2 ] = 254 ;
@@ -1750,7 +1760,8 @@ int pcode_radial( ByteBuffer bos, int hoff, int hedsiz, boolean isZ, byte[] dat
1750
1760
} else if (pcode ==159 || pcode ==161 || pcode == 163
1751
1761
|| pcode == 170 || pcode == 172 || pcode == 173
1752
1762
|| pcode == 174 || pcode == 175
1753
- || pcode == 165 || pcode == 177 ) {
1763
+ || pcode == 165 || pcode == 177 || pcode == 167
1764
+ || pcode == 168 ) {
1754
1765
1755
1766
levels = getDualpolLevels (threshold );
1756
1767
iscale = 100 ;
@@ -2327,18 +2338,20 @@ void setProductInfo(int prod_type, Pinfo pinfo)
2327
2338
cmemo = "Base Specturm Width " + prod_elevation /10 + " DEG " + cmode [pinfo .opmode ];
2328
2339
2329
2340
ctilt = pname_lookup (pcode , prod_elevation /10 );
2330
- ctitle = "BREF: Base Spectrum Width" ;
2341
+ ctitle = "Base Spectrum Width" ;
2331
2342
cunit = "Knots" ;
2332
2343
cname = "SpectrumWidth" ;
2333
- summary = ctilt + " is a radial image of base reflectivity at tilt " + (prod_elevation /10 + 1 ) + " and range 124 nm" ;
2344
+ summary = ctilt + " is a radial image of base spectrum width at tilt " + (prod_elevation / 10 + 1 )
2345
+ + " and range 124 nm" ;
2334
2346
if (pcode == 28 ){
2335
2347
t1 = t1 * 0.25 ;
2336
2348
t2 = t2 * 0.25 ;
2337
2349
lat_min = latitude - t1 ;
2338
2350
lat_max = latitude + t1 ;
2339
2351
lon_min = longitude + t2 ; //* Math.cos(Math.toRadians(lat_min));
2340
2352
lon_max = longitude - t2 ; //* Math.cos(Math.toRadians(lat_min));
2341
- summary = ctilt + " is a radial image of base reflectivity at tilt " + (prod_elevation /10 + 1 ) + " and range 32 nm" ;
2353
+ summary = ctilt + " is a radial image of base spectrum width at tilt " + (prod_elevation / 10 + 1 )
2354
+ + " and range 32 nm" ;
2342
2355
}
2343
2356
}
2344
2357
else if (prod_type == DigitalDifferentialReflectivity ) {
@@ -2402,16 +2415,16 @@ else if (prod_type == HydrometeorClassification ) {
2402
2415
else if (prod_type == HypridHydrometeorClassification ) {
2403
2416
radial = 1 ;
2404
2417
prod_elevation = pinfo .p3 ;
2405
- cmemo = "Hyprid Hydrometeor Classification " + prod_elevation /10 + " DEG " + cmode [pinfo .opmode ];
2418
+ cmemo = "Hybrid Hydrometeor Classification " + prod_elevation /10 + " DEG " + cmode [pinfo .opmode ];
2406
2419
2407
2420
int pLevel = getProductLevel (prod_elevation );
2408
2421
ctilt = pname_lookup (18 , pLevel );
2409
2422
2410
2423
2411
- ctitle = "Dualpol: Hyprid Hydrometeor Classification" ;
2424
+ ctitle = "Dualpol: Hybrid Hydrometeor Classification" ;
2412
2425
cunit = " " ;
2413
2426
cname = "HypridHydrometeorClassification" ;
2414
- summary = ctilt + " is a radial image of dual pol Hyprid Hydrometeor Classification field and its range 162 nm" ;
2427
+ summary = ctilt + " is a radial image of dual pol Hybrid Hydrometeor Classification field and its range 162 nm" ;
2415
2428
2416
2429
}
2417
2430
else if (prod_type == OneHourAccumulation ) {
@@ -3243,14 +3256,16 @@ Pinfo read_proddesc( ByteBuffer buf, int offset ){
3243
3256
p3 = (short )getInt (b2 , 2 );
3244
3257
off += 40 ;
3245
3258
if (pcode == 182 || pcode == 186 || pcode == 32
3246
- || pcode == 94 || pcode == 99 || pcode == 180 ) {
3259
+ || pcode == 94 || pcode == 99 || pcode == 180
3260
+ || pcode == 153 || pcode == 154 || pcode == 155 ) {
3247
3261
for (int i = 0 ; i < 16 ; i ++) {
3248
3262
buf .get (b2 , 0 , 2 );
3249
3263
threshold [i ] = (short )bytesToInt (b2 [0 ], b2 [1 ], false );
3250
3264
}
3251
3265
} else if (pcode == 159 || pcode == 161 || pcode == 163
3252
3266
|| pcode == 170 || pcode == 172 || pcode == 173
3253
- || pcode == 174 || pcode == 175 ) {
3267
+ || pcode == 174 || pcode == 175 || pcode == 167
3268
+ || pcode == 168 ) {
3254
3269
// Scale hw 31 32
3255
3270
buf .get (b4 , 0 , 4 );
3256
3271
byte [] b44 = {b4 [3 ], b4 [2 ], b4 [1 ], b4 [0 ]};
@@ -3711,49 +3726,39 @@ byte[] GetZlibedNexr( byte[] buf, int buflen, int hoff ) throws IOException
3711
3726
static int code_typelookup ( int code )
3712
3727
{
3713
3728
int type ;
3714
- final int [] types = {
3715
- Other , Other , Other , Other , Other , /* 0- 9 */
3716
- Other , Other , Other , Other , Other ,
3717
- Other , Other , Other , Other , Other , /* 10- 19 */
3718
- Other , Base_Reflect , Base_Reflect , Base_Reflect , Base_Reflect ,
3719
- BaseReflect248 , Base_Reflect , Velocity , /* 20- 29 */
3720
- Velocity , Velocity , Velocity , Velocity , Velocity , SPECTRUM , SPECTRUM ,
3721
- SPECTRUM , Other , DigitalHybridReflect , Other , Other , /* 30- 39 */
3722
- Comp_Reflect , Comp_Reflect , Comp_Reflect , Comp_Reflect , Other ,
3723
- Other , Echo_Tops , Other , Other , Other , /* 40- 49 */
3724
- Other , Other , Other , VAD , Other ,
3725
- Other , Other , Other , Other , Other , /* 50- 59 */
3726
- StrmRelMeanVel , StrmRelMeanVel , Vert_Liquid , Other , Other ,
3727
- Other , Other , Other , Layer_Reflect_Avg , /* 60- 69 */
3728
- Layer_Reflect_Avg , Layer_Reflect_Max ,
3729
- Layer_Reflect_Max , Other , Other , Other ,
3730
- Other , Other , Other , Other , Other , /* 70- 79 */
3731
- Other , Other , Other , Precip_1 , Precip_3 ,
3732
- Precip_Accum , Precip_Array , Other , /* 80- 89 */
3733
- Other , Other , Other , Other , Other , Other , Layer_Reflect_Avg ,
3734
- Layer_Reflect_Max , Other , Other , Other , /* 90- 99 */
3735
- BaseReflectivityDR , Other , Other , Other , Other , BaseVelocityDV ,
3736
- Other , Other , Other , Other , Other , /* 100-109 */
3737
- Other , Other , Other , Other , Other ,
3738
- Other , Other , Other , Other , Other , /* 110-119 */
3739
- Other , Other , Other , Other , Other ,
3740
- Other , Other , Other , Other , Other , /* 120-129 */
3741
- Other , Other , Other , Other , Other ,
3742
- Other , Other , Other , Other , DigitalVert_Liquid , /* 130-139 */
3743
- EnhancedEcho_Tops , Other , Other , DigitalStormTotalPrecip , Other ,
3744
- Other , Other , Other , Other , Other , /* 140-149 */
3745
- Other , Other , Other , Other , Other ,
3746
- Other , Other , Other , Other , Other , /* 150-159 */
3747
- Other , Other , Other , Other , DigitalDifferentialReflectivity ,
3748
- Other , DigitalCorrelationCoefficient , Other , DigitalDifferentialPhase , Other , /* 160-169 */
3749
- HydrometeorClassification , Other , Other , Other , OneHourAccumulation ,
3750
- DigitalAccumulationArray , StormTotalAccumulation , DigitalStormTotalAccumulation ,
3751
- Accumulation3Hour , Digital1HourDifferenceAccumulation ,/* 170-179 */
3752
- DigitalTotalDifferenceAccumulation , DigitalInstantaneousPrecipitationRate ,
3753
- HypridHydrometeorClassification , Other , Other ,
3754
- Reflect1 , Reflect1 , Velocity1 , Velocity1 , Other , /* 180-189 */
3755
- SPECTRUM1 , Reflect1 , Reflect1 , Other , Other ,
3756
- };
3729
+ int [] types = {Other , Other , Other , Other , Other , Other , Other , Other , Other , Other , // 0 - 9
3730
+ Other , Other , Other , Other , Other , Other , Base_Reflect , Base_Reflect , Base_Reflect , Base_Reflect , // 10 - 19
3731
+ BaseReflect248 , Base_Reflect , Velocity , Velocity , Velocity , // 20 - 24
3732
+ Velocity , Velocity , Velocity , SPECTRUM , SPECTRUM , // 25 - 29
3733
+ SPECTRUM , Other , DigitalHybridReflect , Other , Other , // 30 - 34
3734
+ Comp_Reflect , Comp_Reflect , Comp_Reflect , Comp_Reflect , Other , // 35 - 39
3735
+ Other , Echo_Tops , Other , Other , Other , // 40 - 44
3736
+ Other , Other , Other , VAD , Other , Other , Other , Other , Other , Other , // 45- 54
3737
+ StrmRelMeanVel , StrmRelMeanVel , Vert_Liquid , Other , Other , // 55 - 59
3738
+ Other , Other , Other , Layer_Reflect_Avg , Layer_Reflect_Avg , // 60 - 64
3739
+ Layer_Reflect_Max , Layer_Reflect_Max , Other , Other , Other , // 65 - 69
3740
+ Other , Other , Other , Other , Other , // 70 - 74
3741
+ Other , Other , Other , Precip_1 , Precip_3 , // 75 - 79
3742
+ Precip_Accum , Precip_Array , Other , Other , Other , // 80 - 84
3743
+ Other , Other , Other , Other , Layer_Reflect_Avg , // 85 - 89
3744
+ Layer_Reflect_Max , Other , Other , Other , BaseReflectivityDR , // 90 - 94
3745
+ Other , Other , Other , Other , BaseVelocityDV , // 95 - 99
3746
+ Other , Other , Other , Other , Other , Other , Other , Other , Other , Other , // 100 - 109
3747
+ Other , Other , Other , Other , Other , Other , Other , Other , Other , Other , // 110 - 119
3748
+ Other , Other , Other , Other , Other , Other , Other , Other , Other , Other , // 120 - 129
3749
+ Other , Other , Other , Other , DigitalVert_Liquid , // 130 - 134
3750
+ EnhancedEcho_Tops , Other , Other , DigitalStormTotalPrecip , Other , // 135 - 139
3751
+ Other , Other , Other , Other , Other , Other , Other , Other , Other , Other , // 140 - 149
3752
+ Other , Other , Other , BaseReflectivityDR , BaseVelocityDV , // 150 - 154
3753
+ SPECTRUM , Other , Other , Other , DigitalDifferentialReflectivity , // 155 - 159
3754
+ Other , DigitalCorrelationCoefficient , Other , DigitalDifferentialPhase , Other , // 160 - 164
3755
+ HydrometeorClassification , Other , DigitalCorrelationCoefficient , Other , // 165 - 168
3756
+ OneHourAccumulation , DigitalAccumulationArray , // 169 - 170
3757
+ StormTotalAccumulation , DigitalStormTotalAccumulation , Accumulation3Hour , // 171 - 173
3758
+ Digital1HourDifferenceAccumulation , DigitalTotalDifferenceAccumulation , // 174 - 175
3759
+ DigitalInstantaneousPrecipitationRate , HypridHydrometeorClassification , Other , Other , // 176 - 179
3760
+ Reflect1 , Reflect1 , Velocity1 , Velocity1 , Other , // 180 - 184
3761
+ SPECTRUM1 , Reflect1 , Reflect1 , Other , Other }; // 185 - 189
3757
3762
3758
3763
if ( code < 0 || code > 189 )
3759
3764
type = Other ;
@@ -3905,6 +3910,7 @@ else if(elevation == 3)
3905
3910
case 183 :
3906
3911
pname = "V" ;
3907
3912
break ;
3913
+ case 155 :
3908
3914
case 185 :
3909
3915
pname = "SW" ;
3910
3916
break ;
@@ -3944,8 +3950,8 @@ static double code_reslookup( int code )
3944
3950
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 120-129 */
3945
3951
0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 1 , 0 , /* 130-139 */
3946
3952
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 140-149 */
3947
- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.25 , /* 150-159 */
3948
- 0 , 0.25 , 0 , 0.25 , 0 , 0.25 , 0 , 0 , 0 , 2 , /* 160-169 */
3953
+ 0 , 0 , 0 , 0.25 , 0.25 , 0.25 , 0 , 0 , 0 , 0.25 , /* 150-159 */
3954
+ 0 , 0.25 , 0 , 0.25 , 0 , 0.25 , 0 , 0.25 , 0.25 , 2 , /* 160-169 */
3949
3955
0.25 , 2 , 0.25 , 0.25 , 0.25 , 0.25 , 0.25 , 0.25 , 0 , 0 , /* 170-179 */
3950
3956
150.0 , 150.0 , 150.0 , 0 , 0 , 0 , 300.0 , 0 , 0 , 0 , /* 180-189 */
3951
3957
};
@@ -3986,8 +3992,8 @@ static int code_levelslookup( int code )
3986
3992
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 120-129 */
3987
3993
0 , 0 , 0 , 0 , 256 , 199 , 0 , 0 , 256 , 0 , /* 130-139 */
3988
3994
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 140-149 */
3989
- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 256 , /* 150-159 */
3990
- 0 , 256 , 0 , 256 , 0 , 256 , 0 , 0 , 0 , 16 , /* 160-169 */
3995
+ 0 , 0 , 0 , 256 , 256 , 256 , 0 , 0 , 0 , 256 , /* 150-159 */
3996
+ 0 , 256 , 0 , 256 , 0 , 256 , 0 , 256 , 256 , 16 , /* 160-169 */
3991
3997
256 , 16 , 256 , 256 , 0 , 0 , 0 , 16 , 0 , 0 , /* 170-179 */
3992
3998
256 , 16 , 256 , 0 , 0 , 0 , 256 , 0 , 0 , 0 , /* 180-189 */
3993
3999
};
0 commit comments