Salekhard (66.53 °N, 66.67 °E) is located in Yamalia at the Northern end of the Ural mountain range. 95% of the daily average temperatures observed at Salekhard weather station since 1882 fall within the shaded area of the above graph. The red line at 5°C is an indicative lower threshold for plant growth. Clearly, the growing season in Yamalia is temperature limited, variable and short.

Tree ring data have been collected from specimens of living and sub-fossil larch trees (*Larix Sibirica*) found in the vicinity. This is known as the *Polar Ural* dataset. Specialists have created growth index chronologies extending back over more than a thousand years, allowing inferences to be made about local climatic history. The data confirm that annual tree growth is correlated with “summer temperature” (usually taken as the average of June-July-August). The Polar Ural dataset includes X-ray measurements of annual maximum latewood density (MXD). It turns out that MXD is more strongly correlated with temperature than are noisier tree ring widths, making the Polar Ural data an especially useful tree ring thermometer.

Plants have a more complex response to temperature than does, say, a mercury thermometer. In horticulture daily growth is usually taken to be zero below a base temperature threshold and linear above. However this response is unlikely to be uniform over the growing season. Indeed for most plant species, warmth is more beneficial in the early “vegetative” part of the growing season than in late summer or autumn. Putting these facts together, I assume that annual tree growth is sensitive to an *effective growing season temperature* defined by

(1)

where is temperature on day and is an interval of days which spans the growing season (e.g. for Polar Urals I took from 11 Apr to 27 Oct). Daily weights () can be modelled flexibly using a two parameter function (defined on the interval [0,1]):

(2)

and produces a centrally peaked distribution, while controls the degree of asymmetry. Positive values of give a higher weight to earlier parts of the growing season and visa versa.

Although wood density is expected to increase with , it cannot exceed some physical limit, implying an additional non-linearity in the relationship between and MXD growth index. A simple model of expected MXD is:

(3)

For the same reason, errors about expected MXD are skewed to the downside. I assume a skew-Normal distribution:

(4)

For zero skew () this reduces to a standard normal distribution with mean and standard deviation .

With suitable priors, joint posterior probability distributions for the 7 parameters of Equation 1-4 were obtained using the remarkable Markov Chain Hamiltonian Monte Carlo package *stan.*

For *stan* aficionados, the calculation used 4 chains each with 1000 iterations of which 500 were warmup. All values of 1.01 suggesting good convergence. The fit to MXD data is illustrated below using mean values of the parameters (showing 5% and 50% confidence intervals of the skew Normal error distribution).

A few more things.

- The posterior distribution of and can be used to estimate the point in the growing season where growth is most sensitive to temperature. This turns out to be 27 June 17 days. As expected, this is in the earlier part of the growing season.
- Prior and posterior distributions of are shown in the graph below. is quite well constrained by the data at biologically reasonable values i.e. within the range expected for a cold weather plant species.
- The posterior “summer temperature” determined by Bayesian analysis is similar but not identical to the standard JJA summer temperature often used by specialists to reconstruct of past climates close to the tree-line in the Northern Hemisphere. The relationship is illustrated below using mean posterior parameters values.

In a follow up post I will look at the calibration problem of reconstructing from observed .

]]>

- Chromaticity diagrams represent all colours that can be perceived by the human eye. The L
*uv*colour space (“CIE 1976”, illustrated above at a particular luminosity L) is believed to be approximately “perceptually uniform” which means that the distance between any two colour points is proportional to the colour difference perceived by humans. - The colours of the rainbow (spectrum of visible light) correspond to saturated colours on the curved boundary of the
*uv*-diagram. These monochromatic colours (indicated above at 20nm intervals) are not distributed uniformly in*uv*space. In other words the*colour acuity*of the human eye depends on wavelength. There is a strong peak at 484nm (cyan) and another broader peak at 592nm (orange).

- The colours of the rainbow are shown below, firstly as a linear function of wavelength and secondly in perceptually uniform space. Notice that the cyan, blue-green and orange areas expand, while green, red and violet shrink.

- Digital photographers are familiar with tristimulus sRGB, Adobe RGB and proPhoto colour triangles. In
*uv*space, these cover 33%, 39% and 77% of perceivable colours respectively. Of course, colours outside the sRGB gamut cannot be displayed correctly on any sRGB device. In particular, strictly speaking none of the colours of the rainbow are displayed correctly in sRGB (or ARGB). - Assuming that it is perceptually uniform, the
*uv-*diagram can be used to compute the*colour error*for the visible light spectrum*.*ARGB reduces the colour error at all wavelengths relative to sRGB, because the sRGB gamut is a subset of the ARGB gamut. However there is still a significant error at the 484nm colour acuity peak. proPhoto has the nice property that the colour error is zero in the vicinity of the cyan and orange colour acuity peaks. Unfortunately no proPhoto displays exist at the present time. - There is an excellent discussion of the difficulties in rendering the visible light spectrum here.

