Aslak Grinsted‎ > ‎

Misc. Debris

A list of debris posts can be found here.

Yet another unconvincing case of cycle fitting

posted Aug 31, 2015, 5:51 AM by Aslak Grinsted   [ updated ]

Jens Morten Hansen (JMH) and co-authors have recently published a study where they use sine-regression to fit 5 oscillations plus a linear trend to a 160-year sea level record from waters near Denmark (a stack of local GIA corrected tide gauge records). They then observe that the sines-plus-trend model correlates highly with the record it was fitted to, after applying a 19-year moving average. This should be unsurprising as the procedure guarantees high correlation, regardless of input data (see figure). This result is clearly not significant in any meaningful sense. 

After having hand tuned their model to fit the data, they proceed to post-rationalize the fitted model frequencies in terms of the nearest half-multiples of the lunar nodal cycle (18.6 years). Yet again, and equally unsurprising, a high correlation is observed (after 19-year averaging). Again, this key result is clearly not significant.

It is therefore not surprising that it has been hard to get this study published. After multiple rejections, it was eventually published in Journal of Coastal Research. They then began to publicize it in primarily danish media. Here are some of the headlines it generated: 
This persistent push for publicity have prompted us to voice our critical concerns regarding this study. This is not a case of scientific censorship. This study has fundamental flaws. 

Our criticism - over fitting 
We wrote a critical comment highlighting the flaws in their analysis. It can be found here (in danish - TODO add link when it goes online.). We demonstrate by example the the non-significance by showing how you get high correlations regardless of data set, and periods used (see figure). We could have calculated a p-value using a monte carlo significance test against auto-correlated noise. 

The plot on this page shows how we can fit the population in Denmark, and the frequency of the words "Frankenstein", and "hamlet" in books using the exact same lunar frequencies they used in their study. We can similarly predict sea level using the orbital periods of exoplanets. High-correlations are guaranteed even when there clearly is no causal link. I.e. the procedure cannot be used to support any hypothesis. 

The basic issue is over-fitting: Their statistical model has 17 degrees of freedom (5 periods, 5 phases, 5 amplitudes, 1 trend, 1 constant). They test against 19-year moving averages of a 160-year series. There is at most 8-9 independent points in the smoothed series (and that is being generous as the time-series is auto-correlated). Ofcourse it will fit. 

"With four parameters I can fit an elephant, and with five I can make him wiggle his trunk" - John von Neumann 

A set of frequencies drop out of the iterative hand tuning of the model parameters. They need an explanation for these frequencies in order to have a tidy story. But there is no need for explanations for this correlation as high correlations are guaranteed regardless of what data is used. The journal article has a long weaving argument for the lunar nodal resonance hypothesis. I see this as a post-rationalization of a (very) insignificant correlation. I am not convinced. 

Other notes

In a radio show from the danish national broadcasting company (DR), JMH lets us know that he also tried to push the story to a large Swedish newspaper. It was rejected with a note that the newspaper never accepted letters opening with references to the Emperors new clothes. I find that reference ironic. 

Data sources
The data in the figure comes from these sources: Sea level digitized from JMHs paper. Word frequencies from google ngrams. DK population from exoplanet periods from Tamino

Further reading

Here's Tamino on another case of sea level cycle fitting

Ice sheet pessimists are not outliers

posted May 22, 2015, 4:50 AM by Aslak Grinsted   [ updated May 27, 2015, 7:03 AM ]

Bamber and Aspinall 2013 published a formal expert elicitation on the future of our two ice sheets, and found a large spread between individual expert answers. It has been argued by them,  and others that there are outlier experts in the data, and that they drive the long-tails of the pooled uncertainty distribution. I wonder if that is really true or whether it could be a visual artifact from drawing samples from a long tailed distribution. When you plot samples from a long tailed distribution then of course the tail values will appear to stand out, but that does not necessarily make them outliers. The question is really whether there are two groups of experts optimists vs. pessimists or whether they all have been sampled from a continuum of experts. 

