Skip to content

Commit c25b9b6

Browse files
committed
Finally resolved NOMADS temp ban issue, added window to alert user that GFS soundings will take a few seconds.
1 parent 7b3756a commit c25b9b6

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed
125 Bytes
Binary file not shown.
247 Bytes
Binary file not shown.

src/com/ameliaWx/soundingViewer/unixTool/RadiosondeWrapper.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,16 @@ private static void doGuiCurrHist(int currHistOption) {
112112
if (site.getFourLetterCode().length() > 0) {
113113
RadiosondeWrapper.displayCurrentSounding(site);
114114
} else {
115+
JFrame init = new JFrame("Getting GFS data, this may take a few seconds...");
116+
init.setSize(500, 0);
117+
init.setLocationRelativeTo(null);
118+
init.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
119+
init.setVisible(true);
120+
115121
Sounding gfs = ModelDerived.getGfsSounding(site.getLatitude(), site.getLongitude());
116122

123+
init.dispose();
124+
117125
new SoundingFrame(site.locationString() + " GFS-Derived", gfs, DateTime.now(DateTimeZone.UTC), 33,
118126
-96.5);
119127

src/com/ameliaWx/soundingViewer/unixTool/nwp/ModelDerived.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,21 @@ public static Sounding getGfsSounding(double lat, double lon) {
4545
System.out.println("after aligning: " + now);
4646

4747
Sounding gfsSounding = null;
48-
while(true) {
48+
for(int i = 0; i < 3; i++) {
4949
try {
5050
gfsSounding = getGfsSounding(lat, lon, now, 0);
5151
break;
5252
} catch (IOException e) {
5353
System.err.println("GFS not found for " + now + ", rolling back 6 hours");
5454
now = now.minusHours(6);
55+
56+
try {
57+
Thread.sleep(3000);
58+
} catch (InterruptedException e1) {
59+
// TODO Auto-generated catch block
60+
e1.printStackTrace();
61+
}
62+
5563
continue;
5664
}
5765
}

0 commit comments

Comments
 (0)