Computations were done using R’s *colorscience* and *rgeos* packages.

]]>

..*large eruptions in the tropics and high latitudes were primary drivers of interannual-to-decadal temperature variability in the Northern Hemisphere during the past 2,500 years. Overall, cooling was proportional to the magnitude of volcanic forcing and persisted for up to ten years after some of the largest eruptive episodes. Our revised timescale now firmly implicates volcanic eruptions as catalysts in the major century pandemics, famines, and socioeconomic disruptions in Eurasia and Mesoamerica*..[1]

- a large volcanic eruption injects tens of millions of tons of sulphur dioxide into the stratosphere, causing global or hemispheric dimming. The cooling effect may last for several years.
- the box-and-whisker graph above shows distributions of the annual growth of trees at two subarctic (taiga) forest sites in Quebec and Russia and at a subalpine forest in France, from 1300 to the present day. These sites are close to the tree line where temperature is likely to have been the limiting factor for growth. The graph suggests that volcanic cooling had a significant impact on forest growth.
- tree ring chronologies for each site were created by detrending raw data from individual trees and averaging. While this procedure loses information about climatic shifts lasting longer than a few decades, shorter term variability (for example, from volcanoes) is retained.
- sulfur deposition in Antarctic ice cores was taken as the measure of volcanic aerosols. A simple annual average from 21 carefully dated Antarctic ices cores was taken
*[1]*. To allow for the fact that aerosol effects can last for more than one year, an exponentially weighted moving average with decay constant of 3 years was computed. Years in which this average exceeded a threshold (40ng/g) were deemed “volcanic”. There were 30 such years since 1300, an average of 4 per century. Interestingly there have been no such years since 1821. - the list of “volcanic” years according to the above criterion since 1300 are: 1347 1459 1460 1461 1462 1463 1464 1465 1466 1600 1601 1602 1603 1604 1643 1644 1696 1697 1698 1810 1811 1812 1813 1815 1816 1817 1818 1819 1820 1821. Most of these correspond to years following well-known historical eruptions such as Kuwae 1453, Huaynaputina 1600, Tambora 1815 and the mystery 1809 volcano.
- strangely, the impact of volcanoes appears weaker if Greenland ice core data is used instead of Antarctic data. Furthermore, the relation between tree-ring and ice core data appears much weaker in the pre-1300 data. For example, there is little evidence of the very large 1257 Samalas eruption in the growth indices at the sites selected (below).

Tree ring indices were calculated from raw research data (.rwl files) archived by NOAA paleoclimate. For example, the Quebec l1 data is available here:

https://www1.ncdc.noaa.gov/pub/data/paleo/treering/measurements/northamerica/canada/cana458.rwl

Growth index chronologies were calculated in R using the dendrochronology *dplR* package. Simple negative exponential detrending was used, which attempts to capture mean biological growth rates over the life of a tree (typically conifer ~ 100 years). For example, the raw Quebec l1 site index chronology (Gennaretti *et al* ) was calculated as follows:

library(dplR) l1 <- read.rwl("https://www1.ncdc.noaa.gov/pub/data/paleo/treering/measurements/northamerica/canada/cana458.rwl") l1.rwi <- detrend(rwl = l1, method = "ModNegExp") l1.crn <- chron(l1.rwi, prefix = "QUE") ...

Antarctic sulfate ice core data described in Sigl et al are available in this spreadsheet.

** [1] Timing and climate forcing of volcanic eruptions for the past 2,500 years.** Sigl, M., Winstrup, M., McConnell, J. R., Welten, K. C., Plunkett, G., Ludlow, F., … Woodruff, T. E. (2015). Nature, 523(7562), 543–549. DOI: 10.1038/nature14565

An AC power network consists of “buses” (vertices or nodes) and “transmission lines” (edges or links). Buses are of two types – “generators” (power sources) and “loads” (power sinks). To a good approximation, power flowing along a link from node i to node j in a high voltage AC transmission network is given by

(1)

where is the voltage phase at node and is the capacity of the transmission line linking and . Maximum power flows when the phase difference is 90.

The capacity of the transmission network as a whole is the maximum total power consumption that it allows. Assume for simplicity that all transmission lines have the same capacity and that all generators and all loads are identical. This simplification means that, if there are generators and cities, each generator produces power and each load consumes power . Given a network topology and , the set of ‘s which satisfy Equation 1 can easily be found, at least for smaller networks. Eventually, when is increased to a critical value, no solution is possible. The capacity of the network has been reached.