I focus on the expert assessment of the rate of future ice loss from the West Antarctic Ice Sheet (WAIS), as this is a key uncertainty. In particular i use the 2012 estimates shown in red in their figure 1 reproduced on this page. I have digitized this figure to obtain the low and high values of each expert range listed in the bottom of this page. 

No evidence for outlier experts

When I rank these values from low to high and plot them then I see that there is no evidence for a discontinuity in the neither experts upper, nor lower estimates. There is no split between ice sheet optimists and ice sheet pessimists. For comparison I also plot some surrogate data sampled from a log-normal distribution, so that you can see an example of how it looks when you draw a small sample from a continuous long tailed distribution. 

See also the final remarks at realclimate in relation to the Horton et al. paper: "There is no split into two groups that could be termed “alarmists” and “skeptics” – this idea can thus be regarded as empirically falsified"

Data plotted in graph:
s=[3.0 0.5;5.0 25.0;1.5 0.5;2.0 0.2;-0.5 2.0;4.0 30.0;-0.5 10.0;0.0 2.0;2.0 8.0;0.5 2.5;1.0 20.0;0.0 4.0;0.3 2.0];

Technical detail: if you draw 13 samples from the surrogate distribution, then there is a 51% chance that the highest value will be greater than 5. The maximum value in the surrogate plot is thus very close to the median value for this distribution. It is not an outlier.

Loading MOLA PEDR files in matlab

posted May 19, 2015, 6:05 AM by Aslak Grinsted   [ updated May 19, 2015, 6:30 AM ]

I have written a little matlab function to read the MOLA laser altimeter data from the Mars Global Surveyor.  More specifically the so called Precision Experiment Data Records (PEDR) records. PEDRs are generated from the raw altimetry profile data with precision orbit corrections applied. They are time-ordered binary tables with attached PDS labels. You can download the MOLA PEDR data here.

Perhaps somebody will find this useful. The function is attached below. 

Thoughts on the Pachauri harassment case

posted Feb 23, 2015, 10:35 AM by Aslak Grinsted   [ updated Feb 23, 2015, 11:33 AM ]

Pachauri has been accused of sexual harassment. You can read about it here:
Pachauri's initial defense was to claim that he didn't do it, but that his phone was hacked. That is not entirely implausible considering the dirty lengths that climate obstructionists would go to (e.g. the CRU hack). Hence I initially withheld any commentary. The climate community I follow on twitter has also mostly been quiet on this. 

Since then more news has surfaced. We have seen the content of some of the messages in the case, and more women have spoken out against Pachauri:
I don't know if he is guilty or not, but these additional reports push me towards the womens account.  

I don't usually comment on gender issues, but I think it is important to publicly make it clear that sexual harassment is not OK regardless of who you are, or how much bad publicity it might give for climate science. 

A better windows experience

posted Jan 22, 2015, 9:21 AM by Aslak Grinsted   [ updated Mar 9, 2015, 4:11 AM ]


Chocolatey is a package manager sort of like apt-get for windows, or a command-line version of ninite. You can do stuff like:

