Climate data sets, which one to select?

For species or vegetation modelling, one of the first choices to make is the selection of explanatory variables, which in most cases will include climatic or bioclimatic data sets. One of the most widely used global climate data sets in biogeographic and ecological research is from Worldclim (Hijmans et al., 2005). Alternative global rainfall data sets are from TAMSAT TARCAT (Maidment et al., 2014) and CHIRPS (Funk et al., 2014). The Worldclim data layers are based on an interpolation of average monthly climate data from weather stations. The other two data sets combine weather station data with satellite observations to improve accuracy where in situ rainfall measurements are sparse. All three data sets are available from the KITE resources website as part of the Africlim dataset (Platts et al. 2015).

Uncertainty in data sets based interpolation of weather station data can be highly uncertain, especially in mountainous and poorly sampled areas (Hijmans, et al., 2005). This is certainly an issue in eastern Africa, which is a topographically diverse region with a relative poor coverage of weather stations. On the other hand, rainfall estimates based on satellite imagery have issues as well. I am not a climatologists and I don’t find it easy to determine which data set I should use. But I can of course start by comparing the data sets. Below, I compare the long-term average annual rainfall data. Note that the Worldclim data set is representative for the time period 1950-2000, while the other two data sets are based on data from 1983-2012.

Click on image to enlarge /  open in slide-show

The images above show the mean annual rainfall. It is immediately evident that the average rainfall distribution as estimated by the TAMSAT data set deviates considerably from the other two estimates. Especially the low rainfall estimates for three of the five s0-called water towers of Kenya (Mount KenyaAberdare Range and the Mau Forest range) and Mount Kilimanjaro in Tanzania raise question marks.

In GRASS GIS it is easy to quickly compare two maps using the bivariate scatterplot tool in the Map display toolbar. Just select two raster layer and select the tool. You can further tweak the graph using the plot and text settings, and export it as png image or print it. Note that if you print it to file, you’ll get a PS (postscript) file, which you can further edit in e.g., Inkscape.

Click on image to enlarge /  open in slide-show

Below you see the scatterplots of Worldclim versus TAMSAT, Worldclim versus CHIRPS and TAMSAT versus CHIRPS (click on images to enlarge). They illustrate that there are large discrepancies in the estimated mean annual rainfall, and a R2 are between 0.73 and 0.8.

Click on image to enlarge /  open in slide-show

Another convenient tool, available from the toolbar in the Map display toolbar, is the profile analysis tool. With this tool you can display the values of one or more raster layers along a line which you can draw on the map canvas. This is particularly handy to see how two or more maps differ.

Click on image to enlarge /  open in slide-show

Below you can see the rainfall values along a transect I drew across the Kenyan highlands. The peaks in the graph are where the transect crosses Mount Kenya, the Aberdares and the Mau forest complex. The blue, red and green lines give the values of respectively the Worldclim, TAMSAT and CHIRPS dataset. The rainfall profile of TAMSAT suggests there is not much differences in annual rainfall between the mountain tops and the lowlands in between. The Worldclim and CHIRPS profiles are more alike, but with the Worldclim providing considerably higher estimates for the mountain peaks then CHIRPS.

Kenyan highlands
Mean annual rainfall values along a transect across the Kenyan highlands

