<?xml version="1.0" encoding="UTF-8"?>
<!--
    This web page is actually a data file that is meant to be read by
    RSS reader programs.

    See http://interglacial.com/rss/about.html to learn more about
    RSS.
-->
<rss version="2.0"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
     xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
  <title>>Aon Scéal - Alastair McKinstrys Blog - </title>
  <link>http://blog.sceal.ie</link>
  <description>Alastair McKinstry's journal</description>
  <language>en</language>
  <copyright></copyright>
  <pubDate>Wed, 19 Oct 2011 18:45 GMT</pubDate>
  <lastBuildDate>Wed, 19 Oct 2011 18:45 GMT</lastBuildDate>
  <managingEditor>alastair@sceal.ie (Alastair McKinstry)</managingEditor>
  <generator>pyblosxom [1.4.3 01/10/2008]</generator>
<item>
  <title>Dear Lazyweb,</title>
  <guid isPermaLink="true">http://blog.sceal.ie/debian/cmake-lazyweb</guid>
  <link>http://blog.sceal.ie/debian/cmake-lazyweb.html</link>
  <category domain="http://blog.sceal.ie">debian</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/debian/cmake-lazyweb.html#comments</comments>
  <slash:comments>5</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/debian/cmake-lazyweb</wfw:comment>
  <pubDate>Wed, 19 Oct 2011 18:45 GMT</pubDate>
  <description><![CDATA[
<p>
I'm building a debian package, <a href="http://bugs.debian.org/584637">CDAT</a>. The latest version 6.0.alpha uses CMAKE to build, rather than configure. The trouble is that CMake doesn't build. It doesn't even fail.
<pre>
$ mkdir build
$ cd build
$ cmake ..
()-- Configuring done
-- Generating done
-- Build files have been written to: /home/amckinstry/deb-packages /cdat/cdat-6.0.alpha/build
$ make
$
</pre>
<p>
The problem is, 'make' does nothing. A Makefile is generated by CMake, which calls cmake which calls make again on <em>./CMakeFiles/Makefile2</em>
... which does nothing useful. Apparently the CMake is supposed to put useful stuff in there, but doesn't.
What puts stuff into Makefile2, and where should I pick up the bugs trail?
</p>

<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/lazyweb" rel="tag">lazyweb</a>, <a href="http://blog.sceal.ie/tags/cmake" rel="tag">cmake</a>, <a href="http://blog.sceal.ie/tags/debian" rel="tag">debian</a> </span>
]]></description>
</item>
<item>
  <title>Testing DIASPORA*</title>
  <guid isPermaLink="true">http://blog.sceal.ie/general/testing-diaspora</guid>
  <link>http://blog.sceal.ie/general/testing-diaspora.html</link>
  <category domain="http://blog.sceal.ie">general</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/general/testing-diaspora.html#comments</comments>
  <slash:comments>1</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/general/testing-diaspora</wfw:comment>
  <pubDate>Sun, 16 Oct 2011 14:40 GMT</pubDate>
  <description><![CDATA[
<p>
As you may have noticed, I'm testing <a href="http://blog.diasporafoundation.org/">DIASPORA*</a> as a blogging
platform. Its been working reasonably well recently for me, with friends and family; even though the
"Main" platform <em>joindiaspora.com</em> is not giving general invites, the code works and a bunch of
distributed 'pods' have been set up.
</p>
<p>
You can make entries public, and I've tested a public address for this:
<a href="http://diaspora.sceal.ie/u/amckinstry">http://diaspora.sceal.ie/u/amckinstry</a> which looks ok, 
a bit plain for the moment, but I'll work on that later. The problem has been the atom feed is garbage.
(It's putting the content into both the Subject line (as unadulterated MarkDown, no less), and 
into the content).
</p>
<p>
So, I've put the old blog back up for the moment. While I debug some Ruby on Rails, not a language
i'm too familiar with ...
</p>
<p>
Note: only logged in DIASPORA users can leave notes on the Diaspora site, but go to the login page
and registrations are open. At least until spammers notice...
</p>


<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/diaspora" rel="tag">diaspora</a>, <a href="http://blog.sceal.ie/tags/ruby" rel="tag">ruby</a>, <a href="http://blog.sceal.ie/tags/debugging" rel="tag">debugging</a>, <a href="http://blog.sceal.ie/tags/blogging" rel="tag">blogging</a> </span>
]]></description>
</item>
<item>
  <title>How much wind energy can we use?</title>
  <guid isPermaLink="true">http://blog.sceal.ie/climate/how-much-wind-power</guid>
  <link>http://blog.sceal.ie/climate/how-much-wind-power.html</link>
  <category domain="http://blog.sceal.ie">climate</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/climate/how-much-wind-power.html#comments</comments>
  <slash:comments>0</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/climate/how-much-wind-power</wfw:comment>
  <pubDate>Thu, 21 Apr 2011 09:00 GMT</pubDate>
  <description><![CDATA[
<p>
So how much wind energy can we realistically use? A paper
(<i>Earth System Dynamics, <a href="http://dx.doi.org/10.5194/esd-2-1-2011">DOI: 10.5194/esd-2-1-2011</a></i>)
 by Miller,Gans and  Kleidon  (MGK10) 
has generated a lot of controversy courtesy of a New Scientist 
<a href="http://www.newscientist.com/article/mg21028063.300-wind-and-wave-farms-could-affect-earths-energy-balance.html">review</a>
 (See <a href="http://climateprogress.org/2011/04/04/wind-and-wave-power-renewable-new-scientist/">Climate Progress</a> for a 
good rebuttal). They argue that the effective limit we can safely extract without (bad) climatic consequences
is around 18--68 TW (we currently use 0.2 TW of wind power). 
</p>
<p>
This paper is a follow-on to Kleidons work on the thermodynamics of the climate, where he 
<a href="http://arxiv.org/abs/1103.2014">points out</a> that the 
<a href="https://secure.wikimedia.org/wikipedia/en/wiki/Free_energy">free energy</a> is the important measure of what energy can be generated by renewables.
The free energy of the atmosphere is on the scale of  hundreds of TW, he argues, much less than the heat energy of ~10^5 TW that comes from
the sun. He argues that not enough attention is paid to the free energy budget, and argues that from
<a href="http://www.earth-syst-dynam-discuss.net/1/C84/2010/esdd-1-C84-2010-supplement.pdf">MEP</a> theory that free energy flows through different geophysical processes are more
important than people currently think: such energy and momentum flows then lead to faster depletion of gradients
than people currently use in their models. Frequently we use "diffusive-like" approximations to stuff we can't explicitly
 handle,such as convection and eddies below the resolution of our computer models.
</p>
<p>
That the free energy budget, and small-scale processes need more detailed study (such as the transfer of momentum and
energy from wind to water), I agree. But paradoxically, MGK10's estimates based on diffusive processes are what gets
it into trouble.  
</p>
<p>
The critiques (e.g. <a href="http://www.earth-syst-dynam-discuss.net/1/C84/2010/esdd-1-C84-2010-supplement.pdf">Jacobsen and Archer</a>)
seem to concentrate on the estimates for diffusive and other energy losses (eg. wake fields) and climatic consequences
are very loose, and out by factors of 50-100. They also ignore the fact that using wind as a substitute for more 
destructive energy sources produces a net gain, climate-wise.
Based on these numbers, the real limits on wind power are more
limited by where we can realistically place turbines, and the use and availability of rare earth metals 
in turbine magnets (MW sized turbines use over a ton of neodynium each in magnets!)
</p>
<p>
One of the focuses of research at <a href="http:/www.ichec.ie">ICHEC</a> and 
<a href="http://www.met.ie">Met Eireann</a> is wind for wind power: this becomes increasingly important 
for Ireland as we have more energy production by wind. I've been recently involved in a
European project <a href="http://www.wire1002.ch/">Weather Intelligence for Renewable Energies</a> on investigating
weather and climate forecasting needs of wind energy.
</p>
<p>
 In our weather models, we are getting to finer and finer resolutions
(down to 2-5 km operationally, but working on 1 km in research), but as yet do not take account of wind energy changes.
Modelling the wake turbulence, etc. and other effects of turbines is a 'fluid dynamics' problem done by the wind turbine
manufacturers, mostly, in order to lay out turbines in a farm efficiently; this is done on the timescale of metres and seconds,
while  on the other end of the spectrum  work is done in climate research on the changes in potential winds to see
if wind energy will change in a few decades. But little is done on 'weather' scales of kilometres, minutes and hours: it turns out
there are wind patterns that we don't predict in our models (vortices, etc.; especially for offshore turbines) that affect wind energy production,
but would be very useful for wind farm and electrical grid operators to know about. So we should think about
adapting our weather models for these.
</p>
<p>
Either way, it looks like more detailed work on the interactions between atmospheric dynamics and wind farms would be a good thing.
</p>
<p>
Incidentally, whatever about the alarmist nature of the article, kudos to <i>New Scientist</i> for their linking to papers: they quoted 
the names of the journals (<i>Earth System Dynamics</i>,<i>Philosophical Transactions of the Royal Society</i>), 
but where the article was not yet published (or behind a paywall), 
<em>linked to the Arxiv.org version</em>.  More could do this.
</p>

<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/climate" rel="tag">climate</a>, <a href="http://blog.sceal.ie/tags/energy" rel="tag">energy</a>, <a href="http://blog.sceal.ie/tags/thermodynamics" rel="tag">thermodynamics</a>, <a href="http://blog.sceal.ie/tags/science" rel="tag">science</a>, <a href="http://blog.sceal.ie/tags/wind" rel="tag">wind</a>, <a href="http://blog.sceal.ie/tags/renewables" rel="tag">renewables</a> </span>
]]></description>
</item>
<item>
  <title>Politican Retraining Fund?</title>
  <guid isPermaLink="true">http://blog.sceal.ie/politics/politican-retraining-fund</guid>
  <link>http://blog.sceal.ie/politics/politican-retraining-fund.html</link>
  <category domain="http://blog.sceal.ie">politics</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/politics/politican-retraining-fund.html#comments</comments>
  <slash:comments>0</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/politics/politican-retraining-fund</wfw:comment>
  <pubDate>Wed, 08 Dec 2010 12:00 GMT</pubDate>
  <description><![CDATA[

<p>
One of the problems we have in Ireland is that the Daíl is unrepresentative: in particular it lacks scientists and engineers, or any representation from the high-tech Smart Economy we are supposedly trying to create. This is largely down to the challenges of a political career, especially in as clientelist a system as ours (that also needs to be fixed).
</p>
<p>
Basically the Daíl is stuffed with teachers, lawyers, publicans and the like: those who can postpone a career, run for office knowing that they can safely move back into their old job. Teachers in particular find their posts held open for them until they return. Scientists and Engineers, on the other hand, would effectively be committing career suicide: 5 years out of the industry and your day-to-day knowledge is stale. You are effectively unemployable.
</p>
<p>
So Mike O'Keeffe from <a href="http://www.ircona.com">Ircona</a> suggests that we create a retraining fund; basically make the promise to engineers and the like running for office that 'your job is open for you when you return'. The fund would go to their employer to help retrain them back into work for several years after they return.
</p>
<p>
This fund would be set up by the high-tech industries in Ireland, who could do with people who actually understand those industries (ICT, biotech, etc.), and even just science in the Daíl. How about it?
</p>
<p>
[Note: this is not to say this is the only, or even most important, fix needed to Irish politics; but it should be straightforward compared to reforming the constitution.]
</p>

<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/politics" rel="tag">politics</a>, <a href="http://blog.sceal.ie/tags/science" rel="tag">science</a>, <a href="http://blog.sceal.ie/tags/ireland" rel="tag">ireland</a> </span>
]]></description>
</item>
<item>
  <title>Tidally locked Benchmarks</title>
  <guid isPermaLink="true">http://blog.sceal.ie/climate/tidally-locked-benchmarks</guid>
  <link>http://blog.sceal.ie/climate/tidally-locked-benchmarks.html</link>
  <category domain="http://blog.sceal.ie">climate</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/climate/tidally-locked-benchmarks.html#comments</comments>
  <slash:comments>0</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/climate/tidally-locked-benchmarks</wfw:comment>
  <pubDate>Sat, 09 Oct 2010 18:00 GMT</pubDate>
  <description><![CDATA[
<p>
Fresh up on <a href="http://arxiv.org">arxiv.org</a> is a paper by Kevin Heng, Kristen Menou and Peter  Phillipps:
<a href="http://xxx.lanl.gov/abs/1010.1257">Atmospheric circulation of tidally-locked exoplanets: a suite of benchmark tests for dynamical solvers<a/>.
Kristen Menou  was at <a href="http://blog.sceal.ie/astronomy/exoclimes-climate-models.html">exoclimes 2010<a/> where one
of the background topics was how to compare and validate our various models in exoplanetary  climates.
</p>
<p>
Earth-based climate modellers have test cases such as 
<a href="http://www.gfdl.gov/bibliography/related_files/ih9401.pdf">Held-Suarez</a> which are used to compare the models, but to date no equivalents are used for exoplanetary models. This work fills that gap for Tidally-locked atmospheres (similar to <a href="http://blog.sceal.ie/astronomy/zarmina.html">Zarmina</a>
for example, and some 'Hot Jupiters'. I'm particularly interested in the tidally-locked Earth case; it's relevant for my own PhD work.
</p>
<p>Incidentally, for a good summary of the different ways we test climate models, 
see Steve Easterbrook's <a href="http://www.easterbrook.ca/steve/?p=1917">recent blog entry</a>; 
he's been doing a tour of major modelling centres, learning how they do things. Worth a look.
</p>


<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/exoplanets" rel="tag">exoplanets</a>, <a href="http://blog.sceal.ie/tags/ climate" rel="tag"> climate</a>, <a href="http://blog.sceal.ie/tags/ benchmarks" rel="tag"> benchmarks</a> </span>
]]></description>
</item>
<item>
  <title>Zarmina!</title>
  <guid isPermaLink="true">http://blog.sceal.ie/astronomy/zarmina</guid>
  <link>http://blog.sceal.ie/astronomy/zarmina.html</link>
  <category domain="http://blog.sceal.ie">astronomy</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/astronomy/zarmina.html#comments</comments>
  <slash:comments>0</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/astronomy/zarmina</wfw:comment>
  <pubDate>Sun, 03 Oct 2010 11:00 GMT</pubDate>
  <description><![CDATA[
<p>
So the exoplanet Gliese-581-g has a name: <a href="http://io9.com/5653433/the-astrophysicist-who-discovered-zarmina-describes-life-on-second-earth">Zarmina!</a>.
Steve Vogt, who led the discovery team, named it after his wife. Good move.
<a href="http://blog.sceal.ie/astronomy/naming-problems.html">About time we named these things</a>.
</p>
<p>
Although personally I think GL 581 d, its neighbour, has a 
<a href="http://xxx.lanl.gov/abs/1009.5814">better chance of being habitable.</a>
Everyone is assuming Zarmina is 
<a href="http://en.wikipedia.org/wiki/Tidal_locking">tidally-locked</a>: that is, it has one side facing the star at all times.
This would mean that while one side of the star is scorching hot, the other freezing cold, all you have to do
is go to the "Terminator", the part of the planet in continuous dusk (or dawn) to find a nice climate.
Not necessarily so: it can be in orbital resonance like Mercury, which rotates in a 3:2 ratio. A better idea is to 
look below any oceans, if it has them, for life.
</p>
<p>
Either way, this Gliese 581 is the direction to point a <a href="http://planetquest.jpl.nasa.gov/TPF/tpf_index.cfm">TPF</a> at.
</p>

<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/names" rel="tag">names</a>, <a href="http://blog.sceal.ie/tags/ exoplanets" rel="tag"> exoplanets</a> </span>
]]></description>
</item>
<item>
  <title>So what should we call these things ?</title>
  <guid isPermaLink="true">http://blog.sceal.ie/astronomy/naming-problems</guid>
  <link>http://blog.sceal.ie/astronomy/naming-problems.html</link>
  <category domain="http://blog.sceal.ie">astronomy</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/astronomy/naming-problems.html#comments</comments>
  <slash:comments>0</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/astronomy/naming-problems</wfw:comment>
  <pubDate>Mon, 13 Sep 2010 18:01 GMT</pubDate>
  <description><![CDATA[
<p>
The <a href="http://www.exoclimes.org">Exoclimes</a> conference ended on an interesting perennial problem: what should
we call these things we work on? The climate folks pointed out what the astronomers have grown used to: the 
telephone numbers we use as planet names. The two most studied Hot Jupiters, for example, are HD209458b and HD189733b.
Come on, we could do better than that.
</p>
<p>
In fact the naming worries started earlier when Frank Selsis asked people to avoid calling the planets he works on
"super-Earths" (or should that be Super-Earths?). Dimitar Sasselov had accidentally kicked up a kerfuffle in the media
a few weeks back by calling them "Earth-like" planets, when he meant "Earth-sized" planets. Selsis pointed out
non-scientists will interpret "super-Earth" to mean "like Earth, only Better!", when we mean its just a bigger
ball of rock and ice than Earth. But what to call them? 
</p>
<p>
<p>
Well, at least one planet already has a name, sort of: HD 209458b is frequently called 'Osiris'. 
And there is a published list of <a href="http://arxiv.org/abs/0910.3989">possible planet names</a>. 
But Osiris the Egyptian god is more famous than Osiris the planet, confusing google.
And people are going to assume things based on the planet names: are we really going to name a planet Vulcan?
</p>
<p>
One suggestion was that if we found a system with seven planets we could call them after the
Seven Dwarfs, but this was ruled out:
<a href="http://www.universetoday.com/13876/dwarf-planet-pluto/"> don't mention the war</a> (but dwarfs could also mean 
<a href="http://en.wikipedia.org/wiki/Brown_dwarf">brown dwarfs</a>!)
</p>
<p>
At the end of the conference, there was show of hands: who agreed with naming planets? of about 100 present,
all in favour, none against. The delegate to the IAU commision on the matter, which had voted against,
duly noted. Perhaps we will name them then.
</p>

<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/names" rel="tag">names</a>, <a href="http://blog.sceal.ie/tags/exoplanets" rel="tag">exoplanets</a>, <a href="http://blog.sceal.ie/tags/ astronomy" rel="tag"> astronomy</a> </span>
]]></description>
</item>
<item>
  <title>Exoclimes: the diversity of planetary scientists</title>
  <guid isPermaLink="true">http://blog.sceal.ie/astronomy/exoclimes-climate-models</guid>
  <link>http://blog.sceal.ie/astronomy/exoclimes-climate-models.html</link>
  <category domain="http://blog.sceal.ie">astronomy</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/astronomy/exoclimes-climate-models.html#comments</comments>
  <slash:comments>0</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/astronomy/exoclimes-climate-models</wfw:comment>
  <pubDate>Sun, 12 Sep 2010 09:00 GMT</pubDate>
  <description><![CDATA[
<p>
I'm just back from <a href="http://www.exoclimes.org/">ExoClimes 2010: Exploring the Diversity of Planetary Atmospheres</a>.
An excellent conference: the PDFs of the talks and posters are now online, and they are putting the videos of the 
talks up soon. But in particular the organizers deserves thanks for bringing exoplanetary scientists and observers
together with climate modelers  doing Earth (and Mars, Titan, Venus, ...) models.
</p>
<div class="img-dec" style="width: 310px">
 <img src="http://blog.sceal.ie/img/model-complexity.png" width="300px" alt="Model complexity graph">
 Peter Cox on model complexity
</div>
<p>
The last talk on Friday was by Peter Cox on 
<a href="http://www.astro.ex.ac.uk/people/alapini/exoclimes/Cox_exoclimes10.pdf">Climate change and exoplanet sciences</a> that was far better than expected for the "graveyard shift". One theme of the conference was the need for a 'heirarchy' of models, from simple energy-balance models to full circulation (GCM) models: using progressively more complex models to understand more bits of whats going on. Exoplanet workers mostly use simpler models, progressing now to GCMs, while Earth modellers are moving beyond GCMs to "Earth system" models including biology, etc.  Peter pointed out the two styles of work: the exoplanet modelers are short of data, and risk being too speculative. We know little of what the planets are like, and concentrate on implementing physics in the models to see what they might be like. Earth modelers on the other hand are if anything swamped with data: the tendency here is to make the model fit the data, by adjusting parameters until it does so. The danger of this approach is that the model will then  not work away from current present-Earth conditions.
</p>
<p>
Tim Lenton pointed out some work that was done with the Met Office model, where they took the radiative transfer part of the model and tested it for
other planets, and paleo-Earth conditions. The model blew up : it wasn't capable of x2 or x4 current CO2 levels. (This has since been corrected). 
</p>
<p>
Over dinner there were interesting discussions on the different styles within the communities.
While the underlying GCMs used come from the Earth sciences, 
its quite common within the exoplanetary community for a researcher to work on all parts of the model: dynamics 
one day, radiative transfer the next. In Earth climate work people have become more specialized and someone
is a 'radiative transfer' person, and won't touch other parts of the code
(even if they can follow them in the huge codes we have today!). 
</p>
<p>
On the other hand, there is a greater
tradition of model inter-comparison in Earth sciences, where we compare the model outputs to each other
for some known test cases (
<a href="http://www-personal.umich.edu/~cjablono/project.html">Held &amp; Suarez</a>, the 
<a href="http://cmip-pcmdi.llnl.gov/cmip5/">CMIP5</a> project, etc.) Apart from some initial work by
Emily Rauscher, little has been done on this in exoplanetary models; it was agreed more of this would
be a good idea.
Radiative transfer (the interaction of 'sunlight' with the atmosphere, where it gets absorbed, scattered and re-radiated)
in particular seems to be an area that could benefit from this.
</p>
In this middle ground Francois Forget showed the work on the LMDZ model and
<a href="http://www.astro.ex.ac.uk/people/alapini/exoclimes/Forget_exoclimes10.pdf">applying GCMs to terrestrial planets</a>. 
They've successfully applied this model to Mars, Titan, and partially to Venus (a much tougher problem, due to its heavy clouds 
giving a long radiative timescale). There are problems with correctly explaining super-rotation though. 
This is where the atmosphere rotates faster than the planet: on Venus for example the planet rotates every 243 days,
while the clouds rotate around the planet every 4 days.
<a href="http://www.astro.ex.ac.uk/people/alapini/exoclimes/Lebonnois_exoclimes10.pdf">Sebastian Lebonnois</a> described
the possible mechanisms for Venus and Titan; Johnathan  Mitchell so did some interesting work on this recently.
Different regimes are involved for different rotation rates of the planet.
</p>
<p>
Ralph Lorenz pointed out the lack of "real paleo-Earth" climate work at the moment. While geology has inspired
a lot of work on the 
<a href="http://www.astro.ex.ac.uk/people/alapini/exoclimes/Lenton_exoclimes10.pdf">atmospheric composition</a>,
what with the different gas mixtures (meaning earth-model radiative transfer codes don't work) and 
the faster dynamics meaning super-rotation could apply (Earth's day was about 8 hours long in the Archean era), we don't have a model of the climate yet.
It looks like we should treat Earth as an exoplanet.
</p>


<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/astronomy" rel="tag">astronomy</a>, <a href="http://blog.sceal.ie/tags/ climate" rel="tag"> climate</a>, <a href="http://blog.sceal.ie/tags/ exoplanets" rel="tag"> exoplanets</a>, <a href="http://blog.sceal.ie/tags/ conferences" rel="tag"> conferences</a> </span>
]]></description>
</item>
<item>
  <title>Building a statically-linked program</title>
  <guid isPermaLink="true">http://blog.sceal.ie/programming/static-pkgconfig</guid>
  <link>http://blog.sceal.ie/programming/static-pkgconfig.html</link>
  <category domain="http://blog.sceal.ie">programming</category>
  <author>alastair@sceal.ie (Alastair McKinstry)</author>
  <comments>http://blog.sceal.ie/programming/static-pkgconfig.html#comments</comments>
  <slash:comments>10</slash:comments>
  <wfw:comment>http://blog.sceal.ie/commentAPI/programming/static-pkgconfig</wfw:comment>
  <pubDate>Fri, 03 Sep 2010 21:00 GMT</pubDate>
  <description><![CDATA[
<p>
I'm currently working on a Fortran program at work: a post-processing tool that takes climate data,
in <a href="http://en.wikipedia.org/wiki/Netcdf">NetCDF</a> format, and outputs in 
<a href="http://www2-pcmdi.llnl.gov/cmor">CMOR2</a> format (a NetCDF variant with climate conventions).
So, it links against netcdf and cmor. 
</p>
<p>
Now in <a href="http://en.wikipedia.org/wiki/High-performance_computing">HPC</a> and climate in particular,
codes are typically linked statically: partially for robustness, but mostly for speed (more on which later).
So, I'd like to link this statically, as I have tens of terabytes of data to process. Now, mostly I've
been linking using pkg-config:
</p>
<pre>
  gfortran -o nemo-rewriter nemo-rewriter.f90 `pkg-config --libs --cflags nemo cmor`
</pre>
<p>
<em>pkg-config</em> assembles the libraries. For dynamic libraries, the netcdf and cmor libraries are themselves
linked to dependencies. But in the static case, all dependencies need to be on the link line, which is more
complex. Never mind, it should be possible with:
<pre>
  gfortran -static -o nemo-rewriter nemo-rewriter.f90 `pkg-config --static --libs --cflags nemo cmor`
</pre>
<p>
This should work by assembling all the required static libraries, via pkg-config dependencies. Unfortunately
not every package has a .pc file, and so this fails: As of version 4.1 NetCDF allows a URL instead of a file to read, and
hence depends on <a href="http://packages.debian.org/lenny/libcurl3">curl</a> to retrieve the file. Curl has 
no pkg-config .pc file describing its libraries, and it fails.
</p>
<p>
Never mind, lets assemble the static libraries by hand. <a href="http:/www.debian.org">Debian</a> provides
static versions of libraries in the -dev packages. Can I assemble a statically-linked program ?
For this I need:
<ul>
<li>NetCDF needs libnetcdff.a and libnetcdf.a directly.</li>
<li>NetCDF needs <a href="http://www.hdfgroup.org/HDF5/">HDF5</a>: libnethdf5_hl.a and libhdf5.a for version 4 files.</li>
<li>CMOR2 needs: <a href="http://packages.debian.org/sid/libcmor-dev">libcmor2.a</a></li>
<li>CMOR2 depends on <a href="http://packages.debian.org/sid/libudunits2-dev">libudunits2.a</a>, to convert between physical units.</li>
</ul>
</p>
<p>
Now here it gets interesting. To handle secure communications and authentication, curl has some complex dependencies.
It has two versions. Pick the gnutls one for example:
</p>
<ul>
<li><a href="http://packages.debian.org/lenny/libgss-dev">libgss.a</a> for Generic Security Services.</li>
<li>libgss needs <a href="http://packages.debian.org/lenny/libidn11">libidn.a</a> for Internationalized Domain names</li>
<li>libgss needs <a href="http://packages.debian.org/sid/libshishi-dev">libshishi.a</a> for Kerberos</a>
<li>libshishi.a needs <a href="http://packages.debian.org/sid/libgpg-error-dev">libgpg-error.a</a></li>
<li>libshishi.a needs <a href="http://packages.debian.org/sid/libgnutls-dev">libgnutls.a</a></li>
<li>libshishi.a needs <a href="http://packages.debian.org/sid/libtasn1-3-dev">libtasn1.a</a></li>
<li>libshishi.a needs <a href="http://packages.debian.org/sid/libgcrypt11-dev">libgcrypt.a</a></li>
<li>libshishi.a needs <a href="http://packages.debian.org/sid/libc6-dev">libresolv.a</a></li>
<li>libcurl.a needs <a href="http://packages.debian.org/sid/libssl-dev">libssl.a</a></li>
<li>libcurl.a needs <a href="http://packages.debian.org/sid/libssh-dev">libssh2.a</a></li>
<li>libcurl.a needs <a href="http://packages.debian.org/sid/libldap2-dev">libldap_r.a</a></li>
<li>libdlap_r.a needs <a href="http://packages.debian.org/sid/libldap2-dev">liblber.a</a></li>
<li>libldap_r.a needs <a href="http://packages.debian.org/sid/libsasl2-dev">libsasl2.a</a>. Which access databases, so ...</li>
<li>libsasl2.a needs <a href="http://packages.debian.org/sid/libmysqlclient-dev">libmysqlclient.a</a></li>
<li>libsasl2.a needs <a href="http://packages.debian.org/sid/libpq-dev">libpq.a</a></li>
<li>libsasl2.a needs <a href="http://packages.debian.org/sid/libdb-4.8-dev">libdb-4.8.a</a></li>
<li>libsasl.a needs <a href="http://packages.debian.org/sid/libsqlite-dev">libsqlite.a</a></li>
<li>libssl.a needs <a href="http://packages.debian.org/sid/libssl-dev">libcrypto.a</a></li>
<li>libcrypto.a needs <a href="http://packages.debian.org/sid/zlib1g-dev">libz.a</a></li>
<li>libcurl.a needs <a href="http://packages.debian.org/sid/libc6-dev">libdl.a</a></li>
<li>libcurl.a needs <a href="http://packages.debian.org/sid/commerr-dev">libcom_err.a</a></li>
<li>libcurl.a needs <a href="http://packages.debian.org/sid/libkeyutils-dev">libkeyutils.a</a></li>
<li>libcurl.a needs <a href="http://packages.debian.org/sid/libkrb5-dev">libgssapi_krb5</a>, <em> which is in dynamic form only</em></li>
<li>libcurl.a needs <a href="http://packages.debian.org/sid/libkrb5-dev">libkrb5crypto</a>, <em>which has no static library</em></li>
</ul>  
<p>
I may have missed some out, having stopped because there is no static implementation of Kerberos on Debian.
But still, the idea that a simple little fortran proggie will statically link in four database libraries is silly.
It appears to be no longer possible to simply statically link a program in Debian, and definitely not via
pkg-config, because so many dependencies do not yet have configuration files.
</p>


<span class="tags">Tags  <a href="http://blog.sceal.ie/tags/debian" rel="tag">debian</a>, <a href="http://blog.sceal.ie/tags/static" rel="tag">static</a>, <a href="http://blog.sceal.ie/tags/cmor" rel="tag">cmor</a>, <a href="http://blog.sceal.ie/tags/pkg-config" rel="tag">pkg-config</a> </span>
]]></description>
</item>
</channel>
</rss>

