Duncan Golicher’s weblog

Painted bunting

Posted in Natural history, Uncategorized by Duncan Golicher on February 28th, 2008

painted-bunting.png

This sadly injured painted bunting (Passerina ciris) flew into the window of our library building around an hour ago and was brought to me for identification. I doubt if the bird will survive. Despite its very bright colours this is the first time I have seen an individual of the species. It is apparently secretive and shy. Unlike most finches and buntings it spends most of the time in dense woody vegetation.

Another use for a 3d view

Posted in R scripts, Uncategorized by Duncan Golicher on February 28th, 2008

beam.gif

One element of the local climate that we are interested in is the effect of dry season insolation on vegetation patterns. This might be particularly important in areas of dry forest. Slopes that face south receive much more direct beam radiation during the dry winter months under clear skies than north facing slopes. This can be quantified using r.sun in GRASS. The following R code uses layers moved from GRASS to produce an animation in R. The previous function 3dview is needed to run the code that is available in one file here beam.doc

library(lattice)
library(sp)
library(rgl)

urlstring<-”ftp://anonymous@200.23.34.16/simulacion/Datos”

a<-paste(urlstring,”tablon”,sep=”/”)
load(url(a))

view.3d(grid=d,dem=1,drape=1,pal=terrain.colors(100),exag=1) #Get the viewpoint right

#Now run the loop


