Life, Technology, and Meteorology

Category: Seasonality (Page 4 of 6)

Weather Computing Resources

One thing I wasn’t expecting when entering the world of weather software with Seasonality was the sheer amount of computing resources that weather data and processing requires. You hear about the supercomputers that different government organizations purchase for weather forecasting and research, but I never really gave a second thought to it. I just assumed that those computers were running high-end computations in a completely different league than the typical online weather service. This is true to some extent, but I severely underestimated how many resources an online weather service can use itself.

Take for example the fairly simple idea of recording temperatures, wind speeds, pressure, and other conditions for locations worldwide. One commonly used system in place for this is a network of 4,000-5,000 different ICAO stations around the globe. This network of weather stations is the same used to generate weather graphs in Seasonality. Most ICAO stations are located at airports or military bases, but some of them are at other public facilities. Each of these stations will report their conditions, on average, maybe once an hour. Now that’s a lot of data for one day, but it seems pretty manageable. However, what if the idea comes up to store this information for a long period of time, say to allow Seasonality users to download several months of data to populate their graphs when using Seasonality for the first time. This raises the required resources to a whole new level. I’ve been collecting data from these weather stations for the past 9 months or so. Every month, about 4.5 million new data records are added to the PostgreSQL database I set up to keep track of this data. By now, the database is several gigabytes. The problem comes when trying to access this data at a later point in time. Even singling out a single ICAO weather station for one month of data can take 30 seconds to query. And this is on a 2Ghz Athlon 64 system with 3GB of RAM and a RAID storage system. What happens when thousands of users are hitting this database at the same time? Literally nothing, the database would be denying more requests than it could fulfill. I’ll continue to work on this functionality, and hope to find a good way to manage this load in the future.

A more recent example presented itself a little over a week ago when Environment Canada ceased to provide forecasts for international weather locations. Seasonality depended on that data to display forecasts outside the U.S., so right now a big hit is taken for users depending on Seasonality to provide that data. So I attempted to find a new data source for Seasonality to use. Prepared worldwide forecasts are hard to come by, but I have found a suitable replacement for this data in a more raw format. The source I found provides GRIB files containing the gridded output from the GFS (Global Forecast System) model. This is really good data, providing more than 50 different variables (temperature, wind speed, wind direction, pressure, cloud cover, among many others) across several different layers of the atmosphere (from the surface to 1 millibar). The grid resolution is pretty good as well, down to 0.5 latitude x 0.5 longitude blocks.

With all this data I can generate a forecast for any location around the globe with reasonable accuracy, but it comes at a cost. The data is plentiful, and it takes plenty of space. The model produces a forecast every 3 hours out to 180 hours (7.5 days) into the future. That’s 60 data sets total. Each data set is around 26MB to download, 1.5GB for a complete forecast. This is just a massive amount of data, especially when a new forecast is generated 4 times a day.

Fortunately, there is a way to pick and choose which variables and which atmospheric levels you would like to download. At the moment, I’ve narrowed down the data set I would require to about 200MB per forecast. Great, that’s doable…I adapted some Perl code I found with a free license on the internet to fit my needs, and I have a cron job going to download the data I want. Depending on the server speed, the download takes an hour or two.

Next, I need to convert the data from the GRIB binary format into something I can throw into the PostgreSQL database. The database should have a row for each block in the longitude/latitude grid, for each 3-hour time period the forecast is generated. With 0.5 longitude/latitude resolution, that’s just under 260k rows in the database for every 3 hour data set, or 15.5 million rows for the entire forecast. My Athlon server takes about 2 hours to parse all the GRIB files and throw them into the database, and this is after extensive optimization on my part.

The data doesn’t do any good if I can’t get to it easily. I need to index the data to help speed up querying. It makes sense to set up indexes based on the longitude and latitude, since this is how I will be querying the data. The indexes I’ve got so far take about 30 minutes to an hour to generate.

When all is said and done, it takes around 4-5 hours to get the forecast back-end ready for Seasonality to query. The data source I’m hitting provides new forecasts every 6 hours, so it really doesn’t make sense for me to refresh that often when it takes so much time to process the data. Maybe updating once or twice a day will be reasonable in the end.

So what about query speed when Seasonality users want to grab a forecast from the server? I think it’s fair for a query to take about 5 seconds to return data…and right now that looks to be doable with my current hardware. With adequate caching, I can probably drop the response time for frequently-used locations even lower. Then there’s redundancy to think about. I want to make sure if something wonky happens with my server or network connection, that there will be a backup somewhere else. I can’t put the CPU load required for parsing the data onto my hosting provider’s servers, but I can use their bandwidth after the data is in a format that can be queried. I’m hoping to replicate the data after it’s been processed and throw it on the hosting server.

