Newsletter: Last blast

Hi divers

Weekend dive plans

Sunday: Launching from Hout Bay at 9.00 and 11.30

So, we are into May and the southeaster soon starts to wane… Except for tomorrow and Saturday. The four graphs below show the direction (around the compass rose) and amount (the size and colour of the pie wedges) of wind during each season in 2015. Our home weather station recorded quite a bit of easterly to south easterly wind, circled in red below, during autumn last year, after which we enjoyed winter diving conditions. Click on the image below to enlarge.

Seasonal wind in 2015
Seasonal wind in 2015

We had a hectic long weekend last week, with pool training on Saturday, shore dives at Long Beach on Sunday, and boat dives in some very murky False Bay waters on Monday. Fortunately the macro specialists were on the boat!

The weekend the only real option is Atlantic diving. False Bay is not all that clean and neither is the Atlantic, but by Sunday morning it will look a whole lot better and we will launch out of Hout Bay.

Launch times will be 9.00 and 11.30 am, but sites will be decided on the morning as the swell predicted for Saturday will have an impact on where we dive. Text or email me if you are keen to dip yourself in some cold Atlantic water.

regards

Tony Lindeque
076 817 1099
www.learntodivetoday.co.za
www.learntodivetoday.co.za/blog/

Diving is addictive!

To subscribe to receive this newsletter by email, use the form on this page!

When it rains…

When does rain fall in Cape Town? What time of day is it safe to leave home without an umbrella, during which months? Am I right in thinking it always pours with rain between 6.00 and 7.00 in the morning when I have to think about getting up?

We haven’t been collecting our weather station data for long enough, but I can tell you what time of day it most often rained during 2014, in each month. I showed you a slice of one of these circular charts last month, to visualise what the wind speed is at different times of day, by month.

Here’s a full circular chart showing the frequency of rain events (i.e. rainfall in a particular hour) in 2014, throughout the day, divided by month. February, April, October and December 2014 were particularly dry months – there are hardly any blue stripes on those segments. The darkest blue stripe you can see, in May, tells us that during the hour from 4pm to 5pm in the month of May, there were six or more days on which it rained (“rain events”).

Time of rain events each month in 2014
Time of rain events each month in 2014

What can we conclude from this circular plot? Looking at the rainier months (May to August), a pattern of rain during the night (outside edge of the circle) can be discerned, as well as in the early hours of the morning (near the centre of the circle). The morning – specially in May-July – seems to be a time when the rain is less frequent during this time.

Once we have a few more years of data, these circular plots will take on more conviction as we are able to smooth out annual fluctuations in rainfall and see broader patterns. March 2014 looks surprisingly (blue) wet, or April was surprisingly (pale) dry. Another year’s data will allow us to figure out which was the case. Watch this space.

A note on the graph

This chart is after Jason and Doug’s chart on their Penang weather blog. The piece of pretty R that did the plotting is here, if that floats your boat:

ggplot(df_summarised, aes(x=month, y=hour, fill=events)) +
  geom_tile(colour="grey70") +
  scale_fill_gradientn(colours = col, name="Rain\nevents\n")+
  scale_y_continuous(breaks = seq(0,23),
                     labels=c("12.00am","1:00am","2:00am","3:00am","4:00am","5:00am","6:00am","7:00am","8:00am","9:00am","10:00am","11:00am","12:00pm",
                              "1:00pm","2:00pm","3:00pm","4:00pm","5:00pm","6:00pm","7:00pm","8:00pm","9:00pm","10:00pm","11:00pm")) +
  coord_polar(theta="x") +
  ylab("HOUR OF DAY")+
  xlab("")+
  ggtitle("Number of rain events by month and time of day")+
  theme(panel.background=element_blank(),
        axis.title.y=element_text(size=10,hjust=0.75,colour="grey20"),
        axis.title.x=element_text(size=7,colour="grey20"),
        panel.grid=element_blank(),
        axis.ticks=element_blank(),
        axis.text.y=element_text(size=5,colour="grey20"),
        axis.text.x=element_text(size=10,colour="grey20",face="bold"),
        plot.title = element_text(lineheight=1.2, face="bold",size = 14, colour = "grey20"),
        plot.margin = unit(c(-0.25,0.1,-1,0.25), "in"),
        legend.key.width=unit(c(0.2,0.2),"in"))