for (i in 2:13){

view.3d(grid=d,dem=1,drape=i,pal=terrain.colors(100),exag=1)
rgl.bringtotop()
j<-as.character(sprintf(”%03.0f”, i))
j<-paste(”beam”,j,”.png”,sep=”")
rgl.snapshot(j)
}

#With image magick in Linux this then makes the animated gif

system(”convert -geometry 500 -delay 200 -loop 0 *.png beam.gif”)

The results can also be exported to Google Earth as an overlay using the function in maptools, or a version of it that I will include in another post. The kml overlay can be obtained here. Extract the contents of the zipped file to a single directory.

beam.png

Visualising the consequences of global warming

Posted in Climate change, GRASS scripts, Uncategorized by Duncan Golicher on February 27th, 2008

I have just been working again on the HADCM3A2 scenario using GRASS. On taking a closer look at the model results I am surprised by dramatic consequences predicted for Mexico under this scenario in 100 years time. I subtracted the last fifty years mean monthly temperatures and mean monthly rainfall (measured as mm per day) from the means for 2000-2049 and 2050-2100 as simulated by this model. The red to green shaded figures show changes in rainfall with red as drier and green moister (note that the colour scheme is not necessarily strictly negative to positive). The blue to red maps show changes in temperature. The file name is in the top right hand corner prec50mx.1 means changes in the first fifty years in precipitation during the month of January, prec50mx.2 February etc. Note the scales on each map change depending on the absolute range.

So the fifty year scenario suggests a slight reduction in rainfall and moderate (0.5 C) warming.

test503.gif

Now look at the simulation after 100 years.

The reductions in rainfall are potentially severe and warming may be between 3 and 5 C. Even the cooler areas are positive warming, not cooling. This is the most extreme of the new IPCC SRES scenarios and one that is fundamentally similar to the old “business as usual” type scenarios.

The most surprising element of the HADCM3 model results, (that is also shown by the model under lower carbon emission scenarios) is the tendency towards drier conditions in Southern Mexico and Central America. Not all GCMs show the same regional pattern and the level of resolution of these models is still very low. Thus the results should be taken as representing one of many credible futures (see post on the ensembles project). A full treatment of the uncertainties involved in predicting the impact of climate change on the distribution and abundance of organisms should take into account as many credible futures as possible. However the prospect of a hotter, drier climate is very disturbing for conservation as many of the most vulnerable organisms are found under cooler, moister conditions.

test1001.gif


Eastern bluebird

Posted in Natural history by Duncan Golicher on February 27th, 2008

bluebird.png

The eastern bluebird (Sialia sialis) is a resident here and is usually seen in small family groups of two to five birds. Although it is a thrush it feeds in a rather similar way to a flycatcher by flying from the perch to the ground to pick up insects, which are sometimes caught in mid air.

Tropical mockingbird

Posted in Natural history, Uncategorized by Duncan Golicher on February 26th, 2008

mockingbird.png

The mockingbirds in our garden are relatively silent at this time of year, but are very active seeking food in the dry grassland.

Earthquake in Lincolnshire!

Posted in Current affairs, Family, Natural history, Personal and family by Duncan Golicher on February 26th, 2008

earthquake1.png

I grew up in Lincolnshire which is rarely in the news, so I was quite proud to hear that it was at the epicentre of an earthquake that measured 4.8. To put this into perspective the earthquake I reported at 6:52 am on the 12 February in San Cristobal measured 5.2. However to be fair an earthquake in England is a rare event, while in Mexico we have several every year. I imagine that tomorrow’s news will be full of eye witness reports of the event. Much of the reporting will no doubt be quite light hearted. British residents don’t appreciate the sheer terror that people experience when an earthquake is felt in regions where they are destructive. Even though San Cristobal itself has had few major earthquakes, every time we feel the earth move we are very unsure how bad it could turn out to be. But this time we have been stirred rather than shaken.

As an aside I made the small illustration above using a Nasa satelite image and the excellent open source software QGIS. QGIS stands for Quantum GIS. It took less than a minute to connect to the Nasa site, download the image and find the rough epicentre. I am a great fan of Google Earth but at the moment the fact that GE has a mess of overlays at different scales is a barrier to it being used for illustration at a regional scale. Also the 3d terrain in Google Earth is great for Chiapas, but rather irrelevant in Lincolnshire.

Encyclopedia of life

Posted in Climate change, Current affairs, Natural history by Duncan Golicher on February 26th, 2008

I have just registered with the Encyclopedia of Life. The idea behind the project is outlined in this BBC article.

The project aims to be the equivalent of Wikipedia in the field of systematics and ecology. If successful detailed descriptions of all the world’s known organisms could be available to anyone with an internet connection. This is a very exciting prospect, especially if the success of the project coincides with advances in the barcode of life. One of the barriers to greater understanding of the distribution and abundance of organisms remains difficulty in identification and ignorance of their characteristics. This initiative should help to democratise this knowledge and place it in the hands of field researchers. It is also a collaborative project in which we too have an obligation to contribute.

RGL surfaces

Posted in R scripts, Uncategorized by Duncan Golicher on February 26th, 2008

3dchiapas.png

Some cool tricks can be achieved in R using the rgl package. I will add code later to produce 3d trees and also to look at the results of multivariate analysis in three dimensions.

Here is a very simple function for making a 3d surface from a digital elevation model held as a SpatialGridDataFrame. The first lines will download an object from an Ecosur ftp site, so the code should produce the results shown above, a 3d map of the state of Chiapas.

library(lattice)
library(sp)
library(rgl)

urlstring<-”ftp://anonymous@200.23.34.16/simulacion/Datos”

a<-paste(urlstring,”chisgrid.rob”,sep=”/”)
load(url(a))

view.3d<-function(grid=chisgrid,dem=1,drape=2,exag=3,pal=sp.theme()$regions$col){
fullgrid(grid)<-TRUE
y<-grid[[dem]]*exag
y[is.na(y)]<-0
dim(y)<-grid@grid@cells.dim

x <- grid@grid@cellsize[1]*(1:grid@grid@cells.dim[1])
z <-grid@grid@cellsize[2]*(1:grid@grid@cells.dim[2])

y2<-grid[[drape]]
y2[!is.na(y2)]<-as.numeric(cut( y2[!is.na(y2)],length(pal)))
y2[is.na(y2)]<-0

ylim <- range(y2)
ylen <- ylim[2] - ylim[1] + 1

pal<-c(”black”,pal)
col <- pal[ y2-ylim[1]+1 ] # assign colors to heights for each point

rgl.clear()
rgl.surface(x, z, y, color=col)
}

view.3d(dem=1,drape=1,pal=terrain.colors(100))

Important note. On testing this I have just found that there seems to be an encoding problem when using WordPress. The site should be using UTM-8 but quotation marks don’t appear to be recognised by R. If this throws an error then copy the code to a text editor and replace the offending quotation marks. I am trying to solve the issue Try this source code view3d.doc.

Great egret

Posted in Natural history by Duncan Golicher on February 25th, 2008

This is another picture of a wild bird taken in Tuxtla Zoo, the Great Egret (Ardea albus). I include it mainly as a comparative reference with the cattle egret, as the white herons can be confusing. I have yet to see the white morph of the great blue heron (Ardea herodias)  although they are apparently found in Chiapas and can be easily mistaken for the Great Egret.

great-egret.png

Squirrel Cuckoo

Posted in Natural history, Uncategorized by Duncan Golicher on February 25th, 2008

I took this rather poor picture in Tuxtla Zoo yesterday (Sunday 24 Feb 2008). Obviously taking pictures of birds in zoos would be cheating, but this is in fact a wild bird outside the cages. The zapote trees in the zoo attract a lot of native wildlife. The reason I have uploaded a low quality picture is to provide proof of observation. The rather coarse scale distribution map for the Squirrel Cuckoo (Piaya cayana) in Howell and Webb suggests that the species is not present in the central depression of Chiapas. In fact it is common in most of the more mature dry forest of the region. It is a rather tame, easily spotted and unmistakable bird. In spite of the poor light the darker characteristics of the southern thermophila form of the species can be made out here.

squirrel-cuckoo.png

It takes a reason to reason

Posted in Current affairs, Personal and family, Uncategorized by Duncan Golicher on February 25th, 2008

Walking home from work I listened to a podcast of BBC radio’s Analysis program. It dealt with political story telling. Some of the most interesting and insightful comments were made by the American clinical psychologist and political strategist Drew Weston. Here a is a link to an interview with Weston.

In the short sound bites that were included in the analysis program Weston made the point that cold objectivity alone cannot capture peoples’ imaginations nor motivate them to think deeply. It is emotion that leads people to reflect on their own prejudices and perhaps even change their world views. He summed this up in the phrase “it takes a reason to reason”. I also liked his neat line “I don’t think anyone remembers Martin Luther King’s ‘I have a plan’ speech. “

This is relevant in the year of Barak Obama. Whatever the outcome of the primaries it is now inevitable that, one way or another, the most powerful nation in the world will soon be led by its first rational president in almost a decade. It is always easy to be cynical about politicians’ appeal to peoples’ emotions. Weston makes the point that an appeal to the right sort of emotions is much more likely to get rational things done than an appeal to logic alone. That is why Al Gore’s passionate, if not wholly accurate, treatment of the climate change issue has been such an important contribution to changing the direction of the climate debate towards one based on rational evaluation of evidence.

Nicole’s Olympic triumph

Posted in Family, Personal and family by Duncan Golicher on February 24th, 2008

On monday Nicole took part in the Mini Olympic games at El Pequeño Sol. She had been practicing her running and jumping all weekend, but she did have a few last minute nerves. Nevertheless she played a vital role in the success of her relay team and showed great poise and balance on the high bar.

Memories from 2006

Posted in Family, Personal and family, Uncategorized by Duncan Golicher on February 24th, 2008

I recently uploaded this older video (November 2006, Nicole aged 1) to You Tube. It helps to fill some of the gaps between this web log and previous ones as far as family life goes. Nicole and her mum were just as beautiful then as they are now. Nicole aged one was an expert at bottom shuffling and even gave lessons on technique to Mickey. She never learnt to crawl and took some time in walking alone. Music “Ain’t that enough” an all time classic from the greatly underrated Glasgow band Teenage Fan Club. The lyrics of this lovely, heart warming song fit all the feelings we had at this time and mean a lot to our family. Every time I see this again I get a lump in my throat in spite of the very silly transitions between scenes!

Biofuels and global warming

Posted in Climate change, Current affairs by Duncan Golicher on February 23rd, 2008

The bbc site today carried news that provides hope that the issues surrounding the use of biofuels to combat global warming are being addresed by European legislators.

The pros and cons of biofuels raise extremely complex issues. Without the time, the inclination nor the obligation to wade through the mass of calculations that are needed to reach a definitive opinion on whether biofuels can make any meaningful contribution to the fight against anthropogenic climate change I am reluctant to express an opinion.

If the scientific jury in general is still out on the issue it is only because they haven’t yet been told what the charges are. If anyone were to be asked to cast a verdict on whether biofuels alone can make a serious contribution to reducing global carbon emissions the issue would be much more quickly resolved. The photosynthetic process is simply not efficient enough to provide a meaningful proportion of our modern global economy’s energy needs. There are much better ways of turning sunlight into energy than growing plants and then burning them.

However the global issue is clouded by local concerns. There are potential winners from biofuels and their interests should of course be considered when weighing the issues. Biofuels can play a very positive role in recycling waste and giving value to forest products. If the correct checks and balances are put in place there may be a place for biofuels in our future energy balance. However to automatically label biofuels as green altenatives while so many legitimate questions have been raised would be irresponsible. There are serious concerns not only regarding  the net carbon balance involved in their production, but also the multiple undesirable side effects in terms of global food security, land use change and biodiversity loss.

A much broader issue is involved here that was touched on in a previous post. The IPCC scenarios that provide hope that carbon emissions  will be below the critical threshold all involve global rather than local action. When issues such as biofuels are under discussion it is important to evaluate how seriously the extent of future global warming is being taken. If an argument has not considered the wider system of global feedbacks doubts must be expressed. Turning food into fuel in one part of the world cannot fail to influence the behaviour of farmers in another part of the world. If behaviour change threatens forests it is clearly difficult for anyone involved in conservation and rural development to express support for the policy.

Predicting from model ensembles

Posted in Climate change, R scripts by Duncan Golicher on February 23rd, 2008

My current research requires the use of up to date predictions of climate change. These are being combined with species distribution data in order to look at impacts on diversity. Because we need to use credible predictions of climate change in our models over the last week I have been looking in some detail at the work being carried out by the ensembles project.

This is an ambitious, highly collaborative project that aims to develop an ensemble prediction system for climate change based on the principal state-of-the-art, high resolution, global and regional Earth System models. By bringing model results together within a common framework the researchers aim to quantify and even reduce the uncertainty in the representation of physical, chemical, biological and human-related feedbacks in the Earth System (including water resource, land use, and air quality issues, and carbon cycle feedbacks. In other words really big science, addressing a really big question. Fascinating stuff, even if most of the technical details are way beyond my understanding.

The most interesting, and rather novel aspect of this project is its stated aim of quantifying uncertainty through looking at multiple predictions from multiple models. It is rarely appreciated by decision makers (even some scientific reviewers can overlook the fact) that a fully quantified estimate of uncertainty requires very much more work to produce than a simple direct statement based on a single viewpoint or model. Take for example the varying estimates of carbon dioxide emissions over the next century presented in the SRES report.

emissions.png

This is a good example of the way different models with different structures and assumptions, lead to large differences in final predictions that can represented as a probability density function. Alterations in the parameterization of a single model can have the same effect. Decision makers often ask for a worst case, best case and most probable scenario. However until multiple scenarios have been evaluated the probabilities attached to each of these remain unknown. Even when large numbers of scenarios can be used ignorance of the true model structure still does not allow for a complete formalization of all the uncertain elements.

Mat Collins of the Hadley centre published an interesting and very accessible review of the issues involved in making predictions regarding future climates. collins-climate-models-ensembles-probabilities.pdf . Collins even gets to use a favourite quotation from Donald Rumsfeld. I will undoubtedly comment in more detail on the profundity of Rumsfeld’s famous lines in some later post.

Here I will look briefly at the point Collins makes regarding the relationship between model complexity and estimates of uncertainty in model predictions. Simple models have the advantage that assumptions can be specified in terms of probabilities for a certain parameter, while more complex models are less transparent. For example in aggregated energy balance models (EBMs) it is usual to specify the climate sensitivity (the global mean temperature change for a doubling of atmospheric CO2), whereas for a Global or General Circulation Model (GCM), the climate sensitivity is a function of the interaction between resolved and parameterized physical processes and cannot be specified a priori.

This means that large complex models are not necessarily “better” than small simple models. They are just doing very different jobs. Progress in climate research requires ever more complex models. The scientific process places a premium on such models and appreciates the work involved in model construction and analysis. However communication of uncertainties often requires the use of simple, intuitive models

This is good, because we can write down and analyse a small simple model in a few minutes in R, while writing and running a GCM is clearly somewhat more ambitious!

Lets take Collins example and use R to reproduce the result. Colins writes ..

“Assume that, after all our efforts, we have produced an estimate of the uncertainty in the climate feedback parameter

eq2.png

defined for an equilibrium climate with a radiative forcing of Q divided by the temperature change DT, which is normally distributed with a mean of 1.0 W mK2 KK1 and a 5–95% range of 0.6–1.4 W mK2 KK1. This is translated simply to a right-skewed distribution for climate sensitivity (owing to the inverse relationship in equation that has a 5–95% range of 2.7–6.3 K. Now, say, that we wish to stabilize atmospheric CO2 levels so as to avoid a global mean temperature rise, DT, of 3 K above pre-industrial values as that is deemed to be some ‘dangerous’ level of climate change. The radiative forcing, Q, for doubled CO2 is approximately 3.8 W mK2 and is known to vary logarithmically

eq1.png

where Cstab is future and the stabilized level of CO2 and Cpre is the pre-industrial level. Thus, in order to be 95% sure of not passing 3 K of global warming (or alternatively, accepting a 5% risk that we do), the CO2 must be stabilized at 1.4 pre-industrial levels or around 386 ppm by volume. This is approximately the CO2 concentration today.
However, assume that we might improve our estimate of the feedback parameter, producing a distribution with the same mean value but with half the 5–95% range (0.8–1.2 W mK2 KK1). Then, to be 95% sure that we do not exceed 3 K warming, we only have to stabilize at 431 ppm. We have bought society some time to develop technologies to limit emissions and allowed economic development for poorer societies.

Is this right? Can we confirm the results in R. Yes, its very easy. We can write the second equation as a function using a single line of R.

Cstab<-function(Cpre=273,deltaT=3,lambda,Q=3.8){Cpre*exp(deltaT*lambda*log(2)/Q)}

Notice this provides default values for Cpre,deltaT and Q, leaving lambda as an input.

Now because R has so many built in ways of simulating values from different distributions it is very easy to use a Monte Carlo simulation to reproduce the example.

Lets assume the first case lambda is distributed with mean 1 and sd 0.2 giving approximately the 95% confidence intervals in the article. We can simulate the distribution of 10,000 possible values with..

lambda<-rnorm(10000,1,0.2)

Now to find the quantile use

quantile(Cstab(lambda=lambda),c(0.05))

5%
392.5294
And in the second example

lambda<-rnorm(10000,1,0.1)

quantile(Cstab(lambda=lambda),c(0.05))

5%
431.0692

So, we used standard deviations of 0.1 and 0.2. This is not exactly the same as using Collins’ 95% confidence intervals. We also used stochastic simulation which is not exact, but the results is close enough to confirm the calculation. It is interesting to reflect on whether extreme precision in statistical calculations is ever really worth persuing when there are so many additional sources of uncertainty.

In this case there is a precise analytical result available, but if several parameters are uncertain the use of a simple Monte Carlo simulation in this way is an incredibly useful application for R as it extends to any function with no further effort. It is a simple task to give distributions for all the parameters of any function in exactly the same way.

The results can be plotted using

plot(density(Cstab(lambda=rnorm(10000,1,0.1)),bw=20),col=1,lwd=2)
lines(density(Cstab(lambda=rnorm(10000,1,0.2)),bw=20),col=2,lwd=2)
legend(”topright”,c(”sd lambda=0.1″,”sd lambda=0.2″),col=c(1,2),lwd=2)

fig3.png

Lengua materna

Posted in Poverty in Chiapas and social issues, Uncategorized by Duncan Golicher on February 22nd, 2008

Ayer recibi esta correspondencia dirigida a todos los investigadores de Ecosur por parte del colega Fernando Limón.

Consecuencia de una proclamación de la Conferencia General de la UNESCO, desde el año 2000 se ha celebrado anualmente el 21 de febrero el “Día Internacional de la Lengua Materna”. Sin embargo en esta ocasión, este día tiene una carga significativa mayor, pues hoy da inicio el “Año Internacional de los Idiomas”, proclamado por la Asamblea General de la ONU.¿Tendremos el ánimo para hacer eco de estas proclamaciones desde nuestros trabajos cotidianos y de investigación?¿Tendremos formas de honrar y colaborar con las “lenguas maternas” de los pueblos y lugares en que trabajamos? La región que por mandato corresponde a ECOSUR tiene la presencia de más de una docena de idiomas indígenas.

El desdibujamiento e incluso la pérdida de los idiomas tiene que ver con la presencia colonialista de muy diversas instituciones (que se han arrogado el poder): de la religión, de lo político y económico, de la ciencia y la tecnología. La afectación a las lenguas maternas atenta contra los pueblos y sus culturas, atenta también contra la biodiversidad; en pocas palabras, afecta a la humanidad y a la naturaleza. Las lenguas maternas son medulares a la vida en sus diversos aspectos, en el lugar y en comunidad.

¿Podemos cada cual de nosotros hacer algo en conciencia y congruencia?

Es fácil de tratar el fenomeno del uso de distintos idiomas como algo que pertenece a sectores de la sociedad. Pero existe otra forma de ver los idiomas. Son simplemente herramientas de comunicación. Como explica el linguista Stephen Pinker, todos tenemos un “instinto” de comunicarnos. Nuestra cultura materna proporciona una herramienta de hacer la comunicación, pero luego esta es adaptada a nuestras necesidades como individuos.

Hace cuatro años, hice el intento de aprender Tsotsil, con muchas ganas pero con poco éxito. Al principio me fascinaban las diferencias gramaticales entre Tsotsil y los idiomas Europeos. Estaba convencido que una persona hablando Tsotsil piensa en una forma distinta. Elementos como el nosotros inclusivo (vo’otik ) y nosotros exclusivo (vo’otik’otik, o sea nosotros pero tú no) sugieren que los que hablan estos idiomas tienen otra “cosmovisión”

Pero al leer el libro Pinker empezaba a reflexionar sobre mi propia experiencia con idiomas. Nuestra familia es bilingue, pero yo aprendí el español a una edad relativamente avanzada (mas de treinta años). Aunque comunico en Español diariamente, siempre siento que me falta algo de mi propia personalidad cuando lo hablo. Me cuesta sentir relajado con mi forma de expresión y me cuesta seguir los chistes o hacer los mios. Este no tiene nada que ver con mi “cosmovisión” Britanica. Es simplemente que en una parte de mi cerebro las conexiones ya se han establecido en un cierto patrón. Cuando empezaba de aprender Español decir “me gusta” parecia patas arriba, pero no significa una forma distinta de pensar sobre mis gustos.

Entonces la verdadera razón por declarar “el dia de la lengua materna” debe restar en el respeto a los individuos haciendo la lucha de adpatarse a sociedades donde la mayoria de la población no habla su lengua materna. Puedo imaginar la sensación de aislamiento y tristeza que un imigrante del campo Chiapaneco puede sentir en San Cristóbal al encontrar su idioma menospreciado por la cultura dominante. Es importante que se mantenga la diversidad de la cultura Chiapaneca, pero nunca debemos ignorar los individuos y familias que pagan el precio asociado con la fragmentación de las formas de expresión en el campo Chiapaneco.

Como contraparte, estaba fascinado al escuchar la jerga viva usada entre albañiles y trabajadores aqui en San Crístobal. Los jovenes mezclan palabras en Tsotsil con frases en Español, inventando sus propias formas de expresión. Por ejemplo el jefe puede ser el “mol” (viejo) . Un idioma se mantiene vivo con el uso, y Tsotsil sigue siendo un idioma vivo. Lo triste es la falta de extensión de su uso en la población general de San Cristobal que todavía no abraza los elementos de la cultura indígena como parte de su identidad regional.

The speed of change in Chiapas

Posted in Personal and family, Poverty in Chiapas and social issues, Uncategorized by Duncan Golicher on February 22nd, 2008

20km2.png

This sign has been placed on the boulevard, the dual carriageway from Ecosur to the centre of the town. It is deeply symbolic of the problems we face in our daily lives here. Society clearly needs to be governed by rules, regulations and guidelines in order to work. These rules must be respected by all. This can only happen if compliance is clearly in our best interest.

No driver would ever think of slowing to 20 kmh on the busy boulevard in order to comply with this sign. It would be ludicrous and cause an accident.

If this were an isolated case we could change Chiapas tomorrow simply by taking down the sign. Unfortunately the equivalent of 20 kmh signs are posted within most aspects of environmental legislation including that for forestry, conservation of protected areas, urban planning and rural development. Even in our academic institution we have to work under an administrative framework which is notably economical in its application of logic and common sense.

I will no doubt develop on this theme as time goes on.

Cattle egret

Posted in Natural history by Duncan Golicher on February 22nd, 2008

egret.png

The cattle egret (Bubulculis ibis) is an immigrant from Africa, this species arrived in the USA in the 1940’s although it apparently first colonized the Americas in Surinam in 1877. It spread through the interior of Mexico in the 1960s and 70s. I photographed this individual when I was on the way to work, feeding around the legs of cattle near my house.

Mickey and dangerous animals

Posted in Family, Linux by Duncan Golicher on February 21st, 2008

Mickey wants to work with dangerous animals, particularly snakes, when he grows up. He has started already.

mickyshark.jpg

mickcob2.png

croc.png

If you haven’t realised, Gimp is the open source equivalent of photoshop.

Globalization, the internet and climate change

Posted in Climate change, Linux, Poverty in Chiapas and social issues, Uncategorized by Duncan Golicher on February 21st, 2008

Compiling data for species distribution modelling has led me to look in some depth at the IPCC SRES scenarios. Developing plausible storylines for the future development of the Global economy over the next hundred years is an extremely challenging task, However the IPCC have drawn on their considerable expertise to develop a sophisticated, consensual and inclusive set of scenarios. Without going into great detail, a very simple message struck me as important. The more optimistic scenarios always involve greater convergence between regions and a change towards a service and information economy. In other words “Globalization”.

This suggests that the internet itself could be a major factor in combating global warming. However the section of the World’s population that will suffer most of the negative consequences of global warming, the rural poor, remain largely excluded from access to the internet. I am very interested in the way developments in Open Source software can help to redress this. One of the most positive examples is the Edubuntu project that allows high quality thin client - fat server networks to be built from recycled PCs. I will continue this theme in later posts.

These are the four groups of “storylines” used in the scenario building. Note that the worst case scenario in terms of emissions and consequent climate change arises from A2 or B2.
The A1 storyline and scenario family describes a future world of very rapid economic growth, low population growth, and the rapid introduction of new and more efficient technologies. Major underlying themes are convergence among regions, capacity building, and increased cultural and social interactions, with a substantial reduction in regional differences in per capita income. The A1 scenario family develops into four groups that describe alternative directions of technological change in the energy system. Two of the fossil-intensive groups were merged in the SPM.

The A2 storyline and scenario family describes a very heterogeneous world. The underlying theme is self-reliance and preservation of local identities. Fertility patterns across regions converge very slowly, which results in high population growth. Economic development is primarily regionally oriented and per capita economic growth and technological change are more fragmented and slower than in other storylines.

The B1 storyline and scenario family describes a convergent world with the same low population growth as in the A1 storyline, but with rapid changes in economic structures toward a service and information economy, with reductions in material intensity, and the introduction of clean and resource-efficient technologies. The emphasis is on global solutions to economic, social, and environmental sustainability, including improved equity, but without additional climate initiatives

The B2 storyline and scenario family describes a world in which the emphasis is on local solutions to economic, social, and environmental sustainability. It is a world with moderate population growth, intermediate levels of economic development, and less rapid and more diverse technological change than in the B1 and A1 storylines. While the scenario is also oriented toward environmental protection and social equity, it focuses on local and regional levels.

Processing output from Global Circulation Models 2

Posted in Linux, R scripts, Uncategorized by Duncan Golicher on February 20th, 2008

After setting up cdo and netcdf you need to download some scenarios from cera.

The distribution modelling project we are working on is looking at a wide range of simulations in order to look at the effects of credible patterns of change in the global climate on tree species diversity in MesoAmerica. There are still relatively few simulations that have specifically represented the new emisions scenarios in the IPCC fourth assessment report. Many of the available model data sets were derived using the Special Report on Emission Scenarios (IPCC 2000, SRES).

The SRES data sets were classified into four different scenario families (A1, A2, B1, B2).
SRES. The A2 storyline describes a very heterogeneous world with the underlying theme of self-reliance and preservation of local identities. It results in this scenario a continous increasing population together with a slower economic growth and technological change. The Hadley Centre Circulation Model is a 3-dim AOGCM described by (Gordon et al., 2000 and Pope et al., 2000).
The atmospheric component has a 19 levels horizontal resolution, comparable with spectral resolution of T42, while the ocean component has a 20 levels resolution. HADCM3(http://www.meto.gov.uk/research/hadleycentre/models/HadCM3.html )

Here I will show a simple use way to look at the HADCM3_A2 scenario in R.

For simple interpretation and use of climate model output three variables are of most interest. Maximum temperature, minimum temperature and precipitation. A great deal of processing can be done in cdo,but here we move the precipitation data set to R using cdo to rewrite the file in netcdf format.

cdo -f nc copy HADCM3_A2_prec_1-1800.grb HADCM3_A2_prec_1-1800.nc

Now in R we can open the file using ncdf.

library(ncdf)
library(maptools)
library(maps)
library(RColorBrewer)

prec.nc <- open.ncdf(”HADCM3_A2_prec_1-1800.nc”)

x <-get.var.ncdf( prec.nc, “lon”)
y <-get.var.ncdf( prec.nc, “lat”)
z<- get.var.ncdf( prec.nc, “var61″)
time <-get.var.ncdf( prec.nc, “time”)

This reads all the data in. Notice that this global grid is quite a low resolution so the whole simulation can be read into memory in one go. Subsets of netcdf files can be taken if they are larger.

The order of the x and y vector has to be changed to be strictly ascending and the matrix rearranged accordingly.

z<-z[,73:1,]
y<-sort(y)
x[x>180]<- (-(360-x[x>180]))
xorder<-order(x)
z<-z[xorder,,]
x<-sort(x)

Now we can average the first fifty years monthly precipitation and subtract this from each month’s simulated precipitation in order to show the simulated pattern of rainfall anomalies over the next fifty years.

for (i in 600:1200){
j<-i%%12;j[j<1]<-12
a<-seq(j,600,by=12)
aa<-apply(z[,,a],c(1,2),mean)
a<-z[,,i] -aa
image(x,y,a,col=brewer.pal(8,”RdBu”),zlim=c(-10,10))
map(”world”,add=T)
title(main=paste(substr(time[i],1,4),substr(time[i],5,6)))
Sys.sleep(0.2)
}

It is not easy to draw conclusions from this visualization alone. However what seems clear is that the largest anomalies and fluctuations in rainfall patterns (areas of dark red or dark blue) are concentrated in the tropics. This is in part due to the fact that the shading represents absolute variation. The tropics receive more rainfall, thus variability is naturally higher. What would be useful would be look in more detail of the pattern for different areas of the global simulation and contrast them after taking into account natural interannual variability.

In order to look at the trend for any part of the world we can make a small function in R that will select a pixel from the map using the locator function and then use stl to produce a seasonally adjusted analysis similar to the one used here.


plot.trend<-function(){
image(x,y,z[,,1],col=brewer.pal(8,”RdBu”)[8:1],zlim=c(-10,10))
map(”world”,add=T)
l<-locator(1)
a<-z[which(abs(l$x-x)==min(abs(l$x-x))),which(abs(l$y-y)==min(abs(l$y-y))),]
a<-ts(a,start=c(1950,1),frequency=12)
plot(stl(a,s.window=12))
}

Select Chiapas.

simulated-trend-in-rainfall-hadcm3-a2-chiapas.png

The units are in mm per day. Thus the third graph represents the annual trend after seasonal effects (second panel) are extracted. At present averaged over the Chiapas grid square annual rainfall averages just over 3 mm per day ( 1000 - 1200 mm per year) . There is around 40% variability in this between years. The simulation suggests that in general terms the pattern of variability will be maintained for the next fifty years. However the end of the simulation shows a rather sudden, sharp drop in rainfall by the end of the century.

There is a great deal of uncertainty in climate model simulations, not only regarding the amount of greenhouse gas forcing but also the complex patterns of feedbacks in the global systems. An alternative scenario from HADCM3 (the B2 scenario) shows a slightly different pattern for Southern Mexico.

simulated-trend-in-rainfall-hadcm4-b2-chiapas.png

Tagged with: , , , ,

Processing output from Global Circulation Models 1

Posted in Linux, R scripts by Duncan Golicher on February 20th, 2008

Installing CDO and netcdf

Global circulation models that iterate calculations on a global grid over many time steps produce potentially vast amounts of data. Output from climate models and large historical climatic data are often held in either GRIB (WMO) or netCDF (Unidata) format. These formats have been specifically designed for efficient, compact storage of huge volumes of information. Research groups that work on climate modelling and monitoring have developed their own specialized tools for handling data in these formats under Unix. A Linux laptop can carry out many powerful operations on these large data sets using the same tools that super computer users run under Unix.

One of the differences between Linux and Windows users is that Linux users naturally tend to have a naturally clearer idea about how information is being held on their computers. While the Ubuntu GUI can do almost anything the Windows GUI can do Linux users tend to use the command line at least occasionally and are more comfortable editing configuration files.

Thus when work arises that involves moving around and reformatting large amounts of data Linux is a natural platform.

The tools for working with GRIB and netCDF have not been designed with ”user friendly” GUIs. However they fit easily into a scripting framework. At the time of writing the tool that appears to have the best documentation, ease of to installation and general simplicity of use is CDO (Climate Data Operators). The program can be downloaded as source code from

http://www.mpimet.mpg.de/fileadmin/software/cdo/.

This software offers a very strait-forward, powerful command line interface that can be used for a large number of pre-processing and processing tasks. Because both grib and netcdf file formats are in common use it is important to compile the source with netcdf support.

In Ubuntu or Debian install netcdf-bin and the libraries either using Synaptic or by typing

sudo apt-get install netcdf-bin

sudo apt-get install netcdfg-dev

sudo apt-get install libnetcdf3

This installs the programs ncdump and ncgen which convert NetCDF files to ASCII and back, respectively. NetCDF (network Common Data Form) is an interface for scientific data access and a freely-distributed software library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data.

 

Now cdo can be built with netcdf support. Check the location of the netcdf header with

 

locate netcdf.h

 

In Ubuntu the header is found in /usr/include. So compile the cdo source code and install it with the following option.

 

sudo ./configure –with-netcdf=/usr/include

sudo make

sudo make install

Now if you get output after typing “cdo” in the console the program should be correctly installed. Full documentation and a reference card cdo_refcard.pdf can be found in the doc directory.

Next install the ncdf package for R. This can apparently be installed under Windows for R2.2.+ and includes all that is needed to run. However Windows users would have to use Cygwin to compile and run cdo, thus their lives would be much more difficult. Note that under Linux you must install the netcdf binary and headers before installing the R package. More details can be found here.

In the next post on the topic I will show how to begin analysing output from a major GCM in R.

 

 

 

Greater Pewee

Posted in Natural history by Duncan Golicher on February 18th, 2008

The open fields around my house with many perches form prime habitat for highland flycatchers. However I have not see this particularly large (18 cm) species (Contopus pertinax pertinax) very often. The bird appears much darker grey than the illustration in Howell and Webb, but its Id is confirmed by the bright orange lower mandible.

pewee3.pngpewee2.png

Tagged with: , ,

Relativism

Posted in Current affairs, Personal and family by Duncan Golicher on February 17th, 2008

The main news story in the UK last week was the reaction to the comments of the archbishop of Canterbury regarding Sharia law. There were extremely strong counter reactions to his views.

In common with the majority of the British population I felt Rowan Willamson’s position to be fundamentally dangerous. Cultural relativism is an extremely useful research tool for anthropologists, sociologists, historians and even ecologists with an interest in resource management. We should all work hard on developing the admirable skill of listening and understanding the concerns and viewpoints that are the product of alternative world views. Individuals who hold culturally imposed beliefs that differ from our own should always be respected as individuals.

However I find myself in full agreement with Richard Dawkins in rejecting the extension of relativism to include tolerance for cultural practices that violate fundamental individual rights. The most shocking elements of the Archbishop’s speech were not the ones that got the publicity.

Rowan Williamson’s position was deliberately misunderstood and shamelessly exploited by right wing critics in the UK. He clearly did not argue that public stoning and beheading should become a part of an alternative Sharia law that would be tolerated under the British Judicial system. In one sense he made a quite reasonable case that some elements of civil life, such as divorce and family disputes could be settled by Muslims under Muslim customs. However he understated the most admirable aspect of the British judicial system. It is respect for the principle that disputes are settled through the careful inspection and evaluation of empirical evidence. I was deeply disturbed by the following phrase in Williamson’s speech …. “Perhaps it helps to see the universalist vision of law as guaranteeing equal accountability and access primarily in a negative rather than a positive sense”.

Of course the system in the UK is far from perfect, but when the principle (that is expressed as the right to a fair trial) is not upheld, we are generally appalled and demand “justice”. This is not the case in all cultures. I am frequently shocked and scared by the lack of respect for the fundamental principles of (my culturally constructed notion of) justice in Mexico. Hearsay evidence is considered of greater value than forensic evidence and “criminals” are considered guilty until proven innocent. Forty percent of the Mexican prison population has not yet faced trial for the crimes of which they are accused. This is not likely to change in the near future. The Mexican population appears to have a culturally constructed tolerance for “their” form of justice, that also extends to the denigration of captured criminals on public TV stations, after they have clearly been mistreated in custody.

This is the stark problem with relativism. Ironically it leads to a defense of a dangerous division based on a classification into “them” and “us”. Go beyond the Archbishop’s polished, academic, postmodernist speech (that I admit to finding impenetrable) and you encounter a much cruder, paternalistic form of relativism in which it can be justified to state that “they” should be allowed to settle matters according to “their” customs. I have no understanding of the way Sharia law evaluates evidence. However I doubt if the archbishop does either (”This lecture will not attempt a detailed discussion of the nature of sharia, which would be far beyond my competence”) . He was making a liberal point based on tolerance of a whole culture, not on respect for individual rights. I doubt if he knows whether, in matters of divorce, if a Muslim wife is reported as seen entering a car with a stranger that this is sufficient “proof” of infidelity and grounds for a divorce settlement that British law would consider unfair (recourse to obtuse statements regarding the “neuralgic questions of the status of women and converts” just don’t cut it for me. Postmodernism gives me a bigger headache). It may well be that evidence is weighed as carefully in a Muslim court as in British civil proceedings. However the precedent set by the implementation of judicial systems outside the UK does not bode well.

Poverty in Chiapas

Posted in Personal and family, Poverty in Chiapas and social issues by Duncan Golicher on February 17th, 2008

One aspect of life in Chiapas affects me on a daily basis. It is poverty. There are just too many moments when contact with the individuals and families leading degraded, devalued lives temporarily takes away the satisfaction and happiness that my own career and family provide, leaving me with feelings of guilt and emptiness. Over time it is too easy to become hardened and insensitive to sights that would shock most Europeans. While we do all develop our personal defense mechanisms, sadness, rejection and anger at the sight of poverty is always the right response. If we could just determine the cause, perhaps we could even eliminate this terrible evil.

The text at the end of this video points out that this family has not received the state aid that they are entitled to. In general terms much has improved for millions of Mexicans in the last decade. Infant mortality has dropped, life expectancy has improved and complete illiteracy is now rare among the young. Targeted poverty alleviation programs have helped. However few programs have been efficiently implemented in Chiapas. Many families have slipped through the flimsy safety net the state provides. The fundamental structural weakness of the rural economy has not been addressed by politicians on either side of the political spectrum, who find it easier to point to global forces outside their control.

A key point is that Mexico is a middle income country. Per capita GDP is around $US 10,000 at purchasing price parity. Even under a system in which wealth is inevitably concentrated in a few hands there is simply no need for the lower end of the scale to be set at such a low level. Relatively few people live off urban rubbish or beg at traffic lights, but the fact that the system allows any family to resort to this is clearly intolerable. It simply doesn’t have to be this way.

I am an ecologist, not a sociologist nor economist. It can be difficult to see how improved knowledge concerning the distribution and abundance of organisms can have any relevance to the larger questions of poverty. I have been involved in several research projects that have aimed at analysing linkages between biodiversity and poverty. These linkages can indeed be found. Ecologists can play positive roles in developing patterns of natural resource use that improve livelihoods. However many of the contributions that the discipline of ecology itself can make are indirect. The benefits are often long term.

This does not mean that those of us that work in the field of ecology cannot play a positive role in tackling social problems while carrying out our research. I have also worked on linkages between poverty and decision making rather more directly. It is in this area I feel I can perhaps “make a difference” through teaching methods of careful reasoning with data. An element that permeates my own thinking both in ecology and life in general is the uniqueness of individual phenomena, even when they form part of a whole. A forest is a collection of trees. A society is a collection of people, each with their own lives and aspirations. I have taught students to use Bayesian Networks and hierarchical modelling to attempt to avoid the so called “ecological fallacies” (which has little to do with ecology) that arise when classification into groups is taken too far.

I find it difficult to accept solutions to the problems of poverty based on the classification of people by ethnic group, class, gender or culture, even though such classifications, if used with great care and discretion, can sometimes be useful as research tools. If I keep up this web log for any space of time I will undoubtedly return to this theme on many occasions in the section on probability.

It is extremely frustrating to find that irrational, even self defeating decision making has become locked into aspects of the Mexican way of life as has endemic inefficiency (see the endless queue) . Attempting to teach the more subtle elements of reasoning under uncertainty can appear quite irrelevant when institutionalized ineptitude devalues even the use of simple common sense. However I will continue to make the effort.