It would be good to find out more about the differences between the Worldclim and CHIRPS estimates. For example, are these differences all due to data errors (in one or both data layers) or was the period 1983 – 2012 in fact drier than the 1950 – 2000 period? But that is a question I might get into later. For now it seems clear, to me at least, that the TAMSAT data has some issues, especially for the Kenyan highlands, suggesting it to be unsuitable for use in ecological or biogeographic studies in east Africa.


  • Funk, Chris, Pete Peterson, Martin Landsfeld, Diego Pedreros, James Verdin, Shraddhanand Shukla, Gregory Husak, James Rowland, Laura Harrison, Andrew Hoell & Joel Michaelsen. The climate hazards infrared precipitation with stations—a new environmental record for monitoring extremes. Scientific Data 2, 150066.
  • Hijmans, R.J., S.E. Cameron, J.L. Parra, P.G. Jones and A. Jarvis, 2005. Very high resolution interpolated climate surfaces for global land areas. International Journal of Climatology 25: 1965-1978.
  • Maidment, R., D. Grimes, R.P.Allan, E. Tarnavsky, M. Stringer, T. Hewison, R. Roebeling and E. Black (2014) The 30 year TAMSAT African Rainfall Climatology And Time series (TARCAT) data set. Journal of Geophysical Research 119 (18), 10,619–10,644.
  • Platts PJ, Omeny PA, Marchant R (2015). AFRICLIM: high-resolution climate projections for ecological applications in Africa. African Journal of Ecology 53, 103-108.


GRASS gis scripts to import data from Worldclim, CSFR and PISM

I just came across these GRASS GIS scripts by Julien Seguinot to import multiple files from the WorldClim current climate dataset, the  Climate Forecast System Reanalysis (CSFR) data and some other reanalysis data sets. Furthermore, there is a script ( to imports multiple raster maps from a NetCDF output file from PISM.

They are not in the GRASS addon 6 or GRASS addon 7 repositories so I am sharing the link here. If you are planning to work with these data sets, check out these scripts, they may make your life a whole lot easier.

Importing WorldClim climate .bil datalayers in GRASS GIS II

I uploaded an update to the R script I posted earlier to import data downloaded from WorldClim into GRASS. The main change is that it unzips and imports one grid at a time into GRASS, thus requiring much less free space on your hard-disk.

It moreover has the option to import and convert the layer to the region settings of the mapset you are working in. Alternatively, you can import rasters in their original extend and resolution. Continue reading “Importing WorldClim climate .bil datalayers in GRASS GIS II”

R script to import WorldClim datalayers in GRASS GIS

As I wrote before, you can download monthly climate data layers (rainfall, mean minimum and maximum temperature of the coldest and warmest month respectively) from WorldClim for current and future climate conditions. The latter can only be downloaded in generic grid (raster) format (.bil). Moreover, monthly data layers are compressed in one zip file.

I also posted a small R script that unzips the zip files with monthly data layers downloaded from WorldClim (.bil format) and imports it your current GRASS GIS Location and Mapset. It also corrects erroneous grid cell values as discussed in that post.

I updated the script, hopefully making it easier to use. Continue reading “R script to import WorldClim datalayers in GRASS GIS”

Importing WorldClim climate .bil datalayers in GRASS GIS

In a previous post I wrote how you can generate bioclimatic data layers based on monthly rainfall and temperature data in GRASS GIS. Monthly climate data for future conditions can be downloaded from WorldClim in generic grid (raster) format only. As indicated on the WorldClim website, ESRI software assumes that the data files (.bil) do not have negative values. These values (x) are replaced by (65535 + x); E.g., -10 becomes 65525. This also means that the nodata value of -9999 is not recognized. Unfortunately, gdal, used by GRASS GIS to import the data, seems to make the same assumption. As a workaround, WorldClim recommends to use Diva-GIS. Although free, it doesn’t run on Linux. So, then what? Continue reading “Importing WorldClim climate .bil datalayers in GRASS GIS”

Calculating bioclim variables in GRASS GIS

I am currently working on the modeling of the distribution of different vegetation types and associate species in eastern Africa. In absence of more detailed climate data for the region, a great source of global climatic data is the WorldClim website. Besides the usual monthly temperature and rainfall data, it provides bioclimatic variables which are derived from these monthly temperature and rainfall values in order to generate more biologically meaningful variables. However, it only does this for the current conditions (interpolations of observed data, representative of 1950-2000) but not yet (?) for the future conditions (downscaled data from global climate model (GCM) output, IPPC 3rd assessment). Thus, I had to calculate them myself, which I did using GRASS GIS and R. Continue reading “Calculating bioclim variables in GRASS GIS”