diff --git a/scwx-qt/res/palettes/wct/HC.pal b/scwx-qt/res/palettes/wct/HC.pal new file mode 100644 index 00000000..825dcea4 --- /dev/null +++ b/scwx-qt/res/palettes/wct/HC.pal @@ -0,0 +1,17 @@ +; WCT Palette for Hydrometeor Classification adapted for Supercell Wx + +SolidColor: 10 156 156 156 ; BI = Biological +SolidColor: 20 118 118 118 ; GC = Anomalous Propagation/Ground Clutter +SolidColor: 30 255 176 176 ; IC = Ice Crystals +SolidColor: 40 0 255 255 ; DS = Dry Snow +SolidColor: 50 0 144 255 ; WS = Wet Snow +SolidColor: 60 0 251 144 ; RA = Light and/or Moderate Rain +SolidColor: 70 0 187 0 ; HR = Heavy Rain +SolidColor: 80 208 208 96 ; BD = Big Drops +SolidColor: 90 210 132 132 ; GR = Graupel +SolidColor: 100 255 0 0 ; HA = Small Hail +SolidColor: 110 160 20 20 ; LH = Large Hail +SolidColor: 120 255 255 0 ; GH = Giant Hail +SolidColor: 130 0 0 0 ; TBD +SolidColor: 140 231 0 255 ; UK = Unknown Classification +SolidColor: 150 119 0 125 ; RF = Range Folded diff --git a/scwx-qt/scwx-qt.qrc b/scwx-qt/scwx-qt.qrc index b9155f08..c949ddc3 100644 --- a/scwx-qt/scwx-qt.qrc +++ b/scwx-qt/scwx-qt.qrc @@ -54,6 +54,7 @@ res/palettes/wct/DR.pal res/palettes/wct/DV.pal res/palettes/wct/ET.pal + res/palettes/wct/HC.pal res/palettes/wct/KDP.pal res/palettes/wct/KDP2.pal res/palettes/wct/OHP.pal diff --git a/scwx-qt/source/scwx/qt/settings/palette_settings.cpp b/scwx-qt/source/scwx/qt/settings/palette_settings.cpp index dcf58f2e..b79bf4db 100644 --- a/scwx-qt/source/scwx/qt/settings/palette_settings.cpp +++ b/scwx-qt/source/scwx/qt/settings/palette_settings.cpp @@ -15,7 +15,7 @@ namespace settings static const std::string logPrefix_ = "scwx::qt::settings::palette_settings"; -static const std::array kPaletteKeys_ { +static const std::array kPaletteKeys_ { // Level 2 / Common Products "BR", "BV", @@ -27,6 +27,7 @@ static const std::array kPaletteKeys_ { "DOD", "DSD", "ET", + "HC", "STP", "OHP", "STPIN", @@ -48,6 +49,7 @@ static const std::unordered_map kDefaultPalettes_ { {"DOD", ":/res/palettes/wct/DOD_DSD.pal"}, {"DSD", ":/res/palettes/wct/DOD_DSD.pal"}, {"ET", ":/res/palettes/wct/ET.pal"}, + {"HC", ":/res/palettes/wct/HC.pal"}, {"OHP", ":/res/palettes/wct/OHP.pal"}, {"OHPIN", ""}, {"PHI3", ":/res/palettes/wct/KDP.pal"}, diff --git a/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp b/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp index edd63ec8..09357b60 100644 --- a/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp +++ b/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp @@ -54,7 +54,7 @@ struct ColorTableConversions float scale {1.0f}; }; -static const std::array, 15> +static const std::array, 16> kColorTableTypes_ {std::pair {"BR", "BR"}, std::pair {"BV", "BV"}, std::pair {"SW", "SW"}, @@ -64,6 +64,7 @@ static const std::array, 15> std::pair {"DOD", "DOD"}, std::pair {"DSD", "DSD"}, std::pair {"ET", "ET"}, + std::pair {"HC", "HC"}, std::pair {"OHP", "OHP"}, std::pair {"PHI3", "KDP"}, std::pair {"SRV", "SRV"}, @@ -84,6 +85,7 @@ static const std::unordered_map {"DOD", {0u, 255u, 128.0f, 1.5f}}, {"DSD", {0u, 255u, 128.0f, 1.5f}}, {"ET", {0u, 255u, 2.0f, 1.0f}}, + {"HC", {10u, 160u, 0.0f, 1.0f}}, {"OHP", {0u, 255u, 0.0f, 2.5f}}, {"PHI3", {0u, 255u, 43.0f, 20.0f}}, {"SRV", {0u, 255u, 128.0f, 2.0f}}, diff --git a/wxdata/include/scwx/common/products.hpp b/wxdata/include/scwx/common/products.hpp index 0e10e470..ce1b12cb 100644 --- a/wxdata/include/scwx/common/products.hpp +++ b/wxdata/include/scwx/common/products.hpp @@ -47,11 +47,12 @@ enum class Level3ProductCategory DifferentialReflectivity, SpecificDifferentialPhase, CorrelationCoefficient, + HydrometeorClassification, Unknown }; typedef util::Iterator + Level3ProductCategory::HydrometeorClassification> Level3ProductCategoryIterator; typedef std::unordered_map< @@ -74,9 +75,8 @@ GetLevel3CategoryDefaultProduct(Level3ProductCategory category); Level3ProductCategory GetLevel3Category(const std::string& categoryName); Level3ProductCategory GetLevel3CategoryByProduct(const std::string& productName); -Level3ProductCategory -GetLevel3CategoryByAwipsId(const std::string& awipsId); -const std::string& GetLevel3Palette(int16_t productCode); +Level3ProductCategory GetLevel3CategoryByAwipsId(const std::string& awipsId); +const std::string& GetLevel3Palette(int16_t productCode); std::string GetLevel3ProductByAwipsId(const std::string& awipsId); const std::string& GetLevel3ProductDescription(const std::string& productName); diff --git a/wxdata/source/scwx/common/products.cpp b/wxdata/source/scwx/common/products.cpp index 7e47712f..87144c8d 100644 --- a/wxdata/source/scwx/common/products.cpp +++ b/wxdata/source/scwx/common/products.cpp @@ -52,8 +52,9 @@ static const std::unordered_map level3ProductCodeMap_ { {159, "DZD"}, {161, "DCC"}, {163, "DKD"}, - {165, "DHD"}, + {165, "DHC"}, {166, "ML"}, + {177, "HHC"}, {180, "TDR"}, {182, "TDV"}}; @@ -67,7 +68,8 @@ static const std::unordered_map {"DZD", "Digital Differential Reflectivity"}, {"DCC", "Digital Correlation Coefficient"}, {"DKD", "Digital Specific Differential Phase"}, - {"DHD", "Digital Hydrometeor Classification"}, + {"DHC", "Digital Hydrometeor Classification"}, + {"HHC", "Hybrid Hydrometeor Classification"}, {"ML", "Melting Layer"}, {"SW", "Spectrum Width"}, {"TDR", "Digital Reflectivity"}, @@ -102,8 +104,9 @@ static const std::unordered_map> // Specific Differential Phase {"DKD", {"NXK", "NYK", "NZK", "N0K", "NAK", "N1K", "NBK", "N2K", "N3K"}}, - // Digital Hydrometeor Classification + // Hydrometeor Classification {"DHC", {"NXH", "NYH", "NZH", "N0H", "NAH", "N1H", "NBH", "N2H", "N3H"}}, + {"HHC", {"HHC"}}, // Melting Layer {"ML", {"NXM", "NYM", "NZM", "N0M", "NAM", "N1M", "NBM", "N2M", "N3M"}}, @@ -120,6 +123,7 @@ static const std::unordered_map {Level3ProductCategory::DifferentialReflectivity, "ZDR"}, {Level3ProductCategory::SpecificDifferentialPhase, "KDP"}, {Level3ProductCategory::CorrelationCoefficient, "CC"}, + {Level3ProductCategory::HydrometeorClassification, "HC"}, {Level3ProductCategory::Unknown, "?"}}; static const std::unordered_map @@ -134,6 +138,8 @@ static const std::unordered_map "Specific Differential Phase"}, {Level3ProductCategory::CorrelationCoefficient, "Correlation Coefficient"}, + {Level3ProductCategory::HydrometeorClassification, + "Hydrometeor Classification"}, {Level3ProductCategory::Unknown, "?"}}; static const std::unordered_map> @@ -145,6 +151,7 @@ static const std::unordered_map> {Level3ProductCategory::DifferentialReflectivity, {"DZD"}}, {Level3ProductCategory::SpecificDifferentialPhase, {"DKD"}}, {Level3ProductCategory::CorrelationCoefficient, {"DCC"}}, + {Level3ProductCategory::HydrometeorClassification, {"DHC", "HHC"}}, {Level3ProductCategory::Unknown, {}}}; static const std::unordered_map @@ -155,7 +162,8 @@ static const std::unordered_map {Level3ProductCategory::SpectrumWidth, "NSW"}, {Level3ProductCategory::DifferentialReflectivity, "N0X"}, {Level3ProductCategory::SpecificDifferentialPhase, "N0K"}, - {Level3ProductCategory::CorrelationCoefficient, "N0C"}}; + {Level3ProductCategory::CorrelationCoefficient, "N0C"}, + {Level3ProductCategory::HydrometeorClassification, "N0H"}}; static const std::unordered_map level3Palette_ { {19, "BR"}, {20, "BR"}, {27, "BV"}, {30, "SW"}, @@ -169,10 +177,10 @@ static const std::unordered_map level3Palette_ { {137, "BR"}, {138, "STPIN"}, {144, "OHPIN"}, {145, "OHPIN"}, {146, "STPIN"}, {150, "STPIN"}, {151, "STPIN"}, {153, "BR"}, {154, "BV"}, {155, "SW"}, {159, "ZDR"}, {161, "CC"}, - {163, "PHI3"}, {165, "???"}, {167, "CC"}, {168, "PHI3"}, + {163, "PHI3"}, {165, "HC"}, {167, "CC"}, {168, "PHI3"}, {169, "OHPIN"}, {170, "STP"}, {171, "STPIN"}, {172, "STP"}, {173, "STP"}, {174, "DOD"}, {175, "DSD"}, {176, "???"}, - {177, "???"}, {178, "???"}, {179, "???"}, {180, "BR"}, + {177, "HC"}, {178, "???"}, {179, "???"}, {180, "BR"}, {181, "BR"}, {182, "BV"}, {184, "SW"}, {186, "BR"}, {193, "BR"}, {195, "BR"}, {-1, "???"}}; diff --git a/wxdata/source/scwx/wsr88d/rpg/product_description_block.cpp b/wxdata/source/scwx/wsr88d/rpg/product_description_block.cpp index 269ec906..90385e88 100644 --- a/wxdata/source/scwx/wsr88d/rpg/product_description_block.cpp +++ b/wxdata/source/scwx/wsr88d/rpg/product_description_block.cpp @@ -365,6 +365,11 @@ uint16_t ProductDescriptionBlock::threshold() const case 176: threshold = p->halfword(37); break; + + case 165: + case 177: + threshold = 10; + break; } return threshold; @@ -572,6 +577,11 @@ uint16_t ProductDescriptionBlock::number_of_levels() const numberOfLevels = p->halfword(36); break; + case 165: + case 177: + numberOfLevels = 160; + break; + case 178: case 179: numberOfLevels = 71;