Auckland aims to be the world's most liveable city, yet some of its beaches become polluted with sewage after rain.
Thirteen days before the world's top male triathletes dived into the chilly, salty Waitemata Harbour for the grand final of their championship series, the water was sampled for signs of bacterial contamination.
Very low levels of bacteria were found. But there was only light rain in Auckland that day - 2.4mm fell at the airport.
Fast-forward to the day of the elite men's final - Sunday, October 21, Labour weekend.
"It's 14C in the water, 15C in the air and it's pouring with rain," says the live commentary of the race in a video of the event on the Auckland Triathlon website. "Look at the rain, it's relentless."
The Auckland City Council and now its Super City successor have for many years warned against swimming at the city's beaches within 48 hours of heavy rain, because of sewage overflows from the old, combined wastewater/stormwater drains in many suburbs.
And in May, council scientists dramatically confirmed why. From March to May they took a series of water samples at five locations from St Marys Bay around to the public steps down into the Viaduct Harbour at Jellicoe St - the steps where the harbour-crossing swim event ended this month.
The samples taken during dry weather found negligible or very low levels of enterococci, a bacteria whose presence may indicate sewage contamination.
But after heavy rain, the bacterial levels shot up, especially if the sample was taken two hours after high tide, by which time the seawater backed up in stormwater pipes had drained out, along with the contaminated rainwater behind it.
The council's trigger point to put up health warning signs at swimming beaches last summer was 1000 enterococci in a single 100ml sample of water, or two consecutive samples exceeding 280.
On May 9, the level at the public steps down into the Viaduct Harbour was 1600, two hours after high tide. At the exit of the Viaduct, the level was 440. This was after a similar amount of rain to that which fell on the wettest day of the triathlon series.
Further testing to identify the sources of the contamination after heavy rain in May found no evidence that it came from birds, little evidence it came from dogs, and that human contamination was present in all the samples analysed.
The study report says that during dry weather - and in the absence of pumping station failures causing sewage overflows - "there is little concern for the quality of the water around the St Marys Bay and Viaduct areas". "However, with increases in rainfall, there are significant increases in contaminant levels, to the point that causes substantial concern for public health and safety.
"Sites with the highest bacteria levels were located where space has been created to enable and encourage public access ... the Viaduct Basin tidal stairs would have been signposted as unsafe for swimming on one occasion during this monitoring programme."
The heavily contaminated point at the exit of the Viaduct Basin is about 750m from the triathlon course. But the path of bacterial contamination in the Waitemata Harbour - driven by wind, tide and currents - and its breakdown rate from salt and sun are only starting to be adequately understood.
Triathlon World Champs 2012, which hosted the races for Triathlon New Zealand, had the water tested at the swimming course between Queens Wharf and Captain Cook Wharf by the Watercare Services laboratory on October 8, as required by the International Triathlon Union. The highest result of the three samples equated to around 10 enterococci per 100ml, a very low level of human risk and just one-tenth of the union's limit of 100 for salt water swimming to proceed.
Dave Beeche, chief executive of the host company, when asked before the peak weekend of the series if the water quality was good, said: "It's unbelievable".
"We've done lots of water quality testing over the last couple of years ... the water quality from the testing we've done changes hour to hour and location to location. It can be marginal in one spot and clear in another and change in 10 minutes with the tide. The consistent testing we've done shows it's very good quality."
But what about after rain, the Herald asked.
"The information from the council is that in extreme rain events there may be temporary, localised issues - as everyone knows."
What would he do if the union's limit was breached?
"We would move to a duathlon option, cancel the swim and go to a run-bike-run."
The proof may be in the absence of reports of sickness, although it is known that many cases of the kinds of symptoms that can be caused by swimming in sewage-polluted water, mainly diarrhoea and vomiting, don't get reported to a doctor or formally notified to an authority.
The medical director for the event, Dr Mark Fulcher, said he was not told of any cases that could be attributed to the water, although a number of Australian competitors fell ill with what appeared to have been a stomach virus passed among only that team. Their symptoms began within 48 hours of arrival in Auckland and lasted for up to 48 hours.
The Auckland Regional Public Health Service, which has lobbied for years for improvements to the inadequate, outdated drains in parts of Auckland, said it had not been told of any sickness associated with the triathlon swimming events, nor other swimming in the harbour.
In many of the older parts of central Auckland, the drainage system was designed 50 to 100 years ago to carry both sewage and rainwater. In storms, as intended, specifically-engineered overflow structures spill dilute sewage into waterways, rather than it being allowed to back up in drains with the risk of pouring into homes. As Auckland housing has intensified, the amount of hard surface has increased, funnelling more rainwater into drains and leading to more overflows.
The solution in the 1990s was to spend many millions of council dollars on installing new pipes and keeping one set for sewage and the other for stormwater - large-scale separations - an approach that lost momentum because it came to be seen as only part of the answer.
The council's acting stormwater manager, Craig McIlroy, said the CBD area was separated as a precursor to the 2000 America's Cup.
"The stormwater network should not contain any wastewater as this is contained within the separate wastewater system. The only risk of wastewater overflows from the stormwater system would be due to unknown illegal wastewater connections."
However, the separated wastewater systems all had a degree of stormwater and groundwater getting into them from cracks in the pipes, imperfect joins and rainwater being able to get into wastewater gully traps - all of which could cause a wastewater pipe to overflow in significant rain.
Combined systems are still in place in parts of suburbs from Freemans Bay and Mt Eden through to Avondale, and in parts of Remuera, Newmarket and Epsom.
Beach-goers interviewed by the Herald were surprised and some were disgusted that in the 21st century, in a developed country, their swimming areas could be contaminated with diluted raw sewage.
"It's a concern, given we've got young children and bring them down here to swim," Pt Chevalier resident Kate Murdoch, 33, said on a sunny day at her local beach. She said it wasn't widely known not to swim within 48 hours of heavy rain.
London-based Kiwi financial analyst Shay Desai, 26, relaxing near the Viaduct steps, said that knowing of the rain-linked pollution there put him off wanting to go near the water: "Just that your body would be in contact with that kind of water and expose yourself to all types of stuff, giardia, especially when there's other places you can swim without contamination."
Coxs Bay, which connects the wealthy harbourside suburbs of Westmere and Herne Bay, bears the shame of its contamination in a council sign: "Public health warning. Water quality in this area is not safe for swimming, collecting shellfish or other water activities." Part of its catchment had separation work done after its enterococci level went off the scale, but the rest fizzled out for a decade while new plans were made.
It's one of a handful of places in the region to carry permanent warnings. Other Waitemata Harbour beaches, some of which have had costly resanding schemes, throw up sporadic high or extremely high contamination results in the council's once-a-week summertime testing programme.
Judges Bay had 1600 enterococci per 100ml one day in January; Herne Bay greatly exceeded 1000 on two days the summer before; and Pt Chevalier, which can be crowded with swimmers and paddling children, had 816 just before Christmas in 2010.
Wendy John, chairwoman of the Friends of Oakley Creek, lobbies for better drainage systems and is involved in planting schemes to rehabilitate the stream, which flows from Mt Roskill to the Pollen Island Marine Reserve in the Waitemata Harbour.
She said: "In this day and age, the fact we're still allowing sewage to go into our fresh water and coastal marine areas is not acceptable."