Figure 1 shows a 5-node 3-generator 5-link network operating at it’s critical capacity. Each generator produces power and each load consumes 1.5. Power flows are indicated in red, with arrows on links giving the directions of flow. Node arrows indicate phase angles. Note the 30 phase difference between generators A and B and between the cities.

Suppose that a new link is added between A & B, coupling the phases of these two generators. The large phase angle between A & B of Figure 1 produces a current which cannot be sustained without disrupting the phases on all of the other nodes.

The new critical state with phases reorganised to maximise capacity in the new network is shown in Figure 2. Generators A & B are now nearly in phase, with only a small current flowing between them. The capacity of the network is reduced to 2.91, 3 lower than the less connected network of Figure 1.

A more extreme case is shown below, where adding an additional three links to a simple power network degrades the capacity of the network by .

Calculations using ** R**‘s excellent

[1] *Braess’s paradox in oscillator networks, desynchronization and power outage*, D. Witthaut and M. Timme, 2012.

]]>

- The graph shows annual median speed of ships from 1750 to 2014. It is based on historical location data from 617,754 vessels in the ICOADS dataset.
- Ship speeds increased by 0.2kn/decade up to 1880. This reflects incremental improvements in sailing ship technology, which reached a peak with
*Sovereign of the Seas*(1852, capable of 22kn). - The impact of new technologies such as steam paddle ships (
*SS Sirius,*1837), steel hulls and screw propellors (*RMS Oceanic,*1871) is not evident until the late 1800s. Then, between 1881 and 1905, median speed of ships increased at an astonishing rate ~ 3kn/decade, a near step change compared to the past. The ocean liner*SS City of Paris (*1889*)*had a cruising speed of 20kn. - From 1906 to 2014, speeds increased at a modest 0.3kn/decade on average, comparable to the rate during the sail ship era.
- A striking feature of the graph is that the median speed of ships is much more variable in the modern era compared to 18th and 19th centuries. Political and economic factors, rather than technology, became dominant driving forces e.g. oil supply and financial crises. A dramatic example is the sharp decline in speed of ships at the end of 2008 following the collapse of the Lehman Brothers.

Ship trajectories from ICOADS were stored in a dataframe *ships** *with ~100 million rows.

Median speeds were calculated using *dplyr*

library(dplyr) library(geosphere) ships <- arrange(ships,ID,time) ships <- ships %>% group_by(ID) %>% mutate(dx = distGeo(cbind(lag(LON),lag(LAT)),cbind(LON,LAT))/1000,dt = as.numeric(difftime(time,lag(time),units="hours"))) shipsdx/ships$dt ships <- filter(ships, dx !=0 & dt <= 48) #data within consecutive days only ships <- arrange(testA,ID,time) shipspeeds <- ships %>% group_by(ID,year) %>% summarise(distance = sum(dx,na.rm=T),speed = median(V,na.rm=T))

The speed of a vessel was calculated whenever it’s location coordinates were available within consecutive days in ICOADS dataset.Periods of zero speed (ship docked or at anchor) were omitted. Buoy and drifter data were excluded. Insufficient data was available for the years 1864-87.

]]>

- The graph shows a comparison between modern sea surface temperatures (SST) and temperatures measured during the 1831-1836 voyage of Captain Fitzroy and Charles Darwin on HMS Beagle.
- Data collected by the Beagle were assigned to weekly buckets of a 53-week year. Modern (1981-2017) weekly means at the ship locations were subtracted to give temperature “anomalies” experienced during the voyage.
- The graph indicates that the Eastern Pacific ocean was anomalously cold during Darwin’s time at the Galapagos (shaded area). This looks consistent with a La Nina event.
- Average temperatures during the voyage were 0.7°C cooler compared to an equivalent trip made today. The Beagle data are slightly more volatile compared to the modern SST dataset. This is to be expected because the latter is an average over time and space (1° x 1°) whereas the Beagle measurements were local in time and space.
- Measurements at anchor and at interpolated coordinates are omitted.
- HMS Beagle data derived from the ICOADS database, which is a very rich source of shipping data with all kinds of application.

]]>

On a recent trip, I visited *Campbell Island*, the Southern-most of New Zealand’s extraordinary sub-antarctic islands. A fellow visitor from Ireland pointed out that Campbell is the land mass furthest from home i.e. Campbell Island is the true Irish antipode. I had always assumed (wrongly) that this distinction was held by the eponymous *Antipodes Island*.

The situation is shown below. Black dots mark the centroids of the small sub-antarctic islands after reflection through the centre of the earth.