choco install <packagename> 
By Luisa Contreras (Flickr: bizcocho de chocolate y nata) [CC BY 2.0 (], via Wikimedia Commons
Usually you have to run choco as an administrator. That means starting the command prompt as an admin. That can get annoying pretty fast, so I recommend installing the sudo package as the next step.

choco install sudo

After this you can install a bunch of other stuff using "sudo choco install xxxx" install, without starting an administrative shell.  

A better terminal, and putty
sudo cinst conemu 

I installed putty manually instead of using chocolatey because that makes it easier to get conemu to cooperate with putty.  see also comments here

SSHFS adds the ability to mount drives over ssh

sudo cinst win-sshfs

I recommend installing FiSSH instead (a fork of win-sshfs) because it is compatible with pageant. I have not tested if it is better than this fork.   


sudo cinst SublimeText3
sudo cinst SublimeText3.powershellalias

Python2.xx (& essentials)

For scientific python you might want to try Anaconda instead of installing python yourself. That is not in the chocolatey.

Note this python section is from memory and may not be optimal.  
sudo cinst python2
pip install --upgrade pip
pip install virtualenv
pip install virtualenvwrapper-win
If you already have python2, then you might want to remove it first using the control panel. 

If PIP is not found, then it is most likely a problem with your path. 

Bayesian exercises for Inverse problems

posted Oct 22, 2014, 2:17 AM by Aslak Grinsted   [ updated Oct 23, 2014, 4:18 AM ]

Below is a pdf with some exercises for that i use in my course on inverse problems.

Problem 0: Goal understand why it is attractive to use loglikelihoods over likelihoods.
Problem 1: An exact model with a single model parameter. This makes easy to plot.
Problem 2: A variant of problem 1 with an inexact model.
Problem 3: Goal: Show that it is easier to calculate derived quantities such as "expected value" of the posterior when you use mcmc.
Problem 4: A problem where it is easy to understand why is the likelihood called a likelihood. 
Problem 5: A problem where you have to grasp many concepts. 

Exercises 4 & 5 are probably the most fun. 

Tracking ice motion in Landsat 8

posted Jun 11, 2014, 1:54 AM by Aslak Grinsted   [ updated Jun 11, 2014, 1:57 AM ]

I have been attempting to track ice motion in landsat 8 files. I have only been able to find the L1T files. These are terrain corrected files. Unfortunately for my study region (the Renland ice cap, East Greenland) the DEM used in this processing is of too poor quality and which introduces large geodetic errors. DEM errors can be seen as residual perspective effects [Click image on the right to expand to an animated GIF showing flipping between two images]. 

If you know where to get L1G, then please email me! 

I would therefore really like to have the L1G product and account for the terrain correction my self (using gimpdem). 

Another advantage of L1G over L1T is that there is less resampling which degrades feature tracking performance. 

(This work is partly motivated by testing a new open source feature tracking & georeferencing toolbox for matlab we have been working on. I am looking forwards to putting it on github.)

Descriptions of the levels of processing 

  • Level 1 Systematically Corrected (L1G)
    • The Level 1G (L1G) data product provides systematic radiometric and geometric accuracy, which is derived from data collected by the sensor and spacecraft. The scene will be rotated, aligned, and georeferenced to a user-specified map projection. Geometric accuracy of the systematically corrected product should be within 250 meters (1 sigma) for low-relief areas at sea level.
  • Level 1 Terrain Corrected (L1T)
    • The Level 1T (L1T) data product provides systematic radiometric accuracy, geometric accuracy by incorporating ground control points, while also employing a Digital Elevation Model (DEM) for topographic accuracy. Geodetic accuracy of the product depends on the accuracy of the ground control points and the resolution of the DEM used.

West Antarctic collapse in the IPCC reports

posted Jun 4, 2014, 2:32 PM by Aslak Grinsted   [ updated Jan 7, 2015, 11:36 PM ]

I have extracted some quotes from the IPCC reports since 1990 showing how West Antarctic Ice Sheet collapse has been discussed over time. It is not an exhaustive list.
  • FAR 1990: 
    • “Antarctica is expected to contribute negatively to sea level due to increased snow accumulation associated with warming. A rapid disintegration of the West Antarctic Ice Sheet due to global warming is unlikely within the next century”. 
  • SAR 1995: 
    • “Nonetheless, the likelihood of a major sea level rise by the year 2100 due to the collapse of the West Antarctic ice sheet is considered low.”
    • "For Antarctica, the sensitivity value is -0.20 ± 0.25 mm/yr/°C (including a term for the possible instability of the West Antarctic ice sheet)," (for a revised IPCC projection in section 7.5.2)
    • "Our ignorance of the specific circumstances under which West Antarctica might collapse limits the ability to quantify the risk of such an event occurring, either in total or in part, in the next 100 to 1000 years."
  • TAR 2001:
    • “The range of projections given above makes no allowance for ice dynamic instability of the WAIS. It is now widely agreed that major loss of grounded ice and accelerated sea level rise are very unlikely during the 21st century.”
  • AR4 2007: 
    • “new evidence of recent rapid changes in the Antarctic Peninsula, West Antarctica and Greenland (see Section has again raised the possibility of larger dynamical changes in the future than are projected by state-of-the-art continental models, such as cited above, because these models do not incorporate all the processes responsible for the rapid marginal thinning currently taking place (Box 4.1; Alley et al., 2005a; Vaughan, 2007).”
    • "Abrupt climate changes, such as the collapse of the West Antarctic Ice Sheet, the rapid loss of the Greenland Ice Sheet or largescale changes of ocean circulation systems, are not considered likely to occur in the 21st century, based on currently available model results."
    • "Recent satellite and in situ observations of ice streams behind disintegrating ice shelves highlight some rapid reactions of ice sheet systems. This raises new concern about the overall stability of the West Antarctic Ice Sheet, the collapse of which would trigger another five to six metres of sea level rise. While these streams appear buttressed by the shelves in front of them, it is currently unknown whether a reduction or failure of this buttressing of relatively limited areas of the ice sheet could actually trigger a widespread discharge of many ice streams and hence a destabilisation of the entire West Antarctic Ice Sheet. Ice sheet models are only beginning to capture such small-scale dynamical processes that involve complicated interactions with the glacier bed and the ocean at the perimeter of the ice sheet. Therefore, no quantitative information is available from the current generation of ice sheet models as to the likelihood or timing of such an event."
    • "We take this as an estimate of the part of the present ice sheet mass imbalance that is due to recent ice flow acceleration (Section, and assume that this contribution will persist unchanged." (note another "scaled-up" discharge scenario was also constructed as an additional term to the main projections of the report.)
  • AR5 2013: 
    • “Only the collapse of the marine-based sectors of the Antarctic ice sheet, if initiated, could cause GMSL to rise substantially above the likely range during the 21st century. This potential additional contribution cannot be precisely quantified but there is medium confidence that it would not exceed several tenths of a meter of sea level rise”.
    • “In summary, ice-dynamics theory, numerical simulations, and paleo records indicate that the existence of a marine-ice sheet instability asso­ciated with abrupt and irreversible ice loss from the Antarctic ice sheet is possible in response to climate forcing. However, theoretical consid­erations, current observations, numerical models, and paleo records cur­rently do not allow a quantification of the timing of the onset of such an instability or of the magnitude of its multi-century contribution.”

See also these posts:

What does "likely" mean?

posted May 9, 2014, 4:48 AM by Aslak Grinsted   [ updated May 14, 2014, 5:34 AM ]

It can be quite difficult to interpret what likely exactly means sometimes. For example in the AR5 sea level chapter they report a likely range of 21-33 cm for thermal expansion (RCP8.5 table 13.5). I have taken that to mean that this was the 66% uncertainty interval based on the IPCC uncertainty guideline note (see table 1). However, I just realized that this range was actually calculated as the 5-95% range from CMIP5. From table 1 I would have called that the very likely range. Can anybody explain to me the motivation for calling it the likely range?

[EDIT2: I asked Jonathan Gregory, and he has been very helpful in explaining the motivation to me. He says: "[Sect explains that] the 5-95% range of CMIP5 models coincides with the assessed likely range of TCR. That's the main reason for proceeding this way. It implies, as you say, that the CMIP5 models do not cover the entire range which is considered "very likely" but we do not have sufficient confidence to quantify a "very likely" range for projections."]

This also affects other parts of the sea level chapter. For example they say that only marine instabilities could cause a rise greater than the likely range. But does that mean that there is a 33% or 10% or chance of that? I have no idea... (or indeed 5% as they appear to use 5-95% for the likely range in this chapter).


The explanation is that the true uncertainty is considered to be greater than the model spread.

The supplementary material to the sea level chapter says that they follow section when they use 5-95% as the likely range. 

[EDIT: I just found an explanation in an SPM footnote: "Calculated from projections as 5−95% model ranges. These ranges are then assessed to be likely ranges after accounting for additional uncertainties or different levels of confidence in models. For projections of global mean sea level rise confidence is medium for both time horizons."]  

If you have any comments then please tweet me at @agrinsted or mail me. I'd greatly appreciate it. 

Vulnerability of marine based sectors of Antarctica

posted May 7, 2014, 2:44 AM by Aslak Grinsted   [ updated Nov 3, 2014, 11:38 PM ]

Should we take the risk of Antarctic collapse seriously?
The IPCC AR5 sea level chapter considered instability of marine-based sectors of the ice sheets to be unlikely (Church et al., 2013). However, post-AR5 modelling indicates that Pine Island Glacier in Antarctica is already engaged in an unstable retreat (Favier et al., 2014), a situation that is projected to extend to neighboring Thwaites glacier (Favier et al., 2014), and even to East Antarctica (Sun et al., 2014).
A recent observational study found an observed sustained increase in ice discharge from the Amundsen Sea Embayment, West Antarctica, from 1973 to 2013 (Mouginot et al. 2014). This prompted this reaction from Eric Steig

Models from Mengel & Levermann (2014) also show that "We have probably overestimated the stability of East Antarctica so far". This is early work and inconclusive, but it highlights a need for further study. [Remark: At EGU2014 Vermeersen and Pollard gave presentations showing WAIS collapse in a few centuries, and a large EAIS response on longer time scales. I assume that this work will be out really soon, so i will update this post when I know more. ]

Crumbling ice figure courtesy Jan Åström, CSC, Finland

AR5 sea level projection unsuitable for adaptation planning?

For adaptation planning we really need the full unconditional uncertainty distribution. The above studies shows that the AR5 conditionality on no marine instability may be excluding a important part of the pdf. It appears to me to be much more than just a very remote possibility. This is also reflected in a recent expert elicitation from Bamber & Aspinall (2013). I question how useful the AR5 projections can be when used as-is for local adaptation planning. 

  1. Church, J.A., P.U. Clark, A. Cazenave, J.M. Gregory, S. Jevrejeva, A. Levermann, M.A. Merrifield, G.A. Milne, R.S. Nerem, P.D. Nunn, A.J. Payne, W.T. Pfeffer, D. Stammer and A.S. Unnikrishnan, (2013a): Sea Level Change. In: Climate Change 2013: The Physical Science Basis. Contribution of Working Group I to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change [Stocker, T.F., D. Qin, G.-K. Plattner, M. Tignor, S.K. Allen, J. Boschung, A. Nauels, Y. Xia, V. Bex and P.M. Midgley (eds.)]. Cambridge University Press, Cambridge, United Kingdom and New York, NY, USA [link]
  2. Favier, L., Durand, G., Cornford, S. L., Gudmundsson, G. H., Gagliardini, O., Gillet-Chaulet, F., T. Zwinger, A. J. Payne, and A.M. Le Brocq. (2014). Retreat of Pine Island Glacier controlled by marine ice-sheet instability, Nature Climate Change, 4, 117–121 doi:10.1038/nclimate2094
  3. Sun, S., Cornford, S. L., Liu, Y., & Moore, J. C. (2014). Dynamic response of Antarctic ice shelves to bedrock uncertainty. The Cryosphere Discuss., 8, 479-508, 2014, [link]
  4. Mouginot, J., Rignot, E., & Scheuchl, B. (2014). Sustained increase in ice discharge from the Amundsen Sea Embayment, West Antarctica, from 1973 to 2013. Geophysical Research Letters, 41(5), 1576-1584. [link]
  5. M. Mengel, A. Levermann. Ice plug prevents irreversible discharge from East Antarctica. Nature Climate Change, 2014; DOI: 10.1038/NCLIMATE2226
  6. Bamber, J. L., and W. P. Aspinall. (2013), An expert judgement assessment of future sea level rise from the ice sheets. Nature Climate Change. doi:10.1038/nclimate1778

1-10 of 70