Sunday, July 6, 2014

Climate Chaos

The arguments about what the right CO2 concentration and global temperature is are getting a bit dull. And to be honest I have spent far too much time on blogs and reading scientific papers on what looks to me like an entirely nugatory exercise. And I hate to see wasted effort. We know that even with supercomputers and some of the best meteorological minds in the country the weather repeatedly fails to listen to what the Met office tells it to do. And despite rising CO2 in the atmosphere the warming is stubbornly failing to materialise. There are explanations like at a certain concentration all the IR that is s going to be absorbed has been absorbed. And there are  other negative feebacks in place that kick in when something goes wrong. Another way of saying that that should appeal to the Gaia-ists is that Gaia heals herself. Surprisingly though they all seem to be in the interventionist camp. I might blog about why I think that is another time.

Suppose the climate is a set of linked chaotic but bounded systems and the past does not accurately predict the future. The climate record and the statistical models that are used to analyse the data for trends are meaningless. In a truly chaotic system any possible outcome has an equal chance of coming to pass. They must be somewhat bounded however because -10 in July in Surrey has to be an edge case. It is not however impossible. I remember vaguely a science fiction book I read many years ago. It might have been Players of Null A where one of the protagonists suffocated when the outside chance of all the O2 molecules in the air, which are constantly in random movement, moved in the same direction, to the other side of the room.

Most people don't like chaos. It is threatening. So we try to make guesses. Mostly based on prior observation. Some systems are predictable, sunrise and sunset, the movement of the planets and stars for instance for these our guesses are good. Sometimes we just plain get lucky.

Thousands (millions) of man hours and pretty well bottomless funding has come up with a conclusion that there is a 95% certainty there will be 0.3 to 6.4C of global warming in the next 86 years. For all the work that has gone in to deriving these numbers the error bars are massive compared to the observed temperature anomalies.

Do you think it is not a chaotic system? Do you think the outcomes are predictable? Want to prove me wrong?

Here is a challenge for those who presume to tell me what the global temperature anomaly is going to be in about a 100 years to an accuracy of 6C and with a 95% certainty. Take a single land based surface thermometer, one with a good and reliable record, anywhere in the UK or CONUS, I'll let you choose. Look at the raw data record or any adjusted data you want to use and tell me what the temperature on that thermometer will be tomorrow and each day at any given time for the next two weeks to within +/-0.5C. That's a pretty big target to hit from a short distance. I've eliminated the necessity gridding and infilling because that is a fairly contentious issue. We are talking about a single location, although you can use any statistical jiggery pokery that you think it helps your data accuracy. You can use any other data inputs you want including GCMs and satellite data, solar activity.  You have a simple series of ~200 years worth of data points. You can manipulate it however you fancy.  Just give me 14 temperatures. I don't even want to see your workings. It should be easy.

Let's make it interesting. For the first person that gives me 14 numbers only, I'll buy you a pint of Timothy Taylors Landlord for every day you hit the mark within the given range.

And yes, I know the difference between weather and climate. Climate is weather averaged over time and area. But I want keep things easy by specifying over small area and a very short time. That keeps the variables down, right?

Saturday, June 14, 2014

On Labels, Parties and Isms

People like labels it gathers allows groups of similar beliefs to group together and it allows other groups who have different beliefs to focus their hate easier. So we have isms that tell us what we are and how we should think if we want to stay in the club. Convienient. More recently we have gone into acronyms which amuse me a lot. I have to search on what they mean because there are so many of them and they are so specific we are almost at the point of being able to have one each*. I've never got on with the idea of this kind of tribalism. After 2 visits to the Cubs 50 years ago it was suggested that it was not for me. I guess I don't play well with others.

This puts me in a good position to observe. Dogmatism is hilarious. You should all try standing outside looking in one day. Shed the beliefs imposed on you by others and think. It is very liberating. It might mean that you can't call on higher authority to support your beliefs and you have to defend them yourself, but it will do you good.

I'm not trying to say that coming together for a common cause is not a good thing. I belong to the Knife Axe and Tomahawk Throwing Association. And the Surrey and Sussex Coppice Group. As soon as either of them tell me what to think I will be an ex-member.

I'm not sure what label you would like to stick on me... I choose not to label myself.

Maybe I do have an ism - individualism.




*We only need 7 letters to service all of the 7,000,000,000 or so people on the planet. Let's call it 10 because working in X, Z and J into your acronym is a bit tricky. Get in quick and register yours here. I'm sorry, SPAZ, MONG and CUNT are already taken.

Sunday, March 23, 2014

Python - the good the bad and the fugly

Background

I'm a fairly seasoned programmer. I cut my teeth on Algol 69, Oric Basic, Sinclair Basic, BBC Basic, Hand assembled 6502 code, MASM, QuickBasic C, C++ and Pascal so I think I know a good programming language when I see one.