About last summer…

How was your summer? Can you recall it? We are far enough into winter that it feels like quite a distant memory, but the summer months of 2014-2015 in Cape Town were memorable for all the wrong reasons! It felt like an endless series of windy days, and we were not able to go diving nearly as often as we’d have liked. South easterly gales raged for weeks on end. Most days boat diving was out of the question, and shore diving was iffy. When the wind stopped, the visibility was appalling. Needless to say the frustration levels of Sun Valley’s resident dive boat skipper were high.

Looking back at what our weather station recorded during this time, it’s clear that the feeling of experiencing endless windy days was not an illusion. These two charts of the wind data from November to the end of January are in knots – to remind you, a wind speed of 10 knots = 18.52 kilometres per hour.

The chart below shows the wind speed and direction for each day in November to January that our weather station recorded data. The wind speed is illustrated in two ways (a bit of redundancy, but easy to read): the colour of each block, and the length of the direction arrow inside the block. So, for example, the first Friday in December (top right hand corner of the December block) was a very windy day from the east.

Summer 2014-2015 wind calendar plot
Summer 2014-2015 wind calendar plot

You can observe several things above. One is that many, many days had average wind speeds of over 10 knots, at which point it is already getting a bit uncomfortable on the boat and tricky/risky fishing divers out of the water. The other is how dramatically the wind started to drop off at the end of January. (If you are wondering why the charts end when they do, the bearing in our Oregon Scientific anemometer packed up mid-February and so that month has a bit of missing data while we waited for a replacement unit!)

Summer 2014-2015 wind line plot
Summer 2014-2015 wind line plot

The same trend is visible in this chart, which shows the average wind speed each day from November to end January (the red line), and an envelope around it showing the maximum wind speed on that day, and the minimum (which was, at times, zero knots).

Summer is the windiest time of the year in the Cape – refer to my post on wind trends for 2014. Even though it’s colder, we are relieved to be in a season of lighter winds that come from favourable directions (in the north to west quadrant) for False Bay.

A note on the graphs

I discovered calendar plots on Jason and Doug’s Penang weather blog, which is heaven for visualisation and weather nerds. The calendarPlot function is part of the R openair package. And here’s the code for the line chart, using ggplot2:

ggplot(data=df_summarised, aes(x=date, y=wind, group=1 )) +
  xlab("Date") + ylab("Wind speed (knots)") + 
  ggtitle("Summer 2014-2015 daily average wind speed") +
  theme_bw() +
  geom_ribbon(aes(ymin=windmin, ymax=windmax), fill="#fee6ce", colour=NA) +
  geom_line(colour="#e6550d", size=1)

Better (wind) days are coming

You’ll have already felt this, but here’s a bit of encouragement about the number of diving days as we progress through Cape Town’s brief autumn (OK, I think we’ve already done that) and into winter proper. The average wind speed has dropped, and more and more of the day – on average – is relatively windless. Is there a historical precedent that we can appeal to, and conclude that the weather in late autumn and early winter will be good for diving?

I don’t have a precedent going back more than one year, which may cause you to question conclusions based on it, but I offer it to you anyway. The slice of pie shown below was calculated from our home weather station wind measurements, taken in April, May and June 2014. It shows the average wind speed during each of those months, at each hour of the day. (I’ve previously shown you some other information derived from these same measurements, here.)

Wind speed at different times of day (2014)
Wind speed at different times of day (2014)

We can learn several things from this segment of a circular chart. First, the daily average wind speed during any hourly period in April-June 2014 didn’t get much above 8 knots, which is about 15 km/h. Of course the wind did blow stronger (and less strongly) than this, but this is a chart of the average. Looking at where those bright green slices are on the chart, we can see that during these months, it’s windiest between the hours of 7am and 2pm (just when you want to go diving).  Finally, you can see that April was windier than May, and May was windier than June (less green, less yellow, more beige). So conditions for being out on and in the ocean improved as we moved further into winter 2014.

Is it fair to infer something – an expectation – about winter 2015 from this chart? I think it wouldn’t be unreasonable to do so, as long as you’re not too dogmatic about it.