Colours show which dot is nearest, using geodesic distances on an ellipsoidal earth. This is just an ordinary Voronoi diagram, expect that the curvature of the Earth is taken into account accurately. (*distGeo*() function from *R*‘s *geosphere* package).

Campbell is the antipode for Ireland and Scotland, while Antipodes Island is antipode for England, Wales and Normandy (except for Anglesea and a sliver of Cumbria).

]]>The map shows tracks of drifting buoys deployed in the southern ocean between 2005 and 2016. The underlying dataset consists of 15-minute gps data collected from 4608 buoys, available from NOAA ftp://ftp.aoml.noaa.gov/pub/phod/buoydata/. Colour indicates speed of drift.

This is simply a visualisation of the raw drifter data with no further analysis or modelling. Nevertheless all of the well-known features of the surface circulation in the southern ocean emerge; Antarctic Circumpolar Drift, western boundary currents along the western coasts of South America (Brazil Current) and Africa (Agulhas), powerful Agulhas Return Current in the Southern Indian Ocean, South Atlantic gyre (centred NorthEast of the Falkland Islands) etc.

A dataframe *buoydata* was created using *fread(),*

library(data.table) buoydata <- fread("../buoydata_10001_15000.dat")

transformed to a stereographic coordinates using *spTransform()*

library(dplyr) library(sp) antarctic <- CRS("+proj=stere +datum=WGS84") lonlat <- CRS("+proj=longlat +datum=WGS84") buoydata.sp <- SpatialPointsDataFrame(select(buoydata, lon,lat),data = select(buoydata,-lon,-lat),proj4string=lonlat) buoy.df <- as.data.frame(spTransform(buoydata.sp,antarctic))

and plot using *geom_path()*

library(ggplot2) ggplot(buoy.df) + geom_path(aes(lon,lat,group=ID,colour=speed),alpha=0.15,size=0.2)

Note the use of transparency (alpha). This can be varied to highlight different aspects of the flow.

]]>

q-state Potts models are a simple type of interacting spin (discrete state) model. Each site on a graph or lattice has state in . The site ‘energy’ is determined by the number of neighbours which agree with . The total energy of a configuration is,

(1)

where if = and otherwise. The sum is over “neighbours” . According to the simple rules of statistical physics, the probability of a particular configuration follows Boltzmann’s law,

(2)

Instead of spins, the states can be re-interpreted as representing flavours of political opinion. The coupling determines how strongly associates influence each others’ opinions. If is close to zero, then opinions are independent and randomly distributed. When groupthink dominates. In a population of economists or social misfits who like to disagree with one another, . However is probably the most relevant and certainly most interesting case.

Much is known about Potts models and equations (1) & (2) are easy to simulate using Gibbs sampling (results below were obtained in *C++* linked to *R* using *Rcpp*). For simplicity, I took the case of a square lattice with nearest-neighbour coupling. This means that each opinion-holder has four associates, and each person’s network overlaps with four other networks. Results for the average agreement (i.e. the average number of associates with whom each person agrees, a number between 0 and 4) on 5050 and 100100 lattices are shown below. The coupling was slowly increased from to with up to 60,000 thermalisation sweeps at each step. At there is a sharp jump in the level of agreement (from about 2 to 3).

The transition can also be seen in opinion percentages. Below, opinion favourable to the blue candidate jumps from 12.5% to over 50% at the transition. All other candidates follow the pink line.

There is no model bias favouring the blue candidate. Their selection is a case of “spontaneous symmetry breaking”. The jump is already very sharp at and becomes a true mathematical discontinuity when .

In this model an opinion poll carried out at has nothing to say about which candidate would emerge if increased to by election day. Is this one reason why opinion polls often turn out mysteriously wrong?

]]>

The Peirce Quincunx (PQ) has nice features for the display of global weather and climate data. Firstly, as a conformal map, it does not distort the shapes of relatively localized objects such as the cyclones present in global weather patterns. The Mercator projection is also conformal, but is notorious for it’s large scale distortion. PQ scale distortion is generally smaller, becoming large only near the four equatorial singular points.

Secondly, PQ is pole-friendly. The poles are special points in the climate system because the jet streams circulate about them. It seems perverse to display climate information using map projections (such as geographic) which are singular at the poles. Other examples of pole-friendly projections include transverse Mercator and oblique cylindrical equal area.

The video shows 850mb PQ wind speed raster maps for October 2015 based on 6-hourly 0.25^{o} resolution gdas data. 1 video second corresponds to two days of weather data.

There is a nice discussion of PQ implementation in *R* here. To create raster maps, both forward and inverse projections were required. These functions are available in *tcl*‘s *mapproj* library and can be called from *R*. More details later.