Microsoft's .net languages are fairly well thought through but are far more complex than they need to be. I've reviewed a lot of code and had WTF moments where the programmer seems to have been more concerned with obfuscation of his intent than actually making something work.

And now I have come to Python. I've looked at it a couple of times as a quick and dirty scripting language to get things done. My initial reaction was that it was a total balls-up of a language but now I have my raspberry pi looking at it a little closer and I'm starting to find some redeeming features.

Libraries

First plus point is the libraries. They are mainly stable and and pretty useful and seem to work across platforms. They are pretty comprehensive and you can get things done with very little code. This weekend I wanted to get a website into a string variable so I could pick it apart. The following three lines did the trick:

#get a web page in Python
import urllib2
response=urllib2.urlopen(webaddress)
html=response.read()

Easy-peasy but urlopen? What happened to verb-noun naming? I had a cursory glance at some online documentation and and automatically translated it to openurl in my head. If I'd have been the code reviewer I'd have sent that back.

The pygame library for android does on implement mixer to play sound files and the mixer in the android library doesn't want to work. I need to try some tinkering which may well involve digging in to the library source.

I have only just got started with the TKinter GUI library, I've managed to put a label and a button on a screen and trap the button event. I feel like I'd achieved something getting that far.  I'm reserving judgement.

IDEs

The IDEs are not bad. On ubuntu I am using Stani's Python Editor (SPE) which allows running a debugging in in the IDE so it's a bit more than just an editor. I'd quite like to use eclipse but it is overweight and a bit picky about whether it wants to run the Python add-in or not on my setup.

I haven't got around to trying Stani's on Windows yet but most of what I do with Python is on Linux. I have IDLE, which I don't like as much.

On my Samsung Note 2 I have QPython which has an editor and interpretor. Coding on it is not bad using my little bluetooth keyboard.

Pretty code

Python forces you to use indents to mark blocks. On the upside this means that your code has to look nice. On the other hand, for me, it is less than intuitive. I have worked with either text block markers or curly braces. It's going to take me a little while to get used to indents.

The other side effect, whether intended or not is, is that, because indenting is  a pain it does make you more inclined to break up your code.

And there are rules about mixing spaces and tabs.  As you can't see them on the screen, tracking them down is a bit of a mission.

Lightweight

The interpreter is very small. Good when you are looking at the raspberry pi or a phone. And, while some libraries come as standard, most can be added as needed. 

Target Audience

If the target audience is script kiddies who can quickly knock out a few lines to get things done, it's fine. It's a bit more intuitive than Bash or Powershell I suppose.

If it is for learners I'd have hoped for better support. The base documentation is pretty well limited to documenting the primitives. A bit like someone learning C a copy of Kernighan and Ritchie. It's fine if you have a background in coding but it is a bit daunting. Luckily there is a community out there to working stuff out.




Sunday, February 16, 2014

Weather

Here's a thing...

Julia Slingo from the Met Office says global warming will make extreme weather more likely in the future.

David Cameron says money is no object.

My suggestion is the government give everybody whose house is uninhabitable a million and a half quid (or whatever it costs to get an equivalent property and furnish it) or so to move to higher ground. There are plenty of brownfield sites that can be developed. I see them as I travel up the East Cost Mainline.

Generate the money by cutting the budget for the EA and the Met Office.

Surely, long-term that is a more effective and cheaper solution than shoring-up.

Anyone who doesn't want to move can stay where they are. They still get the cash but they need to use it to make provision to bale themselves out when it floods.

The problem is, I don't believe either Julia Slingo or David Cameron. And deep down neither do they.

Saturday, February 1, 2014

Good and bad, strong and weak, right and wrong.

I had an interesting discussion today. It started here:

https://twitter.com/andybolton/status/429626053720813568

It was an interesting debate. Unfortunately it did not end satisfactorily for either of us.

I may not have being clear. 140 characters is a horrible format for discussing something serious. I do not blame victims. I have taken Surrey police to task several times for their 'lock it or lose it' type campaigns. I do believe that is blaming the victim.

I don't think suggesting that the world can be a dangerous place too outrageous. Every day the facts bear this out.

Knowing the dangers exist, I don't think suggesting you take measures to improve your safety is too outrageous.

I don't think arguing one sex, age group, or any other demographic should not do whatever they can to keep themselves safe is too outrageous.

Anyway, that aside, and I can agree to differ without ill feelings, it got me thinking about right and wrong, good and bad, strong and weak.

Good and bad, like all extremes on a continuum are tricky things to argue with. It's the land of differential calculus which words are hopeless at dealing with. Good people can do bad things and bad people can do good things. For the sake of convenience let's take a concrete example and that doing violence to someone weaker than you is inherently bad. Can we all agree on that? It avoids any judgement and noble cause stuff that is subjective.

So we have a definition of bad. Let's say that good is not doing violence to those weaker than you.