A note on the graph

This is a slice (manually edited out of the original) of a circular plot that I did using code cannibalised and modified from Jason and Doug’s Penang climate blog. I had to reverse the labels for the times of day because I’m only showing you the bottom of the circle. The meat of the plotting function looks like this (thanks to Pretty R):

ggplot(df_summarised, aes(x=month, y=hour, fill=speed)) +
  geom_tile(colour="grey70") +
  scale_fill_gradientn(colours = rev(topo.colors(7)),name="Wind Speed\n(knots)\n")+
  scale_y_continuous(breaks = seq(0,23),
                     labels=c("12.00am","1:00am","2:00am","3:00am","4:00am","5:00am","6:00am","7:00am","8:00am","9:00am","10:00am","11:00am","12:00pm",
                              "1:00pm","2:00pm","3:00pm","4:00pm","5:00pm","6:00pm","7:00pm","8:00pm","9:00pm","10:00pm","11:00pm")) +
  coord_polar(theta="x") +
  ylab("HOUR OF DAY")+
  xlab("")+
  ggtitle("Wind Speed by month and time of day")+
  theme(panel.background=element_blank(),
        axis.title.y=element_text(size=10,hjust=0.75,colour="grey20"),
        axis.title.x=element_text(size=7,colour="grey20"),
        panel.grid=element_blank(),
        axis.ticks=element_blank(),
        axis.text.y=element_text(size=5,colour="grey20"),
        axis.text.x=element_text(size=10,colour="grey20",face="bold"),
        plot.title = element_text(lineheight=1.2, face="bold",size = 14, colour = "grey20"),
        plot.margin = unit(c(-0.25,0.25,-1,0.25), "in"),
        legend.key.width=unit(c(0.2,0.2),"in"))

I didn’t want to put the entire year’s data up here in a full circular plot because I think it’s a little too useful to share, if you know what I mean! You can see what a complete plot looks like on Jason and Doug’s blog – examples here and here.

 

A year of weather at home: Wind

After examining the year’s worth of temperature and rainfall data from our home weather station, we get to the fun stuff: wind. To visualise wind data, we use a construct called a wind rose. You can think of it like a compass, with north at the top and south at the bottom. We use the compass to display two pieces of information about the wind: its speed, and the direction from which it blew.

We represent the speed of the wind by a colour scale. In these wind roses, the strongest winds are dark blue to dark grey, and the lightest wind is yellow and pale green. The direction that the wind came from is plotted directly onto the compass: the more the wind blew from a particular compass heading, the longer the segment on the chart. The compass is divided into twelve segments of thirty degrees each (12 x 30 = 360 degrees).

Wind rose for December 2013-November 2014
Wind rose for December 2013-November 2014

In the wind rose above, you can see that the single most common direction from which the wind blew at our house between December 2013 and November 2014 is from headings between 75 and 105 degrees: easterly. The next most common wind direction was from headings between 285 and 315 degrees: a north wester. Next most common were south easterly winds (105-135 degrees), and then south south easterly winds (135-165 degrees). This summarises the wind regime in Cape Town: south easterly winds in summer, and north westerlies in winter. We can blame the South Atlantic high pressure for this.

If I split the wind data by season, using 15 May as the start of winter, 15 August as the start of spring, 15 November as the start of summer, and 15 February as the start of autumn, we get the following picture:

Seasonal wind roses
Seasonal wind roses

It is clear from the seasonal division of the data that the clearest wind regimes occur during the summer (east to south south easterly winds) and winter (north westerly winds, some of which are warm berg winds preceding cold fronts). During spring and autumn, we get wind from all directions, but a lot of easterly winds in both those seasons. Unfortunately an easterly wind makes diving on the western side of False Bay very unpleasant – those are the days we stay at home and work in the pool!

One thing that’s important to keep in mind when looking at these charts is that the wind differs quite a lot at a given point in time, all around Cape Town. Both direction and strength can be modified by mountains, of which we have many, and data collected in Sea Point, Newlands or Kommetjie over the same time period would possibly look quite different. We’ve figured out what it means for False Bay when our weather station registers a particular wind strength or direction, but these readings aren’t exactly what you’d get if you went out in the bay. The wind on the bay is stronger than it is at our house during summer (no mountains to obstruct the south easter), and less forceful in winter (it has to blow over the mountains to get to False Bay).

