A guide to the global temperature program TempLS, up to V4

TempLS is an R program that I have been running for some years at Moyhu. It computes a land/ocean temperature average in the style of Gistemp, HADCRUT or NOAA (see Wiki overview) In this post, I want to collect links to what I have written about it over the years, describe the methods, code and reporting, and something about the graphics. I'll then promote it to a maintained page. I'll start with a Table of Contents with links:

Introduction - reporting cycle

TempLS is a program which works by least squares fitting (LS) of a statistical model for temperature. The basic data used comes from GHCN V4 monthly unadjusted, and ERSST V5 monthly. GHCN is updated most days, with about 90% of stations reporting in the first week of the month, and ERSST early in each month. I run TempLS whenever there is new data, and report as soon in each month that there is enough data for a reliable average. I have a general page for updated climate data here; TempLS is reported among the other indices, and with interactive graphics. There is a dedicated report slot, with the latest numbers, a global map, a breakdown plot showing how much regions are contributing to the global average, and a map or which stations have reported so far this month. Updated TempLS also appears in the Trend Viewer, and there is a rather elaborate interactive globe graphics presentation of global anomalies here, which is the best way to see the latest (or past) month's results.

TempLS comes in various flavours, depending on the integration scheme. Most prominent in reports was "mesh", based on a global triangular mesh. It most closely resembles GISS. More recent is "FEM", which fits basis functions on a icosahedral grid.

Each month, on about the 8th, when all the main regions have reported, I post a discussion of results, including a map based on "FEM". This map is designed to match that of GISS, and when this comes out a week or so later, I report on that with comparison of numbers and maps. I have been doing this since July 2011.

Summary, methods and code

TempLS does a least squares fit to a linear model for point temperatures v
xsmy=Lsm+Gmysmy
Here L is a local offset for station month (like a climate normal), G is a global temperature function (the desired result) and ε an error term. Suffices (station, month, year) show what each item depends on. G+ε is the anomaly.

There is a general discussion of methods here, with more here, and an earlier stage here.

The average is formed by area-weighting, which I prefer to think of as a spatial integration method. I discuss advanced methods here, with a TempLS survey here.

I will discuss past versions in the History section, but a recent version is set out starting here, with part 2 and part 3. Each section walks through a part of the code, with data used. The last section gives the complete code (about 250 lines). The code allows options for using unadjusted or adjusted GHCN data, and various integration (weighting) methods, including the "mesh" and "grid", but also spherical harmonics and an advanced grid version which both work very well. More recent again are "LOESS" and "FEM".

The code was revised (V4) again with V4 of GHCN; the main change is that months had to be done separately because of the greater amount of data.

History

TempLS started when there was a flurry of blogging activity in early 2010, described here. My contribution at that stage was a grid-based program, initially based on GHCN V2, lnd only, but extended to include SST. A focus was on breaking down into regions and sub-groups, and there is a summary post of this stage here. Version 2, when it , incorpoated a spatial representation (spherical harmonics). The math basis is probably the most thorough math description of TempLS. Emphasis moved away from working on subsets and sub-regions. There is a review of the V2 and earlier period here.

A side enterprise that TempLS made possible was the search for ways of using much reduced (eg 60) subsets of stations. An early version is here, with much more complete versions here and here.

Graphics and other output

As I developed TempLS I learnt more about Javascript and WebGL. I have mentioned the interactive Trend Viewer, which includes latest TempLS results. And there are Google Earth style interactive globe plots of monthly anomalies and time trends. The style here is a shaded triangle mesh, appearing continuous, in which the color at each station is correct, and shaded in between on each triangle. You can show the nodes and mesh, and click to get data points.

Tests and comparisons

I post occasionally tests of how well TempLS compares with other indices. A general recent comparison is here. Some early ones are here and here.

Another thing TempLS can be used for is testing the effects of homogenisation, since it can be run with and without. I showed here that it had little effect, and what effect it has was broken into regions and types here.

A test of spatial integration methods is here.

TempLS V4, using GHCN V4

In early 2019, GHCN V4 monthly was released. It had many more stations (>27000) than V3 (7280), and other indices, like GISS, began a transition process. So did TempLS. The number of stations stretches the memory of my PC, so GHCN V4 is restructured to do the whole calculation by months, never creating an array for the whole of data. But other changes were introduced too.

The math structure of V4 is described here. As well as restructuring for months, I changed the weighting to be uniform in time; V3 used a combined weighting for space and time which was optimal in space, but not quite in time. The latter became serious for some new higher order methods.

New integration methods introduced included LOESS, described here, based on an equally spaced icosahedral grid. Also the use of spherical harmonics in integration was reformulated, so that it became an enhancement available in any method. The LOESS method also gave a method of higher resolution graphics, which mostly replaced those based on spherical harmonics.

Tests and results of the new methods and of V4 generally are here and here. The restructured V4 code, with description and links, is here.





Nick Stokes June 2019

0 comments:

Post a Comment