No diktat or law will stop the strong preying on the weak. 'Twas ever thus. If threats of retribution worked we would all live in some kind of utopia where no one was nasty to anyone else. And perhaps religious belief of a vengeful god would have a use. Now here's the thing: How do good people stop bad people being bad?

{scroll down}










{and down}
















{and down}


















Become stronger than the bad are and fight back? But now you have become bad by the definition I set out. Which you agreed with, didn't you?

Funny old world ain't it?















Thursday, January 16, 2014

Raspberry Pi - Part 1

PiStories Part 1

Getting up and running

I finally succumbed and bought a raspberry pi. I went for the Maplin kit n34qg. On unboxing I realised I had probably spent more than I had to in order to get started. The box contains:

  • Pi Model B
  • Case
  • Wireless keyboard
  • Wifi dongle
  • 4port powered USB hub
In fact in my odds and ends drawer I had a wifi dongle that I used to use on an old laptop and an 8 port hub which would work better because the footprint is pretty well the same size and the pi itself and it sits on top of it with a bit of bluetack.

The keyboard's ok, if a bit small and I wouldn't want to use it for any serious typing. It will come into it's own if I ever get the Pi linked to the TV and want a remote.

In terms of booting up everything worked pretty well out of the box.

I am running on a Toshiba TV and a Benq monitor. The monitor only has a DVI port but a cheap adaptor from Amazon sorted that out.

The sound didn't work on the TV immediately I had to add the line hdmi_drive=2 to the /boot/config.txt and things started working.

The wifi utility is on the desktop and it connected to the home wifi no problem.

During the setup I realised that the keyboard wasn't really working for me so I plugged in an old usb keyboard I had. It detected it straight away. I had to remove the wireless kb dongle because it was causing some strange behaviour with missed keys and key repeats.

One of the first things you should do is fire up raspi-config. Before you use it the first time go to the last menu item and get the update. The other thing you might want to do set the gui to start automatically.

Remoting

I decided early on that the footprint of yet another keyboard on the desk was not practical so I decided that remote desktop was the way to go.

The recommended remote server for Raspian is TightVNCServer. The command line to get it is

sudo apt-get install tightvncserver

and the instruction to start it is just

tightvncserver

The first time you use the password file is not present so it prompts you for a password for read/write access and an optional one for read access only.

When it starts it tells you it has started but not which port it is listening on or the ip the pi is sitting on. The best way to find out the port is to have a look at the log file like this:



I haven't quite got to the bottom of the last two errors but it works ok anyway.

So from that you can see that we are running on port 5901. You can try and connect using the machine name and DNS. That was not working for me so I needed to get the ip address of the Pi like this:


You will see from that that the wired Ethernet (eth0) is not connected. The bit we are interested in is the wlan0 connector and there you can see the internet address that has been assigned by the router. I have a long lease on the addresses so I usually don't bother setting up a fixed IP on the local network.

Now I have all the information I need to connect. On the laptop I have to run windows for work. I am using the TightVNC client for windows. When you start it up it looks like this:


Not the double colon before the port number...that had me guessing for a while.

When you have a good connection you can enter your password:


And bingo you should be connected.

...Coming soon

  • Connecting with the remmina remote desktop in Linux
  • ssh remoting
  • My appraisal of Python
  • tkinter GUI programming

Wednesday, January 1, 2014

Akademic Shokalsky


If you are going to argue you need facts

There have been lots of words written about  These are just facts. I present them to you without comment:

  • There is a ship stranded in ice in the Antarctic. 
  • It is mid summer in the southern hemisphere.. 
  • The Guardian and the BBC are represented on board. 
  • Along with eco-activists and scientists. 
  • The mission was a scientific one.
  • They said so when they failed to raise public funds through croudsourcing site (they raised $1000)
  • There were two icebreakers trying to break through to them. 
  • One of the icebreakers seems to be stuck itself and the other one is trying to free it but making only around 10 metres an hour. It has about 3 nm to cover
  • The BBC has reported that a third icebreaker is on its way. The USCG has failed to confirm this.
  • The chief scientist on board is claiming the ice that is trapping them is caused by the warming of the Antarctic. 
  • The thermometers are showing a cooling trend.
  • The same chap runs a company that seeks to make money by carbon capture
  • His family are stockholders
  • 100 years ago the area they are in was navigable.
  • The BBC and guardian would like you to think it is a cruise ship, they are either not allowing or deleting comments that contradict their view of the world.

I am  not a scientist. But I hope I can think critically and I know where the facts are leading me. 

You can refute the facts above present new facts. I have evidence to back all of these. If you want to join the discussion make sure you bring some evidence to the party. 

The truth will come out when someone has to pay for it all. The finger pointing has started already. Don't hold your breath though maritime insurance claims can go on 20 years or more.

Update Noon 2nd January

  • The 52 passengers have been airlifted by Chinese Helicopter to Australian icebreaker.
  • The crew remains on board.