We’ll refer back to these weather station posts in another series of posts I want to do when I get a chance, about understanding False Bay’s weather patterns and their effects on the sea state. Stay tuned.

A year of weather at home: Rainfall

Continuing our exploration of the delicious weather data set that our weather station has generated over the last year and a bit, here are some easy to read rainfall charts. Each vertical bar represents the rainfall for a particular month. Total rainfall at our home in Sun Valley from December 2013 until November 2014 was 775.3 millimetres. To put that in perspective, rainier areas of Cape Town such as Newlands can have 2,500 millimetres of rain in a year.

Monthly rainfall figures
Monthly rainfall figures

The seasonal chart (with winter starting 15 May, spring on 15 August, summer on 15 November and autumn on 15 March) reveals nothing earth shattering. The Cape is a winter rainfall area, and we got well over half our year’s rainfall between mid May and mid August. Summer is very dry, and a good time to crack open a book about gardening in coastal areas

Seasonal rainfall
Seasonal rainfall

A year of weather at home: Temperature

Lo and behold, we now have a year and a bit of weather station data, collected at home in Sun Valley. We derive an enormous amount of utility and enjoyment from the weather station (being unashamed weather nerds), and I am very excited to get my hands on a good chunk of data to visualise. I used R for the charts in this and the following two posts. I haven’t got my head around ggplot2 (one of the powerful plotting packages built for R) in a very meaningful way yet, but I’m using the weather data as a fertile field for my plotting experiments. The charts I’m going to show are using 12 months of data, but not a calendar year. The data runs from the start of December 2013 until the end of November 2014.

Monthly temperature chart
Monthly temperature chart

I chose to plot the temperature in a radial chart. Each axis represents a month, and the minimum temperature for the month is shown in yellow at the centre of the axis. The year’s lowest temperature was on 7 July, and was recorded as 3.5 degrees. That morning Tony poured warm water into our little pond at the front door, to provide some winter cheer to the tadpoles, and my car was covered with a coating of ice. I am depressed – just looking at this photo – by how gloomy it is at 7.30 am in winter.

Ice on my car on the coldest day of the year
Ice on my car on the coldest day of the year

The orange line is the average temperature recorded each month. It lies around a dotted grey line with a label of 17.6 on it; this is the average temperature for the year, and is quite close to the annual average temperature that I generally hear bandied about for Cape Town of 18 degrees.

The red line around the outside of the chart shows the maximum temperature each month. The maximum for this year of data was a round 35 degrees recorded in January.

I haven’t split the temperature chart seasonally, but as a general rule of thumb in Cape Town (that I think I got from Lawrence G. Green, rather than the equinoxes and solstices) you can think of winter as starting on 15 May, spring on 15 August, summer on 15 November, and autumn on 15 February (though personally I think autumn is short and only kicks in during mid to late March). So if you imagined drawing an X over the radial chart, summer would be between the upper two arms, and winter at the bottom.

Maps about sharks (part II)

For the final assignment in week five of the Coursera MOOC I just completed, Maps and the Geospatial Revolution, we were tasked with creating a map that tells a story. Following on from the discussion I’d had with my classmates in week four, I decided to make the series of maps I’d talked about in the discussion, showing trends in human-shark interactions through time. I downloaded the entire International Shark Attack File database for South Africa from SharkAttackFile.info, and some census data from Statistics South Africa. I used the census data to normalise the ISAF data, so that we can look at rates of interaction and account for increasing coastal populations.

South African coastal provinces and sea surface temperature
South African coastal provinces and sea surface temperature
Colour scale for maps showing number of incidents
Colour scale for maps showing number of incidents

This series of maps shows the number of interactions (fatal and non-fatal, including bites, nudges, etc) between humans and sharks for each decade between 1951 and 2010, as well as the rate of interactions per million people. Its purpose is to determine

  • whether the widely-held perception in South Africa (and in the Western Cape province particularly) that shark attacks are increasing unchecked, is correct;
  • and whether the frequently-provided partial explanation, that increasing coastal populations – putting more people in the water and in the home of sharks – explains the perceived increase or not.

