Skip to content

Commit

Permalink
Correct URL string
Browse files Browse the repository at this point in the history
  • Loading branch information
legoboyvdlp committed Aug 20, 2019
1 parent ea698be commit 77ef74e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion AloftWx/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ private void Button1_ClickAsync(object sender, EventArgs e)
string forecast = Program.GetForecast(curCycle);
string filename = Program.GetFilename(cycleStr, forecast);

if (int.Parse(forecast) < 10)
if (int.Parse(forecast) < 100 && int.Parse(forecast) >= 10)
{
forecast = "0" + forecast;
}
else if (int.Parse(forecast) < 10)
{
forecast = "00" + forecast;
}

string NOAAurl = "https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p50.pl?file=gfs.t" + curCycleStr + "z.pgrb2full.0p50.f" + forecast + "&lev_100_mb=on&lev_125_mb=on&lev_150_mb=on&lev_175_mb=on&lev_200_mb=on&lev_225_mb=on&lev_250_mb=on&lev_275_mb=on&lev_300_mb=on&lev_325_mb=on&lev_350_mb=on&lev_375_mb=on&lev_400_mb=on&lev_425_mb=on&lev_450_mb=on&lev_475_mb=on&lev_500_mb=on&lev_525_mb=on&lev_550_mb=on&lev_575_mb=on&lev_600_mb=on&lev_625_mb=on&lev_650_mb=on&lev_675_mb=on&lev_700_mb=on&lev_725_mb=on&lev_750_mb=on&lev_775_mb=on&lev_800_mb=on&lev_825_mb=on&lev_850_mb=on&lev_875_mb=on&lev_900_mb=on&lev_925_mb=on&lev_950_mb=on&lev_975_mb=on&lev_1000_mb=on&var_UGRD=on&var_VGRD=on&leftlon=0&rightlon=360&toplat=90&bottomlat=-90&dir=%2Fgfs." + cycleStr;

Expand Down

0 comments on commit 77ef74e

Please sign in to comment.