All of this for the seemingly simple feature of a forecast. There’s still a lot of work I need to do before this new forecast will be ready, but in the end I think it will be worth it. Seasonality will no longer have a dependency on another weather outfit for forecast data. The GRIB data format is a standard, so it’s easy to add redundant sources for this data. I will also be able to update the code to provide more accurate forecasts without having to release a Seasonality update, because that is all server-side. Initial forecasts will be fairly simple, but I expect that over time I’ll be able to improve forecast detail and accuracy by making use of more data variables.

Seasonality 1.4 Preview: The Moon

I’ve been working on Seasonality 1.4 and thought I would show a quick preview of the new moon-related features. The screenshot here shows the new sun/moon view in Seasonality. The look of this will probably change before 1.4 is released, but I think it’s looking pretty good so far.

Last week I got some code working to calculate the moonrise and moonset times, so those are now displayed in text along with the sunrise and sunset times. I also added a new moon ring within the sun ring to give a more graphical representation of what the moon is doing at any given moment. This ring also provides a pretty slick view for astronomers, who often do not want the moon to be out while viewing extraterrestrial bodies. Since the moon ring and sun ring time periods match, it’s easy to see when both the sun and moon will be out of the picture. In this screenshot, the sun and moon match up pretty closely, but that’s not always the case.

I couldn’t add moonrise and moonset without adding a moon phase display, so that’s coming in Seasonality 1.4 as well. In the center of the rings, the moon will be graphically drawn with the appropriate amount shaded. It’s accurate within 0.7% of the actual moon phase over the next 5+ years. One interesting thing I learned while adding the moon phase is that the synodic month (the amount of time between one new moon and the next) is gradually getting longer. This is caused by the moon moving further from the earth, at a rate of about 3.8 centimeters per year. Just another random tidbit of knowledge gained while working on Seasonality.

Seasonality 1.3

After 5 or so months of work Seasonality 1.3 is finally ready. Version 1.3 is a Universal Binary, and it runs much nicer on Intel Macs than 1.2 had previously. I’ve also made several code optimizations, so even if you don’t have an Intel Mac you will observe a noticeable speed increase, especially while working with the satellite image and graphs.

There are plenty of new features this time around. The biggest one is a new Weather Journal. You can create a journal entry for each day and Seasonality will automatically keep track of high/low temperatures and sunrise/sunset times for that day. Then add your own text or photos to the entry. It uses a standard NSTextView, so all the typical text editor properties are available. Thanks go out to whoever worked on NSTextView at Apple/NeXT for making it so easy. 😉

There’s also a new graph interface that’s pretty cool. I received a lot of requests to be able to show more than 2 graphs at once, so this new interface will allow users to show all 6 graphs at the same time.

Another big new feature is the new radar overlay imagery. Technically, the radar images are the same as they were before, but instead of being restricted to just showing radar imagery in the vicinity of your configured locations, now Seasonality will automatically fetch radar images for wherever you happen to be browsing in the U.S., Guam and Puerto Rico. A large piece of the code to support the new radar images is a new image overlay class I created. This will make it much easier to add additional image overlays at a later point in time, and even allow users to add their own image overlays eventually. I’m hoping to find suitable radar overlays for other parts of the world, another often-requested feature.

I’ve added a couple of tips to the General Seasonality Forum. Be sure to check them out and while you’re there, feel free to post some feedback. 🙂

Large Scale Weather

If you live in the Midwest, you are probably pretty familiar with all the rain we’ve been getting the past few days. The low pressure system that has formed is one of the largest I’ve seen in quite some time. It’s centered just over Lake Michigan, and you can see clouds extending well up into Canada all the way down the east coast to Florida and the Gulf of Mexico. Yesterday it bottomed out just about 40 miles West of Mt. Pleasant. We had a 983mb pressure reading, which is the lowest pressure we’ve had here since before I started writing Seasonality. 🙂 The interesting thing about this system is that it’s not really moving much at all. Typically, low pressure systems will form to the West of us, and just move on through within a day or two. This one will probably hang around for 5-6 days. It’s centered over Lake Michigan right now, is expected to move down into Illinois and Ohio over the next day or two, and then perhaps come up North again. It’s forecasted to be dropping rain on and off here through the beginning of next week.

Here’s a screenshot of the storm in Seasonality. This shot also shows one of the cool new features I’ve added in version 1.3, a full radar image overlay. The National Weather Service started offering a high resolution US map with a composite of all the radar images. Now Seasonality uses that to generate a map, so it makes long-distance viewing much nicer with respect to precipitation. I just wish this feature could extend into Canada to show the rest of this storm (US radar sites reach just north of the US-Canada border as you can see in this image), or the rest of the world for that matter. Seasonality 1.3 is coming along slower than originally expected, but it has several new features. Expect an announcement around the end of this month.