I think these maps are an improvement over the ISAF map for South Africa for a couple of reasons:

  • We can spot trends through time, which a single, static map does not allow.
  • The ISAF data quality has probably improved over the years, and plotting data from 1905 and 2005 on the same map is questionable. At least this way we can just look at the most recent maps if we want to know what things look like right now.
Colour scale for maps showing number of incidents per million people
Colour scale for maps showing number of incidents per million people

From the map series above, you can see that the number of encounters between humans and sharks each decade has remained fairly constant. A naïve reading of the data would suggest that there have been no advances in mitigating the risk of a shark bite. However…

The rate of encounters per decade (normalising the data for increasing coastal populations and water use – orange maps below) has mostly been decreasing, after peaking in 1970. In KZN, this can probably be attributed to increased shark netting at swimming beaches. In Cape Town, the Shark Spotters program (started in 2004) warns swimmers out of the water when a white shark is spotted near the backline of the surf, and notifies them when it is safe to return to the water. In the last 25 or so years scientific research has also shed light on the conditions that sharks tend to prefer, enabling water users to avoid the water at these times.

The water temperature off the Western Cape ranges from 10 to 22 degrees celcius, while off KwaZulu Natal (KZN) it varies between 20 and 25 degrees with the seasons. Warmer water temperatures draw more people into the water, where they meet sharks. For the first 40 years of my data set KZN has a relatively high rate of shark encounters because all it took was a bathing suit to enjoy the ocean there. The Western Cape only caught up to KZN with respect to human-shark interactions once thermal protection from wetsuits became commonplace and more affordable in the 1970s, and people were able to stay in the water for longer.

There is a lot of natural variation in the numbers. Detecting firm trends in time series derived from an ecosystem is tricky, as many factors influence the process under observation. Great white sharks have been protected in South Africa since 1994, but because there was no known baseline population figure for the animals at that stage, it is difficult to assess whether there has been an increase in shark numbers as well as bathers. The presence of a whaling station in Durban, that closed in 1975, probably also contributed to numbers of sharks close to the Durban beachfront (attracted by the offal that was pumped out into the ocean in front of the Bluff) that were larger than there would be otherwise.

Finally, the likelihood of you meeting a shark while in South African waters (unless you go out of your way to, on a cage or baited dive) is very, very small. The most recent numbers put it at a less than six in a million chance over ten years. We dramatically overestimate the risk of a shark incident, because they are so emotive and fear-inducing.

If you want to see these maps laid out nicely in sequence, click here to download a pdf of my assignment. It’s easier to follow, I promise!

Maps about sharks (part I)

I’ve recently completed an online course via Coursera, called Maps and the Geospatial Revolution, offered by Pennsylvania State University. Coursera is fabulous, and offers things called MOOCs – Massive Open Online Courses. Most (if not all) of them are free. I’m using it as a way to supplement my education with (1) things I’d never heard about when I was 17 and choosing what to do with my future, and (2) things I was interested in back then already, and probably should have done instead of or in addition to what I did study. Also, (3) supplementing the toolkit I use every day at work, specifically with the programming language R (which is nice for statistics, but actually really interesting to me because you can use it to plot amazing maps). I heard about this course, and about Coursera, from this article.

The Map MOOC I did comprised video lectures, quizzes, practical assignments using the ArcGIS mapping system, and discussion assignments in which we had to share maps we’d found or made, and ideas around the theme of each week’s class. The week four assignment required us to find and discuss maps related to natural hazards around where we live. Our practical assignments that week related to things like earthquakes, tornadoes, volcanic eruptions and floods. I struggled to think of any natural hazards associated with life in South Africa, but eventually came up with this:

I live in Cape Town, South Africa, a location that is gloriously far removed from the edge of any tectonic plates. We don’t have volcanoes, we don’t have earthquakes to speak of, and there are no tornadoes, hurricanes, typhoons, avalanches, forest fires (although we do have some) or any other massive weather or seismic phenomena. For this I am grateful.

We do, however, have lots of lovely sharks living in the waters around our coastline. South Africans are outdoor-loving people and some of our most popular swimming beaches (Fish Hoek in Cape Town, for example) have been the site of multiple interactions between humans and sharks, several fatal.

