Skip to content

Commit

Permalink
Added SPC watch parallelograms, viewed with storm-scale warnings. Upd…
Browse files Browse the repository at this point in the history
…ated help page.
  • Loading branch information
a-urq committed Aug 7, 2023
1 parent f08ecc5 commit a34a524
Show file tree
Hide file tree
Showing 37 changed files with 371 additions and 88 deletions.
Binary file modified bin/com/ameliaWx/radarView/Field.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarMapInset.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarPanel$1.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarPanel$2.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarPanel$3.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarPanel$4.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarPanel.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$1.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$2.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$3.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$4.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$AnimateThread$1.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$AnimateThread.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$CheckOnlineThread$1.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$CheckOnlineThread.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVGraphics.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVKeyListener$1.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVKeyListener$2.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVKeyListener$3.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVKeyListener.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVMouseListener$1.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVMouseListener$2.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVMouseListener.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVMouseMotionListener.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RVMouseWheelListener.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RefreshTimerThread$1.class
Binary file not shown.
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView$RefreshTimerThread.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/radarView/RadarView.class
Binary file not shown.
3 changes: 1 addition & 2 deletions bin/com/ameliaWx/radarView/res/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
</head>
<body>
<h1>About the Creator</h1>
<p class="version"><i>RadarView Beta Version 3 - Released April 29, 2023</i></p>
<p class="version"><i>RadarView Beta Version 4 - Released August 6, 2023</i></p>
<p>Amelia Urquhart (born 2004) is a weather photographer and a meteorology student at the University of Oklahoma. She has been interested in meteorology as long as she can remember, and she has early memories of watching The Weather Channel's secondary cable station on which they played the radar loop and forecast for the Dallas-Fort Worth area on repeat. She has sheltered several times from severe storms and tornadoes, including the Rowlett, TX EF-4 of 2015; the Wylie, TX Hailstorm of 2016; and the North Dallas EF-3 of 2019. She has experienced a heat index of 115 °F and a wind chill of −22 °F.</p>
<p>She started to learn to program in Java in 2016, and began her journey in meteorological programming by making a program that displayed current GFS model data. This later evolved into a project which uploaded images of current model data from the HRRR, HRDPS, HRRR-AK, HRDPS-NORTH, and GFS for areas across the world. RadarView is her current primary project, and she later plans to make an open-source model data viewer that functions in a similar way.</p>
<p>Her scientific interests include tornadogenesis (an extremely common interest among meteorologists), RFD formation, giant hail formation, winter weather precipitation type nowcasting, and mesoscale weather modeling. She is still an underclassman in the undergraduate meteorology program, and her interests are likely to evolve and expand.</p>
<p>Her interests outside of meteorology include heavy metal music and LGBTQ+ advocacy. Her favorite bands change often, but as of the time of writing they are Gojira, Vildhjarta, and Swallow the Sun. Her minor at the University of Oklahoma is LGBTQ+ Studies.</p>
</body>
</html>
73 changes: 56 additions & 17 deletions bin/com/ameliaWx/radarView/res/helpPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,38 @@
</head>
<body>
<h1>RadarView Help Page</h1>
<p class="version"><i>Beta Version 4 - Released ???? ??, 2023<br>Made by <a href="about.html">Amelia Urquhart</a></i></p>
<p class="version"><i>Beta Version 4 - Released August 6, 2023<br>Made by <a href="about.html">Amelia Urquhart</a></i></p>
<a href="https://docs.google.com/forms/d/e/1FAIpQLScJ_znAk9eXMFkPeXFscD6WDZAvThl3yZHq1_kdk6m0l59I9A/viewform?usp=sf_link">Click here to report a bug</a>
<br>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSdteKWtiyNbjerKJ60fR7MtbUqR4ig4x7Yw0VKbO6yetnwsRQ/viewform?usp=sf_link">Click here to request a feature</a>

<h2>Source Code Availability</h2>
<p>Source code is available at <a href = "https://github.com/a-urq/radarview">https://github.com/a-urq/radarview</a>.</p>

<h2>Acknowledgements</h2>
<p><i>Special thanks to Rylan Lopez and Richie Cross for helping me test this program on MacOS and Morgan J. Fuld for helping me test on Windows.</i></p>

<h2>City Data Attribution</h2>
<p>The city data used in RadarView is a modified version of the data provided by <a href = "https://simplemaps.com/data/us-cities">Simplemaps</a> under the Creative Commons Attribution 4.0 license.</p>
<br>

<p>The page will be prettier later I swear</p>
<p>Source code will be available once I get my head around Git and Github</p>
<br/>