Seasonality 1.2

Most of you have probably noticed that Seasonality 1.2 was posted today. I’m pretty excited about the announcement. While this release didn’t take nearly as long to develop as version 1.1 did, it was still a significant undertaking. The beta-testing stage alone has been over a month. So I’m both excited, and in a sense relieved that the hard part has now passed. 🙂

Today has been a pretty typical release day. I’ve spent most of my time in Mail.app and Safari, submitting the update to different news sites and responding to user feedback. I’ve been trying to target French news sites because obviously with a French translation my market just got a lot larger in that country. So far the release is going really well. The server’s been keeping up with the load without any slowdowns or problems there. Speaking of load, this will probably end up being the most traffic ever served in a single day for Gaucho Software. Since around 8:45am when the announcement hit the first news sites, the web server has hosted over 8GB of traffic. Data rates averaged over 450KB/sec for the entire hour from 1-2pm this afternoon. I wish I could see what the peak traffic values were.

Again, I want to thank Ronald Leroux and Philippe Martin for working on the French translation. I can’t even guess how many hours they must have spent on it, and it turned out great. I also want to thank all the beta testers for giving me feedback this time around. I know there were a couple of changes requested that didn’t make it into this release, but I’m hoping to have them ready for the next one. 🙂

Gaucho Software News Feeds

Ever since the beginning of Gaucho Software’s web presence, the index web page has displayed general news items about software updates and other miscellaneous items. I decided it was time to offer an RSS news feed to make it easier for users to keep up with what Gaucho Software is doing. A few weeks ago, I came across an excellent RSS generator called Feeder created by Steve Harris through his software company, Reinvented Software. Feeder finally gave me an easy way to create RSS feeds and post them on my website. So here it is, the Gaucho Software news feed:

 Gaucho Software News Feed

A general Gaucho Software news feed is great and all, but each individual app has their own news items. I’m planning to create feeds for each of them starting with Seasonality, which has an update coming soon…

  Seasonality News Feed

I’ll be adding feeds for Dash Monitors and XRG when I work on porting them to Intel in the coming months. In the mean time, any app updates for either of them will be posted to the Gaucho Software news feed.

Upcoming Seasonality Release and Survey

The release of Seasonality 1.2 is coming up pretty quick. I’m taking care of the last changes and it should be ready to go sometime next week. This version has a ton of bug fixes and a couple of new features as well. The biggest change is localization support, and I’m happy to announce that Seasonality 1.2 will be released with a French language translation. A lot of time from both a programming perspective and a language translating perspective (thanks Ronald and Philippe!) went into this effort, and I’m pretty happy with the results. Look for other translations to be included in future versions. If you are interested in doing a translation, get in touch with me.

Since the Seasonality release is close, I thought I would take advantage of the extra web traffic by posting a Seasonality Survey. I’m hoping to get a lot of user feedback to guide my development path for version 1.3 and beyond. If you have a few minutes, please take the Seasonality survey.

Al Fasoldt on Seasonality…

Check out this excellent review by Al Fasoldt in The Post-Standard (Syracuse, NY)…

I’m a big fan of good weather-reporting software for years but never thought I’d find nirvana so easily. No weather program I’ve ever tried, for Windows, Linux or OS X, comes within a light year of Seasonality.

2005 Software Gift Ideas

What a great gift idea! Seasonality was featured on the TidBITS 2005 Software Gift Ideas:

We have been surprised and pleased by a wonderful weather reporting program, Seasonality, by Gaucho Software. It’s $25 for a single license and $30 dollars for the family. We keep the locations of others in our family in the list.

Thanks! Seasonality 1.2 is coming along, but I’ve gotten slightly sidetracked with everything going on this holiday season.

Complete Satellite Image

Version 1.2 of Seasonality will include a new web export feature, so users can export data from Seasonality to a web page via templates. One thing I want to give users the option of doing is generating a full earth satellite image. This takes about 30 seconds to generate on my G5, so I expect that not everyone will want to enable it, but it’s available. Here’s one such image that I just generated a few minutes ago…


2005-11-05 5:20 am GMT, click to view full size.

To give you an idea, the full size image linked is still just 1/20th of the resolution available along each axis at 100% in Seasonality (1/400 of the total res). Ever since getting into collecting this weather and terrain data, I’m just totally amazed by it. In fact, a few weeks ago I just downloaded the second set of terrain imagery put out by the Blue Marble project, all 24Gb of it. It’s a set of 12 (1 for each month of the year) images, each with a res of 86400×43200 pixels. I’m not sure what I’ll do with it yet, but look for some kind of application of this imagery in a future version of Seasonality.

« Older posts Newer posts »

© 2026 *Coder Blog

Theme by Anders NorenUp ↑