diff --git a/AloftWx/Form1.cs b/AloftWx/Form1.cs index f759a33..6a7fd44 100644 --- a/AloftWx/Form1.cs +++ b/AloftWx/Form1.cs @@ -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;