Skip to content

Commit

Permalink
Finally resolved NOMADS temp ban issue, added window to alert user th…
Browse files Browse the repository at this point in the history
…at GFS soundings will take a few seconds.
  • Loading branch information
a-urq committed Nov 20, 2023
1 parent 7b3756a commit c25b9b6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
Binary file modified bin/com/ameliaWx/soundingViewer/unixTool/RadiosondeWrapper.class
Binary file not shown.
Binary file modified bin/com/ameliaWx/soundingViewer/unixTool/nwp/ModelDerived.class
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,16 @@ private static void doGuiCurrHist(int currHistOption) {
if (site.getFourLetterCode().length() > 0) {
RadiosondeWrapper.displayCurrentSounding(site);
} else {
JFrame init = new JFrame("Getting GFS data, this may take a few seconds...");
init.setSize(500, 0);
init.setLocationRelativeTo(null);
init.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
init.setVisible(true);

Sounding gfs = ModelDerived.getGfsSounding(site.getLatitude(), site.getLongitude());

init.dispose();

new SoundingFrame(site.locationString() + " GFS-Derived", gfs, DateTime.now(DateTimeZone.UTC), 33,
-96.5);

Expand Down
10 changes: 9 additions & 1 deletion src/com/ameliaWx/soundingViewer/unixTool/nwp/ModelDerived.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@ public static Sounding getGfsSounding(double lat, double lon) {
System.out.println("after aligning: " + now);

Sounding gfsSounding = null;
while(true) {
for(int i = 0; i < 3; i++) {
try {
gfsSounding = getGfsSounding(lat, lon, now, 0);
break;
} catch (IOException e) {
System.err.println("GFS not found for " + now + ", rolling back 6 hours");
now = now.minusHours(6);

try {
Thread.sleep(3000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

continue;
}
}
Expand Down

0 comments on commit c25b9b6

Please sign in to comment.