Archives: MS1 - MS2 - MS3 - MS4 - MS5

Milestone Two Writeup

For this milestone, Ben Green was elected team leader of team one. Our work continues to be displayed on the server http://kiveo.coaster-net.com. The team is still made up of Allyson Clark, Ben Green, Tyler Ruff, and Matt Rydzik.

When starting this milestone, we had already completed some of the tasks at hand. From our previous work, the data had been sorted into different arrays by storm name and year. Using the strcmp function, MATLAB found the indices that corresponded to the same storm name in a particular year, and stored all of the data for the storm in separate arrays for the different categories, such as latitude and longitude. We were then able to begin working with m_map. We decided to give the user a variety of different maps to choose from: viewing a single year’s storm, viewing multiple years’ storms on different figures, viewing all the years, and viewing multiple years’ storms on one plot. Eventually we also added the ability to view a sea serpent on the plot of 1983. We used if loops and the input function to give the user all of these choices.

When beginning to plot the data using m_map, we noticed many errors present in the data. First, not all of the data was in longitude coordinates from -180 to 180 degrees. To correct this, we utilized a for loop that would either add 180 if a longitude data point was below -179, leave the point alone if it was in the correct range, or subtract 360 if it did not fall into either of the two categories. This, however, was not the only correction we had to make. Kossin, in order to create data points for every 3 hours instead of just every six, had averaged together data points that could not be averaged. In order to fix this, we programmed a for loop that would look at how the data changed for a storm. If the data jumps more than 6 degrees longitude in six hours, then the incorrect point is taken out of the data. A new point is created from the correct -180 to 180 degree longitude data and put in the old point’s position in the array.

Now that we had correct data, we were able to start using m_map. We decided to create our map with the Miller Cylindrical base. To best showcase the storm tracks, we set the maximum and minimum latitude and longitude values. We decided on a view that focused on the Atlantic, approximately -110 to 15 degrees longitude and 0 to 70 degrees latitude. For easy visibility, we defined the continents to be a light gray color and the oceans to be white. After our background had been completed, we began to plot the data.

We decided to use the m_track function, finding that it gave a nice representation of our data. First, we plotted all of the storm tracks in black, so that there would always be an underlying plot of the storm data. Next, we began to sort the data so we could plot the storms in color. The best way to color-code the storm tracks, we decided, would be to look at wind speeds at every point and compare the speeds to the defined hurricane category guidelines. Using a for loop and if loops, MATLAB went through all the data of the storms being plotted, separating out the points that were at tropical storm, category 1, category 2, category 3, category 4, and category 5 level strength into different arrays. We then replotted all of the data over again, with different m_track plots for each array. Because of this, we were able to define a line color and thickness for each line plotted. We created a scale for intensity – a pale blue for tropical storm, a dark blue for category one, green for category two, orange for category three, red for category four, and purple for category five.

Because we were including a color bar for netCDF data (discussed later in this report), we could not add a second color bar for the storm intensity colors. Since we had mapped the different colors through so many separate m_track plots, there were complications using both legend and m_legend functions. Our solution was to create six text boxes, displayed on the bottom of the figure window. These boxes were created with the annotation function and are a hand-coded version of the legend. Because they were easily customizable and controlled, we decided to use these boxes as our legend. The background of each box corresponds to a storm intensity plot color in the plot above.

Once we had finished color-coding the tracks, we began to work on other glory level tasks, including adding a compass rose, a sea serpent, political boundaries, and sea surface temperatures to our plot. To add a compass rose, we found code at http://wise-obs.tau.ac.il/~eran/MATLAB/Plotting.html that created a basic compass. After integrating this code into our existing program, we realized that it would need to be altered slightly. Only two directions were visible, and east had been placed in the wrong located. We then altered the code so all four directions had a branch on the compass and east and west were pointing in the correct location. Using properties of plots, we defined position, color, and line thickness for the compass.

Another feature we added as the inclusion of political boundaries. Boundaries are only included when a user wants them on the plot. The program asks the user if they would like to see these boundaries in the very beginning using the user input function. If the user enters ‘1’ when queried, the boundaries function, which was downloaded from http://rise.ocean.washington.edu/parker/PM_tools/m_map/private/mapug.html, is run. This function uses boundary data, also downloaded from http://www.maproom.psu.edu/dcw/, and plots it on the map using the m_bndry function. To insure a reasonable loading time, we did not include political boundaries for the entire map, but instead where they were relevant to the storm tracks.

We also added an option to view a sea serpent on the plot. This feature is just for the year 1983, because of time constraints. If the user chooses to view the sea serpent, the original plot is saved as an image. Then the image of the sea serpent is loaded and displayed on top of the original plot image. By defining and analyzing the colors of the sea serpent image, we were able to make it transparent on the plot.

Because we had previously begun work with the netCDF data, we decided to incorporate our work into this milestone as well. All of the data for the years defined by the user is read into MATLAB. However, like our original storm track data, this data is not in our -180 to 180 degree longitude scale, so we needed to correct it. If the longitude degree position was above 180, we subtracted 360 degrees. To ensure that the sea surface temperatures were visible on our plot, we placed the command to plot the data using contours (m_contourf) in between the definition of the projection and the coast. We defined the colormap of the contours to be one of the MATLAB presets, copper. We chose this one because it would not conflict our defined colors for the storm intensities. However, there were problems in the netCDF data for 2002, so we took out the option to plot the sea surface temperatures for that year. For maximum clarity, we included a color bar for the color map. We chose to display the sea surface temperature data for the 920th 6 hour period (approximately August 15th) of every year. We were able to specify a single date because sea surface temperatures do not have a large variability. August 20th was our chosen date because it was in the time frame of many of the storms.

In order to make our program more user-friendly, we enclosed all of our coding in while loops that ask the user if they would like to plot a different storm after they finish viewing their current choice.

Milestone Two Task Summary