<h2>Contents</h2>
<p>WIP</p>
<ul>
<li><a href="#whatsnew">What's New</a></li>
<li><a href="#ptypes">Precipitation Types</a></li>
<li><a href="#controls">Controls</a></li>
<li><a href="#accessibility">Accessibility</a></li>
<li><a href="#products">Products and How to Use Them</a></li>
<li><a href="#bugs">Known Issues</a></li>
<li><a href="#future">Future Features</a></li>
</ul>

<h2>What's New in Beta Version 4</h2>
<h2 id="whatsnew">What's New in Beta Version 4</h2>
<ul>
<li>RAP Soundings! Right-click anywhere to get a sense of the meteorological environment with a vertical temperature profile and hodograph.</li>
<li>RAP Soundings! Right-click anywhere to get a sense of the meteorological environment with a vertical temperature and wind profile, as well as a set of readouts for both severe thunderstorms and winter weather.</li>
<li>SPC Watch Parallelograms now display with storm-scale warnings.</li>
<li>City markers added to basemap. Press C to toggle visibility.</li>
<li>Config settings can now be edited in the program with CTRL+H, CTRL+R, and CTRL+T.</li>
<li>Performance improvements, primarily in initialization time and memory consumption.</li>
</ul>

<h2>What's New in Beta Version 3</h2>
Expand Down Expand Up @@ -63,7 +75,7 @@ <h2>What's New in Beta Version 2</h2>
<li>Added SPC Storm Report display, press R while in the program to use.</li>
</ul>

<h2>Precipitation Types</h2>
<h2 id="ptypes">Precipitation Types</h2>
<p>Internally, the program diagnoses 12 different precipitation types using <a href = 'https://doi.org/10.1175/WAF-D-20-0118.1'>a revised version of the Bourgouin technique (Birk et al. 2021)</a>, with additional freezing rain and snow subtypes added by me. Other algorithms will be added at a later time, such as <a href="http://employees.oneonta.edu/blechmjb/JBpages/M361/BUFKITlabs/Bourgouin/Bourgouin2000.pdf">the original Bourgouin technique developed in 2000</a>. Since viewing all 12 types can be confusing, RadarView is set by default to simplify this into a three- or four-type view. The simplifications are as follows:</p>
<table>
<tr>
Expand Down Expand Up @@ -135,7 +147,7 @@ <h2>Precipitation Types</h2>
<p>In the 3-type view, freezing rain, ice pellets, and any mixing of two or more precipitation types is considered to be a wintry mix.</p>
<p>In the 4-type view, the displayed precipitation type in the case of mixes is generally the most impactful type of precipitation contained in the mix. For example, in a freezing rain-ice pellet mix, the ice pellets will accumulate on the ground and the freezing rain will glue the pellets together into a glaze ice coating. Additionally, only the freezing rain will accumulate on power lines. Since the freezing rain is probably producing a higher impact than the ice pellets in this situation, RadarView's 4-type display shows this as freezing rain.</p>

<h2>Controls</h2>
<h2 id="controls">Controls</h2>
<table>
<tr>
<th>Control</th>
Expand All @@ -153,6 +165,10 @@ <h2>Controls</h2>
<td>Mouse Wheel Spinning</td>
<td>Zooms the map in and out.</td>
</tr>
<tr>
<td>Mouse Right Click</td>
<td>Displays the RAP model sounding at that location. Only works in North America, Hawaii, and nearby parts of the Oceans. See the white-outlined area in <a href="https://rapidrefresh.noaa.gov/RAP-HRRR-RUC-domain.png">this map</a> for an approximation of where works.</td>
</tr>
<tr>
<td>CTRL+2</td>
<td>Sets the <b>Reflectivity + Precip Types</b> display to use 12 precipitation type categories.</td>
Expand Down Expand Up @@ -181,6 +197,10 @@ <h2>Controls</h2>
<td>H</td>
<td>Opens this page.</td>
</tr>
<tr>
<td>CTRL+H</td>
<td>Allows the user to change their home marker location.</td>
</tr>
<tr>
<td>I</td>
<td>Toggles the inspect tool.</td>
Expand All @@ -193,10 +213,22 @@ <h2>Controls</h2>
<td>R</td>
<td>Toggles visibility of <a href="https://www.spc.noaa.gov/climo/reports/today.html">SPC Storm Reports.</a></td>
</tr>
<tr>
<td>CTRL+R</td>
<td>Allows the user to change their default radar.</td>
</tr>
<tr>
<td>S</td>
<td>Toggles visibility of the <a href="https://www.spc.noaa.gov/products/outlook/day1otlk.html">SPC Day 1 Categorical Outlook.</a></td>
</tr>
<tr>
<td>CTRL+S</td>
<td>Displays the RAP model sounding at that location. Only works in North America, Hawaii, and nearby parts of the Oceans. See the white-outlined area in <a href="https://rapidrefresh.noaa.gov/RAP-HRRR-RUC-domain.png">this map</a> for an approximation of where works.</td>
</tr>
<tr>
<td>CTRL+T</td>
<td>Allows the user to change their time zone.</td>
</tr>
<tr>
<td>V</td>
<td>Toggles visibility of NWS watches and warnings.</td>
Expand All @@ -214,12 +246,12 @@ <h2>Controls</h2>
<td>Turns animation mode on.</td>
</tr>
</table>
<h2>Accessibility</h2>
<h2 id="accessibility">Accessibility</h2>
<p>The default color tables have been designed intentionally to be usable for both fully color-sighted users and most colorblind users. I've used the <a href="https://pilestone.com/pages/color-blindness-simulator-1#">Pilestone Color Blindness Simulator</a> to guide development of the color tables, and they should work for users with Deutanopia (the most common form of red-green colorblindness), Protanopia (a less common form of red-green colorblindness), and Tritanopia (blue-yellow colorblindness). I have not yet been able to make them usable for users with Monochromacy (black-and-white vision), but I hope to do that at some point in the future.</p>
<p>Though I've my best on the others, I have not checked the default color table for the 12-ptype precipitation depiction</p>
<p>The velocity color table is currently not very good for those with Deutanopia or Protanopia. I will hopefully be soon fixing or working around this</p>