In Cape Town the Shark Spotters program aims to strike a balance between protecting humans and conserving white sharks, which are the main large shark species found in our waters. Spotters watch the beaches from elevated locations (the Cape Peninsula is nicely mountainous, so this is possible), and since white sharks tend to cruise near the surface when they come inshore, they can be seen if conditions are good. A siren warns swimmers out of the water. When the shark leaves, the swimmers can get back in. A flag system on the beaches also reports whether visibility is good, and whether a shark has been seen. A report by the City of Cape Town on the most recent incident, in which a body boarder was killed, gives a good idea of how the city approaches the problem – the science-based, conservation oriented approach is something I’m very proud of about my city.

The International Shark Attack File, maintained at the Florida Museum of Natural History, keeps (or tries to keep) a record of all interactions between humans and sharks, worldwide. They have some quite rudimentary, but easy to understand, maps showing how many interactions have occurred in various places. Simple colour scales indicate relative frequency. Here’s the one for South Africa. For comparison, here’s one for Australia, where the issue of shark bites has been often in the news recently. Western Australia has had a number of fatalities (mainly surfers), but the map shows that taking the entire history that the ISAF has on file into account, Western Australia actually lags some way behind Queensland and New South Wales.

There are various explanations proposed for the uptick in interactions between humans and sharks in recent years – South Africa, Western Australia and Reunion Island are examples of countries that have seen an increased frequency. The two most plausible sounding explanations are (1) natural variation – you’re dealing with a random variable that will fluctuate around some kind of long term mean, which is unknown, and (2) massive increase in the number of water users, and hence more opportunities for people to meet sharks in the ocean. Populations are more mobile, surfboards and holidays are cheaper than they used to be, and swimming in the sea for recreation – which was almost unheard of 100 years ago, is now a “thing”.

Publishing maps of the shark bite data enable people to make informed decisions based on the risks of swimming or surfing at any given time. Shark Spotters also make additional information, such as the time of year when sharks approach the beaches (the Southern hemisphere summer months) and the conditions (water temperature, phase of the moon, etc) that correlate with more frequent sightings, available to the public.

Anyway. Long waffle! I am quite passionate about this subject.

Here’s the ISAF map for South Africa that I shared. Click on the map to go to the ISAF website, where you can see the legend and a bit of supplementary information. This is an example of a choropleth map, in which areas are shaded according to a statistical variable (in this case, the number of shark bites that occurred in the province since 1905).

ISAF shark attack map for South Africa
ISAF shark attack map for South Africa

My fellow students raised some great points about the ISAF maps, which are of dubious utility. Juernjakob said that

I think the choropleth map on shark attacks in Australia (and probably the one for South Africa as well) could be improved by correcting for the population of the states. Interactions between sharks and humans are more likely where there are more humans and more sharks. Since we know where the humans are, let’s take that out of the equation by normalising the number of shark attacks by the population of humans. That would give a better indication of shark population/aggressiveness/human behaviour /whatever the factors are that lead to shark attacks.

He also rightly pointed out that:

There’s still a lot of uncertainty about the data quality (is it all gathered over the same period of time? How many people actually go swimming in the ocean, as opposed to just living in the state?), but it’s a step.

I replied that:

It’s not clear whether the data is gathered across the same period of time for each area, and the quality will definitely vary from location to location. Also, sharks and people tend to bump into each other infrequently and with widely different time intervals between bites (sometimes years, sometimes months). Making a map using longer time periods is more instructive in some sense, as you might be able to infer more from a large sample. But if there’s been a big change in the number of people, the way they use the water, or in the number of sharks, a single map might hide some of the information. Something a rolling 10 year number (like “average number of shark attacks per 100k inhabitants over a 10 year period”) shown in a sequence of small maps (like this one – it’s a members only page but the image says it all) would convey a time trend as well as location information.

Another very cool map related to sharks that came up in the week four discussion about the ISAF map is the one maintained by Ocearch, showing the tracking data for the white sharks tagged during previous Ocearch expeditions. You can check it out here – and spend ages looking at what sort of travels are made by the white sharks tagged around South Africa.

This discussion gave me some ideas for my week five (final) assignment in the course, which was to make a map that tells a story. More to follow…