<h2>Products and How to Use Them</h2>
<h2 id="products">Products and How to Use Them</h2>

<h3>Base Reflectivity</h3>
<p>More complete description coming later. For now:</p>
Expand Down Expand Up @@ -272,19 +304,26 @@ <h3>Base Velocity</h3>
<p>More complete description coming later. For now:</p>
<p>Doppler Velocity is a measure of how much the storm is moving toward or away from the radar site. Greens and Blues indicate motion toward the radar; Reds and Oranges indicate motion away.</p>

<h2>Known Issues</h2>
<h3>Spectrum Width</h3>
<p>More complete description coming later. For now:</p>
<p>Spectrum Width is a measure of how much variation there is in the wind within a single radar data pixel (often called a bin). It is equivalent to the standard deviation of velocity within the bin. Gray colors indicate low variation while red and green colors indicate significant variation.<br>This can be used to locate regions of convergence as well as the center of a Tornado Vortex Signature (TVS).</p>

<h3>Correlation Correlation</h3>
<p>More complete description coming later. For now:</p>
<p>Correlation Coefficient is a measure of how correlated the sizes of the objects within the radar's beam are. A correlation coefficient of 1.0 means that the objects are all the same size. A lower correlation coefficient indicates variation in sizes. Red colors indicate high correlation coefficients while yellow and blue colors indicate lower values.<br>It can be used in three ways.<br>The first way is to look for a region of lowered values in a ring centered on the radar site. These lowered values indicate a melting layer, which can be helpful in analyzing winter storms.<br>The second way is to look for a region of somewhat lowered values (roughly 0.8 to 0.9) located in the same place as very high reflectivity values (&gt;60 dBZ). This indicates the possibility of large hail.<br>The third way is to look for a sharply defined region of very low values (&lt;0.75) located in the same place as strong rotation in velocity and ideally also a hook shape on reflectivity. This indicates a Tornado Debris Signature (TDS), where debris from buildings has been lifted into the radar beam. It is usually visible when strong tornadoes are directly impacting towns.</p>

<h2 id="bugs">Known Issues</h2>
<ul>
<li>Sometimes, radar data from the previous site is displayed in place of data from the currently selected site</li>
<li>Differential Reflectivity scans are all sorts of messed up</li>
<li>Map "wobbles" a bit when panning</li>
<li>Large-scale warnings in some areas don't render in the program.</li>
<li>Large-scale warnings make the program significantly slower to render</li>
<li>Velocity scans sometimes have large sections of null data, which disrupts the storm-relative velocity computation</li>
<li>Dealiasing algorithm does not entirely work right</li>
</ul>
<h2>Future Features</h2>
<h2 id="future">Future Features</h2>
<ul>
<li>Right-click RAP soundings</li>
<li>City markers for improved map readability. For example, a dot over Dallas, Texas reading "DALLAS".</li>
<li>Historical data display</li>
<li>mPING report display</li>
<li>Multiple-panel display modes</li>
Expand Down
2 changes: 1 addition & 1 deletion src/com/ameliaWx/radarView/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public enum Field {
VLCY_BASE(1, "Base Velocity", 8, 1),
VLCY_SREL(2, "Storm Relative Velocity [Experimental]", 7, 1),
SPEC_WDTH(3, "Spectrum Width", 2, 2),
DIFF_REFL(4, "Differential Reflectivity", 3, 3),
DIFF_REFL(4, "Differential Reflectivity [Currently Broken]", 3, 3),
CORR_COEF(5, "Correlation Coefficient", 4, 4),
DIFF_PHSE(6, "Differential Phase", 5, 5),
KDP(6, "Specific Differential Phase", 6, 6),
Expand Down
85 changes: 85 additions & 0 deletions src/com/ameliaWx/radarView/RadarMapInset.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.awt.image.BufferedImage;
import java.awt.image.RescaleOp;
import java.util.ArrayList;
import java.util.Arrays;

import com.ameliaWx.soundingViewer.MapInset;

Expand Down Expand Up @@ -411,6 +412,89 @@ public BufferedImage drawMapInset(double lat, double lon, double extent, int siz
}
}

BufferedImage spcWatches = new BufferedImage(size, size, BufferedImage.TYPE_4BYTE_ABGR);
gg = spcWatches.createGraphics();

BasicStroke clr2 = new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER);
BasicStroke blk2 = new BasicStroke(7, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER);

gg.setStroke(blk2);

for (int p = 0; p < RadarView.watchParallelograms.size(); p++) {
ArrayList<PointD> polygon = RadarView.watchParallelograms.get(p);
String name = RadarView.spcWatchNames.get(p).trim();

System.out.println("intrf: " + name);
System.out.println("intrf: " + Arrays.toString(polygon.toArray()));

gg.setColor(new Color(0, 0, 0, 0));
if ("TOR".equals(name))
gg.setColor(new Color(0, 0, 0, 255));
if ("SVR".equals(name))
gg.setColor(new Color(0, 0, 0, 255));

for (int i = 0; i < polygon.size(); i++) {
int j = i + 1;
if (j == polygon.size())
j = 0;

PointD p1 = polygon.get(i);
PointD p2 = polygon.get(j);

double lat1 = p1.getY();
double lon1 = p1.getX();
double lat2 = p2.getY();
double lon2 = p2.getX();

int x1 = (int) linScale(leftLon, rightLon, 0, size, lon1);
int y1 = (int) linScale(topLat, bottomLat, 0, size, lat1);
int x2 = (int) linScale(leftLon, rightLon, 0, size, lon2);
int y2 = (int) linScale(topLat, bottomLat, 0, size, lat2);

// System.out.println(leftLon + "\t" + rightLon + "\t" + lon1 + "\t" + x1 + "\t"
// + y1 + "\t" + size);

gg.drawLine(x1, y1, x2, y2);
}
}

gg.setStroke(clr2);

for (int p = 0; p < RadarView.watchParallelograms.size(); p++) {
ArrayList<PointD> polygon = RadarView.watchParallelograms.get(p);
String name = RadarView.spcWatchNames.get(p).trim();

gg.setColor(new Color(0, 0, 0, 0));
if ("TOR".equals(name))
gg.setColor(new Color(255, 64, 64, 255));
if ("SVR".equals(name))
gg.setColor(new Color(255, 255, 64, 255));

for (int i = 0; i < polygon.size(); i++) {
int j = i + 1;
if (j == polygon.size())
j = 0;

PointD p1 = polygon.get(i);
PointD p2 = polygon.get(j);

double lat1 = p1.getY();
double lon1 = p1.getX();
double lat2 = p2.getY();
double lon2 = p2.getX();

int x1 = (int) linScale(leftLon, rightLon, 0, size, lon1);
int y1 = (int) linScale(topLat, bottomLat, 0, size, lat1);
int x2 = (int) linScale(leftLon, rightLon, 0, size, lon2);
int y2 = (int) linScale(topLat, bottomLat, 0, size, lat2);

// System.out.println(leftLon + "\t" + rightLon + "\t" + lon1 + "\t" + x1 + "\t"
// + y1 + "\t" + size);

gg.drawLine(x1, y1, x2, y2);
}
}

double lonStretchFactor = Math.cos(Math.toRadians(radarLat));

double radialLat1 = 1000.0 * 0.25 / 111.32;
Expand Down Expand Up @@ -445,6 +529,7 @@ public BufferedImage drawMapInset(double lat, double lon, double extent, int siz
g.drawImage(estados, 0, 0, null);
g.drawImage(provinces, 0, 0, null);
g.drawImage(states, 0, 0, null);
g.drawImage(spcWatches, 0, 0, null);
g.drawImage(warnings, 0, 0, null);

g.setColor(new Color(0, 0, 0));
Expand Down
Loading

0 comments on commit a34a524

Please sign in to comment.