<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Gnuritas</title><link href="//gnuritas.org/" rel="alternate"></link><link href="//gnuritas.org/feeds/all.atom.xml" rel="self"></link><id>//gnuritas.org/</id><updated>2020-04-20T00:45:23+02:00</updated><entry><title>Understanding COVID &amp; friends</title><link href="//gnuritas.org/understanding-covid.html" rel="alternate"></link><published>2020-04-14T11:11:00+02:00</published><updated>2020-04-20T00:45:23+02:00</updated><author><name>Levien van Zon</name></author><id>tag:gnuritas.org,2020-04-14:/understanding-covid.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;On the symptoms and risks of COVID-19 and other respiratory viral infections&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;By Levien van Zon&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This article isn&amp;rsquo;t short. For those of you who are of an impatient disposition, I have written a short summary of the main points. And for those of you who do read the whole story and want to know even more, I have added footnotes with sources and more background information.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name="top"&gt;&lt;/a&gt;
Several weeks ago, I became ill. Initially I just had a mild headache, which I attributed to drinking a few too many craft beers on a Saturday afternoon. But a day or two later I started feeling feverish and tired. A sore throat came soon after, and I had a runny nose for several days, with occasional sneezing. Normally these symptoms obviously wouldn&amp;rsquo;t be …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;On the symptoms and risks of COVID-19 and other respiratory viral infections&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;By Levien van Zon&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This article isn&amp;rsquo;t short. For those of you who are of an impatient disposition, I have written a short summary of the main points. And for those of you who do read the whole story and want to know even more, I have added footnotes with sources and more background information.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name="top"&gt;&lt;/a&gt;
Several weeks ago, I became ill. Initially I just had a mild headache, which I attributed to drinking a few too many craft beers on a Saturday afternoon. But a day or two later I started feeling feverish and tired. A sore throat came soon after, and I had a runny nose for several days, with occasional sneezing. Normally these symptoms obviously wouldn&amp;rsquo;t be any case for concern: a cold, perhaps, or a mild case of the flu. But I was in Central America, a warm part of the world where a cold or flu didn&amp;rsquo;t seem all that common, especially in the dry season. Moreover, COVID-19 was just spreading into the Americas. So when I started feeling a pressure on my chest and experiencing shortness of breath, I started to get somewhat worried. This clearly wasn&amp;rsquo;t a normal cold, and I had read reports of how symptoms such as these can rapidly deteriorate and possibly lead to death. Also, it didn&amp;rsquo;t help that the nearest decent hospital was several hours away.&lt;/p&gt;
&lt;p&gt;Meanwhile, the media seemed to be focusing very much on the statistics of COVID-19. Initially, reports mostly concerned the number of confirmed cases, but as the pandemic progressed, this shifted to the number of hospitalisations, intensive care beds and of course the rapidly growing number of deaths. I was in a country with only a few confirmed cases of COVID-19, but that statistic wasn&amp;rsquo;t of any use to me. And frustratingly, it was quite hard to find any reliable and consistent information on the actual symptoms and risks associated with COVID-19. So, as a theoretical biologist with &lt;a href="(https://levien.stackstorage.com/s/hhi7QPBfQe16gpf)"&gt;some knowledge on virus dynamics&lt;/a&gt;, I started doing some research, and &lt;a href="https://github.com/lvzon/infectionsurvey"&gt;collecting some data&lt;/a&gt; to get a better idea of what to expect. I wanted to know how my symptoms compared to those of other people, and what the actual risks could be for me as an individual with possible symptoms of COVID-19.&lt;/p&gt;
&lt;p&gt;It is actually quite hard to know whether you have the rather creatively named &lt;em&gt;Corona Virus Disease 2019&lt;/em&gt; (COVID-19) or something else, especially in the first few days of symptoms. And the reason for this has to do with the nature of what we call &amp;ldquo;respiratory infections&amp;rdquo;. The &lt;a href="https://en.wikipedia.org/wiki/Respiratory_tract"&gt;respiratory system or tract&lt;/a&gt; is a fancy term for the parts of our body that we use for breathing: our nose, nasal cavity, throat, lungs and all the bits in between. The upper respiratory tract is roughly everything from the throat upwards, and the lower respiratory tract consists of the bits below that: the windpipe that branches off into the bronchi and further down into an intricate network of spaces in the lungs.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://commons.wikimedia.org/wiki/File:Illu_conducting_passages.svg#/media/File:Illu_conducting_passages.svg"&gt;&lt;img alt="Upper and lower respiratory tract, by Lord Akryl, Jmarchn and http://cancer.gov" src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Illu_conducting_passages.svg/373px-Illu_conducting_passages.svg.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We are all familiar with upper respiratory viral infections. In fact, most adults experience one 2 to 3 times per year, and children a lot more often. The &lt;a href="https://en.wikipedia.org/wiki/Common_cold"&gt;&amp;ldquo;common cold&amp;rdquo;&lt;/a&gt; is a (rather inaccurate) collective term for an upper respiratory infection, which may be caused by caused by over 200 different types of virus. Roughly half of these are so-called &lt;a href="https://en.wikipedia.org/wiki/Rhinovirus"&gt;rhinoviruses&lt;/a&gt;. Another 10-15% of cases of common cold are caused by human &lt;a href="https://en.wikipedia.org/wiki/Coronavirus"&gt;coronaviruses&lt;/a&gt;, which have rather obscure names such as &lt;a href="https://en.wikipedia.org/wiki/Human_coronavirus_OC43"&gt;HCoV-OC43&lt;/a&gt;, and some of which have been circulating in the human population for at least half a century, although probably much longer&lt;sup id="fnref:hcov"&gt;&lt;a class="footnote-ref" href="#fn:hcov"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;So what happens if you get a cold? First, you get infected by &amp;ldquo;live&amp;rdquo;&lt;sup id="fnref:infectious"&gt;&lt;a class="footnote-ref" href="#fn:infectious"&gt;2&lt;/a&gt;&lt;/sup&gt; virus particles, also know as &lt;a href="https://en.wikipedia.org/wiki/Virus#Structure"&gt;&lt;em&gt;virions&lt;/em&gt;&lt;/a&gt;, either because you inhale tiny droplets that other people produce when sneezing or coughing, or because you pick them up from a surface (or person) that was contaminated with live virions&lt;sup id="fnref:virusentry"&gt;&lt;a class="footnote-ref" href="#fn:virusentry"&gt;3&lt;/a&gt;&lt;/sup&gt;. Once infectious virions manage to get into your upper respiratory tract, they break inside some of the cells and start instructing them produce new virions, which can then infect neighbouring cells. Oddly, however, this &lt;em&gt;virus replication&lt;/em&gt; (the production of new virions) is not what causes the typical symptoms associated with a cold. The symptoms are caused not by the virus itself, but by your immune system. Specialised immune cells can recognise signs of viral and bacterial infections, and trigger the production of &amp;ldquo;alarm-substances&amp;rdquo; called &lt;a href="https://en.wikipedia.org/wiki/Cytokine"&gt;&lt;em&gt;cytokines&lt;/em&gt;&lt;/a&gt;. These cytokines subsequently trigger a whole range of responses in your body. The first effects of cytokine production that you usually notice are the so-called &lt;em&gt;systemic symptoms&lt;/em&gt;, which may include &lt;a href="https://en.wikipedia.org/wiki/Fever"&gt;fever&lt;/a&gt;, headache, muscle ache, loss of appetite and/or &lt;em&gt;malaise&lt;/em&gt;, a general feeling of being sick. These systemic symptoms usually develop quite rapidly, but don&amp;rsquo;t last long, at most a few days. Somewhat more slowly however, cytokines and a number of other substances trigger the process of &lt;a href="https://en.wikipedia.org/wiki/Inflammation"&gt;&lt;em&gt;inflammation&lt;/em&gt;&lt;/a&gt; at or near the sites where the virus is reproducing itself. This inflammation is actually a rather complicated and useful set of processes that help remove infected and damaged cells, and help initiate tissue repair. Unfortunately we mostly experience this useful process as pain and snot.&lt;/p&gt;
&lt;p&gt;The first &amp;ldquo;local&amp;rdquo; (rather than systemic) symptom is often irritation of the throat or nasal cavity, which may later develop into a sore throat as inflammation gets worse. Sneezing is another local effect of inflammation, often accompanied by a runny nose. Unfortunately both these responses of your immune system, sneezing and a runny nose, also happen to be great ways of spreading virus particles so that they can infect other people. As the inflammation spreads down in the direction of the lower respiratory tract, it may over-sensitize the nerves that trigger the coughing response, which may then cause you to start coughing at even the slightest irritation of the airways (such as inhaling cold air).&lt;sup id="fnref:eccles"&gt;&lt;a class="footnote-ref" href="#fn:eccles"&gt;5&lt;/a&gt;&lt;/sup&gt; This is known as an &lt;em&gt;unproductive cough&lt;/em&gt; or &lt;em&gt;dry cough&lt;/em&gt; (as opposed to a &lt;em&gt;productive&lt;/em&gt; or &lt;em&gt;wet&lt;/em&gt; cough that actually removes material from your lower airways).&lt;/p&gt;
&lt;p&gt;As it turns out, the symptoms I just described aren&amp;rsquo;t just symptoms of common cold, but of upper respiratory infections in general. Because the symptoms are caused by the immune system rather than a virus, they are more or less the same for the more than 200 viruses that can cause upper respiratory infections in humans. Most of these infections we classify either as common cold or as the flu. &lt;a href="https://en.wikipedia.org/wiki/Flu"&gt;Flu&lt;/a&gt; or influenza is actually an interesting case, because in contrast to common cold it is an infection caused by a single type of virus, known as &lt;em&gt;Influenza A&lt;/em&gt;. &lt;a href="https://levien.stackstorage.com/s/hhi7QPBfQe16gpf"&gt;Originally a virus of water birds, notably ducks&lt;/a&gt;, influenza has also been infecting humans and other mammals for millennia. The resulting illness, called the flu in English and influenza, gripe, Grippe, griep or something similar in most other European languages, is often confused with common cold, but there are a few important differences. It spreads from person to person in more or less the same way as common cold: through coughing or sneezing and through other direct or indirect contact with virions. Due to the way it spreads, the flu generally starts off as an upper respiratory infection, similar to common cold. But while the rhinoviruses that cause many cases of common cold hardly seem to damage the tissues lining the upper respiratory tract, influenza infections can cause tissue damage. Moreover, it seems that an influenza infection can spread to the lower respiratory tract (windpipe, bronchi and lungs) more easily than is common for most common cold viruses. Finally, influenza viruses have a trick up their sleeve called &lt;a href="https://en.wikipedia.org/wiki/Reassortment"&gt;&lt;em&gt;reassortment&lt;/em&gt;&lt;/a&gt;, which allows them to &amp;ldquo;shape shift&amp;rdquo; more easily than other respiratory viruses. This means that they can more easily evade the &lt;a href="https://en.wikipedia.org/wiki/Innate_immune_system"&gt;antibody response&lt;/a&gt; that constitutes the fast part of your immune system memory.&lt;/p&gt;
&lt;p&gt;As a result of the typical properties of flu viruses, an influenza infection may evoke a stronger immune response than a common cold infection, and has a larger probability of causing complications.&lt;sup id="fnref:flucold"&gt;&lt;a class="footnote-ref" href="#fn:flucold"&gt;4&lt;/a&gt;&lt;/sup&gt; For instance, fever is uncommon with common cold in adults, but it is reported in roughly 35% of experimental infections with influenza (in adults younger than 65).&lt;sup id="fnref:carrat"&gt;&lt;a class="footnote-ref" href="#fn:carrat"&gt;6&lt;/a&gt;&lt;/sup&gt; Also other systemic symptoms such as muscle ache and lack of appetite tend to be more common and/or stronger in influenza than in common cold, which suggests a stronger cytokine response, which in turn can be the result of a higher virus load (a larger number of virions) and/or more damaged cells. Generally, adults recover from the flu within 5 to 8 days, but especially in elderly people, young children or people with underlying health problems, potentially dangerous complications can result from an influenza infection. If the virus moves into the lungs, for instance because it is not effectively contained by the immune system, it may cause viral pneumonia. Pneumonia is an inflammation of the lungs, so it is yet another case of symptoms being caused (at least in part) by the immune system rather than a disease agent (virus, bacterium, etc.). The immune reaction in itself is a good thing of course, but if an inflammation of the lungs gets out of hand, it reduces the capacity of the lungs to transfer oxygen to your bloodstream.&lt;sup id="fnref:viralpneumonia"&gt;&lt;a class="footnote-ref" href="#fn:viralpneumonia"&gt;7&lt;/a&gt;&lt;/sup&gt; Several factors can aggravate this problem, including lung damage or existing issues with your immune system. A common complication with influenza is that bacteria infect the lung tissue that has been damaged by the virus, causing yet more damage and a stronger local inflammation. Before such &lt;em&gt;secondary infections&lt;/em&gt; could be treated by antibiotics they were one of the main causes of human deaths, and in many developing countries they still are. In fact, globally a quarter to half a million people are estimated to die every year due to complications of a flu infection, mainly pneumonia. Elderly people are strongly overrepresented in these deaths, because our immune system tends to react less effectively to infections as we get older. Immune responses get both less strong and slower as people age, which explains why symptoms such as fever tend to be less common or less strong in elderly people. Unfortunately this means that viruses and bacteria are also less effectively contained early on in an infection, allowing them to spread more easily, and eventually leading to more serious problems later on.&lt;/p&gt;
&lt;p&gt;So virus infections can turn more serious if your immune system responds slower or less strong early on in the infection. This happens more often in old people, very young people, people with immune system issues, but also for instance in people who are sleep deprived or severely stressed. Moreover, if a virus is not recognised by your immune system, your immune response will initially be less effective at containing it, and the symptoms may eventually be worse. In fact, this is exactly what is thought to happen in pandemics. For instance, the 20&lt;sup&gt;th&lt;/sup&gt; century saw three significant &lt;a href="https://en.wikipedia.org/wiki/influenza_pandemic"&gt;influenza pandemics&lt;/a&gt;, with an estimated death toll of respectively 50-100 million people (up 3-6% of the world population!) in 1918, 1-4 million people in 1956 and around 1 million people in 1968. All three pandemics are thought to result from a human influenza virus acquiring a new &amp;ldquo;coat&amp;rdquo; from their cousins that infect birds (&lt;em&gt;Avian influenza&lt;/em&gt; viruses). The resulting influenza strains were new to our immune systems, and so spread rapidly in the human population and caused more damage than usual.&lt;sup id="fnref:brandes"&gt;&lt;a class="footnote-ref" href="#fn:brandes"&gt;8&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;And this finally brings us back to COVID-19. Coronaviruses aren&amp;rsquo;t new to humans, but like influenza they aren&amp;rsquo;t primarily a human virus. In the same way that influenza is native to ducks, coronaviruses are thought to be native to bats, which support a large diversity of viruses because (like humans) they are very social animals. Occasionally one of these viruses will jump to humans, often through an intermediate animal, as happened in 2003 with the &lt;a href="https://en.wikipedia.org/wiki/Severe_acute_respiratory_syndrome_coronavirus"&gt;Severe Acute Respiratory Syndrome coronavirus (SARS-CoV)&lt;/a&gt; in Asia. It happened again in 2012 with the &lt;a href="https://en.wikipedia.org/wiki/Middle_East_respiratory_syndrome"&gt;Middle Eastern Respiratory Syndrome coronavirus (MERS-CoV)&lt;/a&gt;, and most recently in 2019 with a virus we now call &lt;a href="https://en.wikipedia.org/wiki/Severe_acute_respiratory_syndrome_coronavirus_2"&gt;SARS-CoV-2&lt;/a&gt;. SARS-CoV-2 is the virus that causes &lt;a href="https://en.wikipedia.org/wiki/Coronavirus_disease_2019"&gt;COVID-19&lt;/a&gt;, and as its name suggests it is very closely related to the 2003 SARS coronavirus. Both viruses grab on to a molecule called &lt;a href="https://en.wikipedia.org/wiki/Angiotensin-converting_enzyme_2"&gt;ACE2&lt;/a&gt;, that is present on the outside of various types of human cells, including lung cells. However, there is an important difference between the 2003 virus that caused SARS and the 2019 virus that causes COVID-19. The older SARS-CoV primarily infected the lower respiratory tract, because lung cells have a lot of ACE2-molecules on their surface, while its younger brother SARS-CoV-2 seems less selective and is much better able to infect the upper respiratory tract, which has fewer ACE2-molecules. This means that while SARS was primarily a lung disease that spread relatively slowly, COVID-19 is both an upper respiratory disease &lt;em&gt;and&lt;/em&gt; a lower respiratory disease, and spreads much faster. And this may turn out to be an advantage, almost certainly for the virus and, counter-intuitively, possibly also for us if we&amp;rsquo;re infected by the virus.&lt;/p&gt;
&lt;p&gt;So, what happens if someone in your vicinity has COVID-19 and you&amp;rsquo;re exposed to live virions of SARS-CoV-2? This virus basically spreads from person to person in the same way as common cold and influenza, so initially it manifests as an upper respiratory infection, with the symptoms we already discussed. Like the other viruses, it triggers cytokine production and an inflammation of the upper respiratory tract. So the first symptoms of COVID-19 you&amp;rsquo;d experience are the systemic ones (fever, headache, muscle ache, loss of appetite, loss of smell and/or taste&lt;sup id="fnref:smelloss"&gt;&lt;a class="footnote-ref" href="#fn:smelloss"&gt;9&lt;/a&gt;&lt;/sup&gt;, feeling tired, generally feeling sick), followed somewhat later by local symptoms such as throat ache, runny nose, sneezing and cough. In the second week of March, two hospitals in The Netherlands tested 1353 health care workers with symptoms of respiratory infection, and found 86 (6.4%) to be infected with SARS-CoV-2.&lt;sup id="fnref:kluytmans"&gt;&lt;a class="footnote-ref" href="#fn:kluytmans"&gt;10&lt;/a&gt;&lt;/sup&gt; Of these 86 infected people, 65% reported fever or feeling feverish, 57% reported headache, 17% loss of appetite, 64% muscle ache and 76% reported &amp;ldquo;general malaise&amp;rdquo;. In other words, a majority of people with symptoms experienced some form of systemic symptoms, which is more than is generally the case for common cold or flu. As for local symptoms, 40% reported a sore throat, 55% a runny nose and 76% reported coughing. The first two symptoms indicate an upper respiratory infection (unfortunately the percentage of sneezing wasn&amp;rsquo;t reported), while the high percentage of coughing suggests that the virus may spread downward into the lower respiratory tract (as can also happen with influenza). In fact, 38% of the infected people with symptoms reported shortness of breath, and 29% reported chest pain, both of which may indicate that the virus may have spread into the lungs and caused (mild) viral pneumonia.&lt;/p&gt;
&lt;p&gt;Of the 86 health workers who were identified with COVID-19 in the above study, 84 experienced relatively mild symptoms, and two were admitted to hospital, although their situation wasn&amp;rsquo;t critical. Unfortunately this study only tested people who reported symptoms, so it probably missed health care workers that were infected with SARS-CoV-2 but did not develop any symptoms. This may be more common than you would expect: of the people experimentally infected with influenza, a third did not develop any flu symptoms, and a large multi-year study of British households found that &amp;ldquo;in the field&amp;rdquo; the large majority (75%) of flu cases turned out to be &lt;em&gt;asymptomatic&lt;/em&gt; (without symptoms). For COVID-19 the percentage of asymptomatic cases isn&amp;rsquo;t exactly known at the moment, but two early Japanese studies estimated &lt;a href="https://eurosurveillance.org/content/10.2807/1560-7917.ES.2020.25.10.2000180"&gt;18-40%&lt;/a&gt; and &lt;a href="https://www.medrxiv.org/content/10.1101/2020.02.03.20020248v2"&gt;33-46%&lt;/a&gt; (the large range is due to the uncertainty in the incubation period of COVID-19, which is the time between infection and the onset of symptoms).&lt;/p&gt;
&lt;p&gt;So what does all this mean for the risks of spreading COVID-19, and the risk of potential life-threatening complications? In order understand that better, let&amp;rsquo;s take a look at how the virus load (the amount of virus in the body) develops after the onset of symptoms, for influenza, COVID-19 and SARS:&lt;sup id="fnref:virusloadfig"&gt;&lt;a class="footnote-ref" href="#fn:virusloadfig"&gt;11&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="virus load over time for influenza, COVID-19 and SARS" src="//gnuritas.org/images/covid/viral_loads.png"&gt;&lt;/p&gt;
&lt;p&gt;The first thing to notice is that influenza develops and disappears much faster than the two coronaviruses. The influenza virus load tends to peak 1 or 2 days after the onset of symptoms, and then declines rapidly. In most of the adults for which the average influenza virus load is shown, the symptoms were resolved and the virus load had become negligible after five days, although for some it took longer. Influenza is a fairly fast &amp;ldquo;hit and run&amp;rdquo; virus: it is generally well adapted to replicating in humans, and on average the time between being infected and infecting another person is around 2.5 days, which makes sense because the risk of infecting another person tends to be highest around the peak in virus load, the time when you&amp;rsquo;re producing and spreading the most virions. After this peak, the virus load starts to decline as the virus starts running out of cells that can be easily infected, and because your cytokines have kicked your &lt;a href="https://dx.doi.org/10.1007%2F82_2014_405"&gt;various immune responses&lt;/a&gt; into action, which get to work cleaning up infected cells and virions.&lt;/p&gt;
&lt;p&gt;While the two corona brothers SARS and COVID may be infamous, they don&amp;rsquo;t seem particularly fast. Possibly this is because both were still fairly new to the game of infecting humans. While influenza tends to have an incubation period of 1 day in experiments (and up to a few days in real-life settings), COVID-19 is reported to have an average incubation period of 2-6 days, with much longer incubation times (up to two weeks) reported for some cases.&lt;sup id="fnref:incubation"&gt;&lt;a class="footnote-ref" href="#fn:incubation"&gt;12&lt;/a&gt;&lt;/sup&gt; So while influenza manifests itself quite rapidly, it may take COVID-19 a few days to reach high virus loads and trigger significant cytokine production. However, once the symptoms are there, the peak of virus production in the upper respiratory tract seems to be reached quite rapidly, after about 3 days, after which it declines rapidly, similar to influenza. In fact, after 5 days, no active virus replication was measured in the upper respiratory tract of the 9 patients that were sampled in the &lt;a href="https://www.nature.com/articles/s41586-020-2196-x"&gt;study by Wölfel et al.&lt;/a&gt; (upon which the COVID-lines in the figure are based), and no live virions could be extracted after 8 days. This means that anyone with COVID-19 will probably be most infectious in the first week of symptoms. The runny nose and sneezing and coughing that often occur in this period help spread virus particles to people and surfaces around you, but once that stops, the risk of infecting others may drop quite rapidly – as is also the case with common cold and flu.&lt;/p&gt;
&lt;p&gt;However, as we discussed, COVID-19 isn&amp;rsquo;t just an upper respiratory infection, and the risk of complications mainly pops up when the SARS brothers spread deeper into the lungs. The virus load in the lungs increases somewhat more slowly, and for COVID-19 it seems to reach a peak around day 5-6 of symptoms. &lt;a href="https://www.volkskrant.nl/cs-ba6f85ab"&gt;Other sources&lt;/a&gt; have reported a peak in hospitalisation around day 6 of symptoms, which would indeed be consistent with the peak in lung virus load observed here. SARS, while similar in its complications, seems to be slower and more deadly than COVID-19. A &lt;a href="https://doi.org/10.1016/S0140-6736(03)13412-5"&gt;study in 2003&lt;/a&gt; followed 75 patients with SARS, and found two peaks in serious complications, one around day 11 and one around day 20. The first peak coincides more or less with the peak in lung virus load for SARS. In hospitalised cases of COVID-19, there often seems to be a worsening of symptoms around day 9, slightly earlier than for SARS. A &amp;ldquo;serious complication&amp;rdquo; in the case of both SARS and COVID-19 can be the progression into &lt;a href="https://en.wikipedia.org/wiki/Acute_respiratory_distress_syndrome"&gt;ARDS, acute respiratory distress syndrome&lt;/a&gt;. In ARDS, pneumonia gets worse to a point at which your lungs can no longer supply sufficient oxygen for your body to function, and you need mechanical ventilation. This is why many people have to be admitted to intensive care in countries that have large COVID-outbreaks. However, the rather frightening statistics of intensive care admissions and deaths tend to hide an important fact: for most people, the symptoms of COVID-19 are mild, and they may even be absent all together. However, the virus does seem to hang around for quite a while in the lungs before it disappears from the body, at least in symptomatic cases, which is why symptoms and the risk of complications may persist for several weeks. Coronaviruses are among the bigger and more complicated viruses, and it seems that SARS-CoV-2 is better than influenza at suppressing parts of our immune response, which may help explain why it sticks around the body for so long. Also, the fact that the SARS brothers use the ACE2 molecule to get into cells seems to contribute to the common occurrence of pneumonia symptoms and the risk of developing ARDS.&lt;sup id="fnref:ace2role"&gt;&lt;a class="footnote-ref" href="#fn:ace2role"&gt;13&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;So what does a mild COVID-infection look and feel like, if you&amp;rsquo;re among the estimated 54-82% of people that do experience symptoms? As we&amp;rsquo;ve already established, it starts with systemic symptoms (fever, headache, etc.) in most cases, followed by something that resembles a cold in about half of the cases. During this first week you are the most infectious to other people (actually regardless of which virus you have), so keep your distance, don&amp;rsquo;t sneeze or cough without covering your mouth and wash your hands very regularly. In a little over a third of the cases you may experience mild symptoms of viral pneumonia after a few days, such as shortness of breath and pressure or pain on the chest. After about 6-12 days, your symptoms may go away, and that may be it. Or not, because in many mild cases, something strange seems to happen. This is what my symptoms looked like, more or less:&lt;/p&gt;
&lt;p&gt;&lt;img alt="an approximate visualisation of my symptoms over time" src="//gnuritas.org/images/covid/symptoms-lvz.png"&gt;&lt;/p&gt;
&lt;p&gt;On days 2 and 3, I hiked up two mountains, which may not have been the smartest thing to do because the effort almost certainly suppressed my initial immune reaction, quite likely leading to higher virus loads later on and extending the duration of my symptoms. But despite that, my symptoms were gone after about 10 days. However, two days later, they started coming back, and eventually I had to endure another 11 days or so of shortness of breath and pressure on the chest, symptoms typically associated with mild viral pneumonia. So what happened? I certainly didn&amp;rsquo;t climb any more mountains on day 10 or 11, so something else was going on. &lt;a name="contd"&gt;&lt;/a&gt;I wrote down a more detailed analysis &lt;a href="//gnuritas.org/pages/understanding-covid-details.html"&gt;on this page&lt;/a&gt;, but the summary is that a &amp;ldquo;short break&amp;rdquo; of 1-3 days in the symptoms seems to be quite common for mild COVID-cases, and may coincide with a &amp;ldquo;dip&amp;rdquo; in the virus load around day 10-13. After that however, a relapse of symptoms may occur, and especially the symptoms of pneumonia may persist for another one or two weeks (and in some cases much longer). The little data that we have also seems to suggest that the progression of virus load in cases with symptoms of virual pneumonia looks much more like SARS, when compared with milder cases. Moreover, asymptomatic cases actually seem to have virus loads that are similar to cases with mild symptoms, although the virus is cleared by the immune system within 10-12 days or so if symptoms aren&amp;rsquo;t present.&lt;/p&gt;
&lt;p&gt;Asymptomatic cases may contribute to spreading COVID-19 &amp;ldquo;under the radar&amp;rdquo;, although it is currently unclear how big this contribution is. For influenza it seems that there is little evidence that asymptomatic individuals play an important role in spreading the virus, so this &lt;em&gt;may&lt;/em&gt; also be the case for COVID-19.&lt;sup id="fnref:patrozou"&gt;&lt;a class="footnote-ref" href="#fn:patrozou"&gt;14&lt;/a&gt;&lt;/sup&gt; However, there is still much uncertainty about that, because the evidence is rather inconclusive for influenza, and SARS-CoV-2 may be more infectious than influenza.&lt;/p&gt;
&lt;p&gt;Actually it is somewhat of a long-standing mystery why some people experience symptoms when infected with a virus, while others do not show any symptoms. A &lt;a href="https://dx.doi.org/10.1371%2Fjournal.pgen.1002234"&gt;comparison of the genes expressed in symptomatic and asymptomatic influenza infections&lt;/a&gt; showed that people with asymptomatic infections basically seem to &amp;ldquo;run a different genetic program&amp;rdquo; than people who experience symptoms. Asymptomatic people show a tightly coordinated immune response, while symptomatic people show the much more generic response that we know by now, which involves recognition of cell damage and bits of virus, and activation of inflammation. It is however not clear what causes this difference in the two responses, as virus load and antibody production are more or less identical in both cases. One interesting but unconfirmed possibility is that past exposure to a sufficiently similar virus may cause the immune system to recognise a new but related virus, and respond differently than if the virus were completely new.&lt;sup id="fnref:crossimunity"&gt;&lt;a class="footnote-ref" href="#fn:crossimunity"&gt;15&lt;/a&gt;&lt;/sup&gt; If this is indeed the case, asymptomatic cases of COVID-19 could be people who have recently been exposed to other human coronaviruses, such as &lt;a href="https://en.wikipedia.org/wiki/Human_coronavirus_OC43"&gt;HCoV-OC43&lt;/a&gt; or &lt;a href="https://en.wikipedia.org/wiki/Human_coronavirus_NL63"&gt;HCoV-NL63&lt;/a&gt;, which can cause common cold. This is a testable hypothesis, and it would be interesting to see if this is indeed the case. However, it could also be that the difference in responses is caused by differences between the immune systems or immune state of individuals, or by differences in the site of infection or the initial virus load at the moment (or moments) of infection. It is even possible that asymptomatic and mild cases are people that &lt;em&gt;haven&amp;rsquo;t&lt;/em&gt; been infected yet by similar coronaviruses, while the more serious cases &lt;em&gt;have&lt;/em&gt; experienced prior infection. The possible mechanism behind this is known as &lt;em&gt;immune priming&lt;/em&gt; (and/or &lt;em&gt;antibody dependent enhancement&lt;/em&gt;), and basically involves enhanced activation of the immune system upon infection with a similar virus. While this could be a good thing, &lt;a href="https://doi.org/10.1073/pnas.2005456117"&gt;experience from past vaccine development&lt;/a&gt; shows that such an enhanced immune response &lt;em&gt;can&lt;/em&gt; also lead to a stronger inflammation reaction in the lungs later on, and therefore more serious complications. A &lt;a href="http://dx.doi.org/10.1128/JVI.02015-19"&gt;similar mechanism&lt;/a&gt; may also be behind the relapse of symptoms that I &lt;a href="({filename}/pages/understandingcoviddetails.md)"&gt;and others&lt;/a&gt; experienced in the second week of being sick.&lt;/p&gt;
&lt;p&gt;Whatever the underlying causes may be, it seems that COVID-19 may manifest itself in several forms: without symptoms (which may be somewhat infectious), as a mild upper respiratory infection of 1-2 weeks, as an extended upper and lower respiratory infection that lasts 2-4 weeks or sometimes even longer (often with symptoms of mild pneumonia) or as a more severe pneumonia with an increased risk of complications. The risk of complications seems to be highest in the second and third week of symptoms, so it is important to know how to recognise such complications. The &lt;a href="https://www.who.int/docs/default-source/coronaviruse/clinical-management-of-novel-cov.pdf"&gt;WHO guide for treatment of COVID-19&lt;/a&gt; indicates that cases with mild symptoms of COVID-19 and/or pneumonia do not need medical treatment. But if your breathing rate exceeds 30 breaths per minute, your blood oxygen saturation drops below 93%, you feel like you&amp;rsquo;re suffocating or if you experience a sudden onset of high fever, you may be developing severe pneumonia and you need to seek immediate medical attention. If you experience shortness of breath and want to be sure, you can order an &lt;a href="https://en.wikipedia.org/wiki/Pulse_oximetry"&gt;oximeter&lt;/a&gt; to monitor &lt;a href="https://en.wikipedia.org/wiki/Oxygen_saturation_(medicine)"&gt;blood oxygen saturation&lt;/a&gt;. Oxygen saturation should normally be above 94% at sea level, although it may be somewhat lower if you live at a higher altitude. When in doubt about the severity of symptoms, it&amp;rsquo;s best to contact a doctor for medical advice, as any complications should be treated as early as possible. Also, if you have existing health problems it&amp;rsquo;s wise to get medical advice, especially if you also take medicines against high blood pressure or drugs that suppress parts of the immune system (corticosteroids, diclofenac, ibuprofen and several others).&lt;/p&gt;
&lt;p&gt;In fact, it seems that timing is important in many ways. Your chances of surviving complications are higher if they are treated before your lung function is significantly degraded. And it seems that the fact that COVID-19 is much less deadly than SARS could be related to its tendency to infect the upper respiratory tract. While infecting the upper airways definitely helps spread the virus, it may also buy your immune system valuable time to mount an immune response. The German study of 9 patients by &lt;a href="https://www.nature.com/articles/s41586-020-2196-x"&gt;Wölfel et al.&lt;/a&gt; showed that the blood of all patients started &lt;a href="https://en.wikipedia.org/wiki/Seroconversion"&gt;showing antibodies&lt;/a&gt; against the virus 5-14 days after the onset of symptoms, and that lung virus loads remained higher for a longer period in the people who were slow in producing antibodies. In contrast, in the 75 SARS-patients studied by &lt;a href="https://doi.org/10.1016/S0140-6736(03)13412-5"&gt;Peiris et al.&lt;/a&gt; in 2003, antibodies only showed up 11-28 days after the onset of symptoms (with an average of 20 days). It seems therefore possible that the response mounted to the relatively harmless upper respiratory infection allows our immune system to start limiting the spread of the virus in the lungs, in most cases before it can cause severe pneumonia. This would be consistent with the fact that older people, who have a slower and less effective immune response, have an increased risk of developing severe pneumonia.&lt;/p&gt;
&lt;p&gt;Beyond the individual level, buying time is important for society as well. In the short term, lockdown and social distancing help slow the initial spread of COVID-19, and reduce the flood of severe pneumonia cases that may otherwise overwhelm the healthcare system. However, lockdown and even social distancing cannot be sustained indefinitely, if only because an increasing number of people would not accept such restrictions in the long term. Some governments are now considering a strategy of control, such as the one employed by China, South Korea and Singapore, with tracing and containment of infected cases. While this does seem successful in the short term, it is a fairly fragile strategy that is likely to break down in the longer term. You can never fully control a virus outbreak, especially since the virus has &amp;ldquo;escaped&amp;rdquo; and spread across the globe, so small (or large) outbreaks would keep popping up for years. Also, a control strategy would require that travel and public events remain restricted, probably for several years. This would destroy significant sectors of the economy and would require a large investment in terms of resources for tracing and testing, which will not be an option for many countries. On the other hand, letting the pandemic run its course, as happened with nearly every pandemic until a few decades ago, would paralyse healthcare systems and cause a significant number of deaths, especially because we&amp;rsquo;re still only at the beginning of the pandemic. Blood testing for antibodies in Austria in the first week of April suggested that &lt;a href="https://www.nytimes.com/reuters/2020/04/10/world/europe/10reuters-health-coronavirus-austria-study.html"&gt;less than 1% of the population had been infected so far&lt;/a&gt;, and &lt;a href="https://www.volkskrant.nl/cs-b827127f"&gt;around 3% of blood donors in the Netherlands tested positive for antibodies&lt;/a&gt; in the first weeks of April. Further &lt;a href="https://www.land.nrw/sites/default/files/asset/document/zwischenergebnis_covid19_case_study_gangelt_0.pdf"&gt;preliminary results&lt;/a&gt; from Gangelt, a German region that experienced a relatively large outbreak, suggested that only around 15% of the population there had been infected. It seems therefore that we are still quite far from a level of &amp;ldquo;&lt;a href="https://en.wikipedia.org/wiki/Herd_immunity"&gt;herd immunity&lt;/a&gt;&amp;rdquo; that would protect us from the kind of serious outbreaks that cause a rapid, exponential increase in infections, hospitalisations and deaths.&lt;/p&gt;
&lt;p&gt;So what perspective does this give us for the longer term, if we cannot really control the virus but if we do want to prevent people ending up in hospital or dying? What we need in the long term is either a vaccine, or a way to reduce the number of complications and deaths from pneumonia, or preferably both. Of course we could get lucky, if the virus would evolve into a variant that causes mostly mild infections, similar to the other human coronaviruses that mainly cause a common cold. While viruses do generally become less dangerous in the long term, the problem is that we cannot really count on this in the short term. The virus is probably transmitted between people primarily in the first week of symptoms, while the risk of severe pneumonia mostly occurs in the second and third week. This suggests that the virus will experience little or no selection pressure against causing complications that require hospitalisation, even if the virus would have much genetic control over that (which may not be the case, as symptoms and complications are caused to a large extent by the immune response of the host). &lt;/p&gt;
&lt;p&gt;Currently, a significant number of existing drugs is being tested, to see if any or several are effective in treating patients with COVID-19. &lt;a href="https://en.wikipedia.org/wiki/COVID-19_drug_repurposing_research"&gt;Candidates&lt;/a&gt; include &lt;a href="https://en.wikipedia.org/wiki/Favipiravir"&gt;Favilavir&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Chloroquine"&gt;(hydro)chloroquine&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Remdesivir"&gt;Remdesivir&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Lopinavir/ritonavir"&gt;Lopinavir/Ritonavir&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Umifenovir"&gt;Umifenovir&lt;/a&gt; and a number of other drugs, as well as more generic substances such as &lt;a href="https://en.wikipedia.org/wiki/Intravenous_ascorbic_acid"&gt;intravenous vitamin C&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Interferon_type_I#IFN-%CE%B2"&gt;interferon beta&lt;/a&gt;. Many of these treatments focus on slowing down or stopping the replication of the virus. However, while suppressing virus replication can indeed be effective early on in the infection, it is known from influenza that it doesn&amp;rsquo;t really help much if a patient is already at the stage of serious pneumonia symptoms. Moreover, widespread use of virus inhibitors could easily cause the virus to evolve drug resistance. So if the goal is to reduce serious complications, it may be more effective to focus on the role of the immune response itself rather than the virus. 
For instance, there is some evidence that treatment of COVID patients with &lt;a href="https://en.wikipedia.org/wiki/Corticosteroid"&gt;systemic corticosteroids&lt;/a&gt;, which reduce inflammation, has adverse effects when used too early in the infection, but does seem to reduce symptoms and increase survival for patients once severe pneumonia sets in.&lt;sup id="fnref:steriods"&gt;&lt;a class="footnote-ref" href="#fn:steriods"&gt;16&lt;/a&gt;&lt;/sup&gt; This makes sense, as inflammation helps to control the virus early on, but may aggravate symptoms once the virus has infected the lung sacs.&lt;sup id="fnref2:ace2role"&gt;&lt;a class="footnote-ref" href="#fn:ace2role"&gt;13&lt;/a&gt;&lt;/sup&gt; Intravenous vitamin C also targets the symptoms of viral pneumonia, as it may reduce the damage caused by &lt;a href="https://en.wikipedia.org/wiki/Superoxide"&gt;&lt;em&gt;reactive oxygen species&lt;/em&gt;&lt;/a&gt; that are produced by white blood cells in the lungs.&lt;sup id="fnref2:viralpneumonia"&gt;&lt;a class="footnote-ref" href="#fn:viralpneumonia"&gt;7&lt;/a&gt;&lt;/sup&gt; Earlier research on &lt;a href="https://scholar.google.com/scholar_lookup?journal=Lancet+Infect+Dis&amp;amp;title=Pathogenesis+of+influenza-induced+acute+respiratory+distress+syndrome.&amp;amp;author=KR+Short&amp;amp;author=EJ+Kroeze&amp;amp;author=RA+Fouchier&amp;amp;author=T+Kuiken&amp;amp;volume=14&amp;amp;publication_year=2014&amp;amp;pages=57-69&amp;amp;pmid=24239327&amp;amp;"&gt;influenza-induced viral pneumonia&lt;/a&gt; and &lt;a href="http://dx.doi.org/10.1007/s00281-017-0629-x"&gt;SARS/MERS&lt;/a&gt; suggested several other possible treatments, although unfortunately it seems that the majority of these has not been tested yet on human patients. Also, &lt;a href="https://doi.org/10.20944/preprints202004.0023.v1"&gt;recent research&lt;/a&gt; has suggested that a well-timed combination of several existing drugs could be effective in treating viral pneumonia in hospitalised COVID-patients&lt;sup id="fnref3:ace2role"&gt;&lt;a class="footnote-ref" href="#fn:ace2role"&gt;13&lt;/a&gt;&lt;/sup&gt;, although this hasn&amp;rsquo;t yet been confirmed in practice.&lt;/p&gt;
&lt;p&gt;One treatment that is conceptually very simple and has shown some promise in &lt;a href="https://doi.org/10.1101/2020.03.16.20036145"&gt;treatment of 10 Chinese patients with severe cases of COVID-19&lt;/a&gt; is &lt;em&gt;convalescent plasma therapy&lt;/em&gt;. This treatment, also known as serum or &lt;a href="https://en.wikipedia.org/wiki/Antiserum"&gt;antiserum&lt;/a&gt; therapy, has been around since the late 19&lt;sup&gt;th&lt;/sup&gt; century and involves taking blood from animals or people who have already been infected by a virus, and injecting their (filtered) blood plasma into patients who are currently infected. The antibodies present in the blood plasma can help control and clean up the virus and may help bring down the symptoms of infection within a few days. &lt;a href="https://jamanetwork.com/journals/jama/fullarticle/2763982"&gt;Larger randomised trials are still needed&lt;/a&gt; to see if plasma therapy is really effective against COVID-19, but if it is, the method could be used almost immediately to treat severe cases. This could reduce the number of deaths and perhaps speed up the recovery of hospitalised patients, which would relieve some of the pressure on the healthcare system. However, because plasma therapy probably requires blood from one recovered person for each person treated, it presents a significant logistic challenge. Finding large numbers of people who have been infected and have produced sufficient antibodies and are willing to donate blood isn&amp;rsquo;t trivial, especially if the percentage of asymptomatic cases is high and testing for antibodies or infections is limited (as is currently the case in most countries). But if it is shown to be effective, plasma therapy may represent an important short-term avenue for treatment, and in the longer term other forms of &lt;a href="https://www.nature.com/articles/nrmicro974"&gt;passive antibody therapy&lt;/a&gt; may become available. &lt;/p&gt;
&lt;p&gt;Ultimately, efforts to control COVID-19 would probably require a &lt;a href="https://en.wikipedia.org/wiki/COVID-19_vaccine"&gt;vaccine&lt;/a&gt; that would offer protection against SARS-CoV-2, but unfortunately production of such a vaccine isn&amp;rsquo;t trivial. While there are currently some 115 vaccine candidates, only five so far are ready to be tested on humans. Furthermore, it is estimated that developing and testing a &lt;a href="https://doi.org/10.1073/pnas.2005456117"&gt;safe and effective&lt;/a&gt; vaccine will take at least 18 months, after which it would still need to be produced and distributed in very large amounts, and applied in vaccination programs at global scale. &lt;/p&gt;
&lt;p&gt;It is interesting that seemingly &amp;ldquo;large&amp;rdquo; problems such as poverty and inequality, climate change and the massive global loss of biodiversity and degradation of fertile soil have hardly had &lt;em&gt;any&lt;/em&gt; impact on our behaviour, while something as tiny as a virus has caused massive behavioural change across the globe. COVID-19 has led to a complete shutdown of entire economic sectors, and has brought the mighty machine of global economic growth to a screeching halt. This is especially remarkable because virus pandemics are by no means new or uncommon, and actually occur several times per century. It seems that we are finally willing and able to let go of &amp;ldquo;business as usual&amp;rdquo;, as soon as we fear for the lives of ourselves and our loved ones. Also, COVID exposes the limitation of technological solutions when faced with something as &amp;ldquo;simple&amp;rdquo; as a virus, a small package of genetic material that isn&amp;rsquo;t even technically alive. In the short term at least, the appearance of such a new virus (with the mighty power of molecular evolution behind it, as well as the mind-boggling complexity of immune system interactions) seems well beyond our human ability to easily control with an engineering-approach, although the speed with which the scientific community has made progress in understanding the virus &lt;em&gt;is&lt;/em&gt; truly impressive. In itself a pandemic has rarely been a huge problem for humanity, although it has been for individual humans. Disease and death have always been a feature of life, and actually our immune system is remarkably successful at limiting the damage in most cases. However, a pandemic such as the current one does become a serious problem as soon as we stop accepting risk, disease and death as facts of life, and if we (quite understandably) want to minimise the number of deaths, while at the same time wanting to avoid paralysing social life and large parts of the economy. Welcome to modern life. It seems a crisis such as this exposes both the fragility and the strengths of our social and economic systems, and probably this is not such a bad thing&amp;hellip;&lt;/p&gt;
&lt;p&gt;It seems that, until some kind of treatment becomes available, our best protection is still good health and a strong immune system. In a world where around a quarter of all people suffer from &lt;a href="https://en.wikipedia.org/wiki/Metabolic_syndrome"&gt;metabolic syndrome&lt;/a&gt;, and in which stress and lack of sleep are endemic, this may be a problem. Probably the best advice I can give is this: &lt;em&gt;Don&amp;rsquo;t do what Boris Johnson did.&lt;/em&gt; The British Prime Minister contracted COVID-19, but rather than taking a rest he continued to (quite literally) almost work himself to death. Here is a better approach: as soon as you experience any symptoms of upper respiratory disease, you should stop working, avoid stress or heavy physical exertion and make sure you get plenty of sleep. It seems likely that the initial immune response to COVID-19 is very important in determining the risk of complications, and getting sufficient sleep has been shown to be &lt;a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3256323/"&gt;important for a healthy immune response&lt;/a&gt;. Among other negative effects, sleep deprivation decreases the production of both cytokines and antibodies, so lack of sleep reduces the ability of your body to mount an effective immune response. Stress has also been shown to &lt;a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4465119/"&gt;impair immune system functioning&lt;/a&gt;, especially as people get older. So your best protection against COVID for now may be to get sufficient sleep and take it easy. And in order to protect others, especially ones who have a higher risk of complications, stay away from them as soon as you experience any symptoms, especially during the first 8 days, but preferably at least as long as symptoms persist. Moreover, if you experience symptoms, stay away from work and enclosed spaces with other people and cover your mouth and nose. It also helps to ventilate spaces well, so open the windows if temperature permits. Like influenza, COVID-19 probably spreads mostly through small droplets that infected people produce when sneezing, coughing or even talking.&lt;sup id="fnref2:virusentry"&gt;&lt;a class="footnote-ref" href="#fn:virusentry"&gt;3&lt;/a&gt;&lt;/sup&gt; In spaces that are not well-ventilated, especially if many people are present, these virus-laden droplets can hang around for quite a while and easily infect others, especially if humidity is low (below 45%) or somewhat high (around 65%).&lt;sup id="fnref:virusenvironment"&gt;&lt;a class="footnote-ref" href="#fn:virusenvironment"&gt;17&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;COVID-19 is a disease that travels easily, and has profited immensely from a globalised world with ubiquitous cheap flights. I most likely contracted the disease in a hostel, and I was sick for three weeks, having to avoid contact with others in a situation in which that was not so easy. Like most people of my age group (and younger), I eventually recovered without further complications. In fact, the people around me who most likely also had the virus, experienced only a few days of discomfort. My symptoms were probably aggravated by my unfortunate choice to hike up mountains in the early days of the infection. I realise that I am in quite a privileged position, in quite a few ways. Of course I do worry about loved ones and I miss hugs and friends and social events. But at least I may have experienced COVID-19 already, I did not run much of a risk, I am still healthy and at least in the short term I still have a job and an income. Many people are not so fortunate, and I wish all of you good luck in these strange times. Until some kind of progress is made in resolving this COVID crisis, I mostly try to enjoy the odd departure from normality that this pandemic represents. I try to make time to read and reflect, sit in the sun and spend time by myself just enjoying my surroundings. Above all, I&amp;rsquo;m very curious to see how this all plays out. I cannot predict the future, and neither can anyone else (although everybody seems to try). But I do know that, sometimes, good things can come from a crisis. Let&amp;rsquo;s see. These certainly are interesting times.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a name="summary"&gt;&lt;/a&gt;
&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;COVID-19 generally starts off as an upper respiratory infection, similar to common cold and flu. The typical symptoms of such an infection are actually not caused by the virus but by your immune response, which is why they don&amp;rsquo;t say much about which virus is the culprit. If the cells lining your upper airways are infected by a virus, your immune system often responds by producing molecules called cytokines. These cytokines may initially trigger a number of &lt;em&gt;systemic&lt;/em&gt; symptoms, such as headache, fever, muscle ache, loss of appetite and/or a general feeling of being sick. Somewhat later, cytokines trigger localised inflammation responses, which are responsible for symptoms typically associated with cold or flu, such as a sore throat, a runny nose and sneezing and coughing. Unfortunately some of these responses also contribute to spreading the virus to other people. Small airborne water droplets are produced by people who sneeze, cough or even breathe. Especially at the peak of upper respiratory infection symptoms (the first week of infection), such droplets may contain significant amounts of virus, which can be inhaled by other people and lead to infection.&lt;/p&gt;
&lt;p&gt;While a cold mostly remains restricted to the upper respiratory tract, flu and COVID can move down into the lungs and cause viral pneumonia, an inflammation of the lung tissue. If the infection reaches the alveoli of the lungs, the resulting tissue damage and immune reaction may impair the uptake of oxygen. Symptoms of mild viral pneumonia seem common in a little over a third of symptomatic COVID-cases and may include shortness of breath and pressure or pain on the chest. COVID-19 may manifest itself in several forms: without symptoms (which may be somewhat infectious), as a mild upper respiratory infection of 1-2 weeks, as an extended upper and lower respiratory infection that lasts 2-4 weeks (often with symptoms of mild pneumonia) or as a more severe pneumonia with a higher risk of complications. Serious respiratory distress (e.g. more than 30 breaths per minute) may indicate severe pneumonia, in which case you should seek immediate medical attention.&lt;/p&gt;
&lt;p&gt;Data from both COVID and flu infections suggest that asymptomatic cases of COVID-19 may be common, have a similar virus load but are less prolonged and probably involve a different immune response &amp;ldquo;program&amp;rdquo;. What causes this is not known, although it may involve cross-immunity caused by other coronavirus-infections, differences between the state of people&amp;rsquo;s immune systems or differences in the amount of virus people are exposed to.&lt;/p&gt;
&lt;p&gt;Prolonged disease and increased risk of complications may be the result of a weak or slow initial immune response to the infection. This may allow the virus to eventually spread further in the lungs, and trigger a stronger inflammation reaction associated with pneumonia in the second or third week of the infection. To avoid this, it is important to avoid sleep deprivation, stress and heavy physical exercise early in the infection, as these may interfere with the immune response. Moreover, stay away from others (especially sick and elderly people) if you experience any symptoms, and cover your face if you do need to be near other people, as the risk of infecting others is probably highest in the first 8 days of symptoms. Infection risk is especially high in spaces that are not well ventilated and that have dry air (relative humidity below ca. 45%) or relatively humid air (around 65% relative humidity), because droplets with virus particles may remain present in the air for longer periods under such conditions.&lt;/p&gt;
&lt;p&gt;&lt;a href="#top"&gt;Return to the top&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a name="notes"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Footnotes and further details:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:hcov"&gt;
&lt;p&gt;&lt;em&gt;Another 10-15% of cases of common cold are caused by human coronaviruses, which have rather obscure names such as HCoV-OC43, and some of which have been circulating in the human population for at least half a century, although probably much longer.&lt;/em&gt;&lt;br&gt;
See &lt;a href="https://www.intmedpress.com/journals/avt/abstract.cfm?id=460&amp;amp;pid=88"&gt;Lia van der Hoek (2007), &amp;ldquo;Human coronaviruses: what do they cause?&amp;rdquo;&lt;/a&gt;&amp;#160;&lt;a class="footnote-backref" href="#fnref:hcov" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:infectious"&gt;
&lt;p&gt;&lt;em&gt;So what happens if you get a cold? First, you get infected by &amp;ldquo;live&amp;rdquo; virus particles, also know as virions&lt;/em&gt;&lt;br&gt;
Because a virus isn&amp;rsquo;t technically alive, a &amp;ldquo;live&amp;rdquo; virus particle in this case means one that is still infectious, that is, able to successfully infect a host cell.&amp;#160;&lt;a class="footnote-backref" href="#fnref:infectious" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:virusentry"&gt;
&lt;p&gt;&lt;em&gt;either because you inhale tiny droplets that other people produce when sneezing or coughing, or because you pick them up from a surface (or person) that was contaminated with live virions. [&amp;hellip;] Like influenza, COVID-19 probably spreads mostly through small droplets that infected people produce when sneezing, coughing or even breathing.&lt;/em&gt;&lt;br&gt;
It is still not entirely clear what the most important infection route is, and it probably depends on the virus as well. While virus RNA is found on many &amp;ldquo;infected&amp;rdquo; surfaces, it seems rare to actually find infectious virions on such surfaces, &lt;a href="https://www.thelocal.de/20200402/how-german-scientists-hope-to-find-answers-on-coronavirus-in-countrys-worst-hit-spot"&gt;at least for coronaviruses&lt;/a&gt;. It is believed that for most upper respiratory infections, the main route of infection &amp;ldquo;at a distance&amp;rdquo; is through airborne droplets, especially the relatively large droplets that are &lt;a href="https://link.springer.com/article/10.1007/s00348-015-2078-4"&gt;spread when people cough or sneeze&lt;/a&gt; without covering their mouth. These can be inhaled by people who are nearby, and infect the mucous membrane of the respiratory tract or even the eyes. This can happen indirectly as well, if someone sneezes into their hands and then touches another person, or an object that is subsequently touched by another person, and this other person then touches their eyes, nose or mouth. However, because indirect routes will probably yield lower numbers of infectious virions, and virions do not survive for long outside the body, the probability of indirect infections is almost certainly lower. Also, while small sneeze droplets can &lt;a href="https://jamanetwork.com/journals/jama/fullarticle/2763852"&gt;travel up to 7-8 m&lt;/a&gt;, they contain less virions than larger droplets. Larger droplets travel much less far, so that the probability of direct infection will probably decrease rapidly with distance. Much is still unknown, but in any case sneezing into your elbow and/or wearing some kind of face protection is expected to significantly reduce the risk of direct infection of other people through airborne droplets, so this is a good basic precaution, although it is certainly not guaranteed to stop spread of a respiratory virus. And especially between partners and children, viruses are probably more likely to spread through direct and indirect contact.&amp;#160;&lt;a class="footnote-backref" href="#fnref:virusentry" title="Jump back to footnote 3 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;a class="footnote-backref" href="#fnref2:virusentry" title="Jump back to footnote 3 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:flucold"&gt;
&lt;p&gt;&lt;em&gt;As a result of the typical properties of flu viruses, an influenza infection may evoke a stronger immune response than a common cold infection, and has a larger probability of causing complications.&lt;/em&gt;&lt;br&gt;
To slightly confuse things, common cold is actually caused by influenza viruses in roughly 5-10% or cases, while some instances of common cold can develop into a serious lower respiratory infection. But in this article I will use the term &lt;em&gt;common cold&lt;/em&gt; for a relatively mild upper respiratory infection.&amp;#160;&lt;a class="footnote-backref" href="#fnref:flucold" title="Jump back to footnote 4 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:eccles"&gt;
&lt;p&gt;&lt;em&gt;The first &amp;ldquo;local&amp;rdquo; (rather than systemic) symptom is often irritation of the throat or nasal cavity, which may later develop into a sore throat as inflammation gets worse. Sneezing is another local effect of inflammation, often accompanied by a runny nose. Unfortunately both these responses of your immune system, sneezing and a runny nose, also happen to be great ways of spreading virus particles so that they can infect other people. As the inflammation spreads down in the direction of the lower respiratory tract, it may over-sensitize the nerves that trigger the coughing response, which may then cause you to start coughing at even the slightest irritation of the airways (such as inhaling cold air).&lt;/em&gt;&lt;br&gt;
See &lt;a href="https://doi.org/10.1016%2FS1473-3099%2805%2970270-X"&gt;Eccles (2005)&lt;/a&gt; for a detailed description of common cold and flu symptoms and their origin.&amp;#160;&lt;a class="footnote-backref" href="#fnref:eccles" title="Jump back to footnote 5 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:carrat"&gt;
&lt;p&gt;&lt;em&gt;For instance, fever is uncommon with common cold in adults, but it is reported in roughly 35% of experimental infections with influenza (in adults younger than 65).&lt;/em&gt;&lt;br&gt;
See &lt;a href="http://dx.doi.org/10.1093/aje/kwm375"&gt;Carrat et al. (2008)&lt;/a&gt; for a meta-study of experimental influenza infection results in adults.&amp;#160;&lt;a class="footnote-backref" href="#fnref:carrat" title="Jump back to footnote 6 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:viralpneumonia"&gt;
&lt;p&gt;&lt;em&gt;If the virus moves into the lungs, for instance because it is not effectively contained by the immune system, it may cause viral pneumonia. Pneumonia is an inflammation of the lungs, so it is yet another case of symptoms being caused (at least in part) by the immune system rather than a disease agent (virus, bacterium, etc.). The immune reaction in itself is a good thing of course, but if an inflammation of the lungs gets out of hand, it reduces the capacity of the lungs to transfer oxygen to your bloodstream.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://scholar.google.com/scholar_lookup?journal=Lancet+Infect+Dis&amp;amp;title=Pathogenesis+of+influenza-induced+acute+respiratory+distress+syndrome.&amp;amp;author=KR+Short&amp;amp;author=EJ+Kroeze&amp;amp;author=RA+Fouchier&amp;amp;author=T+Kuiken&amp;amp;volume=14&amp;amp;publication_year=2014&amp;amp;pages=57-69&amp;amp;pmid=24239327&amp;amp;"&gt;Short et al. (2013)&lt;/a&gt; describe how viral pneumonia caused by influenza can lead to ARDS, acute respiratory distress syndrome, something that also seems to happen in a small but rather significant percentage of COVID-cases.&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/File:Lung_structure_normal.jpg"&gt;&lt;img alt="overview of lung structure" src="https://upload.wikimedia.org/wikipedia/commons/b/bb/Lung_structure_normal.jpg"&gt;&lt;/a&gt;&lt;br&gt;
First of all, if the virus reaches the &lt;a href="https://en.wikipedia.org/wiki/Pulmonary_alveolus"&gt;alveoli&lt;/a&gt;, the intricate air sacs in the lungs where oxygen and CO&lt;sub&gt;2&lt;/sub&gt; are exchanged with the blood, the infection can directly damage the &lt;a href="https://en.wikipedia.org/wiki/Epithelium"&gt;epithelial cells&lt;/a&gt; that line the alveoli, causing &lt;a href="https://en.wikipedia.org/wiki/Pulmonary_edema"&gt;fluid to leak into the lungs&lt;/a&gt; and reducing the oxygen uptake capacity of the body. But the infection and the associated cell damage also trigger a large range of immune responses in the lungs, which can cause further damage to the alveoli. Notably, &lt;a href="https://en.wikipedia.org/wiki/Neutrophil"&gt;neutrophils&lt;/a&gt;, a type of white blood cell that arrives in the alveoli whihin a day of local virus infection, seem able to do much damage. Neutrophils can consume invading bacteria and are important in controlling the spread of viruses, but they also produce reactive oxygen species (eg. &lt;a href="https://en.wikipedia.org/wiki/Superoxide"&gt;superoxide&lt;/a&gt;) that can damage not only pathogens but also the intricate structure of the alveoli. Removal of superoxide (by injection of a polymer-comjugated &lt;a href="https://en.wikipedia.org/wiki/Superoxide_dismutase"&gt;superoxide dismutase&lt;/a&gt;) has been shown to &lt;a href="http://dx.doi.org/10.1126/science.2543070"&gt;protect mice against an influenza-induced viral pneumonia&lt;/a&gt; that would otherwise kill them. The article suggests several possible treatments, including the use of growth factors to help protect and restore the alveolar epithelium, inhibition of &lt;a href="https://en.wikipedia.org/wiki/CXCL10"&gt;certain molecular messengers&lt;/a&gt; or &lt;a href="https://en.wikipedia.org/wiki/CXCR3"&gt;their receptors&lt;/a&gt; to reduce neutrophil infiltration, inhibiting &lt;a href="https://en.wikipedia.org/wiki/NADPH_oxidase"&gt;NADPH oxidase-2&lt;/a&gt;, the enzyme that produces reactive oxygen, and various treatments that moderate the inflammatory response. The important role of neutrophils in lethal cases of highly pathogenic H1N1 influenza-induced viral pneumonia has been further elucidated by &lt;a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3763506/"&gt;Brandes et al. (2014)&lt;/a&gt;. Treatment with superoxide dismutase has been attempted in a trial with &lt;a href="https://bmcpulmmed.biomedcentral.com/articles/10.1186/1471-2466-14-86"&gt;human (non-viral) pneumonia patients&lt;/a&gt;, although so far the positive effect seems rather limited.&amp;#160;&lt;a class="footnote-backref" href="#fnref:viralpneumonia" title="Jump back to footnote 7 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;a class="footnote-backref" href="#fnref2:viralpneumonia" title="Jump back to footnote 7 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:brandes"&gt;
&lt;p&gt;&lt;em&gt;The resulting influenza strains were new to our immune systems, and so spread rapidly in the human population and caused more damage than usual.&lt;/em&gt;&lt;br&gt;
The &amp;ldquo;novelty&amp;rdquo; of a virus strain seems to be important for it to become a pandemic, but its &lt;em&gt;pathogenicity&lt;/em&gt; (the degree to which a virus is dangerous) may be determined by other factors as well. &lt;a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3763506/"&gt;Brandes et al. (2014)&lt;/a&gt; studied the difference between two influenza strains, one that produced mild symptoms and one that was highly pathogenic, generally caused lethal pneumonia and is thought to be similar to the strain that caused the 1918 pandemic. They showed that the highly pathogenic virus strain overwhelms the innate immune response (your body&amp;rsquo;s &amp;ldquo;first line of defense&amp;rdquo;) early on in the infection. And while the virus load of both strains was similar, the highly pathogenic strain managed to spread much more widely across the lungs. Because the highly pathogenic strain infects more of the lung tissue, it triggers a stronger response from neutrophils (a type of white blood cells), which then cause more lung damage, eventually leading to death of the host through oxygen deprivation. So virus load by itself isn&amp;rsquo;t necessarily a good predictor of complication risk, the size of the infected area is more important for lower respiratory infections. In COVID-19 something similar may be going on: a weak immune response early in the infection may cause a larger lung area to be infected, which subsequently triggers a strong local immune response that causes further lung damage. While &lt;a href="http://dx.doi.org/10.1007/s00281-017-0629-x"&gt;studies of the immune responses involved in SARS and MERS&lt;/a&gt; suggest that the details differ between influenza and SARS-like coronaviruses, the general mechanism seems to be the same. In both cases, the failure of early immune containment may lead to a hyper-inflammatory response in the lungs later in the infection. In the case of the coronaviruses (but possibly also in influenza), active suppression of the early immune response by the virus may aggrevate this problem.&amp;#160;&lt;a class="footnote-backref" href="#fnref:brandes" title="Jump back to footnote 8 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:smelloss"&gt;
&lt;p&gt;&lt;em&gt;So the first symptoms of COVID-19 you&amp;rsquo;d experience are the systemic ones (fever, headache, muscle ache, loss of appetite, loss of smell and/or taste, feeling tired, generally feeling sick)&lt;/em&gt;&lt;br&gt;
The loss of smell and/or taste seems to be uncommon in viral infections, but has been reported by a number of COVID-19 patients. It is believed to result from infection or inflammation of nerve tissue, although the precise cause is currently unclear. While ACE2 is present in the central nervous system, it is not generally present in nerve tissue, so infection of nerve cells seems unlikely.&amp;#160;&lt;a class="footnote-backref" href="#fnref:smelloss" title="Jump back to footnote 9 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:kluytmans"&gt;
&lt;p&gt;&lt;em&gt;In the second week of March, two hospitals in The Netherlands tested 1353 health care workers with symptoms of respiratory infection, and found 86 (6.4%) to be infected with SARS-CoV-2.&lt;/em&gt;&lt;br&gt;
See &lt;a href="https://doi.org/10.1101/2020.03.23.20041913"&gt;Kluytmans et al. (2020)&lt;/a&gt; for a description of this study and its results.&amp;#160;&lt;a class="footnote-backref" href="#fnref:kluytmans" title="Jump back to footnote 10 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:virusloadfig"&gt;
&lt;p&gt;&lt;em&gt;let&amp;rsquo;s take a look at how the virus load (the amount of virus in the body) develops after the onset of symptoms, for influenza, COVID-19 and SARS&lt;/em&gt;&lt;br&gt;
The influenza virus loads in the figure (right axis) are averages reported by a literature study of infection experiments by &lt;a href="http://dx.doi.org/10.1093/aje/kwm375"&gt;Carrat et al. (2008)&lt;/a&gt;. I assumed here that day 1 post-infection is the first day of symptoms. The COVID-19 virus loads are taken from &lt;a href="https://www.nature.com/articles/s41586-020-2196-x"&gt;Wölfel et al. (2020)&lt;/a&gt; and are the daily averages of the virus loads reported for 8 patients with mild symptoms and 1 patient with no symptoms. The SARS virus loads are the averages reported by &lt;a href="https://doi.org/10.1016/S0140-6736(03)13412-5"&gt;Peiris et al. (2003)&lt;/a&gt; for day 5, 10 and 15 after the onset of symptoms. Both scales are log&lt;sub&gt;10&lt;/sub&gt; virus loads, which means that they are logarithmic: 2 corresponds to 100, 3 corresponds to 1000, 6 corresponds to a million, etc. Values below 2 (100) may not be accurate, at least for the COVID-19 virus loads. For the latter, the numbers are log10 RNA copies per swab for throat swabs, and log10 RNA copies per mL for the lung samples (which are &lt;a href="https://en.wikipedia.org/wiki/Sputum"&gt;sputum&lt;/a&gt; samples). Care should be taken in interpreting the values plotted here, because methods, measures and number of patients vary between studies. The purpose of this figure is to compare the timing of virus load peaks, rather than to compare the actual viral loads.&amp;#160;&lt;a class="footnote-backref" href="#fnref:virusloadfig" title="Jump back to footnote 11 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:incubation"&gt;
&lt;p&gt;&lt;em&gt;COVID-19 is reported to have an average incubation period of 2-6 days, with much longer incubation times (up to two weeks) reported for some cases.&lt;/em&gt;&lt;br&gt;
See &lt;a href="https://doi.org/10.3390/pathogens9030231"&gt;Rabi et al. (2020)&lt;/a&gt; for an overview of what we knew about COVID-19 based on the early outbreaks in Asia.&amp;#160;&lt;a class="footnote-backref" href="#fnref:incubation" title="Jump back to footnote 12 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:ace2role"&gt;
&lt;p&gt;&lt;em&gt;Also, the fact that the SARS brothers use the ACE2 molecule to get into cells seems to contribute to the common occurrence of pneumonia symptoms and the risk of developing ARDS.&lt;/em&gt;&lt;br&gt;
In a recent paper, &lt;a href="https://doi.org/10.20944/preprints202004.0023.v1"&gt;Van de Veerdonk et al.&lt;/a&gt; proposed a mechanism to explain why SARS and COVID-19 so often cause mild and/or serious symptoms of pneumonia. The two coronaviruses bind to ACE2, a molecule on the outside of certain types of cells that, among other things, is involved in regulating blood pressure and parts of the immune system. The latter function involves controlling the effects of &lt;a href="https://en.wikipedia.org/wiki/Bradykinin"&gt;bradykinin&lt;/a&gt;, a messenger molecule that is activated by cytokines and helps induce local inflammation. The problem is that by interfering with the role of ACE2, the viruses may also &lt;em&gt;increase&lt;/em&gt; the inflammatory effects triggered by bradykinin. In the lungs, this local inflammation may cause the tissue to become &amp;ldquo;leaky&amp;rdquo;, so that the air sacs of the lungs start filling with fluid. This fluid reduces the uptake of oxygen in the lungs, causing shortness of breath and/or a feeling of pressure or pain on the chest. In hospitalised patients with COVID-19, breathing problems often get worse around day 9 of symptoms. This could actually be caused by the production of antibodies against the virus around this time. Antibodies that reach infected parts of the lungs, bind to the virions there and attract immune cells that may cause further damage to the lung tissue, an effect known as &lt;a href="https://en.wikipedia.org/wiki/Antibody-dependent_enhancement"&gt;antibody-dependent enhancement (ADE)&lt;/a&gt; of lung damage. A similar effect has also been described for influenza, but it may be worse in SARS and COVID-19 because the problems with ACE2 cause the inflammation reaction to be stronger. This effect may be even worse for people that take drugs against high blood pressure, as these often suppress the function of ACE2. The researchers propose that for serious cases of COVID-19, a well-timed combination of antiviral drugs, generic anti-inflammatory treatment and specific drugs that block the deleterious effect of bradykinin may prevent progression of symptoms to the point where intensive care treatment and mechanical ventilation are needed.&amp;#160;&lt;a class="footnote-backref" href="#fnref:ace2role" title="Jump back to footnote 13 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;a class="footnote-backref" href="#fnref2:ace2role" title="Jump back to footnote 13 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;a class="footnote-backref" href="#fnref3:ace2role" title="Jump back to footnote 13 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:patrozou"&gt;
&lt;p&gt;&lt;em&gt;For influenza it seems that there is little evidence that asymptomatic individuals play an important role in spreading the virus, so this &lt;/em&gt;may&lt;em&gt; also be the case for COVID-19.&lt;/em&gt;&lt;br&gt;
See &lt;a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2646474/"&gt;Patrozou &amp;amp; Mermel (2009)&lt;/a&gt; for a literature study on the possible role of presymptomatic and asymptomatic individuals in spreading influenza. &lt;a href="https://doi.org/10.1101/2020.03.21.001628"&gt;COVID infection experiments using rhesus macaques&lt;/a&gt; show that these monkeys exhibit similar symptoms to humans, and suggest that the timing of their symptoms matches pretty well with the virus load in various parts of the airways. &lt;a href="http://dx.doi.org/10.1126/science.abb7314"&gt;Similar experiments on cynomolgus macaques&lt;/a&gt; however resulted in mostly asymptomatic infections, with detectable virus loads in the nose and throat for several days, although the virus was seemingly cleared somewhat faster than in humans (especially in young animals). &lt;a href="https://science.sciencemag.org/cgi/content/full/science.abb7314/DC1"&gt;Supplementary table S1&lt;/a&gt; of the latter study shows that infectious virus could be isolated for 4 days from the nose and/or throat of these monkeys. &lt;a href="https://doi.org/10.1038/s41467-020-14626-0"&gt;An earlier study on the transmission of influenza between ferrets&lt;/a&gt; suggests that influenza is mostly transmitted through airborne droplets generated during upper respiratory infection of the nasal cavity. However, in the absence of symptoms such as sneezing, coughing and a runny nose, it is unclear how efficiently the virus could spread to other individuals.&amp;#160;&lt;a class="footnote-backref" href="#fnref:patrozou" title="Jump back to footnote 14 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:crossimunity"&gt;
&lt;p&gt;&lt;em&gt;One interesting but unconfirmed possibility is that past exposure to a sufficiently similar virus may cause the immune system to recognise a new but related virus, and respond differently than if the virus were completely new.&lt;/em&gt;&lt;br&gt;
This effect is called cross-immunity. In humans there have been indications that a certain degree of so-called heterosubtypic cross-immunity exists for influenza viruses, which may be related to the observed high percentage of asymptomatic infections. For instance, &lt;a href="http://dx.doi.org/10.1128/mBio.03243-19"&gt;Meade at al. (2020)&lt;/a&gt; describe some degree of apparent cross-immunity in adults infected with influenza, but unfortunately they only included one of several asymptomatic cases. &lt;a href="https://www.nature.com/articles/s41586-020-2196-x"&gt;Wölfel et al. (2020)&lt;/a&gt; showed some degree of cross-reactivity between the antibodies against SARS-CoV-2 and other human coronaviruses, notably HCoV-OC43, HCoV-HKU1 and HCoV-NL63.&amp;#160;&lt;a class="footnote-backref" href="#fnref:crossimunity" title="Jump back to footnote 15 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:steriods"&gt;
&lt;p&gt;&lt;em&gt;there is some evidence that treatment of COVID patients with systemic corticosteroids, which reduce inflammation, has adverse effects when used too early in the infection, but does seem to reduce symptoms and increase survival for patients once severe pneumonia sets in.&lt;/em&gt;&lt;br&gt;
A review by &lt;a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7105332/"&gt;Russell et al.&lt;/a&gt; concluded that evidence is somewhat mixed and at this moment inconclusive, so it currently recommends caution in the use of &lt;a href="https://en.wikipedia.org/wiki/Nonsteroidal_anti-inflammatory_drug"&gt;NSAIDs&lt;/a&gt; (such as Ibuprofen and Diclofenac) and corticosteroids in COVID-19 patients.&amp;#160;&lt;a class="footnote-backref" href="#fnref:steriods" title="Jump back to footnote 16 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:virusenvironment"&gt;
&lt;p&gt;&lt;em&gt;In spaces that are not well-ventilated, especially if many people are present, these virus-laden droplets can hang around for quite a while and easily infect others if humidity is low (below 45%) or somewhat high (around 65%).&lt;/em&gt;&lt;br&gt;
&lt;a href="https://doi.org/10.1371/journal.ppat.0030151"&gt;Lowen et al. (2007)&lt;/a&gt; studied the transmission of influenza virus between guinea pigs. Their results suggest that virus transmission through tiny airborne droplets happens most efficiently at low temperatures and low humidity. However, at room temperature, transmission efficiency showed two peaks: one at lower air humidity, below ca. 45%, and one at higher humidity, around 65%, as shown in &lt;a href="https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.0030151#ppat-0030151-g006"&gt;Figure 6 from Lowen et al. (2007)&lt;/a&gt;: &lt;img alt="Figure 6 from Lowen et al. (2007)" src="https://journals.plos.org/plospathogens/article/figure/image?size=medium&amp;amp;id=info:doi/10.1371/journal.ppat.0030151.g006"&gt;&lt;br&gt;
It is believed that the stability of influenza virions (and probably also coronaviruses) in droplets is highest around low (20%–40%) and high (60%–80%) relative humidity, and minimal at intermediate humidity (50%). But at very high humidity (around 80% or more), the droplets tend to take up water from the air, grow in size and settle more rapidly. Conversely, at low humidity, larger droplets (with more virions) evaporate water, decrease in size and stay airborne longer. Moreover, smaller droplets can also be inhaled more easily and may end up deeper in the respiratory tract.&lt;br&gt;
Dutch pollster Maurice de Hond has analysed the geographical distribution of large outbreaks of COVID-19, and &lt;a href="https://www.maurice.nl/2020/04/14/zo-gaat-de-verspreiding-van-het-covid-19-virus-vooral/"&gt;suggested&lt;/a&gt; that there is a fairly robust relationship with relative humidity, the degree to which people spend time in badly ventilated spaces (high in areas that are cold and/or relatively wealthy, often lower in areas that are warm and/or relatively poor) and the occurrence of large gatherings such as (religious or non-religious) festivals. Indeed, &lt;a href="https://dx.doi.org/10.1371%2Fjournal.pone.0054445"&gt;data from the distribution of influenza and RSV (Respiratory Syncytial Virus) outbreaks&lt;/a&gt; seems to support this analysis. If this is indeed the case, we could expect that the incidence of large COVID-outbreaks may go down significantly in summer in temperate regions, and may go up slightly in the wet season in more tropical regions, as shown for influenza in &lt;a href="https://doi.org/10.1371/journal.pone.0054445.g003"&gt;figure 3 of Bloom-Feshbach et al. (2013)&lt;/a&gt;: &lt;img alt="Figure 5 from Bloom-Feshbach et al. (2013)" src="https://journals.plos.org/plosone/article/figure/image?size=medium&amp;amp;id=info:doi/10.1371/journal.pone.0054445.g003"&gt;&lt;br&gt;
The results above also suggest that it may help to keep spaces such as offices, stores, restaurants, cafes, classrooms and homes well ventilated and (if possible) the air at around 50% relative humidity, to spend more time outdoors and to &lt;a href="https://www.maurice.nl/2020/04/09/zo-groot-is-de-impact-van-superspread-events/"&gt;limit or avoid large gatherings (especially indoors)&lt;/a&gt; as long as the pandemic isn&amp;rsquo;t under control.&amp;#160;&lt;a class="footnote-backref" href="#fnref:virusenvironment" title="Jump back to footnote 17 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="misc"></category></entry><entry><title>Building an open source weather station</title><link href="//gnuritas.org/weatherstation.html" rel="alternate"></link><published>2019-07-25T00:36:00+02:00</published><updated>2019-08-24T01:49:06+02:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2019-07-25:/weatherstation.html</id><summary type="html">&lt;p&gt;In 2018 I got involved in &lt;a href="https://www.ecosystemrestorationcamps.org/camp-altiplano/"&gt;Ecosystem Restoration Camp Altiplano&lt;/a&gt;, a regenerative agriculture project in Southern Spain. Camp Altiplano is a collaborative project intended to restore biodiversity and soil fertility, to explore and share alternative farming methods and to teach people about soil degradation and about the regenerative techniques that can be used to reverse such degradation. The camp is located in the Altiplano region of Murcia, a high plain that is dry, cold and windy for much of the year and warm and windy in summer. This is a very difficult climate for agriculture, and farmers in the region struggle with short growing seasons, drought, high erosion rates and rapidly decreasing soil fertility. To obtain more insight into actual climate conditions, I decided to construct a simple weather station for the camp …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In 2018 I got involved in &lt;a href="https://www.ecosystemrestorationcamps.org/camp-altiplano/"&gt;Ecosystem Restoration Camp Altiplano&lt;/a&gt;, a regenerative agriculture project in Southern Spain. Camp Altiplano is a collaborative project intended to restore biodiversity and soil fertility, to explore and share alternative farming methods and to teach people about soil degradation and about the regenerative techniques that can be used to reverse such degradation. The camp is located in the Altiplano region of Murcia, a high plain that is dry, cold and windy for much of the year and warm and windy in summer. This is a very difficult climate for agriculture, and farmers in the region struggle with short growing seasons, drought, high erosion rates and rapidly decreasing soil fertility. To obtain more insight into actual climate conditions, I decided to construct a simple weather station for the camp.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The weather station at Ecosystem Restoration Camp Altiplano, in late October 2018" src="//gnuritas.org/images/DSC_0590_v1.JPG"&gt;&lt;/p&gt;
&lt;p&gt;As it is nontrivial to build a calibrated wind speed meter (&lt;a href="https://en.wikipedia.org/wiki/Anemometer"&gt;anemometer&lt;/a&gt;) yourself, I decided to order replacement parts for a commonly used low-cost weather station on &lt;a href="https://www.aliexpress.com/item/1-set-of-Spare-part-outdoor-unit-for-Professional-Wireless-Weather-Station/1214985366.html"&gt;AliExpress&lt;/a&gt;. The kit I ordered includes an anemometer, a tipping-bucket rain gauge, a wind direction vane and a unit for measuring temperature, humidity and pressure, protected by a radiation shield.
As it turns out, nearly an identical set can also be ordered from &lt;a href="https://www.sparkfun.com/products/8942"&gt;Sparkfun as article SEN-08942&lt;/a&gt;, although it is more expensive and doesn&amp;rsquo;t include a radiation shield, which is important to have as we shall see (although you can also build one yourself).&lt;/p&gt;
&lt;p&gt;&lt;img alt="&amp;quot;Spare part outdoor unit for professional wireless weather station&amp;quot;, ordered from China through AliExpress" src="//gnuritas.org/images/Spare-part-outdoor-unit-for-Professional-Wireless-Weather-Station-MS-WH-SP-WS02.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Instead of using some cheap black-box measuring unit, my weather station is based on an &lt;a href="https://store.arduino.cc/arduino-uno-rev3"&gt;Arduino Uno&lt;/a&gt;, and a variety of external sensors to collect environmental measurements. As the station is located in a fairly remote off-grid area, it is powered by a solar panel and a battery pack, and measurement data is sent to a server using a 2G cellular modem with a cheap M2M SIM-card.&lt;/p&gt;
&lt;p&gt;Additional sensors and parts I used include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To measure air temperature and relative humidity, I used a &lt;a href="https://www.adafruit.com/product/2857"&gt;Sensirion SHT31-D temperature and humidity sensor&lt;/a&gt;, which has an accuracy of ±0.3°C and ±2% relative humidity, and is connected though I2C. Other sensors can also be used of course, as long as they have a reasonable accuracy. Cheap sensors such as the &lt;a href="https://www.adafruit.com/product/386"&gt;DHT11&lt;/a&gt; tend to be very inaccurate, especially with regard to humidity, so try to avoid these.&lt;/li&gt;
&lt;li&gt;To measure air pressure I used an &lt;a href="https://www.pololu.com/product/2724"&gt;LPS25H air pressure sensor&lt;/a&gt;, which has an accuracy of ±0.2 mbar. Again, other good-quality sensors can also be used. This sensor is also connected to the I2C bus.&lt;/li&gt;
&lt;li&gt;To measure soil temperature I used a waterproof &lt;a href="https://www.itead.cc/waterproof-ds18b20-temperature-sensor.html"&gt;DS18B20 temperature sensor&lt;/a&gt;. Not the most accurate sensor, but cheap and good enough to give a reasonable indication, and several sensors can be used on one connection (a one-wire bus).&lt;/li&gt;
&lt;li&gt;For time keeping (and possibly data storage in future), I used a &lt;a href="https://learn.adafruit.com/adafruit-data-logger-shield"&gt;data logger shield&lt;/a&gt;, which includes an SD-card slot and a battery-powered real-time clock (RTC). The shield I have uses a DS1307 RTC, but other shields may provide other RTC chips (which may actually be better).&lt;/li&gt;
&lt;li&gt;For communication I used a &lt;a href="https://www.elecrow.com/wiki/index.php?title=SIM808_GPRS/GSM%2BGPS_Shield_v1.1"&gt;modem shield with a SimCom SIM808 cellular modem&lt;/a&gt;. There are various shields available, with various SimCom modem types (SIM80x, SIM90x) that all use basically the same &lt;a href="https://en.wikipedia.org/wiki/Hayes_command_set"&gt;AT-command&lt;/a&gt; set. These modems are inexpensive (under $10), although they are limited to 2G (GPRS) and the shields for Arduino may be quite costly. You can also look for a cheap SimCom modem module and connect it to the relevant Arduino pins, but note that the modem is 3.3V so you may need to use a level shifter if you use a 5V Arduino board. Other modem brands can also be used, but will probably require different AT-commands.&lt;/li&gt;
&lt;li&gt;A SIM-card will be needed in order to send the data over a cellular data link. I used an international roaming IoT SIM from Tele2, but there are many, many companies that can provide you with cheap M2M data SIM cards, either prepaid or with a subscription plan.&lt;/li&gt;
&lt;li&gt;For power I used a cheap car USB-adapter (the kind that is normally used with 12-24V cigarette lighter sockets in cars, trucks, caravans, boats, etc.) to convert the ~18 Vdc solar panel voltage to 5 V, and a cheap off-the-shelf USB powerbank (10400 mAh, eventually) to provide power when the sun is down.&lt;/li&gt;
&lt;li&gt;To house the electronics I re-used a waterproof case with an IP65 rating (from a work project), and I also re-used various wires and other bits to connect everything up, including &amp;ldquo;waste material&amp;rdquo; such as electricity wire cuttings and some old telephone connection boxes.&lt;/li&gt;
&lt;li&gt;I used a simple &lt;a href="https://opencircuit.shop/Product/11601/Screw-shield-V2-Arduino-Uno"&gt;Arduino screw shield&lt;/a&gt; to easily connect the sensor wires (which were mostly soldered to left-over bits of UTP cable).&lt;/li&gt;
&lt;li&gt;To get some idea of power consumption and PV-production, I also connected an ACS712 &lt;a href="http://henrysbench.capnfatz.com/henrys-bench/arduino-current-measurements/"&gt;30A current sensor&lt;/a&gt; in series with the solar panel, and connected its output to one of the Arduino&amp;rsquo;s analog inputs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I also tried adding a simple &lt;a href="http://www.circuitstoday.com/arduino-soil-moisture-sensor"&gt;FC-28 soil moisture sensor&lt;/a&gt;, but the sensor PCB heated up significantly, so I disconnected it again to avoid draining the battery pack and disturbing the temperature measurements&amp;hellip; I still need to look into better alternatives.&lt;/p&gt;
&lt;p&gt;For accurate air temperature measurements, it is important that the temperature sensor is mounted in a way that prevents heating up by direct sunlight, as least as much as possible. Usually this is done using a radiation shield, which should be reflective (e.g. painted white or silver) and allow for good ventilation, while protecting the sensor from weather damage (e.g. from rain). The idea is that ambient air can move more or less freely past the sensor, as any housing will still heat up somewhat when exposed to sun. Various designs can be found on the internet, e.g. the one described by &lt;a href="https://www.fs.fed.us/rm/pubs_other/rmrs_2013_holden_z001.pdf"&gt;Holden et al. (2013)&lt;/a&gt; or &lt;a href="https://www.jove.com/video/58273/construction-compact-low-cost-radiation-shield-for-air-temperature"&gt;Terando et al.&lt;/a&gt;, or the &amp;ldquo;Homemade Gill&amp;rdquo; described by &lt;a href="https://pdfs.semanticscholar.org/26cf/4e6ebf29f0287ef84f648b177561d8dc3e6a.pdf"&gt;Tarara &amp;amp; Hoheisel (2007)&lt;/a&gt;. The Citizen Weather Observer Program also lists &lt;a href="http://wxqa.com/shields.html"&gt;some radiation shield designs&lt;/a&gt;, and many other &lt;a href="https://drive.google.com/file/d/0B5lqXrt4qGa1aUV0MW5WekdVMlU/view"&gt;DIY manuals&lt;/a&gt; and &lt;a href="https://www.thingiverse.com/thing:1067700"&gt;3D printing designs&lt;/a&gt; can be found online. I decided to keep it simple and use the plastic radiation shield that came with my Chinese weather sensor kit. I found a &lt;a href="https://nl.farnell.com/spelsberg/334-904-01/box-junction-56x40x23mm-ip20/dp/1615342"&gt;small plastic enclosure&lt;/a&gt; that fit perfectly inside the radiation shield, and used that to mount and protect the temperature and humidity sensor (as the air humidity at Camp in autumn and winter can be quite high). It&amp;rsquo;s not entirely ideal with regard to movement of air, but at least there is no direct contact between the sensor and the outside housing, and this construction seems to work reasonably well given the generally windy conditions at the measurement site. The main drawback seems that &lt;a href="https://en.wikipedia.org/wiki/Earwig"&gt;earwigs&lt;/a&gt; like to use the radiation shield housing as a hiding place on warm days in spring and summer&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;img alt="The radiation shield fits exactly over the little box that houses the temperature and humidity sensor" src="//gnuritas.org/images/P1140487_v2.JPG"&gt;&lt;/p&gt;
&lt;p&gt;Initial testing of the sensor hardware and writing the weather station software was literally done on the kitchen table, in a farm house in the former village of La Junquera, near the Camp.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The weather station parts before assembly, still in the testing phase" src="//gnuritas.org/images/P1140453_v1.JPG"&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://www.sparkfun.com/datasheets/Sensors/Weather/Weather%20Sensor%20Assembly..pdf"&gt;documentation for the weather station parts&lt;/a&gt; is a little sparse, but luckily some &lt;a href="https://forum.arduino.cc/index.php?topic=530818.0"&gt;example code&lt;/a&gt; was available on the Arduino forum. The mechanical sensors for wind and rain use small magnets that close a &lt;a href="https://en.wikipedia.org/wiki/Reed_switch"&gt;magnet reed switch&lt;/a&gt;, which can be detected as a short voltage pulse on one of the Arduino&amp;rsquo;s digital input pins. However, an important detail that isn&amp;rsquo;t mentioned in the documentation is the fact that the magnet switch contacts used in the anemometer and the rain gauge are mechanical, and therefore tend to &amp;ldquo;bounce&amp;rdquo; a few times  after making definitive contact. Especially if you&amp;rsquo;re using an &lt;a href="https://www.allaboutcircuits.com/technical-articles/using-interrupts-on-arduino/"&gt;interrupt handler&lt;/a&gt; to detect the sensor pulses, these &amp;ldquo;contact bounces&amp;rdquo; may end up generating multiple pulses per magnet pass. You therefore need to include a little &amp;ldquo;debounce&amp;rdquo; delay before accepting the next sensor contact pulse. After some testing, a debounce time of 15 ms proved to be sufficient for the anemometer and the rain gauge.&lt;/p&gt;
&lt;p&gt;Reading the digital sensors proved to be fairly straightforward, using various Arduino libraries which you can simply install through the &lt;a href="https://www.arduino.cc/en/Guide/Libraries"&gt;Library Manager&lt;/a&gt; in the Arduino IDE. I used the following libraries:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/adafruit/Adafruit_SHT31"&gt;Adafruit_SHT31&lt;/a&gt;, to read the SHT31 temperature and humidity sensor&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/pololu/lps-arduino"&gt;LPS&lt;/a&gt;, to read the LPS25H pressure sensor&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/matmunk/DS18B20"&gt;DS18B20&lt;/a&gt;, to read the DS18B20 soil temperature sensor&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.arduino.cc/en/reference/wire"&gt;Wire&lt;/a&gt;, for I2C-communication (required for the SHT31 and LPS25H)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.arduinolibraries.info/libraries/one-wire"&gt;OneWire&lt;/a&gt;, for 1-wire communication (required for the DS18B20)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/adafruit/RTClib"&gt;RTClib&lt;/a&gt;, to communicate with the Real Time Clock&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/SlashDevin/NeoSWSerial"&gt;NeoSWSerial&lt;/a&gt;, to communicate with the modem over a software serial connection. In principle, it would be better to use the hardware serial UART, but unfortunately the Arduino Uno only has one UART, which is also used for the USB serial monitor. So if you want to be able to debug your code on an Uno while using the modem, you need to use software serial for the modem.&lt;/li&gt;
&lt;li&gt;Optionally, you can use &lt;a href="https://github.com/greiman/Fat16"&gt;Fat16&lt;/a&gt; or &lt;a href="https://www.arduino.cc/en/Reference/SD"&gt;SD&lt;/a&gt;, to write CSV-data to an SD-card. Currently this does not work on the Arduino Uno unfortunatey, as its microcontroller has insufficient on-board memory. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With the temperature sensors, care should be taken not to read them too frequently, as the sensors will heat up slightly on each reading and this becomes noticable in the measurements at higher frequencies. Currently, I use a delay of 12 seconds between digital sensor readouts.&lt;/p&gt;
&lt;p&gt;In essence, the &lt;a href="https://github.com/lvzon/weatherstation/blob/master/arduino_weatherstation_v2.ino"&gt;Arduino sketch&lt;/a&gt; continuously counts pulses coming from the wind speed and rainfall meters. Every 12 seconds, it reads out the various digital sensors, and measures the current drawn from the solar panel. Every 36 seconds or so, it tries to determine wind speed and wind direction. For most variables, the mean, minimum and maximum values are tracked for a period of roughly 10 minutes, after which these values are reported to a remote server. The reporting is currently rather basic: the Arduino asks the modem to open a TCP-socket, and then simply sends a line of comma-separated values to the server. The server is basically a &lt;a href="https://github.com/lvzon/weatherstation/blob/master/weatherstation-server.py"&gt;Python-script&lt;/a&gt; that sits listening on a port, reads the line of values and dumps it to a CSV-file after checking it and adding a timestamp. It also forwards some of the weather data to two open weather observation networks, but more about that later.&lt;/p&gt;
&lt;p&gt;The source code for the weather station, both for the Arduino and the server, can be found here on Github: &lt;a href="https://github.com/lvzon/weatherstation"&gt;https://github.com/lvzon/weatherstation&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;After writing and testing the software, the equipment needed to be installed in the field. Because the station requires a power source, I decided to install it at the site of the two 1000L water tanks that are used as water storage for the drip irrigation system. The water tanks are placed on a relatively high part of the land, so that irrigation water pressure is provided by gravity at night. During the day, water is pumped up to the tanks from one of the ponds, using a submersible DC pump (12 Vdc, max. 10 A, 120 W) that is directly connected to a solar panel (max. 150 Wp, 18 Vdc, 8.25 A) with a floater switch. When there is sufficient sun, the pump runs and the tanks are refilled, at which point the floater switch turns off the pump. On a normal day, the solar panel can provide much more energy than is required for the pump, so it can easily provide power to run the weather station as well.&lt;/p&gt;
&lt;p&gt;I mounted the wind sensors and the rain gauge above one of the water tanks, as they need to be clear of obstacles as much as possible in order to avoid wind turbulence and drag. Ideally they would be 10 m above ground level, but I did not have the materials to reach that kind of height, so they are now at around 3 m. The temperature sensor was placed 1.25 m above the surface, a few metres from the water tanks, above the cover crop. Further away would have been better, to avoid any temperature effects from the water tanks or the solar panel, but unfortunately the distance was somewhat limited by the length of the UTP cable that I had brought with me. The IP65-case with the electronics was placed in the shade of the water tanks, close to the solar panel. The soil temperature probe was buried 10 cm below the soil, not far from the air temperature sensor. The air pressure sensor (not shown in the pictures because it was added later) was placed in one of the ventilation openings on the side of the IP65-case. Apart from the electronics, two switches were also installed in the IP65-case. One can be used to switch off the water pump, the other to switch on an optional battery charger, which could be housed in a cobbed box next to the weather station.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The weather station electronics in the field, after assembly" src="//gnuritas.org/images/DSC_1076_v1.jpg"&gt;&lt;/p&gt;
&lt;p&gt;While there have been a few minor issues with the software and with the battery pack I used initially, the weather station has been functioning fairly well since November 2018. Under normal conditions, weather data is uploaded every 10-15 minutes to two public weather station networks: the &lt;a href="http://www.wxqa.com/"&gt;Citizen Weather Observer Program (CWOP)&lt;/a&gt; and the &lt;a href="https://www.wunderground.com/weatherstation/overview.asp"&gt;Weather Underground&lt;/a&gt; network.&lt;/p&gt;
&lt;p&gt;More or less live weather information is available from the station&amp;rsquo;s &lt;a href="http://www.findu.com/cgi-bin/panel.cgi?call=FW4087&amp;amp;units=metric"&gt;CWOP dashboard&lt;/a&gt;, and short-term historical plots of CWOP-data can be found &lt;a href="http://www.findu.com/cgi-bin/wxpage.cgi?call=FW4087&amp;amp;last=24&amp;amp;units=metric"&gt;here&lt;/a&gt; and &lt;a href="https://weather.gladstonefamily.net/cgi-bin/wxqchart.pl?site=F4087"&gt;here&lt;/a&gt;. A more detailed automatic analysis is generated &lt;a href="https://weather.gladstonefamily.net/site/F4087"&gt;here&lt;/a&gt;. Weather data can also be viewed on the station&amp;rsquo;s &lt;a href="https://www.wunderground.com/personal-weather-station/dashboard?ID=ICARAVAC4"&gt;Weather Underground dashboard&lt;/a&gt;, and the most recent temperature and wind speed are shown on this little widget:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.wunderground.com/dashboard/pws/ICARAVAC4"&gt;&lt;img src="http://banners.wunderground.com/cgi-bin/banner/ban/wxBanner?bannertype=pws250_both&amp;weatherstationcount=ICARAVAC4" width="250" height="150" border="0" alt="Weather Underground PWS ICARAVAC4" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s examine some of the measurements that have been collected so far. You can &lt;a href="{filename}/files/erc_altiplano_weather_data.zip"&gt;download a ZIP-file with data from the weather station (as CSV) here&lt;/a&gt;. First, let&amp;rsquo;s look at air temperature:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Air temperature (daily mean and range, in °C) measured at Camp Altiplano, between October 2018 and July 2019" src="//gnuritas.org/images/weather/daily_T.png"&gt;&lt;/p&gt;
&lt;p&gt;As can be seen, temperatures below freezing have occurred from November to at least March. The frost isn&amp;rsquo;t extreme, but it&amp;rsquo;s enough to ruin a crop. This year, it was uncommonly warm in late January and early February and March, which caused the almond trees to bloom early. Unfortunately, the frost at the end of March was sufficiently strong to destroy the flowers, leaving the farmers without an almond crop this year&amp;hellip;&lt;/p&gt;
&lt;p&gt;Another thing that can be seen is that on most days there is quite a large difference between the minimum and maximum temperatures. On average, the daily temperature differential is around 15°C (27°F), although on some days it can be well over 20°C (36°F). Such large daily fluctuations in temperature are quite common for dry, exposed areas such as the Altiplano region, where it can be quite cold at night even in summer, and quite warm during the day, even in winter. &lt;/p&gt;
&lt;p&gt;You may also have noticed by now that there are gaps in the data. These were caused by a combination of two or three problems. First of all, the initial incarnation of the station used a 5200 mAh power bank, which worked fine on some days, but turned out to be insufficient when nights got longer and colder (as battery capacity decreases at lower temperatures). This caused the Arduino to lose power, usually in the early morning, but sometimes also at other times, especially in misty weather conditions. High humidity forms an additional problem for the station, as water vapour tends to absorb the signal of the mobile telephone network used by the station&amp;rsquo;s GPRS-modem, causing the signal level to drop and the modem connection to fail quite regularly in wet weather. Finally, it turned out that if the connection was dropped while the network socket was open, this would block the server so that no further data would come in until the server was manually restarted. This sometimes led to long periods without data before I noticed the problem, for instance in April. I made some modifications to the server code to reduce the issue (by adding a data time-out), although further improvements can still be made. And to reduce the problem of power loss, I replaced the 5200 mAh power bank by a bigger 10400 mAh model (which stores around 37 Wh) when I visited Camp the beginning of June, which did improve the situation. Unfortunately this new power bank (produced by Hama) briefly switches off the USB output power when the solar power comes online in the morning, and when the PV voltage drops in the evening, causing the Arduino to restart twice a day, which isn&amp;rsquo;t ideal, although it is better than the former situation&amp;hellip;&lt;/p&gt;
&lt;p&gt;The water content of the air is measured as &lt;em&gt;relative humidity&lt;/em&gt; (RH), expressed in percent:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Relative humidity (daily mean and range, in %) measured at Camp Altiplano, between October 2018 and July 2019" src="//gnuritas.org/images/weather/RH.png"&gt;&lt;/p&gt;
&lt;p&gt;While our sensor reports values up to 100% in misty conditions, such high figures aren&amp;rsquo;t actually possible and should be taken with a grain of salt - the sensor is only accurate up to 95% or so&amp;hellip;&lt;br&gt;
As is visible in the graph, the air tends to contains more moisture in autumn and winter than in spring and summer, when it can be quite dry. Peaks in relative humidity generally occur after it has rained:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Daily rainfall (in mm) measured at Camp Altiplano, between October 2018 and July 2019" src="//gnuritas.org/images/weather/rain_mm.png"&gt;&lt;/p&gt;
&lt;p&gt;When relative humidity is high and there is no sun, conditions at camp can become pretty misty, wet and muddy. This is probably a good thing, as it is quite possible that condensation of moisture on the cover crop actually contributes significantly to the input of water into the soil, although we haven&amp;rsquo;t yet tried to measure this.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A misty morning at Camp Altiplano, October 2018" src="//gnuritas.org/images/DSC_0649_v1.JPG"&gt;&lt;/p&gt;
&lt;p&gt;Rain and mist remain relatively rare occurrences at Camp though, for much of the year. One thing however that seems almost always present at Camp Altiplano is wind, sometimes &lt;em&gt;lots&lt;/em&gt; of it. Here you can see the wind speed measured by the anemometer, in km/h:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Wind speed (daily mean and range, in km/h) measured at Camp Altiplano, between October 2018 and July 2019" src="//gnuritas.org/images/weather/wind.png"&gt;&lt;/p&gt;
&lt;p&gt;As you can see, wind speed can be quite variable, with the majority of days seeing wind gusts at or above 20 km/h (12 mph) for at least some portion of the day, but also periods when there is almost no wind. You can also see that some days are extremely windy, with gusts over 60 km/h (37 mph). On one such day, one of the bell tents was actually lifted off the ground by the strong winds! Note however that, while stormy days occur more often in autumn and winter, maximum daily wind speeds tend to be higher in spring and summer. This probably has to do with the stronger temperature differences in summer, as we shall see below.&lt;/p&gt;
&lt;p&gt;The above graphs mostly show mean daily values, together with the daily range. However, to better understand these observations, it is useful to look at what actually happens during the days and nights. The following graph shows the air temperature (at 1.2 m above ground) and the soil temperature (at 10 cm below ground), from early June to early July (with some loss of data on two days, around June 25&lt;sup&gt;th&lt;/sup&gt;):&lt;/p&gt;
&lt;p&gt;&lt;img alt="Air and soil temperatures (~10-minute averages, in °C) measured at Camp Altiplano, in June 2019" src="//gnuritas.org/images/weather/Tair_Tsoil.png"&gt;&lt;/p&gt;
&lt;p&gt;Here you can see more clearly that despite the fact that the days are long and afternoon temperatures are generally between 25-35°C (77-95°F), warm nights are actually very rare this time of year - the air tends to cool down quite a lot at night, sometimes down to a rather chilly 5°C (41°F). The soil however stays relatively warm at night. During the day the soil surface heats up in the sun, whereby exposed surfaces can easily reach temperatures over 40°C (104°F), as can be seen in this thermal image of the weather station area on July 3&lt;sup&gt;rd&lt;/sup&gt; around midday (with a tilled almond field in the background, beyond the Camp border): &lt;/p&gt;
&lt;p&gt;&lt;img alt="Thermal infrared image of the weather station site at Camp Altiplano, early June around mid-day" src="//gnuritas.org/images/thermal/FLIR0986.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Part of this heat is re-radiated by the soil surface, warming up the air above it, and part of it is transferred to the soil below, which cools down only slowly at night. To get a better picture of what&amp;rsquo;s going on, we can zoom in on a few days in mid-June, and add some of the other weather variables:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Air and soil temperature, wind speed and relative humidity (~10-minute averages, in °C, km/h and %) measured at Camp Altiplano from June 18 to June 24, 2019" src="//gnuritas.org/images/weather/weather-20190618-20190623.png"&gt;&lt;/p&gt;
&lt;p&gt;As the sun comes up and starts heating the surfaces, air temperature (red line) goes up and humidity (black line) goes down. The wind (purple) also starts to pick up, probably because the heat from the sun creates or amplifies pressure differences in the region. The soil temperature (blue line) lags a little behind the air temperature, because it takes some time for the heat to be transferred from the surface to the soil below (and also in the other direction at night). On warm days the soil temperature peaks a little below the air temperature, while it can exceed the air temperature on somewhat cooler days. There was no rain during this period, and you can see that the relative humidity can drop to roughly 20%. As soon as the sunlight decreases in strength, the humidity starts going up, the air temperature starts going down and the wind speed often reaches a peak and then goes down as well. When the sun is down, the wind speed drops and the soil temperature starts going down as the soil starts to cool by radiating heat. The humidity goes up further after sunset, and the air temperature will keep going down until sunrise. &lt;/p&gt;
&lt;p&gt;When there is some rain (tiny blips in the yellow line), this mostly has an effect on the humidity, as we can see in the first week of July:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Air and soil temperature, wind speed, relative humidity and rainfall (in °C, km/h, % and mm) measured at Camp Altiplano from July 1st to July 7th, 2019" src="//gnuritas.org/images/weather/weather-20190701-20190707.png"&gt;&lt;/p&gt;
&lt;p&gt;Even though the actual amount of rain was quite limited here (2-3 mm per event), it came down in a fairly short period, and it noticeably increased humidity and decreased temperatures, although the latter could also be caused by colder air moving in from elsewhere. If you look closely, you can see wind speed increasing and then dropping sharply just before the rainfall events, which usually is related to a &lt;a href="https://www.weatherworksinc.com/high-low-pressure"&gt;low pressure&lt;/a&gt; system moving into the area. Such larger-scale weather systems often influence rainfall and air temperature in a larger area. In this case, you can see the air pressure dropping as the front passes over, with strong rainfall accompanying a drop in temperature and pressure, which would be consistent with a &lt;a href="https://www.weatherworksinc.com/high-low-pressure"&gt;cold front&lt;/a&gt; moving in:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Air pressure (~10-minute averages, in millibar) measured at Camp Altiplano from July 1st to July 7th, 2019" src="//gnuritas.org/images/weather/pressure-20190701-20190707.png"&gt;&lt;/p&gt;
&lt;p&gt;Apart from measuring weather variables, the station also measures the amount of current supplied by the solar panel, which can for instance be useful to monitor the &lt;a href="//gnuritas.org/images/weather/current_day_pump.png"&gt;operation of the water pump&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One important question is of course, how reliable are the weather measurements reported by the station? As reference, I looked at &lt;a href="https://www.juntadeandalucia.es/agriculturaypesca/ifapa/ria/servlet/FrontController?action=Static&amp;amp;url=coordenadas.jsp&amp;amp;c_provincia=18&amp;amp;c_estacion=2"&gt;data from the agricultural meteorological station at Puebla de Don Fadrique&lt;/a&gt;, which is located a little over 20 km south-west of Camp Altiplano in &lt;a href="https://www.google.com/maps/@37.8755379,-2.3809498,3a,75y,333.68h,82.27t/data=!3m6!1e1!3m4!1see3GBa6hMJUw-w2VxwmqoQ!2e0!7i13312!8i6656"&gt;a fairly exposed field next to a farm&lt;/a&gt;. Here is a comparison of daily temperature data from both stations:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Air temperature measurements (daily mean and range, in °C) compared between Camp Altiplano and the Don Fadrique agricultural weather station, between October 2018 and July 2019" src="//gnuritas.org/images/weather/T_comp.png"&gt;&lt;/p&gt;
&lt;p&gt;There are a lot of lines here, but if you look closely you can see that the temperatures measured at both sites are quite similar, except that extremes at the Altiplano station tend to be a little more pronounced and the mean temperature tends to be a little higher. This could of course be an actual difference between the two sites, although it is also possible that there is some small heating effect from the nearby solar panel at Camp, or that the radiation shield isn&amp;rsquo;t perfect.&lt;/p&gt;
&lt;p&gt;The measurements of temperature and &lt;a href="//gnuritas.org/images/weather/RH_comp.png"&gt;humidity&lt;/a&gt; seem good enough for our purposes. Rainfall however is a different story: &lt;/p&gt;
&lt;p&gt;&lt;img alt="Daily rainfall measurements (in mm) compared between Camp Altiplano and the Don Fadrique agricultural weather station, between October 2018 and July 2019" src="//gnuritas.org/images/weather/rain_comp.png"&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately it is clear that the station at Camp Altiplano has grossly underestimated rainfall, especially before June. The precipitation reported at Puebla de Don Fadrique between October 19&lt;sup&gt;th&lt;/sup&gt; 2018 and July 13&lt;sup&gt;th&lt;/sup&gt; 2019 was 217 mm, while our station at Camp Altiplano only registered 66 mm over this same period. This was caused in part by the fact that the station often lost its internet connection as well as eventually its power source during wet weather, so that much of the precipitation wasn&amp;rsquo;t registered (as can be seen in October and November). Also, any rain that fell during longer periods without communication (e.g. April) wasn&amp;rsquo;t measured. The new power bank and the server modifications seem to have solved at least part of the problem. It is possible that there is still a slight underestimate of actual rainfall, due to the design and placement of the rain gauge (which may not work so well at higher wind speeds) and the fact that communication with the modem using the software serial library may temporarily disable interrupts, possibly causing rain gauge pulses to be missed occasionally. In a future version of the station I will use the hardware UART, which should get rid of the latter problem at least.&lt;/p&gt;
&lt;p&gt;With regard to wind speed, it is very hard to tell if the measurements are correct without an additional reference instrument. The  comparison with Puebla de Don Fadrique shows that the average wind speeds measured at Camp Altiplano are &lt;em&gt;much&lt;/em&gt; higher: &lt;/p&gt;
&lt;p&gt;&lt;img alt="Wind speed measurements (daily mean, in km/h) compared between Camp Altiplano and the Don Fadrique agricultural weather station, between October 2018 and July 2019" src="//gnuritas.org/images/weather/wind_comp.png"&gt;&lt;/p&gt;
&lt;p&gt;However, the (tiny) picture of the station at &lt;a href="https://www.juntadeandalucia.es/agriculturaypesca/ifapa/ria/servlet/FrontController?action=Static&amp;amp;url=coordenadas.jsp&amp;amp;c_provincia=18&amp;amp;c_estacion=2"&gt;Puebla de Don Fadrique&lt;/a&gt; seems to show that anemometer there is placed quite close to the ground, and the measured wind speed may also be significantly reduced by the fence around the station (which would introduce significant turbulence):&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Don Fadrique agricultural weather station" src="https://www.juntadeandalucia.es/agriculturaypesca/ifapa/ria/resources/images/18/estacion_2.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Moreover, the measurement interval and averaging method are unclear and may also influence the mean wind speed that is reported. In my estimation, the wind speeds reported by the Puebla de Don Fadrique station would be way too low for the Altiplano site, and the mean wind speeds reported at Camp seem to be more or less in the range that I would expect. But it would be good to verify this at some point.&lt;/p&gt;
&lt;h3&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;If you just want a reliable measurement of standard weather variables, you&amp;rsquo;re probably better off buying an off-the-shelf personal weather station, rather than building one yourself. It requires much less effort, it may sometimes be cheaper and if you pay some attention to specifications and reviews you will know more or less what you will get with regard to reliability and accuracy. With a DIY weather station, the quality of some measurements (such as wind speed) is much harder to establish, and you need to maintain a server infrastructure. Having said that, there are several advantages to building your own setup. First of all, most personal weather stations require an internet connection, which is problematic in remote, off-grid areas. The setup described here uses a cellular modem, which is something that most off-the-shelf consumer products don&amp;rsquo;t offer, unless you add it separately in the form of a cellular router (which can be quite expensive). Moreover, if you build your own system, you do have full control over design elements such as sensor quality, sampling resolution and data storage. With third-party equipment you generally depend on a proprietary closed system, from which it may also be hard to retrieve all your measurements. But perhaps most importantly for this project, the Arduino-based setup described here is very flexible and easy to extend, it allows you to add nearly any kind of sensor you can think of. I recently added a soil temperature sensor, and it would be easy to add more of these, e.g. at various depths or locations. Moreover, it is also possible to monitor other variables, such as soil moisture or the level, pH and conductivity of groundwater or surface water.&lt;/p&gt;
&lt;p&gt;Future extension plans for the weather station at Camp Altiplano include an upgrade of the Arduino (e.g. to a Mega or Due, or better still, one of the newer &lt;a href="https://store.arduino.cc/arduino-genuino/arduino-genuino-mkr-family"&gt;Arduino MKR models with built-in modem&lt;/a&gt; and &lt;a href="https://www.arduino.cc/en/Reference/RTC"&gt;RTC&lt;/a&gt;), local data logging to an SD-card and the addition of additional sensors for soil temperature and moisture, and perhaps other variables of interest. I may even look into the establishment of a mesh network (using &lt;a href="https://www.instructables.com/id/Simple-Arduino-Wireless-Mesh/"&gt;APC220&lt;/a&gt;, &lt;a href="https://sandervandevelde.wordpress.com/2016/05/30/cheap-arduino-mesh-using-rf24-radio-modules/"&gt;RF24&lt;/a&gt; or &lt;a href="https://blog.hackster.io/the-esp-mesh-development-framework-2d521bfd884"&gt;ESP&lt;/a&gt; modules), in order to facilitate measurements at nearby sites. Hopefully the open source design described here will be useful for other Ecosystem Restoration Camps, and similar projects where it is valuable to collect high-resolution data on various environmental variables, beyond the &amp;ldquo;standard&amp;rdquo; weather station measurements of temperature, humidity, pressure and wind.&lt;/p&gt;</content><category term="misc"></category><category term="blog"></category></entry><entry><title>Restoring soil with Ecosystem Restoration Camps</title><link href="//gnuritas.org/erc.html" rel="alternate"></link><published>2018-09-29T00:00:00+02:00</published><updated>2019-08-16T13:34:34+02:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2018-09-29:/erc.html</id><summary type="html">&lt;p&gt;In 1995, a film maker and journalist by the name of &lt;a href="https://en.wikipedia.org/wiki/John_D._Liu"&gt;John D. Liu&lt;/a&gt; was sent by the World Bank to document a &lt;a href="http://projects.worldbank.org/P003540/loess-plateau-watershed-rehabilitation-project?lang=en"&gt;large-scale project&lt;/a&gt; that aimed to restore the heavily degraded soils of the Chinese Loess Plateau. The results of this restoration project so impressed John Liu, that he decided to change his career, to learn everything he could about the large-scale restoration of ecosystem functions, and to tell the world about its potential. This resulted, among other things, in the release of several documentary films, including &amp;ldquo;Hope in a Changing Climate&amp;rdquo; in 2009 (which can be viewed on &lt;a href="https://vimeo.com/19661805"&gt;Vimeo&lt;/a&gt;, &lt;a href="https://www.youtube.com/watch?v=bLdNhZ6kAzo"&gt;Youtube&lt;/a&gt; and &lt;a href="https://itunes.apple.com/us/itunes-u/hope-in-changing-climate-for/id380226468"&gt;iTunes&lt;/a&gt;) and &amp;ldquo;&lt;a href="https://www.youtube.com/watch?v=YBLZmwlPa8A"&gt;Green Gold&lt;/a&gt;&amp;rdquo; in 2012. As the &lt;a href="http://www.jonathanjhalperin.com/sites/default/files/EEMP_PressKit_HopeinaChangingClimate.pdf"&gt;press kit&lt;/a&gt; of the first documentary states:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;On the Loess Plateau, an area the size of Belgium has been successfully restored over …&lt;/p&gt;&lt;/blockquote&gt;</summary><content type="html">&lt;p&gt;In 1995, a film maker and journalist by the name of &lt;a href="https://en.wikipedia.org/wiki/John_D._Liu"&gt;John D. Liu&lt;/a&gt; was sent by the World Bank to document a &lt;a href="http://projects.worldbank.org/P003540/loess-plateau-watershed-rehabilitation-project?lang=en"&gt;large-scale project&lt;/a&gt; that aimed to restore the heavily degraded soils of the Chinese Loess Plateau. The results of this restoration project so impressed John Liu, that he decided to change his career, to learn everything he could about the large-scale restoration of ecosystem functions, and to tell the world about its potential. This resulted, among other things, in the release of several documentary films, including &amp;ldquo;Hope in a Changing Climate&amp;rdquo; in 2009 (which can be viewed on &lt;a href="https://vimeo.com/19661805"&gt;Vimeo&lt;/a&gt;, &lt;a href="https://www.youtube.com/watch?v=bLdNhZ6kAzo"&gt;Youtube&lt;/a&gt; and &lt;a href="https://itunes.apple.com/us/itunes-u/hope-in-changing-climate-for/id380226468"&gt;iTunes&lt;/a&gt;) and &amp;ldquo;&lt;a href="https://www.youtube.com/watch?v=YBLZmwlPa8A"&gt;Green Gold&lt;/a&gt;&amp;rdquo; in 2012. As the &lt;a href="http://www.jonathanjhalperin.com/sites/default/files/EEMP_PressKit_HopeinaChangingClimate.pdf"&gt;press kit&lt;/a&gt; of the first documentary states:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;On the Loess Plateau, an area the size of Belgium has been successfully restored over ten years. A barren, brown landscape, denuded and degraded, has been brought back to life; a people entrenched in back-breaking poverty now work, farm, herd, and live, in a functioning, green ecosystem where rainfall infiltrates, water is retained and crops are readied for export.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Or as John put it: &lt;a href="https://permaculturenews.org/2016/06/29/john-d-liu-interview-possible-rehabilitate-large-scale-damaged-ecosystems/"&gt;&amp;ldquo;It is possible to rehabilitate large-scale damaged ecosystems.&amp;rdquo;&lt;/a&gt; This is a welcome, positive message, among depressing stories of climate-doom and ecosystem destruction. It shows that humans aren&amp;rsquo;t just destroyers of nature, that we can actually help speed up the self-repair of natural systems and create situations in which humans are a part of functioning ecosystems. &lt;/p&gt;
&lt;p&gt;Fast forward to 2016, when John D. Liu proposed the idea of &lt;a href="https://www.permaculture.co.uk/earth-restoration-peace-camps"&gt;&amp;ldquo;Earth Restoration Peace Camps&amp;rdquo;&lt;/a&gt; in Permaculture Magazine. The concept of such camps, later renamed &lt;a href="https://www.ecosystemrestorationcamps.org/"&gt;Ecosystem Restoration Camps&lt;/a&gt;, is that these are places where people can go to learn restoration techniques in practice, by actually restoring degraded pieces of land, and to learn about ecosystem function and meet and learn from and discuss with other people. A &lt;a href="https://www.facebook.com/groups/1206960359323785/"&gt;Facebook group&lt;/a&gt; was started soon after, to further discuss the idea and to form an active community around it. Early 2017 the &lt;a href="https://www.ecosystemrestorationcamps.org/camp-altiplano/"&gt;first Ecosystem Restoration Camp&lt;/a&gt; was started, on a degraded five-hectare piece of former farmland in the Altiplano region of Murcia, a dry, windy and remote area in the south of Spain.&lt;/p&gt;
&lt;p&gt;Early 2018 I heard about this project, became a &lt;a href="https://www.ecosystemrestorationcamps.org/product/become-a-member-of-ecosystem-restoration-camps/"&gt;member&lt;/a&gt; and got involved as a volunteer, initially to design an off-grid energy system for the Camp. The energy system didn&amp;rsquo;t materialise for another year, due to lack of funds, but I did visit &lt;a href="https://www.ecosystemrestorationcamps.org/camp-altiplano/"&gt;Camp Altiplano&lt;/a&gt; in the spring, to document some of the progress in the form of &lt;a href="https://levien.stackstorage.com/s/SmRdGXkao6Dy5d7"&gt;photos&lt;/a&gt; and &lt;a href="(https://www.youtube.com/watch?v=PYo3C7Y1oIY&amp;amp;list=PLTCdtEYt-2bWCk5OL2oyB0Z7ExcfyY2lw)"&gt;video material&lt;/a&gt;, and to help set up a solar-powered drip irrigation system.&lt;/p&gt;
&lt;p&gt;In September, Camp Altiplano published its &lt;a href="https://www.ecosystemrestorationcamps.org/camp-altiplano-restoration-report1718/"&gt;first Restoration Report&lt;/a&gt;, which describes the restoration work done in the first year at the Camp. To accompany the report, I made a &lt;a href="https://www.youtube.com/watch?v=PYo3C7Y1oIY&amp;amp;list=PLTCdtEYt-2bWCk5OL2oyB0Z7ExcfyY2lw"&gt;series of three short videos about some aspects of the restoration&lt;/a&gt;, notably the creation of earthworks to capture and hold water, the decompaction of the soil by deep ripping and the establishment of a mixed cover crop to protect and restore the soil.&lt;/p&gt;
&lt;p&gt;The area of Camp Altiplano is dry, and on the rare occasions when it does rain, the water often comes down in huge torrents. One of the first things that needed to be done is to make sure that the little rain that falls (only around 300 mm annually) is captured, rather than running off, creating large erosion gullies and taking the soil with it. Therefore, a series of ponds, swales and a sediment trap were created to capture rainwater and slow its flow across the site:&lt;/p&gt;
&lt;p/&gt;

&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/PYo3C7Y1oIY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;One of the big problems with modern mechanised agriculture is that tractors and other heavy machines cause the soil to become compacted, which is a problem for plant growth and soil life. Annual tilling does decompact the upper 30 cm or so, but unfortunately it also destroys much of the soil life, removes soil carbon and creates a very hard &amp;ldquo;plough pan&amp;rdquo; layer just below plough depth, which water and air cannot penetrate. Therefore, the land was &amp;ldquo;deep ripped&amp;rdquo; to break through the plough pan, so that water and air and plant roots can again reach into the lower soil layers:&lt;/p&gt;
&lt;p/&gt;

&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/6irT9vKHFKQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;After water management structures were created and the soil was decompacted by deep ripping, compost was spread on a part of the land, and organic fertilizer pellets were used on the remaining land, and a cover crop was sown. The cover crop is a mix of 30 native plant species, which provide ground cover and organic matter and which will improve soil structure and fertility:&lt;/p&gt;
&lt;p/&gt;

&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/uneGZM920Tg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;To learn more about the restoration process at Camp Altiplano, you can read the &lt;a href="https://www.ecosystemrestorationcamps.org/camp-altiplano-restoration-report1718/"&gt;Restoration Report 2017-2018&lt;/a&gt; and the &lt;a href="https://www.ecosystemrestorationcamps.org/wp-content/uploads/Camp-Altiplano-Restoration-Plan-2018-2021-ilovepdf-compressed-1.pdf"&gt;Restoration Plan 2018-2021&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Also, you can learn more about Ecosystem Restoration Camps, and even better, become a member at their website: &lt;a href="https://www.ecosystemrestorationcamps.org"&gt;https://www.ecosystemrestorationcamps.org&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;To learn more about the work and ideas of John D. Liu, visit his &lt;a href="https://knaw.academia.edu/JohnDLiu"&gt;Academia-page&lt;/a&gt;, or if you&amp;rsquo;re in a hurry, watch his &lt;a href="https://www.youtube.com/watch?v=h2SucZp8ETM"&gt;talk on TEDx&lt;/a&gt;. The early period of Camp Altiplano is nicely documented by Timothy Sexauer in &lt;a href="https://museecology.com/2018/04/01/episode-1-ecosystem-restoration-camps-an-idea-takes-root/"&gt;the first episode of his Muse Ecology podcast&lt;/a&gt;, which is worth listening to. While you&amp;rsquo;re at it, also listen to his &lt;a href="https://museecology.com/2018/08/29/3-a-bonn-voyage-with-john-d-liu/"&gt;interview with John D. Liu&lt;/a&gt;.&lt;/p&gt;</content><category term="misc"></category><category term="blog"></category></entry><entry><title>Along the Pamir Highway</title><link href="//gnuritas.org/centralasia.html" rel="alternate"></link><published>2017-05-17T19:57:00+02:00</published><updated>2018-01-10T00:30:03+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2017-05-17:/centralasia.html</id><summary type="html">&lt;p&gt;&lt;em&gt;More pictures with this story:
&lt;a href="https://goo.gl/photos/gGuSuEXRN6cQKNFR7"&gt;https://goo.gl/photos/gGuSuEXRN6cQKNFR7&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Just months ago, I knew next to nothing about Central Asia. Probably
like most people, I knew there was a group of countries just west of
China, with names that all end in -stan. I was vaguely aware of a
connection to the old Silk Routes, the former Soviet Union and a few
acts of recent Muslim extremism. I had read something once on the near
disappearance of the Aral Sea due to irrigation of cotton crops. That
was about it.&lt;/p&gt;
&lt;p&gt;Flying from Moscow to Bishkek, one passes over empty steppes and deserts
for hours on end. Kazakhstan is in the top-ten of biggest countries in
the world, yet somehow I completely failed to notice it on the world map
that has been …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;More pictures with this story:
&lt;a href="https://goo.gl/photos/gGuSuEXRN6cQKNFR7"&gt;https://goo.gl/photos/gGuSuEXRN6cQKNFR7&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Just months ago, I knew next to nothing about Central Asia. Probably
like most people, I knew there was a group of countries just west of
China, with names that all end in -stan. I was vaguely aware of a
connection to the old Silk Routes, the former Soviet Union and a few
acts of recent Muslim extremism. I had read something once on the near
disappearance of the Aral Sea due to irrigation of cotton crops. That
was about it.&lt;/p&gt;
&lt;p&gt;Flying from Moscow to Bishkek, one passes over empty steppes and deserts
for hours on end. Kazakhstan is in the top-ten of biggest countries in
the world, yet somehow I completely failed to notice it on the world map
that has been hanging above my bed for over 5 years. The country is dry,
flat and grassy, and most of it is covered by the vast steppes of
Eurasia that are the evolutionary home of most grasses as well as
grazers, both of which have been essential to humanity. These steppes
are also the home of the Turkic languages that we currently associate
mostly with Turkey, but which actually originated in current-day China
and Mongolia. While seeming empty and lifeless from afar, up close the
steppe is home to various kinds of birds, rodents and insects, as well
as herds of animals and the occasional settlement or yurt. To the north
of the steppes are the forests and tundras of Siberia. To the east, vast
mountains separate the &amp;ldquo;Stans&amp;rdquo; from the steppes and deserts of China.
South of Kazakhstan, the mountainous countries of Kyrgyzstan and
Tajikistan are a prelude to the Himalayas.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/ujWTcKRBynTbTITL5JGMksakNvgwD26kEEX6S9VsHGN3_T8vbJUgsvPLQdi0L1bE3tWRCD8m_B77lXB9KPQsjRLd4X_3vAx8UrrbCf7W3vwFd4Botcc1QcbPVtlN3Pq37GFR3suafYkBC32W4UlAt_Jy3lg6tEems9MHvfwVRw3qq9a6apceDtbyoFh9m1M3D9XkbOkGx7t-M7JozEHNfUwiWQi9lyd5INcxiWI1mkCp-TEc8pox5Mrigk4OzK7Dn5kG6Ts54dmXg1gohzVUx5W5WqPlJm6QEJRYJlUvZ-g83PkhB02ZgU5lXixVxtURtekJ47P46Ere3t2qBchlYc3vM4wIHbJgcbukb77k204UTQpyJzBZ82KFkIe6z62EP3-ivgNmsCF2qUGCj3qwxhsnNvX0ZeZRWwrAYa02t9TI7QNOPu1DX6r9GLOJtN5jSG0cJF1-sHz8_y4zO7mAFPKHtgH36R-P0W7gv9zVXQlnpg29hozvI3wSxnuS6Xo8sVK57X7Rg9ouf5_9jIP8Xs3XGNYcZhdFGNjHDvgFTzJAdPXzRHm7h8FxXTwp7r92ESOFfpwoMHOmkc3WV7yYdN1VxNV-dfwZlKTL4wC01i1qTwQ8Qd4NbMA1fj_eYI7p5JAvAVTctQ5pEUG5BioyIuyD8Zn-tf0R6veIMrbXhQ=w606-h454-no"&gt;&lt;/p&gt;
&lt;p&gt;My first acquaintance with Central Asia was the city of Almaty, the
former capital of Kazakhstan before the president decided to build a new
capital city called Astana (Kazakh for &amp;ldquo;capital city&amp;rdquo;) at a more central
location in the middle of nowhere. Almaty is a fairly pleasant city,
although its many black SUVs and fancy shopping centres betray the fact
that Kazakhstan is an oil producing country, and therefore among the
wealthier of the Stans. We took a two-day trip to see some canyons and a
lake with our guide and driver Sergey, a Cossack and former tank-driver
in the Russian-Afghan war, who looks oddly like a Russian version of
Sean Connery. After Almaty, our journey took us south, to Bishkek,
capital of Kyrgyzstan. But not before one of our party was held at the
border when trying to leave Kazakhstan, had to go to trial the following
morning for failing to register within five days with the proper
authorities, and subsequently got deported from the country we were
trying to leave anyway. Such bureaucratic weirdness is one of the more
unfortunate leftovers from Soviet times.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/6eDtT86qo9C7qJ0gViugaDaX7dPfPpNiuPLh5cLdv9SYGbM9ZSk7vsXgh7cg6miTffGKzkOGoCgnAoiI0blzEkEG4Lxqz8wfChdpE48287JGVTEurzaTHUi5XsjYoSOLT2XE-FTugZQNVMHgdHxV_rMbGD3j5mQiLbNP5OIhQf6tqec9nrZex61yrK3gSKFT-cr42hKezrPkP2ojHVvfj1aK80EkWs9tOpAR1YWdoOCzjjTOXAxWv_2aC0D8-cwe1g9_nhkDfNjqn5aBRcqKiofp2FBrYGIHLxI513QSrSqWusln6931_EC5rYQk1HRZKEhowYVnqIRxAvKkEC_QuIR4icFH3A1RtcD46ps6arkh5P30Ftee-ghSvUCoydtvL9atCzQU0y6DCZl70P3mRY6ne-WxcqnBl7iFTD1P2wXq9twgPK2W3VceScUHTY4HfGjs5Dsi9U0t-lO7Gz-R4CmRwSxw7OxI5PgUonXiOOcn_1RLOFm88h3g2WO2EHz_pgtQ9NsUItgBP6TrdjdV857hUkxCox0Nufpa8v6T8bwykdIg7Ime57hJJDiNL2sYswQ8g5jQSTXY_27dexiMJKUSPYYp6czNmlNu5OT2C46-y6orgMC-5MCNBfSWIcFkb-AbxWQrTfdL_c-9ueCI0Pkm5jPGHq2PRqwUOakOEQ=w664-h194-no"&gt;&lt;/p&gt;
&lt;p&gt;From Bishkek we decided to travel further south, a two-day trip over the
mountains to the city of Osh, one of the oldest settlements in Central
Asia. From Osh we would start a ten-day trip through the Pamir mountain
range, a remote region with high snowy peaks and mountain passes, salt
lakes, plains and high altitude deserts. The main road through the
region is the aptly named Pamir Highway, apparently the second-highest
altitude road in the world, which is only accessible during late spring
and summer.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/VLLNTtgz0C-T0yGVWRHCICrJei5wxkDD8RZCIC6VNq57F4sIC_4AWbzwHX-SCAZ-wVbd0yfhW6hXNvnqbX5XuyshkbrGtvnS3wk9HP_L6_kwkbS3qz1-fcfEFdAM1_SMpAyl5uHjb-v2OnsUiVIa_dSZz82Gg70aVA4fLatbP1oJuvx_gGqsIVrR3FltdKJ13DRdJy8GuqN5Ad60cgRYC4G1YL6HzI_jjIgDNoFsKLRo8yZ5UFTFbZS5SkJ0bB_1D7ssfL2JR2_KMIsWn3i7lbZXabOWlBTyUES7JGQ7_fYIlUUsq9W2AhC7SRraEyszoQU3QbPfsiifQqOPjea5L44MkycYPG-5tknjCqx7qDqMU3i1Ps68mSBm_5ZchJAC2NHXapKRS5sRH5nGUC6enIz9CKqB9GHvD1AhdvVYCnMTIlKuKBm43J3SvafsAw015yNGFMpgVoJ2NN04oqZU3twVYBTtRz6Izw9c3ia49mhdYkUWeIt8RcLeXCoTwwSZTDiPoT4v2hQStg4HJYWWMcVBj9zADs-dGg-cZWNRrDHKM37SoJNlboStKTe05J8MVcW9QKmBGiWKyaOh72jY29fEM3b5LW3S0gXlO61vyXk0JHoO4mL3eW9XoI4ZCB0iCWJhEs5K2SPrLsNY75BocrWMCC17jhi3NZ6lEPjM8A=w606-h454-no"&gt;&lt;/p&gt;
&lt;p&gt;As soon as you drive over the Taldyk Pass (3650 m) into the Alay Valley,
you feel like you&amp;rsquo;ve arrived on another planet. While the grassy
northern plains transition from winter to 30°C in a matter of days, the
Alay Valley was still mostly covered in snow. To the south, &amp;ldquo;Peak Lenin&amp;rdquo;
(7134 m) and the Alay range tower over the valley and separate it from
Tajikistan. An abandoned Soviet &amp;ldquo;meteorological station&amp;rdquo; with two giant
half-broken radar domes added to the otherworldly feeling, as did the
dusty town of Sary Mogul where we spent the night. The town could easily
feature in a Star Wars movie, if it weren&amp;rsquo;t for the constant sound of
chickens and braying of donkeys (and of course the conspicuous lack of
alien lifeforms).&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/dXZrxtQ-kdAnw7hLVjX9YoFfT0YMKFhGuOVmlqbkj_AJjxzyoCZqSoxpQXXK0EJbnv9lC6-EUSBySMhxrhliwf9mx6dir_4yyKTgCjqEZZd_cx2aPz-wUzlQUuw_REj5P_ARagliD0gsmObjt7cXyqd5PRdn8wbxD5lGu5ehhhRBQMj1QcrFpCawUpYZ5pvoQbfPPdk54rndgB_eUqXUb3PjVFW0rh5-8nYuLzgkb5YakVKhA7DIbAXWdS6GElRgkH024JC-stuko2yLi3P1IMW2ptT0LsGjkHWY875Q2VYyMtExyqSNSFMPfCi7WebKkhZziO4z91G72uKgRV4LguGNlwYsAPTWJ5XOzfpepMy_u9O8hvAxwdogJBIma3YgLNNBXEx_NJ3vzipcPT1Mb-RADU-ftuQX3maNZkwZ4H97Mv6zRHG3pg4d83BRSHjEQ-ybbDKdq-KuLmMh-ykkPCZm0CsHSjeBekLfQxzm6kqlQT2A58Oy93cdJ3aWYRuCh6TfwMW7KmjxHVrGFPgGksw7myaQEJzyVHhIz5mOQNw3Sb7W1a7I3h968WIWP2YYfrC_blKYIGePbno92lX7SsygYJj1jv3IRCxnRf10KIIUekIsx5VFWFqLfuX5C9OVsSC7DIiMd9VOmehki7rpn_dnIika4gnJLObyDNpOWA=w606-h454-no"&gt;&lt;/p&gt;
&lt;p&gt;Apparently we were among the first tourists this year able to cross the
Kizil Art Pass and the no man&amp;rsquo;s land beyond, into Tajikistan. In places
the road was still covered in snow and ice, and a 4WD was certainly no
luxury. Beyond the pass the road runs along the rusty &amp;ldquo;Systema&amp;rdquo; border
fence for over a hundred kilometres. The fence marks the no man&amp;rsquo;s land
between China and the former Soviet Union, although large parts of it
have since fallen over or are now missing altogether, presumably used as
firewood. Despite the snow and lack of vegetation, there were quite a
few birds and marmots, and we could spot the occasional vulture circling
high above. Once in Tajikistan, the road descends toward Toktokul, the
&amp;ldquo;Black Lake&amp;rdquo;. Despite its name and high salt content, the lake was still
completely frozen over, and therefore quite white. Beside the lake lies
another dusty Star Wars town with low mud-brick houses and a small
forest of disconnected telephone poles. There is no electricity supply
here, but most houses do have a small Chinese solar panel on the roof,
which is connected to a 12V lead-acid battery. This is sufficient to
charge phones and power a few LED lightbulbs in the evening, and
sometimes a small television. People cook meals and boil their tea water
on stoves powered by animal dung and dry desert shrubs (which
unsurprisingly are becoming increasingly rare around towns).&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/3Mn-GDorEJkxvb2_97wzCq9IFhGkvJHFnQ_cmu-MOUxH_cIhu0H3ZGiaCVEg_aCPzl0ErV09TeFXSejAK_QnnAD3oL0uKx51O0GCve-6q1qGuhvSo2EF3-unwH7-M6FwwAlcE_jIMQeQjSbY4BUT-HbmXqUHRivS4__2L1m0HtLtcV-wJrZFJHiPbSIWo2tcKIP-geXEbxDrknFYhBamOqOSwGJeY5hcVqlLHh97kBWG_vnIi6V_HnGMNgmsMpeQO9wWItM5r20cj8NkSZrPYtAT_TaEFLsh6HxtgHApy51CZNMCnEpub-sG98P67zDBkMXTstq6IipnWwQW9-D4k4jz7FdNk13bM6ue70yvFz-wry4LbuTZ6VGxcbgVF_lIhJHoWIS4_bsxM0WwWjz_Ba9EVaMScAUIUDJXmPeSfoo_NfLoX9KDRHaaaXsQWhvjakdWQDWnU2Ej9YPs4QOujcx8sbk-0hHVBX5NUIRQNhAHoWPqRCdB4QupS4OXfuGUJygO4gJCCaqROTYg-H6UeV8q0LIwN98TKWHoXV3bhkTAJTUgr5IlVHfFdvpfCZsfBSDiNLYBeibjnPcwNsC_VflwELpirKaXVQp6X2I2-gQSm8kT9FqPqeS--3oKJS5QJQ_PrJiW89Of7wOByj9v7FfpfApuk7tcVtc0ru-d1g=w664-h442-no"&gt;&lt;/p&gt;
&lt;p&gt;The strip of land between the town and the lake is covered with salt,
rusting car parts and animal carcasses (or parts thereof). Several yaks
graze in a marshy bit of land by the lakeside, slightly downhill from
the town. I was surprised that such large animals can find sufficient
food in such sparsely vegetated lands, but undoubtedly they have large
fat reserves, and apparently the region is much greener in summer.
Despite being dry and dusty (and sounding like a place in Mordor),
Karakul is not a lifeless town. Everywhere were groups of children in
colourful clothes, eager to practise their &amp;ldquo;Hello&amp;rdquo; and &amp;ldquo;Goodbye&amp;rdquo; on
passing strangers. Walking to the lakeside, we were joined by a little
girl called Fatima and (presumably) her two, somewhat over-active
brothers. Fatima, with her purple dress, pink plastic boots and white
flower in her hair, turned out to be a fairly good portrait
photographer, once I had lent her my camera. I am now the proud owner of
around forty group portraits, taken from the perspective of a
six-year-old. Despite having no language in common with us, she was able
to express very clearly who needed to be where in which picture, in the
peculiar way that way only small children can.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/P9JCkMEJhiP6WjZUsvm0zI5ja3gKcerWTL9NsoAmn4b4LSwsnWMIvwbzahZeRkOGJ7oI28fO5yEZkKSbw2nkGz2wvKtZ19pnZplKKDUeK7o5P3DKtYrWMdDwrfA7toYGsK4Xn4b8SNLf41cYu3FceJ4hlNAxuB-F3pd5TOdv9yktCXza_YZBFwPCh-thHdJt7_NtOed1kqkl02X9v90oBxHeeyVEVMhlyl7S-6FYWsHMBxluyapmJjbJrFodjI5pHhTTKJKCuzX69jX1QBXnnnaB_FtCg0dDv90sNi3qTNrqn2A3vu1fcHcmUfg0Mzi0LtzDGjQ8ATjVdi1SqT6hz_koJSoMq84CO2gHjfWr4-kQFEkyTgtmzwIg9apdo56TKsFAYLeLjOWVeZcHlYojEmKB5KIEBiw__9PSvFoshJrIMa9VUgAkyzUkHhoBVtYMP9zs5oxyMWR3xYgw5gARi88jpxVym-Ksu1QwFnB_dzzVJmjgVpVwPWns93tOpsN5AewvaZkav1y-Fsi4NBj6vMeVJxj6vB_cY6R1fAoKwVoVDh06c26vad-UMRfS_GSuLFidUpTImF1iHIn4v0Y3g84tqMFqG7673HEPraoJxWs1xyYLSzL-tcEbZm81jciZffCdA9MbIIqGMIKikUcJH7wt9cwrBo3nmmMkiGB_jA=w486-h323-no"&gt;&lt;/p&gt;
&lt;p&gt;Night was not spent in Karakul but in Murghab, the largest town in the
region, and the home-town of our driver Muhammad. Like most towns of the
high Pamir, Murghab features mostly dusty streets, low buildings,
telephone poles and rusty car parts. In theory there is an electricity
supply, but it was out of order for an unknown period of time. As
Murghab and many other towns cannot be reached for half the year, people
have to stock up on food during the summer months. Even in summer the
town is mostly supplied by container trucks that have to traverse
hundreds of kilometres of unpaved roads through steep mountainous
terrain, so this is not exactly the cheapest place to buy supplies. No
wonder that many people keep a small herd of animals, that graze in the
river valley and on the hills around town. Also no wonder that the food
in this regions consists mostly of mutton, potatoes, onions, carrots and
rice, as these ingredients are easily obtained and keep well through the
year.&lt;/p&gt;
&lt;p&gt;After saying goodbye to our driver for the night, we decided to try and
find a place where we could exchange some money. We rang the doorbell of
a travel agency, as it seemed that they might speak English and may be
able to help us. To our great surprise it was our driver Muhammad who
opened the door of what turned out to be his family home, where we were
promptly invited to tea with home-made pastry. Unknown to us at the
time, Muhammad&amp;rsquo;s grandmother had died two weeks earlier, and the family
was preparing a feast to mark the end of the mourning period. We were
happy to have this opportunity to visit a local household, although we
were also slightly embarrassed when we learnt of the occasion for the
festivities. The next day, we were invited again to come and eat a meal
and drink tea, while town elders gathered in the family home to eat and
pray.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/39-UtJNaTrxlAxVBozS5ltMi2UreLWdBODDj7CKxucKJv-ckR8YCBXPVuuc3hTAlV9mpp0A67zY53b8zFmD7lDF2em2uo0ErHQX_CcN20bjo-Lr7ohiuF2oQdRyCYjALxGM6K9taSVYJR3itjBx1Sq_KZG2g5Uz58jlYSsoMSPsNch458eTtjtWcYzA2gOaGaCY06tXWAazYof0yIHRjhi11pvvx4yyntTjkW65n6DDA5hAVA1xTQbRqfP2ML4sIXH5suMagn_tIXprXhycoI_DRipKf30JkryGfEmLlqE5st_Rbq_0nVHK6MHP-9jubIgY2PgUNVF5L9yEwzIjZRBHl6GaGYjgHLIb_wW4NdeBbNNNT9u1P9oaOvgQBHJi898rf3Oc5Tnmap9IowC6J-nnixATbvaDFc_EcTUIEcE-Q1rC395dC3_OmhYJTaFp1WWHnXFQtv1DySgz2OUE4SbgL9C17xCGKulgwgxgiKq8HqJJfm-x_mm9UkY8CuEFf_6Jyds9kWj63KNMAWlmztyCV6eCiH_rRqZO3i3rZviX_dKXjfL79DsvMG2UoNPkMnyWUc5cwPnppu2AGtADOZHlGK0Ys4Xs72O3tL_mUH3QRJzEMlTFV56J5TriEK1GhAsEyqnHoQZKwGTaail2suMrgWvjy0QCAMwiagg8n7Q=w606-h454-no"&gt;&lt;/p&gt;
&lt;p&gt;Two more days of beautiful and otherworldly landscapes followed,
including a visit to the Pshart Valley, a moonlit but very windy night
in the remote town of Alichur and a visit to the even more remote
Bulunkul town and lakes (reportedly the coldest place in Tajikistan).
Then we crossed the Khargush Pass (4344 m) into the Wakhan Valley, the
southernmost part of Tajikistan. The Pamir river flows through the
valley, and further downstream becomes the Panj and then the Oxus (Amu
Darya). The river also forms the border with a strange, narrow strip of
Afghanistan known as the Wakhan Corridor, created in the nineteenth
century as a buffer zone between the British Empire (current-day
Pakistan) and the Russian Empire (current-day Tajikistan). The eastern
extremity of the Wakhan Valley is known as the Pamir Knot, the meeting
point of several major mountain ranges: the Himalayas, Tian Shan,
Karakoram, Kunlun and Hindu Kush. However, we travelled west along the
river, toward the mighty Hindu Kush range (&amp;ldquo;Killer of Hindus&amp;rdquo;) which
rose in the background and beyond which lies Pakistan.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/qXX_FoqQ-e4BjhZHdQki41LmhykB9t4BbgJlDUZz2E9GfjCkV23Egz6aM5gXq-X7K16yiuldbkDNMi8zutSn5nKqbN-EXZzacLcPORtVFBLMFj0-q7zPktDJfTcphDBMLOhhjbyU4Wqj3h9eeqkFUJbwCRfVMH8k4PkmbfJ5UKtW_5BLi2EPv2u4H0ErqazHwPn5DfCzaxtbWXUjNRZJaZupfN3yFC40pchspWkQvUdPz2DN5q8g7jfaoMOwOx1eWGHtsdSzU8L1D9OKOXnBhd5_WWIEcwxY_-Q3aMhhPss2oWV8Ew7y2ZnK34gqZzr75p0-GNzu_6CygS6lNJ-G0bwplu5Fn67BdH8IEL9Pm9SMjWFf1hzIlX-d1seLrpmdnra6fhz2Mav29JCMCDJDBz4eyBAKWjnIT-Y5gRRsChmE7mXz-_iiE4sX-OG7bPan0BWy_pmeSKegjUEUWsjKc94xSDEXhlcawv5kNyAz_BsiarecZvNaIuboqeAGetROrNwway9hqubYq_ztFXlNnrlWGcgM8TLsEpilGcB4OkbdoFk5uH7e2V3R_Fqmh4oiAUOOFph4qPKvsCpn8SOow-LunXSFeJD66xjEPxYo_6J3UUgvY8WKnQEgut-BGJX4O7Uyv-_HwKGegsO1C-IRkaEpAO_YbJZYg9vYhRrZgA=w664-h442-no"&gt;&lt;/p&gt;
&lt;p&gt;The Afghan side of the river has only a narrow dirt road running along
the mountain side. There were few signs of habitation there, just some
goats and the occasional Afghan on a horse or walking with a donkey. Our
side was not much different however, there were only a few (abandoned)
buildings along our dirt road, which sometimes ran along the river bank
and sometimes along a steep crumbling cliff side with the river far
below. We met only a single person, probably a soldier walking from the
remote checkpoint at the pass, a good two-day walk to Ratm, the nearest
village. Near Ratm, suddenly green fields appear in the rocky valley,
plowed by farmers using oxen and old tractors. The dry soil was
irrigated through a system of simple canals that divert water from
nearby mountain streams. While the people of the high mountains were
traditionally Kyrgyz shepherds, the people in the lower valleys speak
Tajik (a Persian language) and look more Afghan in their features and
clothing.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/pPKeAtyCkyubVImk78dfTBru7SwNM7Un8vuQVb-26CJl3c0HmmY9pdg0zv2CsEZ7DHr4JiVTdUKRicyFUTT-ZWw3S5DcP35VJoi_0kyBdoprN9Z58ctqCpc_aqOA7S2bvknzcr2ZZ0P58ttThB1W6KbiTiRWrqyRMgUPaMaQ9kNFPTrVaTfn1Geypx0u8ZHsDdN2JBPrl0nltNhCcGHuBDngAyg0jZ8VTd_mZFOZYqJJKD2JAu4sduBinQkwCp61PODR2DGJhf33SHVp3jHMmzuIM_3FxUVRdiokklfjib5KUy16AgFvDlXtkiADsPrbx2oVves8XcnXGQe3vx6nR-lD6S83NGBMaHTmgkCe-E_02ZECJhvkv2ojvCWRvk8UPmBr55xL7Z5aDBSo9_6V-KZqKWc9cNv8UH8Gommkq_74o_2SwkTY1eMA7n79oMWD4xRWr7R9MLeR7-Uij7CAG6eN1WFDT-bbKzMlpA-tGuRAb2-tITCrFr0pe2jweyFLUKpdjfs20u0QFunNev7caj9WBiq23loL8pS7zSUr0l-JMHaAj4ZbcdDU2UaLhHjv4mBKK9mCF0d-xcEnNCf12I9Om8XzjdTwYfwwe-1ah9YIADWFZpqz_Z9mL2aVExXXSMfab4stJPQ5ZundBpPJ_WHZpXawjpWyTwUo3QiC9w=w606-h454-no"&gt;&lt;/p&gt;
&lt;p&gt;We spent two days in the lovely town of Langar. Spring had only just
started in the valley, so fruit trees were flowering, green leaves just
started to appear and everywhere we saw newborn lambs, calves and baby
goats. On the lower slopes of Peak Karl Marx and Peak Engels we met two
old shepherd ladies, guiding their flock among the rocky terrain. One of
them was hand-spinning yarn from the wool of her animals. Trade routes
ran through these valleys in ancient times, and the remains of several
forts and temples can still be seen on the mountain slopes, overlooking
the valley in strategic places. One of these forts is actually still
used by the Tajik army to guard the border with Afghanistan, near the
town of Ishkashim. However, the young border guards were very friendly
and gladly showed us around the ruins, on the condition that we didn&amp;rsquo;t
take any pictures of &amp;ldquo;military installations&amp;rdquo;. Apart from a small
barrack, an outside cooking stove and an antenna array, we failed to see
any military installations. There was one mysterious structure with
lines on the ground, which we thought might be some kind of helicopter
pad, but turned out to be a volleyball field.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/jGlQTYatsUE3BPPa9wq9czxB3lAQ6cofTMoicBum2AQ8sZfzK27_-KhRQTME59i2wtDsk7v4QZy_1OEGhBAaKQ5NXY8O-qIKdWf-efZe9IKgxE91QE8kCSIboL_rx0lGC856f2YGkJAcgdaWiCBh61IsVAdjJ9ZU826JE1cxWnCocY9KyRwDitQzNZo5XnDCgVeNxzY-RjW_tM76-A-iLugXL5kUlKf3EXMTlnAwruNqkp_63mAnQ6Aoe6q_0MZaHP3IvVDjfJH6OWKRUAeP8FA-SDWq_oBeuoVZBZ3bSg5NNJ_8ieEpsv--rGnqJ74UDjqDfAI6U-BWkQtZ5djfugn3-c6oF4tbdVJlxUPCvUkj1YE8ogT_BGBd5gwDwACg6kakMdhc7XVtx5e0SgdwB-RRUJ9RjLq4JrCswLCcEzbtibzj1pSaryOhcScp-SB1BKqHPXhVzeRBbECa1N3g01njwsco2vqsgdiSAoL4b1KwsL0N8yOnRTksa3c2oeLhcSBdIds_cfnQxRfM2MQsHRoknivh6PYNrzRW8dHTvwdJFq5cdmCBWW_wefvf_zkmkJwDRIPG0tNytwDJxgy6MMWJ1cEjkRgoTpYpuJwhvivvQhfXA7M6ywKI02OJfes7jpiqlW0c1dcvvIh4sIBz2O3qebJMM2CzfzFxZYPNsA=w1024-h315-no"&gt;&lt;/p&gt;
&lt;p&gt;Our guesthouse in Ishkashim was next to a police station, which featured
a large machine gun on the roof. As we found out later, there had been
fighting between the Taliban and Afghan forces several days earlier,
some distance from the border. This is probably why Ishkashim has a
strong army presence, and official buildings are well-guarded. We had
hoped to visit the Afghan market on an island in the river, between both
countries, but it turned out that the market was closed for safety
reasons, and it had been for three years.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/_kMny1JzTzbMfGSXcF_jRmZzmXE4owUYAeJtzResKlbasc4Lfk3K6rf-VwJsE97GKpfwZ9mzaFdgGTvlyiMQQxJA50kiE0k26IloYk-DtoXiKR4mW_qLDafua219QiXcs8YVcyMmHMCSN9uY1KXSQLyoEzx5WB_ZLzLlRC7cNNUwlXc4HP9uT2HUWnFCHkJ75rfA60g6gUYaLX1LWwm5EKzwagszI4dZyXxLCpczQ2jclOYvGntgNOey4qgJDagmxL8wsTNC4P95PmOoXXzawJHU5jpgxtbnKADQYIYhVJcDixzWt6dMzO6bgjovaq-Lj38uz10MXJQakRnKXJoYPcb0NxzUiQKc9WU3q25S8C5b-E098BMS-dddRAcJ8QD6J6IAV0JatWXwEhnyArTM6ZEOtWvLnM4Hr1iASbDncMZj3nyiMMXsDEzZHRxtqpmE7ln450zZyKF2ajJZlDuLFIYSMLa7MrFQZ1zKZAF226bF5-5ZL4-K0Sl3OE0mXehvKBqepo5owPjwe1VHo1NFrHGKLaZb-Z7N0gle-nodWA8vsXVPYYsVNhVR7oGnQXHJWsb8nHKTThiKUDuC8uLOw_MtvlwtTqDZ-LDIAoLjAhiiOSbrMN6sfxsxw69mHCUbnM2vL2CtMdFXeFGbe27LBoyBZgAYaNLmVfzBxglqjw=w606-h454-no"&gt;&lt;/p&gt;
&lt;p&gt;The rest of our journey through the Pamir region followed the Panj-river
northward, over increasingly bad roads as the amount of traffic
increased. Large Chinese-built container trucks crawl up the hills from
the capital Dushanbe over the narrow unpaved road to Khorog, and from
there to Murghab and Ishkashim. The many trucks and frequent landslides
don&amp;rsquo;t really contribute to the quality of the road, or the comfort of
the journey. But at least there is a road. On the Afghan side of the
river there were still few cars, and on some sections road workers were
hacking out a path through the rocks with pneumatic hammers, a task that
looked like it could take at least several years of hard work to
complete. Toward Dushanbe, the Tajik roads at least get better. Road
workers there were busy constructing concrete walls to protect against
landslides. However, a few hundred meters beyond, large sections of the
newly constructed wall had already been destroyed by said landslides. I
guess in the end, the mountain always wins.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://lh3.googleusercontent.com/K09jsZ5lEmoXpiU-lgxNnk-eo566ejAK3wQeBvMBrCX-NNdrRhmpcoriVzTvIKCMiwov6W8CTldDSMrZVjwT70yjKOXi66_512UnzfcZ1Ak4wlkH4yF3ghj6x8qHfYbUgn-MMhV2nNjTwPNKPk-UzcuLWbd_Q5FimU_ygObDGr8eqZmz37m2z_8wpYannbr85ASRYnNAHMISnre8nnnnwJWPVpQSIPUlMBj-TWZ7PFNG40tVNamffUusjp1hZBRvglNK-Lfer3Gzjmao3aLZSiqLdtx_BlzNDbT2EQXs3WeL373xhGTpuDj8gNFm21PYbn4Ek0NIpkVvrYfnMxDnjKmxKs_bMPcChgQXAz5ctdv8G-XOo6_gHTtiJhKSBLcbitdnhep8CDnk8bav9ilLJ6G8Tptl8K7DnzQoCTST_OP_pMy0bWSQpUqE2_1PWOJB49ouJeaulNEIGcVeY-eYKJra1-SOsXVFlft7DUMeIqVKPuTw4gBAHlA5Zy8zzEmCqd6t3MYx1B5M5vzrGshcieSumFsY48WF1kr5EiKxhEOB7KSE8Vqcxsxo2tjOts16jAWk5gRvJV_Y03POu3blXzPOBz3XvuFKQnyfp4vn7aqAqKIlQC1nIAo0V58dsTtB7AVjT2hhAWiC8dEsJs_YkDLwD5a-zZU65Kj-0YQnWg=w606-h454-no"&gt;&lt;/p&gt;</content><category term="misc"></category><category term="blog"></category></entry><entry><title>CO2 and (the average) you</title><link href="//gnuritas.org/co2footprint.html" rel="alternate"></link><published>2016-04-22T00:00:00+02:00</published><updated>2019-05-05T16:32:58+02:00</updated><author><name>Levien van Zon</name></author><id>tag:gnuritas.org,2016-04-22:/co2footprint.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;By Levien van Zon&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This article was published on &lt;a href="http://sustainsubstance.org/co2footprint.html"&gt;The Substance of Sustainability&lt;/a&gt; and &lt;a href="http://www.duurzaamheidsweb.nl/co2footprint.html"&gt;in Dutch on Duurzaamheidsweb&lt;/a&gt;. It is also available as &lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20160422-co2_and_the_average_you.pdf"&gt;PDF&lt;/a&gt; or ebook (&lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20160422-co2_and_the_average_you.epub"&gt;EPUB&lt;/a&gt; and &lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20160422-co2_and_the_average_you.azw3"&gt;Kindle&lt;/a&gt;) for offline reading.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Today, on Earth day, &lt;a href="http://www.un.org/sustainabledevelopment/blog/2016/04/what-exactly-is-going-to-happen-at-the-climate-signing-ceremony-on-22-april/"&gt;countries will start signing the Paris climate treaty&lt;/a&gt; that was reached last December by the representatives of 195 countries. A lot has already been said and written about this Paris Agreement, which in 2020 should succeed the venerable 1997 Kyoto protocol.&lt;sup id="fnref:cop21"&gt;&lt;a class="footnote-ref" href="#fn:cop21"&gt;1&lt;/a&gt;&lt;/sup&gt; 
While the agreement is a great step forward, we&amp;rsquo;re certainly not there yet. There&amp;rsquo;s a lot of work ahead for governments, civil society and the private sector. The key to controlling global warming basically lies in &lt;a href="http://www.theguardian.com/commentisfree/2015/dec/16/new-form-climate-denialism-dont-celebrate-yet-cop-21"&gt;keeping government-owned fossil fuel reserves in the ground, and halting the exploration of new reserves by private …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;By Levien van Zon&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This article was published on &lt;a href="http://sustainsubstance.org/co2footprint.html"&gt;The Substance of Sustainability&lt;/a&gt; and &lt;a href="http://www.duurzaamheidsweb.nl/co2footprint.html"&gt;in Dutch on Duurzaamheidsweb&lt;/a&gt;. It is also available as &lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20160422-co2_and_the_average_you.pdf"&gt;PDF&lt;/a&gt; or ebook (&lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20160422-co2_and_the_average_you.epub"&gt;EPUB&lt;/a&gt; and &lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20160422-co2_and_the_average_you.azw3"&gt;Kindle&lt;/a&gt;) for offline reading.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Today, on Earth day, &lt;a href="http://www.un.org/sustainabledevelopment/blog/2016/04/what-exactly-is-going-to-happen-at-the-climate-signing-ceremony-on-22-april/"&gt;countries will start signing the Paris climate treaty&lt;/a&gt; that was reached last December by the representatives of 195 countries. A lot has already been said and written about this Paris Agreement, which in 2020 should succeed the venerable 1997 Kyoto protocol.&lt;sup id="fnref:cop21"&gt;&lt;a class="footnote-ref" href="#fn:cop21"&gt;1&lt;/a&gt;&lt;/sup&gt; 
While the agreement is a great step forward, we&amp;rsquo;re certainly not there yet. There&amp;rsquo;s a lot of work ahead for governments, civil society and the private sector. The key to controlling global warming basically lies in &lt;a href="http://www.theguardian.com/commentisfree/2015/dec/16/new-form-climate-denialism-dont-celebrate-yet-cop-21"&gt;keeping government-owned fossil fuel reserves in the ground, and halting the exploration of new reserves by private companies&lt;/a&gt;. This is possible, but not exactly trivial given the huge economic interests involved and the significant challenges inherent in transitioning to a new energy system. &lt;/p&gt;
&lt;p&gt;&lt;a href="/co2.html"&gt;In an earlier article&lt;/a&gt; I described why it is important to reduce the emission of greenhouse gasses such as CO&lt;sub&gt;2&lt;/sub&gt;, even if you&amp;rsquo;re sceptical about the warnings of an impending climate apocalypse.&lt;sup id="fnref:co2importance"&gt;&lt;a class="footnote-ref" href="#fn:co2importance"&gt;2&lt;/a&gt;&lt;/sup&gt; Recognising that something should probably be done to reduce emissions is an important step, one that our governments finally seem to have taken. But the more difficult problem is really: how do we do that? Reducing greenhouse gas emissions is much easier said than done. For the most part, they are caused by the burning of fossil fuels to meet our energy requirements. If we want to reduce these emissions, we will need two things: alternative energy sources and more efficient use of energy.&lt;sup id="fnref:energy"&gt;&lt;a class="footnote-ref" href="#fn:energy"&gt;3&lt;/a&gt;&lt;/sup&gt; Governments will no doubt play an important role in reducing emissions, but the role of citizens and companies will probably be at least as important, if not more so.&lt;/p&gt;
&lt;p&gt;An average person exhales roughly a kilogram (2.2 lbs) of CO&lt;sub&gt;2&lt;/sub&gt; per day.&lt;sup id="fnref:farts"&gt;&lt;a class="footnote-ref" href="#fn:farts"&gt;4&lt;/a&gt;&lt;/sup&gt; On top of that however, our activities are responsible for the emission of a lot more CO&lt;sub&gt;2&lt;/sub&gt; and other greenhouse gasses. For instance, my home country of The Netherlands is a relatively wealthy Western European country, with a high standard of living, and therefore a high energy requirement. In fact, the activities of an average Dutch person cause the equivalent of around &lt;strong&gt;46 kilograms&lt;/strong&gt; (100 lbs) of CO&lt;sub&gt;2&lt;/sub&gt; to be emitted every day! This is more than our &lt;a href="http://statline.cbs.nl/Statweb/publication/?DM=SLNL&amp;amp;PA=81565NED&amp;amp;D1=3-4,6&amp;amp;D2=a&amp;amp;D3=5&amp;amp;D4=0&amp;amp;D5=34&amp;amp;HDR=G1,T&amp;amp;STB=G2,G4,G3&amp;amp;VW=T"&gt;average body weight&lt;/a&gt; every two days. In some cases we emit this CO&lt;sub&gt;2&lt;/sub&gt; directly, for instance when burning gasoline, diesel or natural gas in our car or heating system. Sometimes someone else emits it for us, some distance away, for instance if we use electricity or take a plane. Very often however, our emissions are indirect, and often even occur outside of our own country. This happens when we buy things that cost energy to produce. Sometimes &lt;em&gt;a lot of&lt;/em&gt; energy, as we shall see.&lt;/p&gt;
&lt;p&gt;The figure below shows the daily greenhouse gas emission for an average consumer in the Netherlands (click on the figure for more details):&lt;/p&gt;
&lt;div style="display: block; margin: 30px 0; width: 80vw; margin-left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); -o-transform: translateX(-50%); transform: translateX(-50%);"&gt;
&lt;a href="http://sustainsubstance.org/pages/ghg-consumption-nl.html"&gt;
&lt;img src="http://sustainsubstance.org/images/carbon-footprint-consumption-nl.png" alt="greenhouse gas emissions from average consumption in NL"&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;First, I&amp;rsquo;d like to say two things about these numbers. These are &lt;em&gt;estimates&lt;/em&gt;, based on two different studies, done using data from 2000 and 2001. These numbers are &lt;em&gt;not&lt;/em&gt; exact measurements, and results from various studies rarely match exactly. And yes, the data is 15 years old, unfortunately I could not find more recent numbers at this level of detail. Undoubtedly some things will have changed since the start of the millennium, which would cause some minor shifts in these figures. But I don&amp;rsquo;t expect drastic changes in consumption or emission over this period. More importantly, it doesn&amp;rsquo;t really matter if the numbers are a bit off, as I aim to look at large-scale trends here.&lt;/p&gt;
&lt;p&gt;Another thing to note is that these are numbers for an &amp;ldquo;average Dutch person&amp;rdquo;. This average person, however, does not exist. It is a theoretical construct of indeterminate age and sex, with no clear place of residence. Or to put it another way, the &lt;em&gt;actual&lt;/em&gt; emissions will be different for everyone, and the numbers quoted here will apply to nobody exactly. If you&amp;rsquo;re vegan and do not own a car, your average daily CO&lt;sub&gt;2&lt;/sub&gt;-emission will easily be 10 kg below average. But if you eat meat three times a day and drive around in a big SUV or fly to a different continent four times a year, your emissions can easily be several times the average. &lt;/p&gt;
&lt;p&gt;So within a country, the differences in emission between people can be quite large. But &lt;em&gt;between different countries&lt;/em&gt; the differences can sometimes be enormous. The average American emits one and a half times as much as the average Dutch person. The average Chinese on the other hand causes around five times &lt;em&gt;less&lt;/em&gt; greenhouse-emissions than the average Dutch consumer, even though China, with its enormous population and industry, is often named as the biggest polluter. The reason for this apparent contradiction is simple: Chinese consumers (on average) buy less, travel less and use less energy than those in the West. However, the Chinese industry produces a lot of the stuff we buy. Therefore much of the emission in China &lt;em&gt;as a country&lt;/em&gt; is for making &lt;em&gt;our&lt;/em&gt; consumption goods. The CO&lt;sub&gt;2&lt;/sub&gt; from Chinese factories and power plants is mostly part of &lt;em&gt;our&lt;/em&gt; indirect emissions in the West. The more well-off a country&amp;rsquo;s inhabitants, the more greenhouse gasses are emitted directly and indirectly to support their lifestyle. One average Dutch person emits as much greenhouse gas as 4 Brazilians, 10 people in India or 23 people in Malawi.&lt;/p&gt;
&lt;div style="display: block; margin: 30px 0; width: 80vw; margin-left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); -o-transform: translateX(-50%); transform: translateX(-50%);"&gt;
&lt;a href="http://sustainsubstance.org/pages/carbon-footprint-countries.html"&gt;
&lt;img src="http://sustainsubstance.org/images/carbon-footprint-consumption-countries.png" alt="greenhouse gas emissions from average consumption in various countries"&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;As we can see in the figure above, The Netherlands is fairly representative of rich Western European countries when it comes to greenhouse gas emissions. So, if we assume that being poor is not the preferred way to mitigate climate change, what would be the most effective way to reduce our greenhouse gas emissions? To determine this, it is useful to look at the numbers in a bit more detail. Which things contribute most to our emissions?&lt;/p&gt;
&lt;p&gt;In the above figures, I have divided consumption-related emissions into five main categories. Generally the smallest of these represents the emissions from constructing houses and other buildings. This is a bit misleading, as constructing a building (and producing all its components) actually requires an &lt;em&gt;enormous&lt;/em&gt; amount of energy. But most people have only one house, which lasts at least a few decades and is usually shared with other people. This is why the emissions associated with &lt;strong&gt;construction&lt;/strong&gt; &lt;em&gt;per person per day&lt;/em&gt; are fairly small: 3 kg for someone in The Netherlands, even though this is still more that the &lt;em&gt;total&lt;/em&gt; daily greenhouse gas emissions of someone in Malawi!&lt;/p&gt;
&lt;p&gt;When people talk about saving energy or installing solar panels, a lot of attention is given to the direct usage of electricity in buildings. But actually our &lt;strong&gt;home electricity use&lt;/strong&gt; tends to make only fairly small contribution to our total greenhouse gas emissions (for an average Dutchman less than 3 kg per day). Heating actually has a bigger impact. In The Netherlands, buildings predominantly use &lt;strong&gt;natural gas for heating&lt;/strong&gt; rather than electricity, and this provides for an emission of almost 4 kg CO&lt;sub&gt;2&lt;/sub&gt;-eq. per person per day. Taken together, the direct energy use of Dutch households (gas + electricity) generates almost a sixth of Dutch greenhouse gas emissions, or ±6.5 kg per person per day.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mobility&lt;/strong&gt;, especially road and air traffic, contribute around the same order of magnitude as our housing. In The Netherlands, mobility is responsible for 9 kg CO&lt;sub&gt;2&lt;/sub&gt;-eq. per person per day, around a fifth of the total emissions. The figure below shows the source of some of these in more detail for 2010/2012 (click on the figure for more details):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sustainsubstance.org/pages/transport.html"&gt;&lt;img alt="greenhouse gas emissions by transport" src="http://sustainsubstance.org/images/carbon-footprint-transport-nl.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We should note that the contributions of especially air traffic and transport of goods are underestimated here, because only traffic within the country counts in this figure. Nonetheless, you can clearly see that &lt;strong&gt;air travel&lt;/strong&gt; contributes significantly (probably more than 2 kg), but that &lt;strong&gt;cars&lt;/strong&gt; contribute even more to emissions (almost 3.5 kg). Emissions from public transport on the other hand are almost negligible. Commuting and private car-use emit about as much as electricity use at home does. And this is despite the fact that only around half of land-based travel in the Netherlands is by car.&lt;sup id="fnref:nltransport"&gt;&lt;a class="footnote-ref" href="#fn:nltransport"&gt;5&lt;/a&gt;&lt;/sup&gt; Compared to other European countries, a relatively high percentage of Dutch people travel mainly with public transport or on bicycle. The average emission figures actually include a lot of people that either have no car or hardly use their car, so the daily emission &lt;em&gt;per car driver&lt;/em&gt; will certainly be higher than 3.5 kg!&lt;/p&gt;
&lt;p&gt;Construction, direct energy use and mobility together are responsible for just under half of the Dutch greenhouse gas footprint. The other half is due to the remaining two categories. One bears the somewhat mysterious title &amp;ldquo;services &amp;amp; trade&amp;rdquo;, and includes things like infrastructure and the things we do and use outside our homes, in as far they do not fit in the other categories. For most of us, these are mainly the things we do at &lt;strong&gt;work&lt;/strong&gt;, and our use of &lt;strong&gt;public services&lt;/strong&gt; such as hospitals, schools, government services, universities, roads and public lighting. All in all these things cause about a quarter of our greenhouse gas emissions. And unfortunately we have little control over this category, with the possible exception of the things you do at work. &lt;/p&gt;
&lt;p&gt;However, the remaining category covers many things we &lt;em&gt;can&lt;/em&gt; control: Roughly a quarter of the CO&lt;sub&gt;2&lt;/sub&gt;-emission of European consumers comes from making the stuff we consume. The largest part of this is for &lt;strong&gt;food and drink&lt;/strong&gt;, around 9 kg CO&lt;sub&gt;2&lt;/sub&gt;-eq. per person per day in The Netherlands. More than a third of this is for producing animal protein: things like meat, fish, eggs and milk products. Of course the reason why food contributes so much to our daily emissions is that everyone needs food on a daily basis. Other &lt;strong&gt;consumption goods&lt;/strong&gt; like clothes and electronics often require more energy to produce, but we simply buy such things less often. So it follows that an obvious way to reduce your CO&lt;sub&gt;2&lt;/sub&gt;-emissions is by simply buying less stuff, especially buying less &lt;em&gt;new&lt;/em&gt; stuff.&lt;/p&gt;
&lt;p&gt;Because it&amp;rsquo;s not so easy to think in averages, it&amp;rsquo;s good to see how much greenhouse gas is emitted by individual products and activities (click on the figure for more details):&lt;/p&gt;
&lt;div style="display: block; margin: 30px 0; width: 80vw; margin-left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); -o-transform: translateX(-50%); transform: translateX(-50%);"&gt;
&lt;a href="http://sustainsubstance.org/pages/ghg-products.html"&gt;
&lt;img src="http://sustainsubstance.org/images/carbon-footprint-products-nl.png" alt="greenhouse gas emissions for consumption goods and activities"&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Here the same caveats apply: these are not exact figures, and estimates for emission will vary between studies, between products and between countries. But again, it&amp;rsquo;s the large-scale patterns that are important.&lt;/p&gt;
&lt;p&gt;For most of us, this figure will contain a few surprises. The emissions from public transport, taking a shower or using electricity are perhaps surprisingly small. On the other hand, things like paper, cheese and food or flowers grown under glass have an unexpectedly large emission footprint. Most people will not be very surprised by the fact that meat, shrimp and driving a car all have a relatively large carbon-footprint. The contribution of driving however depends very much on the size of the car (and its speed, but that is not shown here). And many people probably wouldn&amp;rsquo;t guess that, as a passenger, we emit roughly the same amount per kilometre when we fly as when driving an average car. But because we generally travel much longer distances when we fly, one trip by plane will have a large impact on our emission figures. However, the impact of an intercontinental trip is dwarfed by the amount of CO&lt;sub&gt;2&lt;/sub&gt; released when making a new car. Buying a car has a huge impact, even if no-one ever drives in it, especially if the car in question is big and luxurious. Finally, because our first two figures use data from 2000/2001, they may somewhat underestimate the current contribution of electronics devices. As an example, producing one computer emits roughly as much CO&lt;sub&gt;2&lt;/sub&gt; as 1-3 months&amp;rsquo; worth of food, or driving an average car for 12-40 hours.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Roses in a greenhouse, with additional &amp;quot;assimilation lighting&amp;quot;." src="http://sustainsubstance.org/images/storage/rose-greenhouse.jpg"&gt;&lt;/p&gt;
&lt;p&gt;And in case you were wondering why roses have such a large climate footprint (relative to many other producs), this is a matter of energy and climate. A single-stem rose takes &lt;a href="http://ageconsearch.umn.edu/bitstream/42312/2/staff369.pdf"&gt;roughly two months&lt;/a&gt; to grow, and it requires additional lighting and heating in winter, when most roses are bought (think Valentines Day!). Although heat pumps and modern LED-lights can significantly reduce energy use in modern greenhouses, a single greenhouse complex easily requires several megawatts of electrical power just to keep the lights on.&lt;/p&gt;
&lt;p&gt;If we want to keep climate warming below 2°C, we will basically have to reduce our direct and indirect emissions to zero within a few decades. This is going to be a real challenge for governments and companies. They will have to figure out where to get sufficient, affordable energy to keep their infrastructure, their transportation, their services and their factories running, and to keep growing their food. This is going to take time. But of course we don&amp;rsquo;t have to sit around waiting, there are plenty of ways in which we can help as individuals. Which lessons can we learn from the above figures, how can we start reducing our carbon footprint as individual consumers and employees? The main categories we can influence directly are consumption goods, mobility and our direct energy use at home and at work. There are several things you should consider, if you want to significantly reduce your greenhouse gas emissions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In many countries, saving energy at home is a high-profile issue. But energy savings at work often receive a lot less attention. In many offices the heating or climate control is turned on night and day, computers are never switched off, and perfectly functional equipment is replaced every few years, even when this is not strictly needed. As we spend a lot of our time at work, our energy use and CO&lt;sub&gt;2&lt;/sub&gt;-emission at work is often higher than at home. Maybe now is a good time to start discussing this in your organisation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you own or regularly use a car, only use it when really necessary. If you live in a country with decent public transport, consider taking the train or the bus to work. Work from home on a regular basis, if your job allows it. For some odd reason it is generally considered normal that employees come to work by car, even in companies that consider themselves &amp;ldquo;sustainable&amp;rdquo;. Likewise, it is generally considered acceptable that we drive several hours just to visit a client or attend a meeting. Such trips easily amount to several hundred kilometres, and the average car emits 20 kg CO&lt;sub&gt;2&lt;/sub&gt;-eq. per 100 km. In other words, driving for 2-3 hours can easily double your greenhouse gas emissions on a given day. The same trip by a combination of train and bus (or folding bicycle), easily emits a factor 5 less carbon and is very doable in countries such as The Netherlands. This has the added advantage that you can work on the train. Of course, using public transport isn&amp;rsquo;t always a viable option for attending meetings. As an alternative, you may want to research the possibilities of conference calls or video conferencing. Current-day technology makes this almost trivial on any laptop, smart phone or tablet.&lt;sup id="fnref:videoconference"&gt;&lt;a class="footnote-ref" href="#fn:videoconference"&gt;6&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For holidays, the distance you travel has a much greater impact than the form of transport you choose. If you do want to travel to far-away places, consider making one longer trip (e.g. a few weeks), rather than several separate short trips. Even better, consider destinations that aren&amp;rsquo;t so far away. And for distances up to a few hundred kilometres, the impact of travelling by train or bus is much less than that of travel by car or plane.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your climate has cold winters and especially if you live or work in an old building, consider investing in insulation and an upgrade of the heating system. Even small modifications can have a large effect on energy use. In some cases you can already save around a third on heating energy by simply closing cracks and gaps, tweaking your central heating and lowering the thermostat by a few degrees when you&amp;rsquo;re in bed or away from home. Such measures can save you a lot of money, with just a few hours of work and almost no material. But if you&amp;rsquo;re able to invest a bit more, insulating your outer walls and ceiling/roof can have a huge impact on your energy bills. If you&amp;rsquo;re putting up a new building, or are planning a renovation, consider insulation as well as floor- or wall-heating. A large heating surface is more efficient and comfortable than using a radiator, and the lower water temperature will make it easier to install a &lt;a href="http://www.withouthotair.com/c21/page_146.shtml"&gt;heat pump&lt;/a&gt; at some point. A heat pump is basically a fridge in reverse: it extracts heat from the ground, water or air outside, and uses this to heat your house or workplace. In theory, a heat pump can be up to 3-4 times more efficient than using natural gas or an electrical radiator for heating&lt;sup id="fnref:heatpump"&gt;&lt;a class="footnote-ref" href="#fn:heatpump"&gt;7&lt;/a&gt;&lt;/sup&gt;, especially when combined with a thermal solar-collector and a heat-buffer. Moreover, a heat-pump can also function as a cooling-system in summer. &lt;br&gt;
For older buildings where floor-heating and heat pumps are not an option, &lt;a href="http://www.lowtechmagazine.com/2015/03/local-heating.html"&gt;local heating&lt;/a&gt; with &lt;a href="http://www.lowtechmagazine.com/2015/03/radiant-and-conductive-heating-systems.html"&gt;thermal infra-red panels or similar systems&lt;/a&gt; can be an efficient and comfortable alternative.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you own your roof, consider placing solar panels. A solar photo-voltaic (PV) installation usually pays back its investment costs within 5-12 years or so (the payback time varies greatly between countries), while it will produce power for 20-30 years. Even better, consider placing a thermal solar collector as well, or a install a hybrid system that can produce both electricity and heat. If you do not have the funds to invest in a PV-installation, you could consider leasing one (through companies such as &lt;a href="https://www.sungevity.com"&gt;Sungevity&lt;/a&gt;). If you do not own your roof, you could consider joining an energy cooperation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Don&amp;rsquo;t buy things you don&amp;rsquo;t need. This may sound obvious, but check with yourself how many of the things you bought recently (for yourself, your family or for work) were things that you &lt;em&gt;really&lt;/em&gt; needed. If you do need (or would &lt;em&gt;like&lt;/em&gt; to have) something, try checking first if you can get it second-hand. And if you do buy something new, you may want to consider product quality and expected life span. Sometimes you end up spending a lot less in the long run if you buy something that is a bit more expensive, but of higher quality. Cheap things tend to be cheap for a reason, and quite often something is cheap because the quality of the materials and the construction isn&amp;rsquo;t very good. Low-quality products won&amp;rsquo;t last very long and need replacing more frequently. This applies to items such as shoes and bags, but also to electronics equipment and mechanical devices such as washing machines and bicycles. If you cannot assess the product quality yourself, try asking someone who can, or check out some reviews. If you buy devices that use energy, their energy efficiency is as important as their life span. More efficient devices tend to be a bit more expensive as well, but may save you a lot of money in the long run. This applies to things such as refrigerators, freezers, heaters, washing machines, dryers, lamps and especially cars. When selecting a car, remember that a small, light vehicle will require significantly less energy (to build and run) than big and heavy vehicles. Moreover, electrical vehicles tend to be more energy-efficient than comparable vehicles with a combustion engine.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Eat less meat. You don&amp;rsquo;t immediately have to become a vegetarian or vegan&lt;sup id="fnref:vega"&gt;&lt;a class="footnote-ref" href="#fn:vega"&gt;8&lt;/a&gt;&lt;/sup&gt;, but it certainly doesn&amp;rsquo;t hurt to eat a meal without meat every once in a while. If you don&amp;rsquo;t know how to cook a nice vegetarian meal, try looking up some good recipes, or talk to a vegetarian who cooks well. Another option is to simply reduce the portions of meat you use, or replace part of it with alternative products. In fact, most people will hardly notice if you replace half a portion of minced meat or factory-farmed chicken by a decent, vegetable-based product. My own experience with eating less meat is that after a while, you really start to enjoy both cooking a good vegetarian meal and occasionally eating a meal with good-quality meat. It&amp;rsquo;s a win-win situation, although of course your mileage may vary. Just give it a serious try!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Buy fewer products out-of-season. Especially in cold climates, a lot of food is imported, and a lot of energy is wasted on growing vegetables in greenhouses during the winter months. Greenhouses are great at capturing light and providing a controlled environment, but they tend to be very badly insulated and in winter they require artificial heating and lighting. If certain fruits and vegetables can&amp;rsquo;t be grown outside in season, then it may actually be better to buy frozen or canned products, or to look for alternatives. This applies especially to soft fruit and leafy vegetables that do not keep well and are hard to transport.   &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Produce less waste. Instead of throwing something away, try selling it, give it away, eat it&lt;sup id="fnref:foodwaste"&gt;&lt;a class="footnote-ref" href="#fn:foodwaste"&gt;9&lt;/a&gt;&lt;/sup&gt;, bring it to a second-hand store, recycle it where possible, but don&amp;rsquo;t throw it in the general trash unless you have no good alternative. In most countries, municipal waste is either burned or used as landfill. Both disposal methods tend to produce a lot of greenhouse-gas emissions, while (at least in principle) a modern society should hardly have to produce any rest-waste. Most of what we consider &amp;ldquo;waste&amp;rdquo; is actually a mix of high-grade resources, which can be used in producing all kinds of new products. Metals are a well-known example, but also plastics can be seen as a concentrated source of carbohydrates, glass is basically silicon, paper provides cellulose and organic waste contains all kinds of valuable nutrients, not to mention energy. Reusing these &amp;ldquo;waste&amp;rdquo;-materials can sometimes save a considerable amount of energy in producing new products. Moreover, everything you give away or sell second-hand, won&amp;rsquo;t have to be bought new by someone else.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Last but not least, do you feel that your work does not make a positive contribution to society? Consider looking for a different job.&lt;sup id="fnref:work"&gt;&lt;a class="footnote-ref" href="#fn:work"&gt;10&lt;/a&gt;&lt;/sup&gt;. The government, the service-sector and the private companies are responsible for much of our emissions, and we want them to start changing the world for the better. But in the end, governments, companies and other institutions are all run by us. There is such a thing as &amp;ldquo;the system&amp;rdquo;, but you should never forget that you&amp;rsquo;re a part of it, and therefore you can help change it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Interested in more articles? Follow us &lt;a href="https://www.facebook.com/sustainsubstance"&gt;on Facebook&lt;/a&gt;, on &lt;a href="https://twitter.com/levienvanzon"&gt;Twitter&lt;/a&gt;, or subscribe to our &lt;a href="https://groups.google.com/d/forum/sustainsubstance"&gt;mailing list&lt;/a&gt; or &lt;a href="/feeds/all.atom.xml"&gt;Atom-feed&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Footnotes:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:cop21"&gt;
&lt;p&gt;&lt;em&gt;A lot has already been said and written about this Paris Agreement, which in 2020 should succeed the venerable 1997 Kyoto protocol.&lt;/em&gt; &lt;br&gt;
&lt;a href="http://www.theguardian.com/environment/cop-21-un-climate-change-conference-paris"&gt;The Guardian&lt;/a&gt; has provided excellent coverage of and commentary on the Paris talks and the resulting agreement. Read their &lt;a href="http://www.theguardian.com/global-development/2015/dec/15/climate-change-deal-five-reasons-glad-five-reasons-gloomy"&gt;5 reasons to be glad, 5 to be gloomy&lt;/a&gt; for a short summary. While &lt;a href="http://www.theguardian.com/environment/2015/dec/12/james-hansen-climate-change-paris-talks-fraud"&gt;James Hansen&lt;/a&gt; and &lt;a href="http://www.theguardian.com/environment/georgemonbiot/2015/dec/12/paris-climate-deal-governments-fossil-fuels"&gt;George Monbiot&lt;/a&gt; see the Paris agreement as grossly insufficient, others have pointed out that it represents a &lt;a href="http://www.theguardian.com/environment/2016/jan/17/paris-climate-deal-flame-of-hope-diplomacy-christiana-figueres"&gt;flame of hope&lt;/a&gt;, that &lt;a href="http://www.theguardian.com/environment/2016/jan/16/rapid-switch-to-renewable-energy-can-put-paris-climate-goals-within-reach"&gt;its goals can be reached if governments and the private sector increase energy efficiency and scale up renewable energy to 36% by 2030&lt;/a&gt;, and that the agreement at least provides a &lt;a href="http://www.theguardian.com/commentisfree/2015/dec/13/paris-climate-talks-15c-marathon-negotiating-physics"&gt;reason to run harder&lt;/a&gt;.&amp;#160;&lt;a class="footnote-backref" href="#fnref:cop21" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:co2importance"&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="/co2.html"&gt;In an earlier article&lt;/a&gt; I described why it is important to reduce the emission of greenhouse gasses such as CO&lt;sub&gt;2&lt;/sub&gt;.&lt;/em&gt; &lt;br&gt;
The effects of having more CO&lt;sub&gt;2&lt;/sub&gt; in the atmosphere are hard to predict, and the effects of more CO&lt;sub&gt;2&lt;/sub&gt; in surface waters are almost certainly negative. It is fairly certain that more heat is being retained by the climate system, but the effect of this will vary by region, and is partially still unknown, which in itself is a problem. It is certain however that this extra heat is &lt;a href="http://www.nytimes.com/2015/11/03/science/global-warming-pacific-ocean-el-nino-blob.html"&gt;a big problem for life in the oceans&lt;/a&gt;. And as example of possible nasty surprises, the climate in Europe may actually cool down due to global warming, as the melting ice of Greenland may &lt;a href="http://www.vox.com/2015/3/23/8277345/atlantic-overturning-circulation"&gt;slow down the gulf stream&lt;/a&gt; in the Atlantic Ocean.&amp;#160;&lt;a class="footnote-backref" href="#fnref:co2importance" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:energy"&gt;
&lt;p&gt;&lt;em&gt;If we want to reduce these emissions, we will need two things: alternative energy sources and more efficient use of energy.&lt;/em&gt; &lt;br&gt;
There are alternative sources of energy, but their contribution is currently very small. Globally, solar, wind and geothermal energy contribute around 1% to the &lt;a href="/co2.html#fn:worldenergy"&gt;global human energy supply&lt;/a&gt;. Fossil fuels, by comparison, contribute around 80% globally, and over 90% in countries such as &lt;a href="http://statline.cbs.nl/Statweb/publication/?DM=SLNL&amp;amp;PA=7516&amp;amp;D1=0-1&amp;amp;D2=0-2,5-6,10,14,22,26&amp;amp;D3=0&amp;amp;D4=l&amp;amp;HDR=T,G2&amp;amp;STB=G1,G3&amp;amp;VW=T"&gt;the Netherlands&lt;/a&gt;. The role of renewable energy sources is increasing fast, but a lot of technical and social problems still need to be overcome if solar and wind power are to contribute significantly to the global human energy supply. A realistic expectation is that fossil fuels will continue to play an important role for at least the coming decades, although this role will probably decrease over time. Because we cannot simply cease being dependent on fossil fuels to some extent, it is important to use the available energy more efficiently. Luckily there is enormous scope for improvements in energy-efficiency. Even with existing technologies and methods, the way we heat and cool our buildings, the way we power our transport and the way we produce food can be made much more efficient, provided that we start using better technologies and methods on a large scale.&amp;#160;&lt;a class="footnote-backref" href="#fnref:energy" title="Jump back to footnote 3 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:farts"&gt;
&lt;p&gt;&lt;em&gt;An average person exhales roughly a kilogram (2.2 lbs) of CO&lt;sub&gt;2&lt;/sub&gt; per day.&lt;/em&gt; &lt;br&gt;
This is roughly 1.6% of our &lt;a href="https://en.wikipedia.org/wiki/Human_body_weight"&gt;average body weight&lt;/a&gt;. Apart from CO&lt;sub&gt;2&lt;/sub&gt;, we humans also emit small amounts methane directly, as a result of &lt;a href="https://en.wikipedia.org/wiki/Flatulence#Production.2C_composition.2C_and_smell"&gt;flatulence&lt;/a&gt;. While methane is a stronger greenhouse gas than CO&lt;sub&gt;2&lt;/sub&gt;, the amount we emit in our daily farts is almost negligible: roughly &lt;a href="https://www.ncbi.nlm.nih.gov/pubmed/9176210"&gt;6%&lt;/a&gt; of a litre, which comes down to a fraction of a gram per person per day.&amp;#160;&lt;a class="footnote-backref" href="#fnref:farts" title="Jump back to footnote 4 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:nltransport"&gt;
&lt;p&gt;&lt;em&gt;only around half of land-based travel in the Netherlands is by car.&lt;/em&gt; &lt;br&gt;
Statistics on car ownership and use in The Netherlands in 2010 can be found in the CBS-publication &lt;em&gt;Sociaaleconomische trends, 1e kwartaal 2012&lt;/em&gt;, chapter &lt;em&gt;&lt;a href="http://www.cbs.nl/NR/rdonlyres/69B7DBF3-BA02-4B1F-90D0-40F362C6C4E1/0/2012k1v4p34art.pdf"&gt;Personenautobezit van huishoudens en personen&lt;/a&gt;&lt;/em&gt;. The &lt;a href="http://statline.cbs.nl/Statweb/publication/?DM=SLNL&amp;amp;PA=37856&amp;amp;D1=0-3,5&amp;amp;D2=0&amp;amp;D3=0&amp;amp;D4=2,5,12-22&amp;amp;HDR=G1&amp;amp;STB=G2,T,G3&amp;amp;VW=T"&gt;StatLine&lt;/a&gt; database shows that in 2007, 84% of Dutch people owned a bicycle, 63% had a drivers&amp;rsquo; license and 45% owned a car.&amp;#160;&lt;a class="footnote-backref" href="#fnref:nltransport" title="Jump back to footnote 5 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:videoconference"&gt;
&lt;p&gt;&lt;em&gt;you may want to research the possibilities of conference calls or video conferencing. Current-day technology makes this almost trivial on any laptop, smart phone or tablet.&lt;/em&gt; &lt;br&gt;
&lt;a href="https://hangouts.google.com/"&gt;Google Hangouts&lt;/a&gt; is probably the easiest option for video conferencing, as it&amp;rsquo;s free, it handles video, audio, text-based chat and screen-sharing, works for two or more people, and works on almost any device. The only drawback is that it does require a Google-account. Unsurprisingly, many free services are coupled to social networks: &lt;a href="http://www.peer2.me/"&gt;Peer&lt;/a&gt; uses LinkedIn and &lt;a href="http://www.oovoo.com/"&gt;ooVoo&lt;/a&gt; requires Facebook. &lt;a href="http://www.webex.com/"&gt;Cisco WebEx&lt;/a&gt; and &lt;a href="http://www.skype.com/en/business/"&gt;Skype for Business&lt;/a&gt; are targeted specifically toward hosting business meetings. Other options for group-meetings are &lt;a href="http://www.fring.com/"&gt;Fring&lt;/a&gt;, &lt;a href="https://jitsi.org/Projects/JitsiMeet"&gt;Jitsi&lt;/a&gt; and &lt;a href="http://www.viber.com/"&gt;Viber&lt;/a&gt;. For one-to-one meetings, the free version of &lt;a href="http://www.skype.com/"&gt;Skype&lt;/a&gt; works just fine, as does &lt;a href="http://www.apple.com/mac/facetime/"&gt;Facetime&lt;/a&gt; on Apple-devices, or basically any other video chat service. And for meetings where you don&amp;rsquo;t need video, you can just use Skype, or even a plain old phone, smart or otherwise.&amp;#160;&lt;a class="footnote-backref" href="#fnref:videoconference" title="Jump back to footnote 6 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:heatpump"&gt;
&lt;p&gt;&lt;em&gt;A heat pump is basically a fridge in reverse: it extracts heat from the ground, water or air outside, and uses this to heat your house or workplace. In theory, a heat pump can be up to 3-4 times more efficient than using natural gas or an electrical radiator for heating&lt;/em&gt; &lt;br&gt;
Specifically, the theoretical coefficient of performance (COP) of a heat pump can easily be 3-4 times higher than that of other heating devices. A COP of 1 would mean that all the energy you put into a heating device is actually used for heating living spaces. Modern high-performance gas heaters tend to have a COP above 0.85, which means that less than 15% of the heat escapes up the chimney. Modern heat pumps can have a COP above 3, which means that they can actually pump at least three times as much thermal energy as the electrical energy you put in. In practise however, this does not lead to a factor 3 decrease in energy use or CO&lt;sub&gt;2&lt;/sub&gt;-emission. Part of this is due to the fact that electricity is often generated using gas or coal, with 40-70% efficiency. Furthermore, the efficiency of a heat pump goes down if the outside temperature is low and the heat requirement is high. Still, a heat pump tends to be a good long-term investment, as it makes the heating-system of a building less dependent on gas supply and prices, and it allows a heat buffer to be installed. A heat buffer is basically a large mass of water or rock that can be used to store heat in times of abundance (i.e. summer), and extract it when needed (i.e. winter).&amp;#160;&lt;a class="footnote-backref" href="#fnref:heatpump" title="Jump back to footnote 7 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:vega"&gt;
&lt;p&gt;&lt;em&gt;Eat less meat. You don&amp;rsquo;t immediately have to become a vegetarian or vegan&lt;/em&gt; &lt;br&gt;
Of course, with respect to greenhouse gas emissions, general pollution and soil degradation, biodiversity and animal welfare, being vegetarian or vegan is a lot better than eating meat! But what to eat and not to eat is a choice that everyone must make for him- or herself. In The Netherlands, the percentage of vegetarians and vegans combined is around 4.5%. But the percentage of people that choose to skip eating meat on a regular basis is much higher, around 35% (source: &lt;a href="https://www.natuurenmilieu.nl/wp-content/uploads/2015/10/120606_factsheet_flexitariers1.pdf"&gt;fact sheet&lt;/a&gt; and &lt;a href="http://edepot.wur.nl/212318"&gt;report&lt;/a&gt;, LEI 2012).&amp;#160;&lt;a class="footnote-backref" href="#fnref:vega" title="Jump back to footnote 8 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:foodwaste"&gt;
&lt;p&gt;&lt;em&gt;Produce less waste. Instead of throwing something away, try selling it, give it away, eat it&lt;/em&gt; &lt;br&gt;
My grandmother, who had to feed several children during the &amp;ldquo;hunger winter&amp;rdquo; of 1944-1945 in Amsterdam, is one of the people who raised me never to throw away food unless it has really gone off. Therefore I am always shocked when I see people, especially friends, dump large quantities of perfectly edible food into the trash after dinner without giving it a second thought. To me, this is a completely unnecessary waste of good ingredients. Try using leftovers in your next meal, make them into soup, put them in the freezer (this works especially well with rice) or eat them as lunch or even breakfast.&amp;#160;&lt;a class="footnote-backref" href="#fnref:foodwaste" title="Jump back to footnote 9 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:work"&gt;
&lt;p&gt;&lt;em&gt;Last but not least, do you feel that your work does not make a positive contribution to society? Consider looking for a different job.&lt;/em&gt; &lt;br&gt;
One could argue that this measure is actually the one that can make the most difference. But changing your job or even your career will not be easy for most people, which is why I mention it last. This does not mean that you shouldn&amp;rsquo;t give it some serious thought.&amp;#160;&lt;a class="footnote-backref" href="#fnref:work" title="Jump back to footnote 10 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="misc"></category><category term="CO2"></category><category term="climate"></category></entry><entry><title>The future of food: voor rijke consumenten</title><link href="//gnuritas.org/future-of-food.html" rel="alternate"></link><published>2015-10-31T00:00:00+01:00</published><updated>2019-05-03T01:25:43+02:00</updated><author><name>Levien van Zon</name></author><id>tag:gnuritas.org,2015-10-31:/future-of-food.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;Door Levien van Zon&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Dit artikel is gepubliceerd op &lt;a href="http://www.foodlog.nl/artikel/the-future-of-food-voor-rijke-consumenten/"&gt;Foodlog&lt;/a&gt; en &lt;a href="http://duurzaamheidsweb.nl/future-of-food.html"&gt;Duurzaamheidsweb&lt;/a&gt;, en is beschikbaar als &lt;a href="http://duurzaamheidsweb.nl/offline/duurzaamheidsweb-20151031-the-future-of-food.pdf"&gt;PDF&lt;/a&gt; en als e-book (&lt;a href="http://duurzaamheidsweb.nl/offline/duurzaamheidsweb-20151031-the-future-of-food.epub"&gt;EPUB&lt;/a&gt; of &lt;a href="http://duurzaamheidsweb.nl/offline/duurzaamheidsweb-20151031-the-future-of-food.azw3"&gt;Kindle&lt;/a&gt;).
De voetnoten in dit artikel bevatten extra achtergrondinformatie en bronnen, en zijn straffeloos over te slaan of apart te lezen.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Op 15 oktober werd de documentairefilm &lt;a href="http://commerceoftomorrow.com/food"&gt;The Future of Food&lt;/a&gt; gelanceerd, gemaakt in opdracht van PostNL. Het lijkt het eerste deel te zijn van &lt;a href="http://commerceoftomorrow.com/"&gt;Commerce of Tomorrow&lt;/a&gt; een &amp;ldquo;multi chapter documentary&amp;rdquo; over de toekomst van &lt;em&gt;e-commerce&lt;/em&gt;. De introductie spreekt van &amp;ldquo;A conversation with leading voices&amp;rdquo;, en &amp;ldquo;A 360° journey&amp;rdquo;. De makers zeggen: &lt;br&gt;
&lt;em&gt;The world is continually changing and with a population approaching 8 billion, our behaviour needs to change with it. Commerce of Tomorrow is inviting thought leaders to share their vision, their understanding of how we can shape the …&lt;/em&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;Door Levien van Zon&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Dit artikel is gepubliceerd op &lt;a href="http://www.foodlog.nl/artikel/the-future-of-food-voor-rijke-consumenten/"&gt;Foodlog&lt;/a&gt; en &lt;a href="http://duurzaamheidsweb.nl/future-of-food.html"&gt;Duurzaamheidsweb&lt;/a&gt;, en is beschikbaar als &lt;a href="http://duurzaamheidsweb.nl/offline/duurzaamheidsweb-20151031-the-future-of-food.pdf"&gt;PDF&lt;/a&gt; en als e-book (&lt;a href="http://duurzaamheidsweb.nl/offline/duurzaamheidsweb-20151031-the-future-of-food.epub"&gt;EPUB&lt;/a&gt; of &lt;a href="http://duurzaamheidsweb.nl/offline/duurzaamheidsweb-20151031-the-future-of-food.azw3"&gt;Kindle&lt;/a&gt;).
De voetnoten in dit artikel bevatten extra achtergrondinformatie en bronnen, en zijn straffeloos over te slaan of apart te lezen.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Op 15 oktober werd de documentairefilm &lt;a href="http://commerceoftomorrow.com/food"&gt;The Future of Food&lt;/a&gt; gelanceerd, gemaakt in opdracht van PostNL. Het lijkt het eerste deel te zijn van &lt;a href="http://commerceoftomorrow.com/"&gt;Commerce of Tomorrow&lt;/a&gt; een &amp;ldquo;multi chapter documentary&amp;rdquo; over de toekomst van &lt;em&gt;e-commerce&lt;/em&gt;. De introductie spreekt van &amp;ldquo;A conversation with leading voices&amp;rdquo;, en &amp;ldquo;A 360° journey&amp;rdquo;. De makers zeggen: &lt;br&gt;
&lt;em&gt;The world is continually changing and with a population approaching 8 billion, our behaviour needs to change with it. Commerce of Tomorrow is inviting thought leaders to share their vision, their understanding of how we can shape the future we envision. Please join the conversation. Together we can make a difference. PostNL and Present Plus present: &lt;a href="http://commerceoftomorrow.com/food"&gt;The Future of Food&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;iframe src="https://player.vimeo.com/video/142278154" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;strong&gt;Dominante toekomstbeelden&lt;/strong&gt; &lt;br&gt;
Uiteraard is PostNL geïnteresseerd in de logistiek die volgt uit de verkoopmodellen van de toekomst, zoals webwinkels voor voedsel. De titel &amp;ldquo;The Future of Food&amp;rdquo; suggereert echter een bredere visie. Die wilde ik graag ontleden omdat die visie vermoedelijk laat zien wat de dominante toekomstbeelden over onze omgang met voedsel zijn. Om de spanning alvast op te bouwen: ik kan er nog geen geruststellend beeld voor de wereld als geheel in ontdekken. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vervreemding&lt;/strong&gt; &lt;br&gt;
Unilever&amp;rsquo;s &lt;a href="https://www.linkedin.com/pub/bart-kuppens/0/548/283"&gt;Bart Kuppens&lt;/a&gt; en schrijfster &lt;a href="http://www.hungrycitybook.co.uk/"&gt;Carolyn Steel&lt;/a&gt; schetsen goed voor welke uitdagingen we staan. Beiden zien een complex probleem, dat wordt veroorzaakt door een groeiende wereldbevolking, toenemende verstedelijking en een kwetsbaar niet-duurzaam voedselsysteem met weinig rek in productiecapaciteit. De anderen in de film noemen ook zaken als de verontreiniging van bodem en water, afnemende biodiversiteit en het feit dat materiaalkringlopen niet gesloten zijn. Consumenten zijn vervreemd geraakt van hun voedsel. Ze kunnen zich niet betrokken voelen en hebben de intuïtie verloren om te beoordelen welke keuzen verstandig zijn en welke juist niet. Ze weten immers niet waar het voedsel dat als vanzelf iedere dag weer klaar staat in de supermarkt vandaan komt, hoe het geproduceerd wordt en wat er allemaal gebeurt voor het in de schappen belandt. Ook de rol van vlees wordt genoemd, met name het feit dat de productie van vlees een onevenredig groot beslag legt op de schaarse middelen die nodig zijn om voedsel te kunnen produceren: water, nutriënten, bodems, fossiele brandstof.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meer werk in voedselproductie en grotere diversiteit&lt;/strong&gt; &lt;br&gt;
De film laat zien dat de relatie tussen consument en producent verandert. Consumenten laten zich beter informeren over de herkomst van hun voedsel, en krijgen meer vrijheid om te kiezen hoe en door wie hun voedsel wordt geproduceerd. Door onder meer online-verkoop en -productinformatie verkleint de afstand tussen boer en consument. Dat en &amp;ldquo;urban farming&amp;rdquo;, het verbouwen van voedsel in de stad, betrekt mensen weer meer bij de productie van hun voedsel. Het aantal mensen dat werk vindt in voedselproductie stijgt daardoor weer. Daarnaast zal de diversiteit in productiesystemen toenemen, met een grotere rol voor kleinschalige gemengde bedrijven naast grootschalige industriële operaties.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contrasten&lt;/strong&gt; &lt;br&gt;
Dat is wat mij betreft een goed getroffen, maar incompleet toekomstbeeld. Daarnaast zie ik belangrijke contrasten in visie. Dat geldt met name voor de duurzaamheid van productiesystemen. &lt;a href="http://cp.media.mit.edu/caleb-harper/"&gt;Caleb Harper&lt;/a&gt; van MIT Media Lab, Steven Dring van &lt;a href="http://growing-underground.com/"&gt;Growing Underground&lt;/a&gt; en &lt;a href="http://culturedbeef.net/mark-post/"&gt;Mark Post&lt;/a&gt; van de Universiteit Maastricht zien vooral toekomst in technische innovatie. Zij staan voor een min of meer industriële aanpak van voedselproductie, in een maximaal gecontroleerde en geoptimaliseerde omgeving. Ze stellen dat dit de beste manier is om kringlopen te sluiten, verontreiniging en verspilling tegen te gaan en ruimte te besparen. In het geval van Mark Post gaat het om &amp;ldquo;&lt;a href="http://culturedbeef.net/"&gt;cultured meat&lt;/a&gt;&amp;rdquo;, de productie van vlees uit celculturen, vrijwel zonder tussenkomst van dieren. &lt;/p&gt;
&lt;p&gt;In het geval van Caleb Harper en Steven Dring gaat het om &amp;ldquo;&lt;a href="http://openag.media.mit.edu/hardware"&gt;Controlled Environment Agriculture&lt;/a&gt;&amp;rdquo;, plantaardige teelt in een stedelijke omgeving. Zij denken dat we landbouwgrond en zonlicht kunnen vervangen door hydrocultuur en LED-licht. &lt;br&gt;
Een geheel ander soort productiesysteem wordt vertegenwoordigd door de biologisch-dynamische boer Nir Halfon en de Spaanse bioloog Miguel Medialdea. Zij zien toekomst in kleinschalige, relatief extensieve productie in gemengde bedrijven, in evenwicht met de natuurlijke omgeving eromheen. 
In het Spaanse natuurgebied &lt;a href="http://www.vetalapalma.es/index.asp?LG=2"&gt;Veta la Palma&lt;/a&gt; wordt vis gekweekt, rijst verbouwd, en grazen runderen en paarden. En de &lt;a href="http://www.plawhatchfarm.co.uk/"&gt;Plaw Hatch Farm&lt;/a&gt; waar Nir Halfon werkt, levert groenten, fruit en zuivelproducten via hun eigen boerenwinkel, direct aan de consument. &lt;br&gt;
Docent &lt;a href="http://stephenritz.com/"&gt;Stephen Ritz&lt;/a&gt; uit New York neemt een middenpositie in. Hij ziet toekomst in stedelijke voedselproductie, maar meer in een sociaal-maatschappelijke context: Het kleinschalig verbouwen van groenten in achterstandsbuurten, door mensen die anders weinig vooruitzicht hebben op werk en gezond voedsel.&lt;/p&gt;
&lt;p&gt;De film schetst een beeld van intensieve voedselproductie in de steden zonder bestrijdingsmiddelen, en extensieve voedselproductie op het platteland en in natuurlijke gebieden. Uiteraard in balans met de omgeving. Dat beeld spreekt de samenleving aan en bevestigt het dominant beeld in de media.
Helaas is het niet echt een reëel antwoord op de problemen rondom voedselproductie.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Voedselzekerheid gaat over akkerbouw&lt;/strong&gt; &lt;br&gt;
Allereerst lijkt het beeld van voedselproductie dat hier geschetst wordt, vooral te draaien om productie van groente, fruit, zuivel, vis en vlees. Dit is een heel ander beeld dan de discussie over voedselzekerheid, zoals die wordt gevoerd bij instanties als de FAO (de Food and Agriculture Organisation van de Verenigde Naties). Bij de FAO gaat de aandacht vooral uit naar calorieën en &amp;ldquo;staple foods&amp;rdquo;. De nadruk ligt voornamelijk op akkerbouwgewassen als rijst, tarwe en mais, omdat deze het overgrote deel van de energie leveren in ons voedsel (wereldwijd zo&amp;rsquo;n 35%, maar in veel ontwikkelingslanden meer dan 50%). Dit heeft uiteraard een nadeel. Teveel aandacht voor &amp;ldquo;staple foods&amp;rdquo; gaat ten koste van de variatie in ons voedsel. Mensen kunnen niet enkel leven van calorieën. We hebben ook &amp;ldquo;micronutriënten&amp;rdquo; nodig, vitaminen en mineralen die vooral te vinden zijn in groenten, fruit en dierlijke producten (of goede vervangers daarvan). Deze micronutriënten zijn prima te halen uit kleinschalige productie van groenten en fruit en dierlijke eiwitten, in steden of daarbuiten. Maar daarmee voed je nog niet de wereldbevolking. &lt;br&gt;
Het overgrote deel van onze voedselbehoefte blijft bestaan uit granen, wereldwijd zo&amp;rsquo;n 2534 miljoen ton in 2015 (gemiddeld ongeveer een kilo per wereldburger per dag).&lt;sup id="fnref:foodnutrition"&gt;&lt;a class="footnote-ref" href="#fn:foodnutrition"&gt;1&lt;/a&gt;&lt;/sup&gt; Hoe deze enorme hoeveelheid granen geproduceerd dient te worden komt niet aan bod in &lt;em&gt;The Future of Food&lt;/em&gt;. Het is onwaarschijnlijk, en vooralsnog zelfs ondenkbaar, dat we dit zullen redden met kleinschalige productie in gemengde bedrijven en steden.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Voedselproductie kost schaars blijvende energie&lt;/strong&gt; &lt;br&gt;
Het tweede probleem is het feit dat energiegebruik compleet genegeerd lijkt te worden. Bart Kuppens van Unilever Benelux stelt dat de wereld hoe dan ook een probleem gaat krijgen met water en met voedsel, dat regionale tekorten zullen leiden tot toenemende spanningsvelden. Dat is waarschijnlijk het geval, maar de wereld staat ook voor een enorme uitdaging op het gebied van energievoorziening. Mondiaal neemt ons energieverbruik nog altijd toe, zowel totaal (gemiddeld ca. 2% per jaar) als per persoon (gemiddeld rond 1% per jaar). Een land als China opent iedere 1 á 2 weken een nieuwe kolencentrale. De gemiddelde wereldburger gebruikt momenteel rond de 60 kWh primaire energie per dag, en in westerse landen als Nederland is dat makkelijk drie keer zo veel.&lt;sup id="fnref:energiegebruik"&gt;&lt;a class="footnote-ref" href="#fn:energiegebruik"&gt;2&lt;/a&gt;&lt;/sup&gt; 
Tegelijkertijd is te verwachten dat de kosten voor onze energievoorziening de komende decennia flink toe zullen nemen.&lt;sup id="fnref:energiekosten"&gt;&lt;a class="footnote-ref" href="#fn:energiekosten"&gt;3&lt;/a&gt;&lt;/sup&gt; 
Het probleem is niet eens zozeer dat fossiele brandstoffen snel op zullen zijn, maar het wordt steeds duurder om ze uit de grond te halen. Hernieuwbare energie wordt wel langzaam goedkoper, maar grootschalige toepassing van bronnen als zon en wind staat nog voor enorme technische en sociale uitdagingen.&lt;/p&gt;
&lt;p&gt;Zelfs als we het voor elkaar zouden krijgen om vrijwel al ons energieverbruik te betrekken uit zon en wind, dan is het onwaarschijnlijk dat steden zelfvoorzienend kunnen zijn in hun energieverbruik. Het directe energiegebruik van een stedelijke bebouwde omgeving is rond de 10-20 W/m². Afhankelijk van locatie en seizoen ontvangen de meeste steden gemiddeld ergens tussen de 20 en 300 W/m² aan zonlicht, maar hiervan kan slechts een klein deel gebruikt worden. Een installatie met zonnepanelen in Duitsland levert gemiddeld rond de 5 W/m² aan elektriciteit. Dit zou nét voldoende kunnen zijn voor een modern energiezuinig kantoorgebouw met één verdieping. Maar het energieverbruik van een ouder hoogbouw-kantoorcomplex kan oplopen tot meer dan 6000 W/m². Dat zou betekenen dat er meer dan 1000 m² PV-zonnepanelen nodig kunnen zijn om te voorzien in het verbruik van een vierkante meter kantoorgebouw. En dat is exclusief de energie die nodig is om het gebouw neer te zetten en om onze consumptieartikelen te produceren, waaronder het voedsel dat we eten.&lt;sup id="fnref:urbanenergy"&gt;&lt;a class="footnote-ref" href="#fn:urbanenergy"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Het verbouwen van voedsel is na de Tweede Wereldoorlog flink efficiënter geworden, in ieder geval als je kijkt naar opbrengst versus menselijke arbeid en het gebruik van landbouwgrond. Maar dit is ten koste gegaan van het energieverbruik. De moderne akkerbouw is energie-intensief, met name door het gebruik van kunstmest, pesticiden en grote landbouwmachines. Ook het transport van landbouwproducten vergt energie, al maken &amp;ldquo;voedselkilometers&amp;rdquo; voor de meeste producten slechts 10-15% uit van het energieverbruik.&lt;sup id="fnref:foodmiles"&gt;&lt;a class="footnote-ref" href="#fn:foodmiles"&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Het verbouwen van hydrocultuur-gewassen in kassen of onder LED-verlichting is in zekere zin efficiënter dan akkerbouw. Gewassen groeien sneller, op minder oppervlak, met minder water en pesticiden. Ook is recycling van afvalstoffen makkelijker en gaat minder van de opbrengst verloren. De keerzijde van &lt;em&gt;Controlled Environment Agriculture&lt;/em&gt; is echter dat het duurder is, en dat het energieverbruik doorgaans een stuk hoger is dan bij akkerbouw. Dit komt vooral door het gebruik van lampen, verwarming en ventilatie. Het indrukwekkende &lt;a href="http://repository.tudelft.nl/assets/uuid:f9dd86ce-22a9-4dfe-b66e-ef55230e3856/Luuk_Graamans_1502662_VERTICAL_MSc_graduation_thesis.pdf"&gt;Master-onderzoek van Luuk Graamans&lt;/a&gt; laat zien dat zelfs bij inzet van de nieuwste energiezuinige technieken, het energieverbruik ongeveer 220 W bedraagt per m² productieoppervlak, of 40 kWh per kg product (in dit geval sla). Het totale primaire energiegebruik ligt zelfs nog een stuk hoger, want voor het produceren van 1 kWh elektriciteit is ongeveer 3 kWh fossiele brandstoffen nodig. Bovendien is het produceren van kunstmest en andere grondstoffen hier nog niet meegerekend. Zelfs als we dit indirecte energieverbruik niet meerekenen, en de hele installatie zou draaien op zonne-energie, dan zou er ongeveer 44 m² aan PV-zonnepanelen nodig zijn per m² productieoppervlak (in Noord-Europa). In werkelijkheid is dit nog meer, als we willen dat de productie ook op peil blijft in de winter. Dat is allerminst een efficiënt gebruik van zonlicht en ruimte.&lt;/p&gt;
&lt;p&gt;Bij glastuinbouw is minder energie nodig voor verlichting, omdat de zon direct een bijdrage levert. Helaas ligt het energieverbruik voor verwarming hier doorgaans vrij hoog, met name in de winter, omdat &lt;a href="http://www.lowtechmagazine.be/2015/02/passieve-tuinbouwkas-zonne-energie.html"&gt;de meeste kassen slecht warmte vasthouden&lt;/a&gt;. Een &lt;a href="http://www.cornellcea.com/attachments/Energy%20Scoping%20Study%20Final%20Report.pdf"&gt;onderzoek van Cornell uit 2009&lt;/a&gt; vergeleek hoeveel energie nodig is voor het verbouwen van sla, op het land en in een hydrocultuur-kas in New York State. Voor ijsbergsla en baby-spinazie van het land, geïmporteerd over een gemiddelde afstand van ruim 4500 km, was het primaire energieverbruik respectievelijk rond 4.5 en 6 kWh per kg geconsumeerd product (met transport en verliezen meegerekend). Bij lokale kasbouw kon dit oplopen tot 27 en 50 kWh/kg, een factor 6 tot 9 hoger.&lt;sup id="fnref:ceaenergy"&gt;&lt;a class="footnote-ref" href="#fn:ceaenergy"&gt;6&lt;/a&gt;&lt;/sup&gt; &lt;/p&gt;
&lt;p&gt;De teelt van gewassen met hydrocultuur en LED-licht is een nuttige oplossing voor bepaalde soorten gewassen. Kwetsbare, slecht houdbare producten uit een warm klimaat moeten anders over lange afstanden getransporteerd worden, met koeling en aanzienlijke verliezen. Het is ook niet voor niets dat Growing Underground in London vooral &lt;a href="http://growing-underground.com/our-produce/"&gt;diverse soorten sla en kruiden&lt;/a&gt; produceert. Een voordeel is hierbij dat een bunker 30 meter onder London waarschijnlijk weinig energie benodigt voor verwarming. Maar Waterkers, Mizuna en Thaise Basilicum blijven luxeproducten, en echt goedkoop zal het niet zijn. We hebben het hier over een stad waar een woninghuur van 60-90 euro per vierkante meter niet ongebruikelijk is, en waar huurprijzen voor kantoorruimte in het centrum al gauw oplopen tot 125 euro per m² per maand.&lt;sup id="fnref:londonrent"&gt;&lt;a class="footnote-ref" href="#fn:londonrent"&gt;7&lt;/a&gt;&lt;/sup&gt; 
In het voorbeeld dat Luuk Graamans uitwerkt in zijn onderzoek, is de opbrengst ongeveer 6.6 kg sla per vierkante meter &lt;em&gt;per jaar&lt;/em&gt;. In London zou dit leiden tot vrij dure sla. &lt;/p&gt;
&lt;p&gt;Er moeten dan ook serieuze vraagtekens worden geplaatst bij de bijdrage van stedelijke tuinbouw aan het wereldvoedselprobleem. Op dit moment valt eenvoudigweg niet rond te rekenen dat stedelijke teelt een significante bijdrage kan leveren aan het wereldvoedselprobleem. Wél kan stedelijke teelt luxe voedsel produceren. Ultiem verse producten leveren door hun schaarste en verse kwaliteit hoge marges op en bedienen een kapitaalkrachtig publiek. &lt;br&gt;
Het blijft verstandiger om te zoeken naar oplossingen die basisgewassen gewoon buiten, maar wel zo schoon mogelijk te verbouwen. Een &lt;a href="http://www.aup.edu.pk/sj_pdf/ENERGY%20AND%20ECONOMIC%20EFFICIENCY%20ANALYSIS%20OF%20RICE.PDF"&gt;studie uit 2009&lt;/a&gt; schatte het energieverbruik voor het verbouwen van rijst in China op ongeveer 1.5 kWh/kg. Dat is bijna 27 keer minder dan voor het verbouwen van sla in een leegstaand kantoorgebouw.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stedelijke teelt is educatief&lt;/strong&gt; &lt;br&gt;
Op dit moment woont iets meer dan de helft van de wereldbevolking in stedelijke gebieden, en de voorspelling is dat dit tegen de 80% zal zijn rond 2050.&lt;sup id="fnref:urbanisation"&gt;&lt;a class="footnote-ref" href="#fn:urbanisation"&gt;8&lt;/a&gt;&lt;/sup&gt; 
Maar als het grootste deel van de mensheid in steden woont, moeten we dan onze voedselproductie ook verplaatsen naar de stad? Ik denk niet dat dat mogelijk is, althans niet op significante schaal. Ik ben van mening dat stedelijke landbouw zinvol is. Echter niet als serieuze optie voor grootschalige voedselproductie, maar wel als een vorm van educatie over de herkomst van eten. Op zich is het wel waar dat er nu meer mensen geïnteresseerd zijn in voedsel dan 20 jaar geleden. Maar het overgrote deel van de consumenten is nog steeds vooral geïnteresseerd in de prijs van hun voedsel.&lt;sup id="fnref:bewustconsumeren"&gt;&lt;a class="footnote-ref" href="#fn:bewustconsumeren"&gt;9&lt;/a&gt;&lt;/sup&gt;
Bovendien, onderzoek in &lt;a href="http://www.independent.co.uk/life-style/food-and-drink/news/lack-of-food-knowledge-shocking-says-survey-7850665.html"&gt;Engeland&lt;/a&gt; en &lt;a href="http://www.foodlog.nl/artikel/wat-weten-onze-kinderen/"&gt;Frankrijk&lt;/a&gt; laat zien dat het daar niet best gesteld is met de kennis van met name jongeren over voedsel. Nogal wat mensen blijken niet te weten waar producten als ham, kipnuggets, boter, yoghurt, chips en zelfs friet of brood van gemaakt zijn. Dat blokkeert hun bewustzijn van hun impact op de aarde. Daar ligt een educatieve taak voor stadsboeren en –tuinders.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rijke consument&lt;/strong&gt; &lt;br&gt;
Het is goed dat meer mensen hun eigen eten gaan verbouwen, zodat ze weten waar het vandaan komt en hoeveel moeite het kost om het te maken. Het is goed dat bepaalde kwetsbare gewassen verbouwd worden in een gecontroleerde omgeving, in plaats van duizenden kilometers verderop met enorme hoeveelheden pesticiden en kostbaar grondwater. Het is een prima idee om duurzame, extensieve landbouw, veeteelt en aquacultuur te bedrijven in overwegend natuurlijke gebieden, in harmonie met het ecosysteem. Voor de stabiliteit en duurzaamheid van onze voedselproductie is het bovendien belangrijk dat het aantal industriële monoculturen op termijn afneemt, en dat er meer kleine, gemengde bedrijven komen. Zo krijgen ziektes minder kansen, zijn minder pesticiden nodig en neemt de biodiversiteit toe.&lt;/p&gt;
&lt;p&gt;Naast een verduurzaming van landbouwmethoden zou het ook erg helpen als we zouden stoppen met het eten van dieren die worden gevoed met 36% van de wereldproductie van graan. We voeren een aanzienlijk deel van ons voedsel momenteel aan dieren, enkel om de prijs van vlees omlaag te brengen.&lt;sup id="fnref:vlees"&gt;&lt;a class="footnote-ref" href="#fn:vlees"&gt;10&lt;/a&gt;&lt;/sup&gt;
Als vlees duurder zou kunnen worden, zijn we al een aardig eind richting een oplossing van het voedselprobleem. Natuurlijk kun je hetzelfde effect als consument ook bereiken door minder vlees te eten, of door nog slechts zelden, maar uitsluitend diervriendelijk vlees te eten. Het is tekenend voor onze wens om niets op te hoeven geven dat deze optie niet aan bod komt in de film. Er wordt simpelweg gesteld dat we &amp;ldquo;carnivoren&amp;rdquo; zijn, en dat we daarom onze landbouwgrond hard nodig zullen hebben voor vleesproductie.&lt;/p&gt;
&lt;p&gt;The Future of Food lijkt vooral gemaakt door en voor de rijke consument in Westerse steden, die een maximale keuzevrijheid wil behouden in zijn voedsel. De meeste bevolkingsgroei zal de komende decennia echter plaatsvinden in Afrika, Zuidwest-Azië en Latijns-Amerika. Online eten bestellen speelt hier vooralsnog een marginale rol, en de mogelijkheden voor high-tech &lt;em&gt;Controlled Environment Agriculture&lt;/em&gt; zijn waarschijnlijk tamelijk beperkt. Maar ook verdere intensivering van de reguliere landbouw is hier een slecht idee, aangezien watertekorten en bodemdegradatie in veel van deze gebieden nu al problematisch zijn. &lt;br&gt;
Ik denk dat er nog veel te winnen valt als we de opbrengst van kleinschalige landbouw kunnen verbeteren, maar niet noodzakelijkerwijs met nóg meer kunstmest, pesticiden en irrigatie. De grenzen van deze &amp;ldquo;&lt;a href="https://en.wikipedia.org/wiki/Green_Revolution"&gt;groene revolutie&lt;/a&gt;&amp;rdquo; zijn al lang bereikt, en in veel gebieden overschreden.&lt;sup id="fnref:greenrevolution"&gt;&lt;a class="footnote-ref" href="#fn:greenrevolution"&gt;11&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Slimmer gebruik van natuurlijke processen&lt;/strong&gt; &lt;br&gt;
De oplossing ligt mijns inziens niet zozeer in meer technologie, of in het energie-intensief verbouwen van voedsel in steden. De oplossing ligt volgens mij vooral in het beter en slimmer gebruiken van natuurlijke systemen en processen. Bijvoorbeeld het planten van gewassen die insecteneters aantrekken. Of het bestrijden van erosie, uitdroging en onkruid door bodembedekking. Of het slim afwisselen van gewassen, dusdanig dat ze elkaar beschermen tegen vraat en zon. Dergelijke, &lt;a href="https://en.wikipedia.org/wiki/Agroecology"&gt;agro-ecologische&lt;/a&gt; landbouwtechnieken zijn wellicht niet erg high-tech of hip, maar ze werken wel, en ze worden al met succes gebruikt door een &lt;a href="http://viacampesina.org/en/index.php/main-issues-mainmenu-27/sustainable-peasants-agriculture-mainmenu-42"&gt;toenemend aantal kleine boeren&lt;/a&gt; om opbrengsten te verhogen en de bodemkwaliteit te verbeteren.&lt;sup id="fnref:agroecology"&gt;&lt;a class="footnote-ref" href="#fn:agroecology"&gt;12&lt;/a&gt;&lt;/sup&gt; 
Hoewel de industriële landbouwtechnieken van de groene revolutie extreem succesvol zijn gebleken de laatste halve eeuw, blijken ze ook problematisch qua duurzaamheid en sociaal-economische effecten. Bovendien wordt het meeste voedsel wereldwijd nog steeds geproduceerd door kleine, relatief arme boeren in landelijke gebieden. Het is verstandig om dat niet te vergeten, zeker niet in een discussie over de toekomst van ons voedsel.&lt;/p&gt;
&lt;p&gt;Interesse in meer artikelen? Volg ons &lt;a href="https://www.facebook.com/duurzaamheidsweb"&gt;op Facebook&lt;/a&gt;, op &lt;a href="https://twitter.com/levienvanzon"&gt;Twitter&lt;/a&gt; of via de &lt;a href="/feeds/all.atom.xml"&gt;Atom-feed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Met dank aan &lt;a href="http://www.foodlog.nl/profiel/3/"&gt;Dick Veerman van Foodlog&lt;/a&gt; voor de uitnodiging tot het schrijven van dit artikel, en voor een groot aantal tekstuele verbeteringen.&lt;/em&gt;&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:foodnutrition"&gt;
&lt;p&gt;&lt;em&gt;Bij de FAO gaat de aandacht vooral uit naar calorieën en &amp;ldquo;staple foods&amp;rdquo;. De nadruk ligt voornamelijk op akkerbouwgewassen als rijst, tarwe en mais, omdat deze het overgrote deel van de energie leveren in ons voedsel (wereldwijd zo&amp;rsquo;n 35%, maar in veel ontwikkelingslanden meer dan 50%). [&amp;hellip;] Het overgrote deel van ons voedsel blijft bestaan uit granen, wereldwijd zo&amp;rsquo;n 2534 miljoen ton in 2015 (gemiddeld ongeveer een kilo per wereldburger per dag).&lt;/em&gt; &lt;br&gt;
Een schatting van de graanproductie wordt gegeven in de &lt;a href="http://www.fao.org/GIEWS/english/fo"&gt;FAO Food Outlook&lt;/a&gt;. Allerlei aanvullende statistieken voeding en voedselproductie zijn te vinden in het FAO-zakboekje &lt;a href="http://www.fao.org/publications/card/en/c/9f31999d-be2d-4f20-a645-a849dd84a03e"&gt;Food and Nutrition in Numbers 2014&lt;/a&gt; en in de database &lt;a href="http://faostat3.fao.org/browse/Q/*/E"&gt;FAOstat&lt;/a&gt;. Hierin vinden we onder meer dat de calorie-inname van de gemiddelde wereldburger ongeveer 2868 kcal per dag is, waarvan 35% wordt geleverd door granen, 1.5% door groenten, 3% door fruit, 17% door suiker, eveneens 17% door vlees en 10% door alcohol(!). Er zijn echter grote verschillen tussen regio&amp;rsquo;s. In Afrika wordt bijvoorbeeld gemiddeld 51% van de 2558 dagelijkse calorieën geleverd door granen, 14% door wortels en knollen, en slechts 4% door vlees. En in Nederland krijgen we gemiddeld 3169 kcal/dag binnen, waarvan 20% uit granen, 3% uit groenten, 5% uit fruit, 14% uit suiker, 12% uit vlees, 5% uit wortels en knollen, 15% uit olie en vet, 15% uit melk, en &amp;ldquo;slechts&amp;rdquo; 5% uit alcohol. Wereldwijd zijn zo&amp;rsquo;n 805 miljoen mensen chronisch ondervoed, ongeveer 11% van de wereldbevolking. Dit houdt in dat ze structureel onvoldoende energie binnenkrijgen om een actief en gezond leven te kunnen leiden. Het grootste absolute aantal hiervan (526 miljoen) woont in Azië, maar als percentage van de bevolking (21%) vinden we de meeste ondervoeding in Afrika (227 miljoen mensen), waar de voedselprijzen ook het hoogst zijn ten opzichte van de inkomens. Verder vinden we relatief veel ondervoeding in ramp- en conflictgebieden, en in Noord-Korea. Afgezien van ondervoeding hebben wereldwijd &lt;a href="http://www.publichealthreviews.eu/show/f/28"&gt;meer dan 2 miljard mensen een tekort aan micronutriënten&lt;/a&gt; als gevolg van slechte voeding, en heeft 30% van de mensheid last van overgewicht. Beide problemen komen voor in zowel ontwikkelingslanden als &amp;ldquo;ontwikkelde&amp;rdquo; landen. &lt;br&gt;
In 2014 woonden zo&amp;rsquo;n 3.4 miljard van de 7.2 miljard mensen (46%) op het platteland. In ontwikkelingslanden is dat 3.1 miljard van de 6 miljard mensen, dus iets meer dan de helft. In &amp;ldquo;ontwikkelde&amp;rdquo; landen woont nog slechts 21% van de mensen buiten de stedelijke gebieden. Hier zitten we dus al bijna aan de 80% verstedelijking.&amp;#160;&lt;a class="footnote-backref" href="#fnref:foodnutrition" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:energiegebruik"&gt;
&lt;p&gt;&lt;em&gt;Mondiaal neemt ons energieverbruik nog altijd toe, zowel totaal (gemiddeld ca. 2% per jaar) als per persoon (gemiddeld rond 1% per jaar). Een land als China opent iedere 1 á 2 weken een nieuwe kolencentrale. De gemiddelde wereldburger gebruikt momenteel rond de 60 kWh primaire energie per dag, en in Westerse landen als Nederland is dat makkelijk drie keer zo veel.&lt;/em&gt; &lt;br&gt;
Primaire energie is de energie die we gebruiken &amp;ldquo;aan de bron&amp;rdquo;, dus vóór enige technische omzetting. Het gaat hier dus om het verbruik van bijvoorbeeld steenkool, bruinkool, aardolie, aardgas, uranium, water, biomassa en/of zonnestraling, vóór omzetting in de elektriciteit, warmte en brandstof die we als consument gebruiken. &lt;br&gt;
Ieder jaar wordt het mondiale totaalverbruik van primaire energie geschat door de &lt;a href="http://www.eia.gov/cfapps/ipdbproject/IEDIndex3.cfm?tid=44&amp;amp;pid=44&amp;amp;aid=2"&gt;U.S. Energy Information Administration (EIA)&lt;/a&gt; en door oliebedrijf &lt;a href="http://www.bp.com/en/global/corporate/energy-economics/statistical-review-of-world-energy.html"&gt;BP&lt;/a&gt;. De groei in het mondiale energieverbruik varieert de laatste jaren tussen ongeveer -1% en +6%, en het tienjarig gemiddelde is volgens &lt;a href="http://www.bp.com/en/global/corporate/energy-economics/statistical-review-of-world-energy/2014-in-review.html"&gt;BP&lt;/a&gt; +2.1%. In 2004 gebruikten we volgens BP 122773 TWh (Terawatt-uur) aan energie, en in 2014 was dat 150357 TWh. Echter, in die tien jaar is de wereldbevolking ook toegenomen, van 6.40 miljard mensen in 2004 tot 7.18 miljard in 2014.
Op basis van de getallen van het EIA, was het primaire energieverbruik &lt;em&gt;per persoon&lt;/em&gt; in 2004 rond de 55.3 kWh per dag, en is het nu meer dan 60 kWh per dag. Tussen 2000 en 2011 is het toegenomen met gemiddeld 1.3% per jaar. Volgens de getallen van BP, die iets lager zijn, was het in 2004 rond de 52.6 kWh per dag, en in 2014 57.3 kWh per dag, met een gemiddelde toename in deze periode van 0.91% per jaar. Volgens auteur &lt;a href="http://www.withouthotair.com/c18/page_104.shtml"&gt;David MacKay&lt;/a&gt; gebruikt de gemiddelde Europeaan een stuk meer energie dan de gemiddelde wereldburger: ca. 125 kWh/dag aan primaire energie, plus nog eens minstens 40 kWh/dag voor de productie van geïmporteerde spullen. &lt;br&gt;
Getallen over toename van het aantal kolencentrales in China worden genoemd door onder meer &lt;a href="http://energydesk.greenpeace.org/2015/02/23/comment-new-coal-power-plants-china-carbon-bubble-waiting-burst/"&gt;Greenpeace&lt;/a&gt;, &lt;a href="http://www.factcheck.org/2014/11/checking-inhofes-energy-statistics-on-china/"&gt;factcheck.org&lt;/a&gt; en het enigszins neoliberale &lt;a href="http://instituteforenergyresearch.org/analysis/as-u-s-shutters-coal-plants-china-and-japan-are-building-them/"&gt;Institute for Energy Research&lt;/a&gt;.&amp;#160;&lt;a class="footnote-backref" href="#fnref:energiegebruik" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:energiekosten"&gt;
&lt;p&gt;&lt;em&gt;Tegelijkertijd is te verwachten dat de kosten voor onze energievoorziening de komende decennia flink toe zullen nemen.&lt;/em&gt; &lt;br&gt;
Gegevens over de kosten voor olie, aardgas en elektriciteit uit onder meer &lt;a href="http://www.eia.gov/totalenergy/data/monthly/#prices"&gt;de VS (van de EIA)&lt;/a&gt;, &lt;a href="http://ec.europa.eu/eurostat/statistics-explained/index.php/Energy_price_statistics"&gt;de EU (van Eurostat)&lt;/a&gt;, &lt;a href="https://data.oecd.org/energy/crude-oil-import-prices.htm#indicator-chart"&gt;de OECD&lt;/a&gt; en &lt;a href="https://www.destatis.de/DE/Publikationen/Thematisch/Preise/Energiepreise/EnergyPriceTrendsPDF_5619002.pdf?__blob=publicationFile"&gt;Duitsland&lt;/a&gt;, laten een daling in de olie- en gasprijzen zien in 2008-2009, en na 2012. De prijzen van olie en gas zijn wegens overproductie en de economische crisis momenteel lager dan vóór 2008. Maar dit is vermoedelijk slechts een tijdelijk effect, en het heeft nauwelijks invloed gehad op de almaar stijgende prijzen van elektriciteit in de meeste landen. Voor Nederland is de verwachting dat &lt;a href="http://atriensis.nl/nieuws/actueel/538/nev_2015_energierekening_gaat_weer_stijgen"&gt;de prijzen voor elektriciteit de komende jaren flink zullen stijgen&lt;/a&gt;.&amp;#160;&lt;a class="footnote-backref" href="#fnref:energiekosten" title="Jump back to footnote 3 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:urbanenergy"&gt;
&lt;p&gt;&lt;em&gt;Het directe energiegebruik van een stedelijke bebouwde omgeving is rond de 10-20 W/m². Afhankelijk van locatie en seizoen ontvangen de meeste steden gemiddeld ergens tussen de 20 en 300 W/m² aan zonlicht, maar hiervan kan slechts een klein deel gebruikt worden. Een installatie met zonnepanelen in Duitsland levert gemiddeld rond de 5 W/m² aan elektriciteit. Dit zou nét voldoende kunnen zijn voor een modern energiezuinig kantoorgebouw met één verdieping.&lt;/em&gt; &lt;br&gt;
Een goede uitleg van het begrip energiedichtheid wordt gegeven in het artikel &lt;a href="http://www.theenergycollective.com/robertwilson190/257481/why-power-density-matters"&gt;The Future of Energy: Why Power Density Matters&lt;/a&gt;. Robert Wilson schrijft dat een &lt;em&gt;solar farm&lt;/em&gt; in de woestijn een opbrengst kan halen van zo&amp;rsquo;n 20 W/m². Echter, een installatie in Duitsland haalt meestal niet veel meer dan 5 W/m². Dit is inclusief het oppervlak dat nodig is voor de ruimte tussen de panelen. &lt;br&gt;
In het boek &lt;a href="https://books.google.nl/books?id=eQe6vZ3R51YC"&gt;Energizing Sustainable Cities: Assessing Urban Energy&lt;/a&gt; (Grubler &amp;amp; Fisk, 2013) wordt een &lt;a href="https://books.google.nl/books?id=eQe6vZ3R51YC&amp;amp;lpg=PA96&amp;amp;ots=ntddwzJGsH"&gt;schatting gegeven van de energievraagdichtheid van een aantal grote steden&lt;/a&gt;. De gemiddelde dichtheid van energieverbruik is 28.5 W/m² voor centraal Tokyo, 27.4 W/m² voor centraal London en 13 W/m² voor Greater London. In sommige gebieden van de steden is de energievraag echter meer dan 200 W/m². Het gaat hier om het directe verbruik, dus exclusief de energie die nodig is voor geïmporteerde producten. Tokyo ontvangt gemiddeld 157 W/m² aan zonnestraling, en London 109 W/m² (voor andere plaatsen, zie &lt;a href="http://www.pveducation.org/pvcdrom/properties-of-sunlight/average-solar-radiation"&gt;deze kaart&lt;/a&gt;). Aangenomen dat 20% hiervan te gebruiken is, dan kan zonnestroom voorzien in respectievelijk 31 W/m² and 22 W/m² aan energie-opwekking in Tokyo en London. Dit vereist echter wel dat vrijwel alle oppervlaktes worden voorzien van PV-zonnepanelen en dat een deel van de opgewekte energie wordt opgeslagen voor gebruik in de winter. Dit is niet een erg realistisch scenario. &lt;br&gt;
&lt;a href="http://www.vaclavsmil.com/"&gt;Vaclav Smil&lt;/a&gt; schat in zijn boek &lt;a href="https://books.google.nl/books?id=Mj87CQAAQBAJ&amp;amp;lpg=PA165&amp;amp;ots=IU5viKbjL4&amp;amp;pg=PA173"&gt;Power Density&lt;/a&gt; (2015) een typisch energieverbruik van 10-21 W/m² voor stedelijke gebieden. Dit is de laatste decennia overigens afgenomen, met name door efficiënter gebruik van energie in woningen. Een modern energie-efficiënt huis verbruikt ±10 W/m², en het verbruik van moderne kantoorgebouwen kan minder zijn dan 50 W/m² grondoppervlak, of 6 W per m² vloeroppervlak. Aan de andere kant, sommige hoge kantoorgebouwen verbruiken meer dan 6000 W/m² grondoppervlak.&amp;#160;&lt;a class="footnote-backref" href="#fnref:urbanenergy" title="Jump back to footnote 4 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:foodmiles"&gt;
&lt;p&gt;&lt;em&gt;Ook het transport van landbouwproducten vergt energie, al maken &amp;ldquo;voedselkilometers&amp;rdquo; voor de meeste producten slechts 10-15% uit van het energieverbruik.&lt;/em&gt; &lt;br&gt;
Diverse aspecten van &amp;ldquo;food miles&amp;rdquo; worden uitgebreid besproken in dit &lt;a href="https://attra.ncat.org/attra-pub/viewhtml.php?id=281"&gt;achtergrondartikel van ATTRA&lt;/a&gt; en in het artikel &lt;a href="http://www.worldwatch.org/node/6064"&gt;Is Local Food Better?&lt;/a&gt; van The Worldwatch Institute.&amp;#160;&lt;a class="footnote-backref" href="#fnref:foodmiles" title="Jump back to footnote 5 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:ceaenergy"&gt;
&lt;p&gt;&lt;em&gt;Voor ijsbergsla en baby-spinazie van het land, geïmporteerd over een gemiddelde afstand van ruim 4500 km, was het primaire energieverbruik respectievelijk rond 4.5 en 6 kWh per kg geconsumeerd product (met transport en verliezen meegerekend). Bij lokale kasbouw kon dit oplopen tot 27 en 50 kWh/kg, een factor 6 tot 9 hoger.&lt;/em&gt; &lt;br&gt;
&lt;a href="https://www.google.nl/maps/place/Cornell+University/@42.4534492,-85.4295911,5z/data=!4m2!3m1!1s0x0:0xf50ee64d821b9ff4"&gt;Cornell University&lt;/a&gt;, in de staat New York, heeft een &lt;a href="http://www.cornellcea.com/research/energy/"&gt;Controlled Environment Agriculture (CEA) kassencomplex&lt;/a&gt;, gebouwd in 1999. In de periode 1999-2003 bedroeg het gemiddelde &lt;a href="http://www.cornellcea.com/attachments/CEAGreenhouseEnergyAudit.pdf"&gt;energieverbruik&lt;/a&gt; voor 595 m² productieoppervlak zo&amp;rsquo;n 3703 kWh per dag (259 W/m²), waarvan 860 kWh voor licht en 2292 kWh aan aardgas voor verwarming. Inmiddels is het energieverbruik lager, door toepassing van &lt;a href="http://energyandsustainability.fs.cornell.edu/file/GuttermanBdg_Cons_Proj_Summary_5_2013.pdf"&gt;efficiëntere apparatuur&lt;/a&gt;. Het energieverbruik van de kassen van Cornell wordt &lt;a href="https://cuaes.cals.cornell.edu/sustainability/greenhouses/energy-use"&gt;nauwlettend bijgehouden&lt;/a&gt;. Sommige moderne Nederlandse kassen gebruiken overigens minder fossiele energie dan de kassen van Cornell, door gebruik van LED-verlichting, WKK-installaties, restwarmte en/of warmtepompen. &lt;br&gt;
De &lt;a href="http://www.cornellcea.com/attachments/Energy%20Scoping%20Study%20Final%20Report.pdf"&gt;studie uit 2009&lt;/a&gt; die geïmporteerde producten en lokaal verbouwde producten vergeleek, keek naar ijsbergsla, spinazie, aardbeien, tomaten en appels. De studie concludeerde dat de benodigde energie voor transport hoger was dan de energie die nodig was om de producten te verbouwen in New York State (zie p. 192-193). Echter, sommige van de geïmporteerde producten kwamen uit Mexico, Israël, Spanje, Chili, Nieuw-Zeeland en Nederland (tomaten!), wat leidde tot een relatief hoog energieverbruik voor transport (zie p. 194-195 en 207). Het energieverbruik voor import van sla en spinazie versus productie in de CEA-kassen van Cornell wordt vergeleken op pagina 197-201.&amp;#160;&lt;a class="footnote-backref" href="#fnref:ceaenergy" title="Jump back to footnote 6 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:londonrent"&gt;
&lt;p&gt;&lt;em&gt;We hebben het hier over een stad waar een woninghuur van 60-90 euro per vierkante meter niet ongebruikelijk is, en waar huurprijzen voor kantoorruimte in het centrum al gauw oplopen tot 125 euro per m² per maand.&lt;/em&gt; &lt;br&gt;
In sommige wijken van London is de koopprijs voor huizen momenteel &lt;a href="http://www.mirror.co.uk/news/uk-news/house-prices-12k-now-buy-5931726"&gt;6000-12000 GBP/m²&lt;/a&gt;, ca. 8340-16172 EUR/m². In 2014 waren de huurprijzen in centraal London, afhankelijk van de wijk, tot
&lt;a href="http://www.globalpropertyguide.com/Europe/United-Kingdom/Rental-Yields"&gt;44-64 GBP/m²&lt;/a&gt;, zo&amp;rsquo;n 61-89 EUR/m². Kantoorruimte was in diezelfde periode ongeveer &lt;a href="http://www.statista.com/statistics/323023/prime-office-rental-costs-in-london-uk-by-area/"&gt;54-119 EUR/m²&lt;/a&gt;, afhankelijk van de locatie. In centraal London worden momenteel huurprijzen gevraagd van &lt;a href="http://www.findalondonoffice.co.uk/toolbox/rental-guide"&gt;68-150 GBP/ft²&lt;/a&gt; per jaar, omgerekend 85-177 EUR/m² per maand. Voor 93 m² (1000 ft²), een kantoorruimte voor zo&amp;rsquo;n 12 mensen, betaal je al snel bijna £100000 per jaar, wat neerkomt op een maandbedrag van zo&amp;rsquo;n 125 EUR/m².&amp;#160;&lt;a class="footnote-backref" href="#fnref:londonrent" title="Jump back to footnote 7 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:urbanisation"&gt;
&lt;p&gt;&lt;em&gt;Op dit moment woont iets meer dan de helft van de wereldbevolking in stedelijke gebieden, en de voorspelling is dat dit tegen de 80% zal zijn rond 2050.&lt;/em&gt; &lt;br&gt;
Het succes van de intensieve landbouw vanaf de jaren &amp;lsquo;60 is deels verantwoordelijk voor de snelle verstedelijking. Voedsel is zo goedkoop geworden dat we ons een hoop transport en verspilling kunnen veroorloven. Bovendien brengt een boerenbestaan tegenwoordig weinig geld op, tenzij je het heel grootschalig aanpakt. In agrarische gebieden is weinig werk, dus trekken veel mensen naar de stad. De stedelingen zijn echter ook de eersten die het zullen merken als er problemen zijn met de voedselproductie. De prijs van voedsel is nu op haar laagste punt in ruim zes jaar (volgens de &lt;a href="http://www.fao.org/3/a-I5003E.pdf"&gt;FAO Food Outlook, oktober 2015&lt;/a&gt;). Maar als de prijzen van voedsel weer sterk zouden stijgen, dan is het niet ondenkbaar dat de trend van verstedelijking stopt, en dat veel mensen wellicht weer terug trekken naar het platteland.&amp;#160;&lt;a class="footnote-backref" href="#fnref:urbanisation" title="Jump back to footnote 8 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:bewustconsumeren"&gt;
&lt;p&gt;&lt;em&gt;Ik ben van mening dat stedelijke landbouw zinvol is. Echter niet als serieuze optie voor grootschalige voedselproductie, maar wel als een vorm van educatie over de herkomst van eten. Op zich is het wel waar dat er nu meer mensen geïnteresseerd zijn in voedsel dan 20 jaar geleden. Maar het overgrote deel van de consumenten is nog steeds vooral geïnteresseerd in de prijs van hun voedsel.&lt;/em&gt; &lt;br&gt;
In de documentaire wijzen &lt;a href="https://www.ted.com/talks/carolyn_steel_how_food_shapes_our_cities"&gt;Carolyn Steel&lt;/a&gt;, Stephen Ritz en Nir Halfon er allen op dat het belangrijk is om de verbinding te herstellen tussen consument en voedselproductie. Dit is ook de boodschap van auteurs als &lt;a href="http://michaelpollan.com/"&gt;Michael Pollan&lt;/a&gt; en vele anderen. De vraag is echter of dit voldoende is. Het is prachtig dat een groeiend aandeel &amp;ldquo;bewuste consumenten&amp;rdquo; momenteel zorgt voor de meeste verandering bij voedselproducenten. Maar wat we nodig hebben is structurele verandering. Het risico is natuurlijk dat &amp;ldquo;bewust consumeren&amp;rdquo; een modeverschijnsel is, dat zomaar weer voorbij kan zijn als de voedselprijzen ineens zouden stijgen. Ik denk wel dat een werkelijk bewustzijn van voedselproductie hier enige bescherming biedt. Maar daarnaast is het belangrijk dat overheden en producenten ook &lt;em&gt;onafhankelijk&lt;/em&gt; van consumenten maatregelen nemen om een duurzame voedselproductie op lange termijn zeker te stellen. Dat gebeurt al in zekere mate, getuige bijvoorbeeld het &lt;a href="https://www.unilever.com/sustainable-living/transformational-change/mainstreaming-sustainable-agriculture/"&gt;beleid van Unilever&lt;/a&gt;. Maar het mag allemaal best wat breder en sneller.&amp;#160;&lt;a class="footnote-backref" href="#fnref:bewustconsumeren" title="Jump back to footnote 9 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:vlees"&gt;
&lt;p&gt;&lt;em&gt;Naast een verduurzaming van landbouwmethoden zou het ook erg helpen als we zouden stoppen met het eten van dieren die worden gevoed met 36% van de wereldproductie van graan. We voeren een aanzienlijk deel van ons voedsel momenteel aan dieren, enkel om de prijs van vlees omlaag te brengen.&lt;/em&gt; &lt;br&gt;
Het mondiale gebruik van granen wordt door de FAO geschat op 2498.9 Mt in 2014/2015, waarvan 1084.2 Mt voor menselijke consumptie en 888.7 Mt voor diervoer (&lt;a href="http://www.fao.org/3/a-I5003E.pdf"&gt;FAO Food Outlook, oktober 2015&lt;/a&gt;, p. 1). &lt;br&gt;
De voornaamste oplossing die wordt voorgesteld in de film is het produceren van vlees zonder dieren. Op zich lijkt me dit een uitstekend idee. Kwalitatief en qua smaak is het vast niet slechter dan de &amp;ldquo;plofkip&amp;rdquo; en andere producten uit de huidige industriële veehouderij.&amp;#160;&lt;a class="footnote-backref" href="#fnref:vlees" title="Jump back to footnote 10 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:greenrevolution"&gt;
&lt;p&gt;&lt;em&gt;Ik denk dat er nog veel te winnen valt als we de opbrengst van kleinschalige landbouw kunnen verbeteren, maar niet noodzakelijkerwijs met nóg meer kunstmest, pesticiden en irrigatie. De grenzen van deze &amp;ldquo;&lt;a href="https://en.wikipedia.org/wiki/Green_Revolution"&gt;groene revolutie&lt;/a&gt;&amp;rdquo; zijn al lang bereikt, en in veel gebieden overschreden.&lt;/em&gt; &lt;br&gt;
Ook een grootschalige inzet van genetisch gemodificeerde gewassen is onverstandig. De resulterende verdere afname in genetische diversiteit kan zeer nadelige gevolgen hebben voor onze voedselzekerheid. Een wereldwijde of regionale infectieziekte zou in dat geval de &lt;a href="https://nl.wikipedia.org/wiki/Internationale_Aardappelcrisis"&gt;aardappelcrisis van 1845&lt;/a&gt; kunnen doen verbleken als een gezellige picknick. Bij deze &amp;ldquo;potato famine&amp;rdquo; stierven meer dan 1 miljoen Ieren en enkele honderdduizenden andere Europeanen van de honger, nadat een uit Amerika geïmporteerde schimmelinfectie de aardappeloogst had gedecimeerd.&amp;#160;&lt;a class="footnote-backref" href="#fnref:greenrevolution" title="Jump back to footnote 11 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:agroecology"&gt;
&lt;p&gt;&lt;em&gt;Dergelijke, &lt;a href="https://en.wikipedia.org/wiki/Agroecology"&gt;agro-ecologische&lt;/a&gt; landbouwtechnieken zijn wellicht niet erg high-tech of hip, maar ze werken wel, en ze worden al met succes gebruikt door een &lt;a href="http://viacampesina.org/en/index.php/main-issues-mainmenu-27/sustainable-peasants-agriculture-mainmenu-42"&gt;toenemend aantal kleine boeren&lt;/a&gt; om opbrengsten te verhogen en de bodemkwaliteit te verbeteren.&lt;/em&gt; &lt;br&gt;
Een bijkomend voordeel is dat dergelijke technieken doorgaans weinig (financiële) investering vergen. Voor de &lt;em&gt;high-input&lt;/em&gt; landbouwmethoden van de groene revolutie zijn vaak relatief hoge investeringen nodig in dingen als apparatuur, zaden pesticiden en kunstmest. Dit is vooral een probleem voor kleine boeren in ontwikkelingslanden, die meestal niet in staat zijn om veel te investeren. Door het aangaan van leningen worden ze soms opgezadeld met hoge schulden, die ze niet altijd kunnen terugbetalen. &lt;br&gt;
Ik zal in de nabije toekomst een artikel wijden aan agro-ecologie en gerelateerde landbouwmethodes en -filosofieën.&amp;#160;&lt;a class="footnote-backref" href="#fnref:agroecology" title="Jump back to footnote 12 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="misc"></category><category term="voedsel"></category></entry><entry><title>On Filesystems</title><link href="//gnuritas.org/filesystems.html" rel="alternate"></link><published>2014-12-05T17:51:19+01:00</published><updated>2017-12-12T20:54:33+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2014-12-05:/filesystems.html</id><summary type="html">&lt;p&gt;&lt;em&gt;This article was originally written in 2011, and was slightly updated in 2014.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Filesystem types and (lack of) compatibility&lt;/h3&gt;
&lt;p&gt;Despite the fact that we&amp;rsquo;re no longer living in the 1980s,
filesystem-compatibility between operating systems seems to remain an
issue in computer-land. The filesystem basically defines the way in
which files are organised on a disk. In the 1980s, the popularity of
MS-DOS led to widespread adoption of the
&lt;a href="http://en.wikipedia.org/wiki/File_Allocation_Table"&gt;FAT&lt;/a&gt; filesystem,
which was also used in earlier Windows versions (&amp;frac12;/3/95/98/ME). As
NT-based Windows versions (NT/2000/XP/Vista/7) started becoming the
mainstream consumer-versions, more and more computers started using
Microsoft&amp;rsquo;s proprietary &lt;a href="http://en.wikipedia.org/wiki/Ntfs"&gt;NTFS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Nowadays, most external USB harddisks are sold pre-formatted with an
NTFS-filesystem, while camera flash-cards and USB thumb-drives tend to
still use a FAT32 filesystem. NTFS …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;This article was originally written in 2011, and was slightly updated in 2014.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Filesystem types and (lack of) compatibility&lt;/h3&gt;
&lt;p&gt;Despite the fact that we&amp;rsquo;re no longer living in the 1980s,
filesystem-compatibility between operating systems seems to remain an
issue in computer-land. The filesystem basically defines the way in
which files are organised on a disk. In the 1980s, the popularity of
MS-DOS led to widespread adoption of the
&lt;a href="http://en.wikipedia.org/wiki/File_Allocation_Table"&gt;FAT&lt;/a&gt; filesystem,
which was also used in earlier Windows versions (&amp;frac12;/3/95/98/ME). As
NT-based Windows versions (NT/2000/XP/Vista/7) started becoming the
mainstream consumer-versions, more and more computers started using
Microsoft&amp;rsquo;s proprietary &lt;a href="http://en.wikipedia.org/wiki/Ntfs"&gt;NTFS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Nowadays, most external USB harddisks are sold pre-formatted with an
NTFS-filesystem, while camera flash-cards and USB thumb-drives tend to
still use a FAT32 filesystem. NTFS can be read (but not written by
default) on Mac OS X, and can be read and written (but not properly
repaired) by most modern Linux distributions. The default filesystem on
Apple devices is &lt;a href="http://en.wikipedia.org/wiki/HFS_Plus"&gt;HFS+&lt;/a&gt;, which
cannot be accessed (by default) on Windows systems, but can be read (and
written without journalling) on most Linux systems. Linux in turn mostly
uses the &lt;a href="http://en.wikipedia.org/wiki/Ext2"&gt;ext2&lt;/a&gt;,
&lt;a href="http://en.wikipedia.org/wiki/Ext3"&gt;ext3&lt;/a&gt; or
&lt;a href="http://en.wikipedia.org/wiki/Ext4"&gt;ext4&lt;/a&gt; filesystem, which (by default)
cannot be read on either Windows or Mac. &lt;/p&gt;
&lt;p&gt;So actually, FAT -though
ancient- is still the only filesystem that can (by default) can be
accessed on all mainstream operating systems. Moreover, Linux is the
only operating system that has out-of-the-box read (and mostly write)
access to FAT, NTFS, HFS+ and ext&amp;#8532;/4, as well as a load of other
filesystems. Therefore, if I need a disk to be accessible on any
computer, I format it as FAT32. Conversely, when I need to salvage data
from a Windows/Mac/Linux system that won&amp;rsquo;t boot or is infected with
malware, a Linux live-CD or bootable USB-stick with
&lt;a href="http://www.knoppix.net/"&gt;Knoppix&lt;/a&gt; or &lt;a href="http://ubuntu-rescue-remix.org/"&gt;Ubuntu Rescue
Remix&lt;/a&gt; tends to be my tool of choice&amp;hellip;&lt;/p&gt;
&lt;h3&gt;Access to NTFS and ext&amp;#8532;/4 on MacOS X&lt;/h3&gt;
&lt;p&gt;MacOS X can read NTFS volumes out of the box, but cannot write them. If
you work with NTFS or ext&amp;#8532;/4 volumes on a frequent basis, have a look
at &lt;a href="http://www.tuxera.com/products/tuxera-ntfs-for-mac/"&gt;Tuxera NTFS for Mac&lt;/a&gt;, 
&lt;a href="http://www.paragon-software.com/home/ntfs-mac/"&gt;Paragon NTFS for Mac&lt;/a&gt; or 
&lt;a href="http://www.paragon-software.com/home/extfs-mac/"&gt;Paragon ExtFS for Mac&lt;/a&gt;. There
are also free alternatives, based on MacFUSE. First install
&lt;a href="http://code.google.com/p/macfuse/"&gt;MacFUSE&lt;/a&gt;. For NTFS, install the
&lt;a href="http://www.tuxera.com/community/ntfs-3g-download/"&gt;ntfs-3g&lt;/a&gt; driver. For
ext2/ext3, use the
&lt;a href="http://alperakcan.org/?open=projects&amp;amp;project=fuse-ext2"&gt;fuse-ext2&lt;/a&gt;
driver. Follow this guide:
&lt;a href="http://www.ericwingate.com/2009/09/27/mounting-ext3-in-snow-leopard/"&gt;http://www.ericwingate.com/2009/09/27/mounting-ext3-in-snow-leopard/&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Access to Mac HFS+ disks and DMG images on Windows&lt;/h3&gt;
&lt;p&gt;Have a look at these:&lt;br&gt;
&lt;a href="http://www.catacombae.org/hfsx.html"&gt;http://www.catacombae.org/hfsx.html&lt;/a&gt; (free, read-only)&lt;br&gt;
&lt;a href="http://www.mediafour.com/products/macdrive/"&gt;http://www.mediafour.com/products/macdrive/&lt;/a&gt; (commercial)&lt;br&gt;
&lt;a href="http://www.paragon-software.com/home/hfs-windows/"&gt;http://www.paragon-software.com/home/hfs-windows/&lt;/a&gt; (commercial)&lt;/p&gt;
&lt;h3&gt;Access to Linux ext&amp;#8532;/4 on Windows&lt;/h3&gt;
&lt;p&gt;Have a look at these:&lt;br&gt;
&lt;a href="http://ext2read.blogspot.com/"&gt;http://ext2read.blogspot.com/&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.fs-driver.org/ http://code.google.com/p/winflux/"&gt;http://www.fs-driver.org/ http://code.google.com/p/winflux/&lt;/a&gt; (experimental?)&lt;br&gt;
&lt;a href="http://www.chrysocome.net/explore2fs"&gt;http://www.chrysocome.net/explore2fs&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.diskinternals.com/linux-reader/"&gt;http://www.diskinternals.com/linux-reader/&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.soluvas.com/read-browse-explore-open-ext2-ext3-ext4-partition-filesystem-from-windows-7/"&gt;http://www.soluvas.com/read-browse-explore-open-ext2-ext3-ext4-partition-filesystem-from-windows-7/&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Renaming a FAT filesystem in Linux&lt;/h3&gt;
&lt;p&gt;In modern Linux distributions and on MacOS X, the volume label
determines the mount-point of a filesystem. For instance, an USB disk
which has a partition called MyDisk will be mounted under /media/MyDisk
in Ubuntu. Sometimes the current volume label is not practical, so you
want to be able to change it. By far the easiest way to change the
volume label of most filesystem types in Linux is to use either the
Gnome Disk Utility (System-&amp;gt;Administration-&amp;gt;Disk Utility) or the
excellent &lt;a href="http://gparted.sourceforge.net/"&gt;GParted partition editor&lt;/a&gt;
(in Ubuntu: install the
&lt;a href="http://packages.ubuntu.com/search?keywords=gparted"&gt;gparted&lt;/a&gt; package
and look under System-&amp;gt;Administration). However, for some reason this
will always result in an upper-case label on existing FAT filesystems.
This is odd, because lower-case or mixed-case labels seem no problem
when creating a new FAT filesystem. Luckily there is a workaround.
First, clear the existing label (e.g. using Gparted or Disk Utility),
and write down which device corresponds to the partition you want to
change (e.g. /dev/sdf1). Then set the label using the &lt;code&gt;dosfslabel&lt;/code&gt; tools
from the
&lt;a href="http://packages.ubuntu.com/search?keywords=gparted"&gt;dosfstools&lt;/a&gt;
package. For instance: &lt;code&gt;sudo dosfslabel /dev/sdf1 MixedCaseLabel&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;To check the result, run &lt;code&gt;sudo blkid&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;After having done that, it&amp;rsquo;s wise to
run a filesystem-check and fix any errors you encounter.
Filesystem-checks can be run from Disk Utility, Gparted or from the
commandline (e.g. &lt;code&gt;sudo fsck -r /dev/sdf1&lt;/code&gt;).&lt;/p&gt;
&lt;h3&gt;Working with HFS+ in Ubuntu&lt;/h3&gt;
&lt;p&gt;If you want to be able to create and check HFS+ filesystems (e.g. in
Gparted), you&amp;rsquo;ll need to install the
&lt;a href="http://packages.ubuntu.com/search?keywords=hfsprogs"&gt;hfsprogs&lt;/a&gt; package
first. Unfortunately it currently does not seem possible to change the
HFS+ volume label in Linux after creating the filesystem, so be sure to
get it right the first time! Of course you can always use a Mac to
rename it afterwards, just right-click on the disk-icon and choose
rename, or use a terminal-command such as:
&lt;code&gt;diskutil rename "Old Label" "New Label"&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;Also, not that apparently
Linux currently is incapable of writing to HFS+ filesystems that have
&lt;a href="http://support.apple.com/kb/ht2355"&gt;journaling&lt;/a&gt; enabled, so you&amp;rsquo;ll need
to &lt;a href="http://support.apple.com/kb/TA21053?viewlocale=en_US"&gt;disable journaling&lt;/a&gt; in Mac
OS X before being able to write to a HFS+ volume in Linux. Reading a
HFS+ filesystem with journaling anabled is of course no problem.&lt;/p&gt;
&lt;h3&gt;Access to DMG or ISO images&lt;/h3&gt;
&lt;p&gt;DMG and ISO files are disk-images, which means that they are essentially
files formatted as if they were disks, with respectively a HFS+ (for
DMG) or &lt;a href="http://en.wikipedia.org/wiki/ISO_9660"&gt;ISO9660&lt;/a&gt; filesystem.
Accessing the files inside such a &amp;ldquo;virual disk&amp;rdquo; is easy in Mac OS X
(just open the file), but requires a bit more work on other systems:  &lt;/p&gt;
&lt;p&gt;For Ubuntu/Linux, see: &lt;a href="https://help.ubuntu.com/community/ManageDiscImages"&gt;https://help.ubuntu.com/community/ManageDiscImages&lt;/a&gt;  &lt;/p&gt;
&lt;p&gt;To mount ISO-files in Windows, try &lt;a href="http://www.daemon-tools.cc/eng/products/dtLite"&gt;Daemon Tools Lite&lt;/a&gt;.   &lt;/p&gt;
&lt;p&gt;To access DMG files in Windows, try HFSExplorer.&lt;/p&gt;
&lt;h3&gt;Recovering files from broken filesystems&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.cgsecurity.org/wiki/PhotoRec"&gt;PhotoRec&lt;/a&gt; and
&lt;a href="http://www.cgsecurity.org/wiki/TestDisk"&gt;TestDisk&lt;/a&gt; are two tools I&amp;rsquo;ve
found particularly useful on occasions where filesystems were damaged.
Both were written by Christophe Grenier, and can be installed on Ubuntu
through the
&lt;a href="http://packages.ubuntu.com/search?keywords=testdisk"&gt;testdisk&lt;/a&gt; package.
Before trying to repair a badly damaged filesystem, it&amp;rsquo;s always a good
idea to &lt;a href="http://geekyprojects.com/cloning/how-to-use-clonezilla-tutorial/"&gt;make a disk-image&lt;/a&gt;
backup of the damaged partition, e.g. with
&lt;a href="http://clonezilla.org/"&gt;CloneZilla&lt;/a&gt; (if the disk has bad sectors,
select Expert mode and use the &amp;ldquo;-rescue&amp;rdquo; option, and optionally &amp;ldquo;-g
auto&amp;rdquo; and &amp;ldquo;-v&amp;rdquo;), &lt;a href="http://www.mondorescue.org/"&gt;Mondo Rescue&lt;/a&gt; or
&lt;a href="http://clonezilla-sysresccd.hellug.gr/index.html"&gt;Clonezilla-SysRescCD&lt;/a&gt;.
If the disk is really badly damaged, you may want to try 
&lt;a href="http://www.gnu.org/software/ddrescue/ddrescue.html"&gt;GNU ddrescue&lt;/a&gt;, which is
included on the above live-CDs (as well as on most other Linux live
CDs).&lt;/p&gt;
&lt;h3&gt;The easiest network filesystem: SSHFS&lt;/h3&gt;
&lt;p&gt;Both at home and at University, most of my files are stored on a Linux
desktop. If I want to access those files over the network, I can
transfer them using a scp/sftp client such as FileZilla, or I can set up
file-sharing over the network through Samba. However, a much easier
solution is to use &lt;a href="http://fuse.sourceforge.net/sshfs.html"&gt;SSHFS&lt;/a&gt;,
which allows you to mount a remote SSH server as if it were a local
filesystem.   &lt;/p&gt;
&lt;p&gt;For Ubuntu: &lt;a href="https://help.ubuntu.com/community/SSHFS"&gt;https://help.ubuntu.com/community/SSHFS&lt;/a&gt;  &lt;/p&gt;
&lt;p&gt;For Windows: &lt;a href="http://dokan-dev.net/en/"&gt;http://dokan-dev.net/en/&lt;/a&gt;  &lt;/p&gt;
&lt;p&gt;For Mac OS X:&lt;br&gt;
&lt;a href="http://systems.cs.uoregon.edu/wiki/index.php?n=Help.AppsSSHMacSSHFS"&gt;http://systems.cs.uoregon.edu/wiki/index.php?n=Help.AppsSSHMacSSHFS&lt;/a&gt; or
&lt;a href="http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS"&gt;http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS&lt;/a&gt;  &lt;/p&gt;
&lt;p&gt;Note that Gnome supports connecting to SSH servers out-of-the-box, e.g. by typing
&lt;code&gt;ssh://username@ssh.server.com&lt;/code&gt; in the location bar of the file-manager.
However, this only works well for Gnome-applications. On my Ubuntu
laptop, I therefore combine SSHFS with 
&lt;a href="https://help.ubuntu.com/community/SSH/OpenSSH/Keys"&gt;key-based SSH login&lt;/a&gt; and a
launch-button on the Gnome-panel that uses sshfs to mount my desktop&amp;rsquo;s
root directory at a mount-point in /media (which is owned by my user).
This way, I only need one click in order to access all the files on my
desktop, which is very handy (as long as my laptop isn&amp;rsquo;t stolen ;).&lt;/p&gt;</content><category term="misc"></category><category term="technical"></category><category term="ubuntu"></category></entry><entry><title>Why CO2 Should Worry You (Yes, Sceptics Too!)</title><link href="//gnuritas.org/co2.html" rel="alternate"></link><published>2014-10-30T00:00:00+01:00</published><updated>2019-05-03T01:36:53+02:00</updated><author><name>Levien van Zon</name></author><id>tag:gnuritas.org,2014-10-30:/co2.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;By Levien van Zon&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This article was published on &lt;a href="http://sustainsubstance.org/co2.html"&gt;The Substance of Sustainability&lt;/a&gt; and &lt;a href="http://duurzaamheidsweb.nl/co2.html"&gt;in Dutch on Duurzaamheidsweb&lt;/a&gt;, and as &lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20141030-why_co2_should_worry_you.pdf"&gt;PDF&lt;/a&gt; or ebook (&lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20141030-why_co2_should_worry_you.epub"&gt;EPUB&lt;/a&gt; and &lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20141030-why_co2_should_worry_you.azw3"&gt;Kindle&lt;/a&gt;) for offline reading. The footnotes provide additional background information, and can safely be skipped or read separately.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I had originally planned to write my first article on a different subject, the ecological footprint. But World Climate Action Day and the UN Climate Summit last month persuaded me to write about CO&lt;sub&gt;2&lt;/sub&gt; instead. I must admit, I think that maybe too much emphasis has been put on climate change over the last few years. It is but one aspect of an underlying problem, that of energy sources and energy use. Moreover, it distracts from other important problems, such as land use, biodiversity decrease and ethical issues. Sometimes …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;By Levien van Zon&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This article was published on &lt;a href="http://sustainsubstance.org/co2.html"&gt;The Substance of Sustainability&lt;/a&gt; and &lt;a href="http://duurzaamheidsweb.nl/co2.html"&gt;in Dutch on Duurzaamheidsweb&lt;/a&gt;, and as &lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20141030-why_co2_should_worry_you.pdf"&gt;PDF&lt;/a&gt; or ebook (&lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20141030-why_co2_should_worry_you.epub"&gt;EPUB&lt;/a&gt; and &lt;a href="http://sustainsubstance.org/offline/sustainsubstance-20141030-why_co2_should_worry_you.azw3"&gt;Kindle&lt;/a&gt;) for offline reading. The footnotes provide additional background information, and can safely be skipped or read separately.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I had originally planned to write my first article on a different subject, the ecological footprint. But World Climate Action Day and the UN Climate Summit last month persuaded me to write about CO&lt;sub&gt;2&lt;/sub&gt; instead. I must admit, I think that maybe too much emphasis has been put on climate change over the last few years. It is but one aspect of an underlying problem, that of energy sources and energy use. Moreover, it distracts from other important problems, such as land use, biodiversity decrease and ethical issues. Sometimes one gets the impression that sustainability is equal to reducing CO&lt;sub&gt;2&lt;/sub&gt;-emissions, which is obviously not the case.
Many people are tired of the discussion surrounding climate change. The arguments of climate sceptics and &amp;ldquo;climate deniers&amp;rdquo; have been quite effective in generating doubt among the general public. More than half of people worldwide do not believe climate change to be a serious problem.&lt;sup id="fnref:polls"&gt;&lt;a class="footnote-ref" href="#fn:polls"&gt;1&lt;/a&gt;&lt;/sup&gt; Yet, despite all this, it is still important to talk about CO&lt;sub&gt;2&lt;/sub&gt;. Even if you doubt that climate change occurs, there are still good reasons to seriously reduce CO&lt;sub&gt;2&lt;/sub&gt; emissions as soon as possible. &lt;/p&gt;
&lt;h3&gt;Six degrees and four kilos&lt;/h3&gt;
&lt;p&gt;So what&amp;rsquo;s up with carbon dioxide? Relatively speaking, there&amp;rsquo;s only a tiny amount of CO&lt;sub&gt;2&lt;/sub&gt; in the air, less than one part in a thousand. In the natural situation&lt;sup id="fnref:ppmco2"&gt;&lt;a class="footnote-ref" href="#fn:ppmco2"&gt;2&lt;/a&gt;&lt;/sup&gt; this is around 0.03% by volume, or ±300 ppm (&lt;em&gt;parts per million&lt;/em&gt;). The rest of the air consists mostly of nitrogen gas (78%), oxygen (21%) and the noble gas argon (0.9%). So there&amp;rsquo;s really not a lot of carbon dioxide in our atmosphere, but still this little bit is actually rather important. For plants and algae, this smidgeon of CO&lt;sub&gt;2&lt;/sub&gt; is the source of nearly all carbon, the main building block of organic molecules. And together with water vapour and a couple of other gases, CO&lt;sub&gt;2&lt;/sub&gt; is responsible for what we call the &lt;em&gt;greenhouse effect&lt;/em&gt;.&lt;sup id="fnref:greenhouse"&gt;&lt;a class="footnote-ref" href="#fn:greenhouse"&gt;3&lt;/a&gt;&lt;/sup&gt; And this is a good thing. Without this effect, things would be rather chilly on Earth, on average around -18°C. Thankfully this is not the case, average temperatures are a comfortable 14°C. The natural greenhouse effect therefore contributes roughly 33°C to our climate, which is important to keep it habitable.&lt;/p&gt;
&lt;p&gt;There is, however, one problem: The magnitude of the greenhouse effect depends on &lt;em&gt;how much&lt;/em&gt; of the various &amp;ldquo;greenhouse gases* we have in our atmosphere. And these amounts are not exactly constant. Before the industrial revolution, the air probably contained around 280 ppm CO&lt;sub&gt;2&lt;/sub&gt; (on average). But since then, this concentration has been rapidly increasing. Currently it&amp;rsquo;s over 400 ppm, with an annual increase of 2 ppm (and rising). CO&lt;sub&gt;2&lt;/sub&gt; contributes roughly 6°C to the (natural) greenhouse effect, but this contribution is increasing&amp;hellip;&lt;/p&gt;
&lt;p&gt;Of course our atmosphere is not merely a reservoir that is slowly filled by various gases. Living organisms and other natural processes constantly exchange substances with the atmosphere. Plants and algae need carbon to grow, and as already mentioned, they get this from the air in the form of CO&lt;sub&gt;2&lt;/sub&gt;. However, breaking this CO&lt;sub&gt;2&lt;/sub&gt; down into carbon and oxygen requires energy, and plants get this energy from sunlight. Animals do the opposite: they eat plants, and use a small fraction of the carbon from plant molecules as building material. What happens to the rest of the carbon, you may wonder? It is used as an energy source, to stay alive! The carbon reacts with oxygen from the air, which results in CO&lt;sub&gt;2&lt;/sub&gt;. This releases energy, in fact the same energy that plants needed to break the CO&lt;sub&gt;2&lt;/sub&gt; apart in the first place. The reaction of (in this case) carbon-based molecules with oxygen is also known as &lt;em&gt;oxidation&lt;/em&gt;, or more commonly, &lt;em&gt;combustion&lt;/em&gt; or &lt;em&gt;burning&lt;/em&gt;. An average human combusts quite a lot of food every day, and from it produces around 1 kg of CO&lt;sub&gt;2&lt;/sub&gt;. This means that on an average day, the carbon dioxide you exhale roughly has the weight of a pack of sugar!&lt;/p&gt;
&lt;p&gt;To put it differently, together we humans exhale around 7 billion kilos of CO&lt;sub&gt;2&lt;/sub&gt;. That may sound like a lot (and it is), but it&amp;rsquo;s only around 1% of the roughly 575 billion kg CO&lt;sub&gt;2&lt;/sub&gt; that all living beings pump into the atmosphere on a given day. And us living beings have been doing this for quite a while, yet the CO&lt;sub&gt;2&lt;/sub&gt;-concentration in the air remains remarkably constant. The reason for this is that plants, algae and oceans also remove roughly 589 billion kg CO&lt;sub&gt;2&lt;/sub&gt; from the atmosphere per day. Natural emission and absorption of atmospheric CO&lt;sub&gt;2&lt;/sub&gt; are therefore almost in balance.&lt;sup id="fnref:carbonbalance"&gt;&lt;a class="footnote-ref" href="#fn:carbonbalance"&gt;4&lt;/a&gt;&lt;/sup&gt; However, a significant source of extra CO&lt;sub&gt;2&lt;/sub&gt; was added quite recently. Below ground are all sorts of fossil remains of plants and animals, buried in the course of millions of years. In some spots, these remains have formed a reservoir of concentrated carbon compounds. We know this as oil, natural gas or coal. From the 18&lt;sup&gt;th&lt;/sup&gt; century onward, people have begun digging up these remains. Not that we particularly enjoy digging up dead things, but burning these carbon compounds does yield a lot of energy. And we need this energy to power our modern society: Over 80% of the energy produced by humans, is produced from such &lt;em&gt;fossil fuels&lt;/em&gt;. In most western countries this percentage is higher, in my home country of The Netherlands for instance it is 92%.&lt;sup id="fnref:worldenergy"&gt;&lt;a class="footnote-ref" href="#fn:worldenergy"&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Obviously, burning all this dug up carbon does not just yield energy, it also yields CO&lt;sub&gt;2&lt;/sub&gt;. This relatively recent source emits around 23 billion kg extra CO&lt;sub&gt;2&lt;/sub&gt; into the atmosphere on a daily basis. This comes down to an average of 3.3 kg per person per day, three times what we breathe out ourselves. And there is no extra sink for this extra source. Worse, the Earth&amp;rsquo;s capacity to remove CO&lt;sub&gt;2&lt;/sub&gt; from the air has &lt;em&gt;decreased&lt;/em&gt; in recent centuries, in part due to the large scale removal of forests. The result is that the concentration of CO&lt;sub&gt;2&lt;/sub&gt; in the atmosphere has increased, with almost 50% in two centuries. Moreover, this increase is accelerating.&lt;/p&gt;
&lt;p&gt;So far, this is all not very controversial. The recent increase in CO&lt;sub&gt;2&lt;/sub&gt; can be measured, and its causes are quite well known. Less clear however, is what effect this extra CO&lt;sub&gt;2&lt;/sub&gt; will have. One of the consequences is an enhanced greenhouse effect. This is simply because the extra CO&lt;sub&gt;2&lt;/sub&gt; will cause extra heat to be trapped by the atmosphere. The problem is, we&amp;rsquo;re not sure &lt;em&gt;how much&lt;/em&gt; extra heat, precisely, and we also don&amp;rsquo;t know how this effect will develop in the coming century. There is no doubt that the average temperature is currently rising.&lt;sup id="fnref:temperature"&gt;&lt;a class="footnote-ref" href="#fn:temperature"&gt;6&lt;/a&gt;&lt;/sup&gt; We can also say with a high certainty that this is, at least in part, due to an enhanced greenhouse effect. But the climate is a complex system with many feedbacks, so what will happen in the long term? Many predictions and projections have been made, but fact is that &lt;em&gt;no-one really knows what will happen&lt;/em&gt;.&lt;sup id="fnref:uncertainty"&gt;&lt;a class="footnote-ref" href="#fn:uncertainty"&gt;7&lt;/a&gt;&lt;/sup&gt; Basically, two centuries ago we started the largest experiment in human history. And this experiment is virtually uncontrollable, the outcome is unknown and there is no panic button, should things go wrong.&lt;sup id="fnref:experiment"&gt;&lt;a class="footnote-ref" href="#fn:experiment"&gt;8&lt;/a&gt;&lt;/sup&gt; Maybe, this should worry us.&lt;/p&gt;
&lt;h3&gt;Acid is the new base&lt;/h3&gt;
&lt;p&gt;Of course, it might just turn out fine. Maybe the extra CO&lt;sub&gt;2&lt;/sub&gt; will hardly have an effect, and all will be tickety-boo. On the other hand, maybe it will lead to runaway climate warming, rendering large parts of the planet unsuitable for agriculture. We don&amp;rsquo;t know. Personally, I think that&amp;rsquo;s a &lt;em&gt;pretty big&lt;/em&gt; risk to take.&lt;sup id="fnref:climaterisk"&gt;&lt;a class="footnote-ref" href="#fn:climaterisk"&gt;9&lt;/a&gt;&lt;/sup&gt; But even if you really don&amp;rsquo;t believe that CO&lt;sub&gt;2&lt;/sub&gt; contributes to climate change, or if you believe that this will not really be a problem, there are other reasons why an increase in atmospheric CO&lt;sub&gt;2&lt;/sub&gt; &lt;em&gt;should&lt;/em&gt; worry you. &lt;/p&gt;
&lt;p&gt;Part of the extra CO&lt;sub&gt;2&lt;/sub&gt; that ends up in the atmosphere, will eventually dissolve in surface water. For the global temperature this is a good thing, as it reduces the warming effect. But if carbon dioxide dissolves in water, it becomes an acid, known as carbonic acid. Dissolved CO&lt;sub&gt;2&lt;/sub&gt; is what provides the &amp;ldquo;sparkle&amp;rdquo; in carbonated water (and in most soft drinks), and carbonic acid is what gives it a slightly sour taste. Carbonated water has a pH value between 3 and 4. Luckily, surface water contains rather less carbon dioxide than carbonated water does. Most of the surface water consists of oceans, and sea water tends to have an average pH just above 8. Those of you that have paid attention in chemistry class may know that this is not acidic. Rather, it&amp;rsquo;s the opposite: slightly &lt;em&gt;basic&lt;/em&gt;.&lt;sup id="fnref:pH"&gt;&lt;a class="footnote-ref" href="#fn:pH"&gt;10&lt;/a&gt;&lt;/sup&gt; As far as we know, the average pH of sea water has remained fairly constant over the last 24 million years or so, between 8.1 and 8.3.&lt;sup id="fnref:phco2"&gt;&lt;a class="footnote-ref" href="#fn:phco2"&gt;11&lt;/a&gt;&lt;/sup&gt; However, over the last decades, the average pH of the ocean water has been declining rapidly, from around 8.2 to just under 8.1.&lt;!---http://www.scientificamerican.com/article/rising-acidity-in-the-ocean/---&gt; The oceans are becoming less basic, or to put it another way, they are becoming more acidic. A 0.1 unit decrease in pH may seem minuscule. In fact, in a glass of tap water it would be. But the oceans are not a glass of tap water, we&amp;rsquo;re talking about a well-buffered system with &lt;em&gt;a LOT&lt;/em&gt; of water. In this situation, structural decrease in pH isn&amp;rsquo;t just a tiny natural variation. And for life in the oceans, a small decrease can be a big problem, especially given how fast it&amp;rsquo;s happening. Many of the smaller sea animals have an external skeleton that consists of calcium carbonate. Think sea shells, but also coral, and even some types of plankton. If water becomes more acidic, calcium dissolves more easily, and it becomes harder to build and maintain an exoskeleton. The current, rapid acidification of ocean water can lead (and probably already does lead) to large-scale extinction of corals, plankton and molluscs. And as these creatures are at the base of the ocean food chain, this could endanger the stability of the entire oceanic ecosystem.&lt;/p&gt;
&lt;p&gt;As with the climate, no-one really knows what&amp;rsquo;s going to happen to the oceans. Even scientists cannot see the future, they can only extrapolate from current knowledge and trends. It could be that the effects of increased CO&lt;sub&gt;2&lt;/sub&gt; levels are not so bad as we expected, and we&amp;rsquo;ll wonder what all the fuss was about. In fifty years we&amp;rsquo;ll probably know. On the other hand, the effects could also turn out as bad as we expected, or worse. In that case, we&amp;rsquo;ll probably wonder why the hell we didn&amp;rsquo;t act earlier. In any case, if we just sit around and do nothing, we&amp;rsquo;re taking a pretty big risk. It would be like playing Russian roulette with the stability of both the climate and the ocean ecosystem. And that&amp;rsquo;s, probably, not a good idea.&lt;/p&gt;
&lt;h3&gt;War, crises and resources&lt;/h3&gt;
&lt;p&gt;Risk management isn&amp;rsquo;t the only reason to curb the human emissions of CO&lt;sub&gt;2&lt;/sub&gt;. The underlying cause of these emissions, burning fossil carbon for energy, is actually a problem in itself. The largest reserves of fossil fuels are controlled by a relatively small number of regimes. And let&amp;rsquo;s just say that not all of these regimes are particularly known for their reliability and good will. Attempts to control and mine fossil fuel reserves have directly or indirectly led to many violent conflicts over the last century, and have caused much human suffering. Control over large fuel reserves gives some countries a lot more influence than might be desirable, and funnels a lot of money into corrupt regimes in Africa and Latin America.&lt;sup id="fnref:fossilcountries"&gt;&lt;a class="footnote-ref" href="#fn:fossilcountries"&gt;12&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Apart from geopolitical considerations, if you value economic stability and poverty reduction, it is unwise to make the world&amp;rsquo;s energy supply dependent on a small number of centralised energy sources.&lt;sup id="fnref:centralenergy"&gt;&lt;a class="footnote-ref" href="#fn:centralenergy"&gt;13&lt;/a&gt;&lt;/sup&gt; If the supply is (temporarily) reduced, or is in danger of being reduced, the price of energy tends to sky-rocket worldwide. And with increased energy prices, the price of almost every product and service goes up fast. This is what happened for instance during the &lt;a href="http://en.wikipedia.org/wiki/1973_oil_crisis"&gt;oil crises of 1973&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/1979_energy_crisis"&gt;1979&lt;/a&gt;, and to a lesser extent during the &lt;a href="http://en.wikipedia.org/wiki/2007%E2%80%9308_world_food_price_crisis"&gt;food crisis of 2007-2008&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, apart from practical considerations, there are also ethical considerations. We could argue that every generation should leave the world as they found it, or preferably in a better state. Currently, this is not what is happening. Granted, socio-economic factors like wealth, technology and health do tend to improve considerably across generations. But playing roulette with the climate system and the oceans, and draining fossil fuels and other natural resources, clearly isn&amp;rsquo;t part of &amp;ldquo;leaving the world in a better state&amp;rdquo;. We still have sufficient fossil fuel reserves to last us at least a few decades. But fossil carbon shouldn&amp;rsquo;t just be considered a fuel, it&amp;rsquo;s a valuable non-renewable resource. One could argue that this resource is too valuable to simply be converted into heat by burning, within a timespan of less than three centuries&amp;hellip;&lt;/p&gt;
&lt;h3&gt;A LOT of energy&lt;/h3&gt;
&lt;p&gt;There is no shortage of arguments for why we should reduce CO&lt;sub&gt;2&lt;/sub&gt; emissions. Unfortunately this is easier said than done! If we add all direct and indirect emissions through consumption and services, then the average Dutchman or -women emits between 38 and 46 kg CO&lt;sub&gt;2&lt;/sub&gt;-equivalent per day. This is over forty times as much as we exhale ourselves! For other western countries the figures are similar: in the UK it&amp;rsquo;s around 42 kg, in Germany 41 kg, in France 36 kg, and in the US it&amp;rsquo;s a bit higher, around 78 kg.
Of these emissions, around 88% is CO&lt;sub&gt;2&lt;/sub&gt;, the rest is mostly methane and N&lt;sub&gt;2&lt;/sub&gt;O.&lt;sup id="fnref:GWP"&gt;&lt;a class="footnote-ref" href="#fn:GWP"&gt;14&lt;/a&gt;&lt;/sup&gt;
And the difficulty is, almost everything we do causes CO&lt;sub&gt;2&lt;/sub&gt; emission, because everything we do requires energy. Switching to alternative energy sources is basically the only way to significantly reduce emissions. But this is not so simple, because we currently use &lt;strong&gt;a lot&lt;/strong&gt; of energy! An inhabitant of The Netherlands directly and indirectly uses something between 100 and 250 kWh &lt;em&gt;per day&lt;/em&gt;, on average.&lt;sup id="fnref:kWh"&gt;&lt;a class="footnote-ref" href="#fn:kWh"&gt;15&lt;/a&gt;&lt;/sup&gt; Again, for other westerns countries these figures are similar. In many countries, the electricity use is only a small part of the total &lt;em&gt;energy use&lt;/em&gt;. Most of the energy is used to heat houses and offices, to drive vehicles and to produce all the stuff we buy. And that energy is almost entirely derived from fossil fuels.&lt;/p&gt;
&lt;p&gt;Actually our energy use can already be reduced by a fair amount, simply by using the energy we have in a more efficient manner. I will write about this in more detail, in a separate article. But most energy is currently being wasted in transport and in heating. &lt;a href="http://www.withouthotair.com/cA/page_254.shtml"&gt;Internal combustion engines use only around a quarter of the energy from their fuel&lt;/a&gt; for actually moving a vehicle. The other three quarters are discarded into the air as heat, a &amp;ldquo;waste&amp;rdquo; product. An &lt;a href="http://www.withouthotair.com/c20/page_125.shtml"&gt;electromagnetic engine is much more efficient&lt;/a&gt;, with up to around 90% of input power getting converted into movement. Even if you would generate the electricity using coal (which also isn&amp;rsquo;t very efficient), the &lt;a href="http://www.withouthotair.com/c20/page_131.shtml"&gt;indirect emissions of an electrical car&lt;/a&gt; would still be slightly less than the direct emissions from a conventional one. So switching to electrical transport is already a good idea, even though &lt;a href="http://batteryuniversity.com/learn/article/cost_of_power"&gt;storage of electricity&lt;/a&gt; is still a problem. While batteries these days are much more advanced than those two decades ago, they are still impractical and inefficient. Batteries cost a lot of energy, material and money to produce, they&amp;rsquo;re heavy, charging them is slow, their capacity is rather limited and they generally last only a few years.&lt;sup id="fnref:batteries"&gt;&lt;a class="footnote-ref" href="#fn:batteries"&gt;17&lt;/a&gt;&lt;/sup&gt; Therefore, we badly need more investment in developing alternative energy storage!&lt;/p&gt;
&lt;p&gt;In cold and moderate climates, houses and offices are probably the biggest causes of wasted energy. In many countries, buildings are heated by burning gas. The conversion of natural gas into heat is actually extremely efficient.&lt;sup id="fnref:heatefficiency"&gt;&lt;a class="footnote-ref" href="#fn:heatefficiency"&gt;16&lt;/a&gt;&lt;/sup&gt; Unfortunately though, most of this heat tends to escape from buildings pretty rapidly. It is radiated by walls and windows, and it is carried away by moving air, that escapes through cracks, holes and ventilation systems. A lot of energy can be saved by simply keeping the heat inside the building a little longer! Think double glazing, insulating walls and ceilings, closing cracks, using heat exchangers, and in general better design of new houses and offices. Technology may help, but significant energy savings can already be obtained with merely low-tech solutions like insulation. Moreover, we don&amp;rsquo;t really need to obtain all our heat from burning gas, or coal, or wood. Nearly everything we do produces heat as by-product. Heat is our main &amp;ldquo;waste-product&amp;rdquo;, heat everywhere in our environment, and heat is relatively easy to store and move around. By better use of heat pumps and storage buffers, we can heat our buildings with a lot less fossil fuels. Currently there is a lot of interest in placing (photovoltaic) solar panels on houses. But if you live in a moderate to cold climate and want to cut down on fossil fuel use, it makes a lot more sense to start with 
&lt;a href="http://www.withouthotair.com/c21/page_140.shtml"&gt;placing a solar heater on your roof&lt;/a&gt;, installing a heat buffer below your house and modifying your heating system!&lt;/p&gt;
&lt;h3&gt;Alternatives wanted&lt;/h3&gt;
&lt;p&gt;By saving energy and increasing efficiency, we can certainly decrease CO&lt;sub&gt;2&lt;/sub&gt; emissions by a sizeable fraction. But it will not be sufficient. To drastically reduce emissions we will need to solve the underlying issue of energy sources. This will however require some technological development. Many people believe that solar and wind power can provide all the energy we need, but currently &lt;a href="http://www.withouthotair.com/c27/page_203.shtml"&gt;this is not the case&lt;/a&gt;. Perhaps they could, one day, but the windmills and solar panels that are currently on the market produce relatively little energy, do cost a lot of energy and resources to produce, take up a lot of space and are relatively expensive. Moreover, our current energy infrastructure is not suited to such intermittent energy sources. We simply have no efficient way of storing lots of energy for later use. Better alternatives for batteries will no doubt appear at some point. Better solar cell technology is being developed, for instance at institutes like &lt;a href="http://www.erbium.nl/"&gt;AMOLF&lt;/a&gt; in Amsterdam. But it will still take ten to twenty years for such technologies to reach the market. And the problem is, we can&amp;rsquo;t really afford to stand around for twenty years and wait for the technology to get better. If we want to reduce our use of fossil fuels any time soon, we&amp;rsquo;d better start placing as many conventional solar panels and windmills as is practical. They might not yet contribute much to the total energy picture, but they will contribute to an energy transition. The recent increase in demand for solar panels is already driving all kinds of developments in technology and infrastructure. Yet while technological development can be fast, infrastructure will take decades to adapt. We therefore need to invest more in modifying our energy infrastructure, and looking for ways to efficiently store surplus electricity. Especially the latter, energy storage, will be one of the great technological challenges for this generation.&lt;/p&gt;
&lt;p&gt;Apart from renewable energy sources, other technologies are being developed that may contribute to significantly reducing CO&lt;sub&gt;2&lt;/sub&gt;-emissions. A &lt;a href="http://en.wikipedia.org/wiki/Liquid_fluoride_thorium_reactor"&gt;thorium molten salt reactor&lt;/a&gt; may be able to produce nuclear energy without many of the dangers and drawbacks associated with traditional nuclear reactors. However, this technology will still require a few decades of research and development, before it is ready for large-scale application. This applies even more strongly to &lt;a href="http://en.wikipedia.org/wiki/Fusion_power"&gt;nuclear fusion&lt;/a&gt;, which will probably require another half a century or so of research and development.
Until good, large-scale alternatives are available, &lt;a href="http://en.wikipedia.org/wiki/Carbon_capture_and_storage"&gt;CO&lt;sub&gt;2&lt;/sub&gt; capture and storage&lt;/a&gt; could allow us to continue using fossil energy for a few more decades, without many of the associated greenhouse gas emissions. However, capture and storage of CO&lt;sub&gt;2&lt;/sub&gt; isn&amp;rsquo;t free. It requires 20-40% of the energy that is produced, and currently it is not financially viable.&lt;/p&gt;
&lt;p&gt;Whatever ways we will use to produce energy in the future, it&amp;rsquo;s important that we start acting now, and it&amp;rsquo;s important that don&amp;rsquo;t put all our eggs in one basket. If we want to decrease CO&lt;sub&gt;2&lt;/sub&gt;-emissions within a reasonable time frame, then we should start investing now in research and development of new energy technologies, rather than stalling and protecting existing interests. In this respect, most politicians and policy makers seem to show little vision and daring. Let&amp;rsquo;s hope that this will change the coming years.&lt;/p&gt;
&lt;h3&gt;And what can normal people do?&lt;/h3&gt;
&lt;p&gt;Important transitions in societies are seldom to never driven by politicians and policy makers. Important transitions happen because sufficient people want them to happen, because they can happen, or because we don&amp;rsquo;t have a choice. As a citizen and as a voter you influence politics, and you influence others around you. And as consumer, employee, researcher, entrepreneur, policy maker, teacher or whatever role you may fulfil, you don&amp;rsquo;t have to wait for politics, science or business sectors to start making large-scale changes. In your work and in your private life you can make choices, and in this way influence society. Granted, probably only a small part of society, but a part nonetheless. So make choices. Try to reduce your energy use, and thereby your emissions. Set an example.&lt;/p&gt;
&lt;!--- But the following figure is ... **TODO: een voorschot?**
[![CO2-uitstoot](http://sustainsubstance.org/images/co2-voetafdruk-consumptie-nl.png)](http://sustainsubstance.org/images/co2-footprint-consumption-nl.png) ---&gt;

&lt;p&gt;I will end with a rather superficial list of things you can do to reduce your CO&lt;sub&gt;2&lt;/sub&gt;-emissions. In one of my next articles I will break down our greenhouse gas emissions from consumption in more detail, to see where the largest gains can be made. But for now, it will suffice to state that by far the largest fraction of our &lt;em&gt;CO&lt;sub&gt;2&lt;/sub&gt;-footprint&lt;/em&gt; is formed by our buying consumption goods, by road and air traffic and by energy use at home. This footprint can be significantly reduced with a few relatively simple measures:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Don&amp;rsquo;t buy things you don&amp;rsquo;t need. This may sound obvious, but take some time to check with yourself how many of the things you buy are &lt;em&gt;actually&lt;/em&gt; required. Collectively we buy enormous amounts of food we don&amp;rsquo;t eat, clothes we hardly wear, trinkets and gadgets that sit unused in a cupboard, cheap devices that are outdated or break within a few months or years, and all kinds of other stuff that we think we need, but in the end &lt;a href="http://www.ted.com/talks/graham_hill_less_stuff_more_happiness"&gt;doesn&amp;rsquo;t really contribute to our happiness&lt;/a&gt;. But all this stuff does cost a lot of energy and other resources to produce.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you do really need something, first see if you borrow, rent or lease it, or try to buy it second-hand. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you stop using stuff, don&amp;rsquo;t simply throw it in the garbage. Municipal waste tends to be either burned or sent to landfill. Either way, it ends up as CO&lt;sub&gt;2&lt;/sub&gt;, methane and/or as other forms of pollution. This is a shame, because many of the products and materials that are thrown away can easily be reused or recycled in some way. If things are still remotely usable, try selling them, giving them away or bring them to a second-hand store. Outdated or broken electronics equipment should be handed in at a recycling point, as it contains precious (and often toxic) materials that can easily be reused. It will cost you a little extra effort and time, but indirectly it can save a lot of energy and other resources.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make sure that the walls and attic (or roof, or ceiling) of your house, apartment or room are well insulated. Close cracks and holes through which warm air can escape. Consider adapting your warm water installation by fitting a heat pump, a solar heater and heat storage. Also consider installing photovoltaic solar panels, especially if you have a heat pump. If you rent your house, check with the house owner for possibilities regarding insulation and sustainable energy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you don&amp;rsquo;t live in a particularly hilly area and road safety allows it, consider using a bicycle for short-distance travels. You can also consider getting an electric bicycle for longer distances, or for hilly roads. When cycling is not an option but public transport is present and bearable, travelling by train or bus is preferable to car or aeroplane. If you know your way around the train systems (especially discount tickets) and book a few weeks in advance, international travel by train &lt;em&gt;can&lt;/em&gt; be cheaper than flying, or can be just as cheap. This is the case in many European countries, e.g. between cities such as Amsterdam, Berlin, London, Brussels and Paris. Over such distances, the amount of time you can save by flying is quite limited anyway, due to the overhead of getting to and from the airport and standing in line.&lt;br&gt;
Moreover, one or two long holidays are preferable to a lot of short trips, especially for intercontinental travel. And if you do travel by car, try to take as many people as you can. Using car-sharing networks such as Blablacar may allow you to reduce both cost and fossil fuel use. And who knows, you may even meet some interesting people along the way&amp;hellip;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Interested in reading more articles like this? Follow us &lt;a href="https://www.facebook.com/sustainsubstance"&gt;on Facebook&lt;/a&gt;, on &lt;a href="https://twitter.com/levienvanzon"&gt;Twitter&lt;/a&gt;, or subscribe to our &lt;a href="https://groups.google.com/d/forum/sustainsubstance"&gt;mailing list&lt;/a&gt; or &lt;a href="/feeds/all.atom.xml"&gt;Atom-feed&lt;/a&gt;.
This article is occasionally updated. &lt;a href="https://github.com/lvzon/sustainsubstance/commits/master/content/CO2/CO2.md"&gt;View the page history&lt;/a&gt;. &lt;/p&gt;
&lt;hr&gt;
&lt;h3&gt;Notes:&lt;/h3&gt;
&lt;!---Direct historical measures of ocean pH (on the scale of millions of years) do not exist.  However, scientists have used proxies (e.g., boron isotopes from ancient plankton shells) to formulate reasonable estimates of historic ocean pH. Pearson and Palmer (2000 Nature) use this technique, and show that global average surface ocean pH has varied over time (though not necessarily cyclically), but that it has been relatively stable over the past 24 million years, ranging from 8.3-8.1.  Most importantly, changes in average surface pH appear to be gradual, on the scale of tens of thousands to millions of years.  What concerns scientists most about the recent observed, and predicted, changes in ocean pH is that it is extremely - unprecedentedly - rapid.
http://switchboard.nrdc.org/blogs/lsuatoni/why_scientists_agree_ocean_aci.html---&gt;

&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:polls"&gt;
&lt;p&gt;&lt;em&gt;More than half of people worldwide do not believe climate change to be a serious problem.&lt;/em&gt; &lt;br&gt;
The exact figures will vary between polls and countries, of course. A &lt;a href="http://www.gallup.com/poll/147203/Fewer-Americans-Europeans-View-Global-Warming-Threat.aspx"&gt;2010 Gallup survey in 111 countries&lt;/a&gt; indicated that on average 42% of adults worldwide considered global warming to be a threat. Countries that scored below 50% included China, Russia and many countries from Africa, Asia and Eastern Europe. However, it also included The Netherlands, Sweden, Finland and Denmark. The US, often considered a nation of climate sceptics, actually scores above 50% when it comes to climate worries. This year&amp;rsquo;s Gallup environmental poll indicates that around &lt;a href="http://www.gallup.com/poll/168617/global-warming-climate-change-difference.aspx"&gt;56-60% of Americans are worried about climate change&lt;/a&gt;, while &lt;a href="http://www.gallup.com/poll/168620/one-four-solidly-skeptical-global-warming.aspx"&gt;25% do not believe global warming to be a serious problem&lt;/a&gt;. 
A &lt;a href="http://ec.europa.eu/clima/citizens/support/docs/report_2014_en.pdf"&gt;study by the European Commission in 2013&lt;/a&gt; found that 69% of Europeans ranks climate-change as a serious problem, 21% ranks it as a moderate problem and 9% ranks it as being relatively unimportant. Interestingly, only 25% of Europeans seem to think they have a personal responsibility in tackling climate change. A &lt;a href="http://www.nielsen.com/content/dam/corporate/us/en/reports-downloads/2011-Reports/nieslen-sustainability-report.pdf"&gt;2011 report by Nielsen&lt;/a&gt; states that 19% of the Dutch respondents were not worried by climate change. Moreover, 33% did not have an opinion, and 48% were worried. This places The Netherlands far below the European average. 
However, according to a &lt;a href="http://www.pbl.nl/sites/default/files/cms/publicaties/klimaatveranderingmensenwerk.pdf"&gt;poll by TNS Nipo in 2007&lt;/a&gt; 90% of the Dutch public does believe that the climate is changing, and 80% believe that humans contribute to this. But 27% of respondents was not really interested in the issue, almost half was tired of the subject and more than half was not really sure what to believe anymore.&amp;#160;&lt;a class="footnote-backref" href="#fnref:polls" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:ppmco2"&gt;
&lt;p&gt;&lt;em&gt;Relatively speaking, there&amp;rsquo;s only a tiny amount of CO&lt;sub&gt;2&lt;/sub&gt; in the air, less than one part in a thousand. In the natural situation this is around 0.03% by volume, or ±300 ppm.&lt;/em&gt; &lt;br&gt;
Obviously, there is no such thing as a &amp;ldquo;natural&amp;rdquo; CO&lt;sub&gt;2&lt;/sub&gt;-concentration. As far as we know, the atmospheric CO&lt;sub&gt;2&lt;/sub&gt;-concentration has varied a lot over the last several hundreds of millions of years. During recent ice ages it was around 180 ppm, in the tropical climates of the Mesozoic era (the Triassic, Jurassic and Cretaceous periods) it was around 2000 ppm, and during the Cambrian era it is possible that concentrations were as high as 7000 ppm. However, the world was, quite literally, a different place back then. During the last two interglacials (the periods between ice ages), atmospheric concentrations of CO&lt;sub&gt;2&lt;/sub&gt; seem to have been rather consistently between 260 and 300 ppm. Some studies do estimate slightly higher values, above 300 ppm, but this is still significantly lower than the current-day concentration, which is over 400 ppm. Moreover, measurements from ice cores suggest that the concentration has been remarkably stable during the last few millennia, around 280 ppm. Measurements that are based on plant stomata (the openings that plants use to breathe) suggest a somewhat higher variation over the last few centuries, between 260 and 320 ppm, and concentrations up to 400 ppm during previous interglacials. This still seems to be below current-day values, and because human societies mostly developed during the last few millennia, I will consider 300 ppm to be the &amp;ldquo;natural&amp;rdquo; pre-industrial average, with a &amp;ldquo;normal&amp;rdquo; variation of 20-40 ppm around this level.&amp;#160;&lt;a class="footnote-backref" href="#fnref:ppmco2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:greenhouse"&gt;
&lt;p&gt;&lt;em&gt;&amp;hellip; together with water vapour and a couple of other gases, CO&lt;sub&gt;2&lt;/sub&gt; is responsible for what we call the greenhouse effect.&lt;/em&gt; &lt;br&gt;
Actually this name is somewhat misleading, because the mechanism behind the greenhouse effect is different than the mechanism in an actual greenhouse. However, the effect is the same: in both cases heat gets trapped. The Earth receives &lt;em&gt;a lot&lt;/em&gt; of energy from the Sun on a daily basis, but around half of this is immediately reflected, and the other half is fairly rapidly radiated back into space. Water vapour, CO&lt;sub&gt;2&lt;/sub&gt; and several other gases absorb a large part of this outgoing radiation, and re-radiate part of it back in the direction the Earth&amp;rsquo;s surface.
&lt;a href="http://ed.ted.com/lessons/how-quantum-mechanics-explains-global-warming-lieven-scheire"&gt;This video by the TED-Ed project&lt;/a&gt; nicely explains how the greenhouse effect works.&amp;#160;&lt;a class="footnote-backref" href="#fnref:greenhouse" title="Jump back to footnote 3 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:carbonbalance"&gt;
&lt;p&gt;&lt;em&gt;Natural emission and absorption of atmospheric CO&lt;sub&gt;2&lt;/sub&gt; are therefore almost in balance.&lt;/em&gt; &lt;br&gt;
Seen over longer time scales, this isn&amp;rsquo;t the case of course. During the Holocene (the last 4000 centuries or so) the atmospheric concentration of CO&lt;sub&gt;2&lt;/sub&gt; varied between 180 and 300 (possibly 400) ppm. But during the current interglacial, the CO&lt;sub&gt;2&lt;/sub&gt;-concentration seems to have been fairly stable, which suggests that emission to and absorption from the atmosphere were roughly balanced. More importantly, the historical variations that did occur, seem to have occurred relatively slowly, especially if you compare it to the rate at which the CO&lt;sub&gt;2&lt;/sub&gt;-concentration is currently increasing.&amp;#160;&lt;a class="footnote-backref" href="#fnref:carbonbalance" title="Jump back to footnote 4 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:worldenergy"&gt;
&lt;p&gt;&lt;em&gt;Over 80% of the energy produced by humans, is produced from such &lt;/em&gt;fossil fuels&lt;em&gt;. In most western countries this percentage is higher.&lt;/em&gt; &lt;br&gt;
According to the &lt;a href="http://www.iea.org/publications/freepublications/publication/key-world-energy-statistics-2013.html"&gt;2013 Key World Energy Statistics&lt;/a&gt; of the International Energy Agency (IEA), in 2011 the world used around 13113 Mtoe (&lt;em&gt;million tonnes oil equivalent&lt;/em&gt;) of energy from primary sources. This is roughly 152504 TWh (&lt;em&gt;terawatt-hour&lt;/em&gt;) of energy (1 TWh is a billion kWh, or 3600 terajoules, and 1 Mtoe is 11.63 TWh). This comes down to 21786 kWh per world citizen in 2011, or an average of 60 kWh per person per day. Of this energy, 31.5% comes from oil, 28.8% from coal and peat, and 21.3% from natural gas. All together, 81.6% of the energy we used in 2011 (124443 TWh) was derived from fossil fuels. The rest was mostly derived from biomass and waste material (10%), nuclear fission (5.1%), hydroelectric power (2.3%) and &amp;ldquo;other sources&amp;rdquo; (1%). This last category includes renewable energy sources, such as solar energy, wind power and geothermal energy. It&amp;rsquo;s clear that, at a global scale, sustainable energy sources do not contribute significantly to our energy supply. The main renewable energy sources are firewood and hydropower, and both of these sources are often exploited at the expense of natural ecosystems and small communities. &lt;br&gt;
A part of the energy from fossil fuels is converted into electricity, whereby a sizeable fraction (around 60%) of the energy is lost as heat.
Due to such losses, around 8918 Mtoe (103716 TWh, or 68% of the primary energy) was available to end users, in the form of oil (40.8%), electricity (17.7%), natural gas (15.5%), biomass and waste (12.5%), coal and peat (10.1%) and other sources (3.4%). Oil is mainly (62.3%) used for transport, and gas, biomass, coal and peat are primarily used to produce heat for industry, offices and households. &lt;br&gt;
In total, burning non-renewable energy sources in 2011 caused 31342 Mt (megatonnes) of CO&lt;sub&gt;2&lt;/sub&gt; to be emitted, around 92% of total human CO&lt;sub&gt;2&lt;/sub&gt;-emissions, and 64% of total human greenhouse gas emissions. Of these emissions, 44% comes from burning coal and peat, 35.3% from oil, 20.2% from natural gas en 0.5% from waste and other sources. &lt;br&gt;
Around 40% of our global energy supply (5239 Mtoe in 2012) is used by the 34 relatively wealthy OECD-contries (the Organisation for Economic Co-operation and Development). These countries represent roughly 18% of the world population (1.26 billion people in 2013). The average energy use per OECD-citizen is therefore more than two times the world average, around 48356 kWh per person in 2012, or 132 kWh per person per day. &lt;br&gt;
In the Netherlands, the gross energy use in 2012 was 951 TWh (according to &lt;a href="http://epp.eurostat.ec.europa.eu/portal/page/portal/energy/data/main_tables"&gt;Eurostat&lt;/a&gt;). Of this, around 92% is derived from fossil fuels: 41.4% from oil, 40.4% from natural gas, 10% from coal, 4.3% from renewable sources (including biomass), 1.2% from nuclear energy and 0.9% from waste.&amp;#160;&lt;a class="footnote-backref" href="#fnref:worldenergy" title="Jump back to footnote 5 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:temperature"&gt;
&lt;p&gt;&lt;em&gt;There is no doubt that the average temperature is currently rising.&lt;/em&gt; &lt;br&gt;
Even if you would doubt that such temperature measurements are accurate and representative, there is sufficient evidence for a structural increase in average global surface temperature. The extent of polar ice, glaciers and plant- and animal-populations are good natural indicators of long-term temperature trends. The size of nearly all of the world&amp;rsquo;s glaciers has decreased significantly over the last few decades, and the same applies to land and sea ice at the poles. Many plant and animal species in moderate climates have shifted their range in the direction of the poles, and the tree line has shifted upward in many mountain regions.&amp;#160;&lt;a class="footnote-backref" href="#fnref:temperature" title="Jump back to footnote 6 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:uncertainty"&gt;
&lt;p&gt;&lt;em&gt;But the climate is a complex system with many feedbacks, so what will happen in the long term? Many predictions and projections have been made, but fact is that no-one really knows what will happen.&lt;/em&gt; &lt;br&gt;
In my opinion, denying uncertainty does not contribute to the climate discussion. Granted, many climate deniers use the existence of uncertainty to generate doubt. The response is often to point to broad scientific consensus. Unfortunately this can be counterproductive, as to some this may suggest absolute certainty. And this is misleading, as there&amp;rsquo;s no such thing as absolute certainty. In a recent interview with de Volkskrant (27 September 2014), logician Johan van Benthem said the following: &amp;ldquo;Many scientists choose that approach: we&amp;rsquo;ll shout them into silence. We&amp;rsquo;ll keep loudly insisting that we&amp;rsquo;re right. And as long as we keep stamping out every spark, reason will prevail. Unfortunately, history has shown that it simply doesn&amp;rsquo;t work that way. Often, scientists will present their knowledge as something fixed, something on which there is consensus. They&amp;rsquo;re basically saying: we thought about the ins and outs with a number of very smart people, and now there&amp;rsquo;s consensus, which you can use to convince others. Personally, I have a different idea about science. I see science as a form of organised discussion, and the power of science is in the quality of that discussion. The fact that we keep differences in opinion open for discussion, that is where we obtain progress. The image that science should emit is one of discussion and debate. I believe that this will make us stronger, because this way you indicate: we&amp;rsquo;re familiar with differences in opinion. And if you open these for discussion, in our way and following our norms, you will gain progress.&amp;rdquo; &lt;br&gt;
It is true that there is broad consensus among scientists regarding &lt;em&gt;the existence of an enhanced greenhouse effect&lt;/em&gt;. However, this consensus does not cover the scale of the problem, or the effects in the long term, and I think that it&amp;rsquo;s important to be open about this.&amp;#160;&lt;a class="footnote-backref" href="#fnref:uncertainty" title="Jump back to footnote 7 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:experiment"&gt;
&lt;p&gt;&lt;em&gt;Basically, two centuries ago we started the largest experiment in human history. And this experiment is virtually uncontrollable, the outcome is unknown and there is no panic button, should things go wrong.&lt;/em&gt; &lt;br&gt;
A cynic might state that this applies to the development of humanity in general. This does not make it less worrying.&amp;#160;&lt;a class="footnote-backref" href="#fnref:experiment" title="Jump back to footnote 8 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:climaterisk"&gt;
&lt;p&gt;&lt;em&gt;Maybe the extra CO&lt;sub&gt;2&lt;/sub&gt; will hardly have an effect, and all will be tickety-boo. Personally, I think that&amp;rsquo;s a pretty big risk to take.&lt;/em&gt; &lt;br&gt;
A nice 15 minute explanation of global warming and why we should be worried, is given in &lt;a href="https://www.youtube.com/watch?v=A7ktYbVwr90"&gt;this TEDx talk by David Roberts&lt;/a&gt;.&amp;#160;&lt;a class="footnote-backref" href="#fnref:climaterisk" title="Jump back to footnote 9 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:pH"&gt;
&lt;p&gt;&lt;em&gt;sea water tends to have an average pH just above 8. Those of you that have paid attention in chemistry class may know that this is not acidic. Rather, it&amp;rsquo;s the opposite: slightly basic.&lt;/em&gt; &lt;br&gt;
pH is a measure of acidity. Pure water has a pH-value of 7, which is considered neutral. A pH below 7 is acidic, and higher pH is called basic. Strong acids can be damaging to life, as can strong bases. Think sulfuric acid, and potassium-hydroxide (a strong base, often used as chemical agent to unclog sinks). However, even small variations in pH can already have large effects on biological processes, especially where single celled organisms and small water-organisms are involved.&amp;#160;&lt;a class="footnote-backref" href="#fnref:pH" title="Jump back to footnote 10 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:phco2"&gt;
&lt;p&gt;&lt;em&gt;As far as we know, the average pH of sea water has remained fairly constant over the last 24 million years or so, between 8.1 and 8.3.&lt;/em&gt; &lt;br&gt;
This seems odd at first sight, as the atmospheric CO&lt;sub&gt;2&lt;/sub&gt;-concentration has been rather variable over the same period. You might expect that the pH of the oceans would follow the atmospheric concentration of CO&lt;sub&gt;2&lt;/sub&gt;, but this does not seem to be the case. Probably, the oceans are good at regulating the concentration of dissolved CO&lt;sub&gt;2&lt;/sub&gt; and buffering the pH of the water, provided that the concentration changes aren&amp;rsquo;t too rapid. Currently however, the &lt;a href="http://switchboard.nrdc.org/blogs/lsuatoni/why_scientists_agree_ocean_aci.html"&gt;rise in oceanic CO&lt;sub&gt;2&lt;/sub&gt;-concentration seems to outrun the ocean&amp;rsquo;s buffering capacity&lt;/a&gt;.&amp;#160;&lt;a class="footnote-backref" href="#fnref:phco2" title="Jump back to footnote 11 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:fossilcountries"&gt;
&lt;p&gt;&lt;em&gt;Attempts to control and mine fossil fuel reserves have directly or indirectly led to many violent conflicts over the last century, and have caused much human suffering. Control over large fuel reserves gives some countries a lot more influence than might be desirable&lt;/em&gt; &lt;br&gt;
I do not mean to suggest that you should consider countries such as the US or Russia as &amp;ldquo;evil states&amp;rdquo;. However, Russia does use its oil and gas reserves for geopolitical gain (for which you can&amp;rsquo;t really blame them I guess). And since the &lt;em&gt;Carter doctrine&lt;/em&gt;, it has been the policy of the US to secure their oil supply, using military force if needed. It is unlikely that this doctrine has done the stability of the Middle East much good. Moreover, the US army itself is probably the organisation that uses the most oil world-wide. In 2001 alone, the US army probably used more than 85 million barrels (an estimate from the book &lt;a href="http://books.google.nl/books/about/Crude.html?id=dW9vsUjQc8MC"&gt;Crude: The Story of Oil&lt;/a&gt;). And in 2010 the author &lt;a href="http://www.akpress.org/howbadarebananas.html"&gt;Mike Berners-Lee&lt;/a&gt; estimated the emissions from the military operation in Iraq at 250-600 billion tonnes CO&lt;sub&gt;2&lt;/sub&gt;-equivalent. This is roughly what all the inhabitants of The Netherlands emit in two years. &lt;br&gt;
Obviously, mining fossil fuels can have some beneficial effects, mostly in the short term. Until around 1994, the Netherlands built their welfare state on the state income from selling natural gas. In the long term however, this isn&amp;rsquo;t necessarily a good thing. In fact, the example of the Netherlands is known as &lt;a href="http://en.wikipedia.org/wiki/Dutch_disease"&gt;the Dutch disease&lt;/a&gt;.
Currently, the Dutch treasury receives over 10 billion euros per year from selling gas. But as the gas reserves in the north of the country are shrinking, &lt;a href="http://www.dnb.nl/binaries/OS65_tcm46-186972.pdf"&gt;this source of income is expected to decrease in coming years&lt;/a&gt;. And it is certainly not unthinkable that the reduced state income from fossil reserves will have to be compensated at some point by further spending cuts regarding the welfare society.&amp;#160;&lt;a class="footnote-backref" href="#fnref:fossilcountries" title="Jump back to footnote 12 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:centralenergy"&gt;
&lt;p&gt;&lt;em&gt;&amp;hellip;if you value economic stability and poverty reduction, it is also unwise to make the world&amp;rsquo;s energy supply dependent on a small number of centralised energy sources.&lt;/em&gt;
Note that this applies both to fossil fuels and sustainable energy sources. An important concept that is often promoted for sustainable energy production, is building large-scale solar power plants in the desert. But becoming largely dependent on desert solar power would provide single points of failure, and interruptions in the supply would be disastrous. On the other hand, it is unlikely that we would ever be as dependent on large solar power plants as we currently are on oil&amp;hellip;&amp;#160;&lt;a class="footnote-backref" href="#fnref:centralenergy" title="Jump back to footnote 13 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:GWP"&gt;
&lt;p&gt;&lt;em&gt;Of these emissions, around 88% is CO&lt;sub&gt;2&lt;/sub&gt;, the rest is mostly methane and N&lt;sub&gt;2&lt;/sub&gt;O.&lt;/em&gt; &lt;br&gt;
Methane (CH&lt;sub&gt;4&lt;/sub&gt;) as a greenhouse gas has around a 25-fold bigger effect than CO&lt;sub&gt;2&lt;/sub&gt;. And the greenhouse effect of nitrous oxide (N&lt;sub&gt;2&lt;/sub&gt;O, also known as laughing gas) is almost 300 bigger than that of CO&lt;sub&gt;2&lt;/sub&gt;. In both cases we&amp;rsquo;re talking about estimated potential warming (&lt;em&gt;global warming potential&lt;/em&gt;) over a period of 100 years (GWP&lt;sub&gt;100&lt;/sub&gt;). Both gases are present at very low concentrations in the atmosphere (less than 1 ppm), but both do have a significant warming effect. &lt;a href="http://www.eci.ox.ac.uk/research/energy/downloads/methaneuk/chapter02.pdf"&gt;Methane&lt;/a&gt; is a relatively light gas, and therefore ends up relatively high in the atmosphere. Here it stays on average about 10 years, after which it degrades into water and CO&lt;sub&gt;2&lt;/sub&gt;. These are both again greenhouse gases, which moreover have a bigger effect at higher altitudes. &lt;a href="http://www.unep.org/pdf/UNEPN2Oreport.pdf"&gt;Nitrous oxide&lt;/a&gt; has a much longer lifespan than other greenhouse gases, it remains in the atmosphere for over a century (on average). Moreover, it isn&amp;rsquo;t just a greenhouse gas, but also contributes to degrading the ozone layer.&amp;#160;&lt;a class="footnote-backref" href="#fnref:GWP" title="Jump back to footnote 14 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:kWh"&gt;
&lt;p&gt;&lt;em&gt;An inhabitant of The Netherlands directly and indirectly uses something between 100 and 250 kWh per day, on average.&lt;/em&gt; &lt;br&gt;
The kilowatt-hour (kWh, or technically kW·h) is a unit mostly used to express electricity-use. A kilowatt-hour is the amount of energy consumed in an hour, by a device that uses 1000 Watt. In SI-units this is 3.6 MJ (megajoule). However, following author &lt;a href="http://www.withouthotair.com"&gt;David MacKay&lt;/a&gt;, I will use kWh as general unit for energy use, because many people are already familiar with it (e.g. from their electricity bill).&amp;#160;&lt;a class="footnote-backref" href="#fnref:kWh" title="Jump back to footnote 15 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:heatefficiency"&gt;
&lt;p&gt;&lt;em&gt;In many countries, buildings are heated by burning gas. The conversion of natural gas into heat is actually extremely efficient.&lt;/em&gt; &lt;br&gt;
In fact, all the energy released in burning gas (or anything else) is eventually turned into heat, so in principle one could say the conversion efficiency is 100%. However, in a gas-powered heating system, not all of the heat is released into the building. Some of it escapes through the exhaust, so the efficiency of most gas-heaters is somewhere from 70% to 95%.&amp;#160;&lt;a class="footnote-backref" href="#fnref:heatefficiency" title="Jump back to footnote 16 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:batteries"&gt;
&lt;p&gt;&lt;em&gt;Batteries cost a lot of energy, material and money to produce, they&amp;rsquo;re heavy, charging them is slow, their capacity is rather limited and they generally last only a few years.&lt;/em&gt; &lt;br&gt;
At the moment, the dominant type of electricity storage is the lithium-ion (Li-ion) battery. These are the batteries that are used in most phones, laptops and electric vehicles, mainly because they have a high energy-density (energy stored per unit weight or volume of battery). However, the drawback is that after about three years, the performance of most Li-ion batteries tends to start decreasing rapidly. Under optimal temperature- and charge-conditions, some types can be made to last at most 10-15 years or so. Higher temperatures will make a battery &lt;a href="http://batteryuniversity.com/learn/article/what_causes_lithium_ion_to_age"&gt;degrade faster&lt;/a&gt;, as will fully discharging it. A trick therefore used to extend battery life in electrical cars is to only partially discharge the batteries during normal use. This saves you having to replace the batteries every few years. The drawback is of course that you cannot use the batteries to their full capacity, while you do still have to haul their weight around (which requires energy). Additionally, the Tesla electric sports car and several other electric vehicles utilise a cooling system for their battery packs, which increases life span and &lt;a href="http://batteryuniversity.com/learn/article/safety_concerns_with_li_ion"&gt;safety&lt;/a&gt;, but again also increases weight. To compensate for the weight of the batteries, the Tesla&amp;rsquo;s aluminium frame is designed to minimise weight and drag. &lt;br&gt;
There are many &lt;a href="http://batteryuniversity.com/learn/article/types_of_lithium_ion"&gt;Li-ion battery variants&lt;/a&gt;. Laptops and phones mostly use lithium cobalt oxide batteries, which have a high capacity but do not last very long. &lt;em&gt;Lithium iron phosphate&lt;/em&gt; (Li-phosphate) batteries have a much &lt;a href="http://eliiypower.co.jp/english/technology/index.html"&gt;longer life span, and are safe&lt;/a&gt;. However, they are less frequently used due to their somewhat lower (initial) capacity. The Tesla model S uses &lt;em&gt;lithium nickel cobalt aluminum oxide&lt;/em&gt; (NCA) batteries, which have the advantage of high capacity and a relatively long life span, but are also more expensive and prone to overheating. &lt;br&gt;
Apart from the most &lt;a href="http://batteryuniversity.com/learn/article/secondary_batteries"&gt;common types of batteries&lt;/a&gt;, such as &lt;a href="http://batteryuniversity.com/learn/article/lead_based_batteries"&gt;lead acid&lt;/a&gt; (&amp;ldquo;car batteries&amp;rdquo;), Li-ion and NiMH, there are &lt;a href="http://batteryuniversity.com/learn/article/alternate_battery_systems"&gt;alternate battery technologies&lt;/a&gt; that may hold some promise. The venerable &lt;a href="http://www.nickel-iron-battery.com/"&gt;Nickel-iron battery&lt;/a&gt;, developed by Edison in 1901, is currently seeing a bit of a revival in solar-power storage, due to its low cost and extremely long life span. Modern lead-acid derivatives such as the &lt;a href="http://www.csiro.au/Outcomes/Energy/Storing-renewable-energy/Ultra-Battery.aspx"&gt;CSIRO UltraBattery&lt;/a&gt; also hold promise, although the much-hyped &lt;a href="http://grist.org/business-technology/progress-rarely-glows-blue-eestor-and-the-lure-of-new-technology/"&gt;EEStor ultracapacitor has spectacularly failed to materialise&lt;/a&gt;.
&lt;a href="http://batteryuniversity.com/learn/article/fuel_cell_technology"&gt;Hydrogen fuel-cells&lt;/a&gt;, another big hype (in the 1990s), are also unlikely to be a viable solution for energy storage any time soon.&amp;#160;&lt;a class="footnote-backref" href="#fnref:batteries" title="Jump back to footnote 17 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="misc"></category><category term="CO2"></category><category term="climate"></category></entry><entry><title>Video Processing and Encoding</title><link href="//gnuritas.org/encodevideo.html" rel="alternate"></link><published>2014-06-20T16:58:00+02:00</published><updated>2018-01-09T23:11:30+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2014-06-20:/encodevideo.html</id><summary type="html">&lt;p&gt;For a couple of years there have been a number of great open-source
programs around for encoding video, both in Windows and (Ubuntu) Linux.
Some of them provide a nice graphical user interface, but the best ones
are still commandline tools, such as &lt;a href="http://www.ffmpeg.org/documentation.html"&gt;ffmpeg&lt;/a&gt; and &lt;a href="http://www.mplayerhq.hu/design7/info.html#docs"&gt;MEncoder&lt;/a&gt;. They
are extremely flexible, but unfortunately also have a bewildering number
of commandline options. This page lists a few invocations I regularly
use.&lt;/p&gt;
&lt;h3&gt;Extracting DVD titles&lt;/h3&gt;
&lt;p&gt;To extract a single title from a DVD, first copy the DVD to harddisk:  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;dvdbackup -M&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Next, use totem or vlc (under Plackback-&amp;gt;Title) to find out the number
of the title you want. For our example we&amp;rsquo;ll assume that the DVD files
are in a directory called DVD_VOLUME/ and that we want the second
title. Finally, copy the title …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For a couple of years there have been a number of great open-source
programs around for encoding video, both in Windows and (Ubuntu) Linux.
Some of them provide a nice graphical user interface, but the best ones
are still commandline tools, such as &lt;a href="http://www.ffmpeg.org/documentation.html"&gt;ffmpeg&lt;/a&gt; and &lt;a href="http://www.mplayerhq.hu/design7/info.html#docs"&gt;MEncoder&lt;/a&gt;. They
are extremely flexible, but unfortunately also have a bewildering number
of commandline options. This page lists a few invocations I regularly
use.&lt;/p&gt;
&lt;h3&gt;Extracting DVD titles&lt;/h3&gt;
&lt;p&gt;To extract a single title from a DVD, first copy the DVD to harddisk:  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;dvdbackup -M&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Next, use totem or vlc (under Plackback-&amp;gt;Title) to find out the number
of the title you want. For our example we&amp;rsquo;ll assume that the DVD files
are in a directory called DVD_VOLUME/ and that we want the second
title. Finally, copy the title to a separate file using mencoder:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mencoder -dvd-device DVD_VOLUME/ "dvd://2" -ovc copy -oac copy -of mpeg -o title_2.mpeg&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will create an MPEG2 file containing just the title you specified.
You can of course select a &lt;a href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-selecting-codec.html"&gt;different container format&lt;/a&gt; with the &lt;code&gt;-of&lt;/code&gt;
parameter, or a codec other than &lt;code&gt;copy&lt;/code&gt; to transcode the file. To leave
out audio, use &lt;code&gt;-nosound&lt;/code&gt; instead of &lt;code&gt;-oac copy&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Cutting/selecting part of a video&lt;/h3&gt;
&lt;p&gt;With the &lt;a href="http://en.wikibooks.org/wiki/Mplayer#Split.2Fsub-section_videos"&gt;options &lt;code&gt;-ss&lt;/code&gt; and &lt;code&gt;-endpos&lt;/code&gt;&lt;/a&gt; 
you can tell mencoder to
process only a part of the input file. Note that mencoder can currently
only split streams on keyframes, and the position used with &lt;code&gt;-endpos&lt;/code&gt; is
relative to the start of the output, not the input (so it&amp;rsquo;s perhaps more
logical to think of it as &amp;ldquo;duration&amp;rdquo;). Here&amp;rsquo;s an example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mencoder -ss 05:30 -endpos 12:45 -oac copy -ovc copy input.avi -o output.avi&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You may want to consider &lt;a href="http://avidemux.sourceforge.net/"&gt;avidemux&lt;/a&gt; for a more user-friendly
alternative (which is also &lt;a href="http://www.avidemux.org/admWiki/doku.php?id=using:cutting"&gt;more flexible when it comes to cutting
frames&lt;/a&gt;) .&lt;/p&gt;
&lt;h3&gt;Fast MPEG-4 encoding with FFmpeg&lt;/h3&gt;
&lt;p&gt;I recently needed to rapidly transcode a HDTV-quality H.264 file into
MPEG4, so I could play it decently on an ancient Xbox. The following
worked very well, and finished the job in no-time on my multi-core
machine:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ffmpeg -i input.mp4 -vcodec mpeg4 -threads 2 -b 1500k -acodec libmp3lame -ab 160k output.avi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or if the audio was already fine:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ffmpeg -i input.mp4 -vcodec mpeg4 -threads 2 -b 1500k -acodec copy output.avi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Encoding DVD-compliant MPEG-2 video&lt;/h3&gt;
&lt;p&gt;Check out &lt;a href="http://renomath.org/video/linux/dv/encdvd.html"&gt;Eric Olson&amp;rsquo;s page&lt;/a&gt; on this subject, and his automated
encoding script. I could not get it to encode MP2 audio under Ubuntu
Lucid out-of-the-box, so I used &lt;a href="http://www.twolame.org/"&gt;twolame&lt;/a&gt; to encode the audio
separately. For authoring a DVD, I found &lt;a href="http://www.dvdstyler.org/en/"&gt;DVDStyler&lt;/a&gt; to work quite
nicely, at least once you figure out the somewhat awkward
user-interface&amp;hellip; But at least it doesn&amp;rsquo;t try to re-encode your videos
when they&amp;rsquo;re already in the right format.&lt;/p&gt;
&lt;p&gt;See also:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html"&gt;Using MEncoder to create VCD/SVCD/DVD-compliant files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://womble.decadent.org.uk/talks/dvd-ukuug06/dvd-talk-ukuug06-paper.html"&gt;Creating DVD videos on Linux and Unix&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Extracting audio from a video file&lt;/h3&gt;
&lt;p&gt;You can do this with FFMPEG by specifying &lt;code&gt;-vn&lt;/code&gt; to disable video. You
can use any output format and codec, but for best results don&amp;rsquo;t reencode
(&lt;code&gt;-acodec copy&lt;/code&gt;) and choose an output file-format that matches the audio
codec used in the video file. You can use e.g. &lt;code&gt;mplayer&lt;/code&gt; or &lt;code&gt;ffprobe&lt;/code&gt; to
check whether the audio track is AAC (use .aac / .m4a / .mp4 for
output), MP3 (use .mp3), MP2 (use .mp2), PCM (use .wav or .flac) or
something else. If in doubt, use FLAC output for lossless encoding
without huge files. Use &lt;code&gt;-acodec pcm_s16le&lt;/code&gt; if you want uncompressed
.wav files. Some examples:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ffmpeg -i input.flv -vn -acodec copy output.m4a&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ffmpeg -i input.avi -vn output.flac&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Note that you can tag MPEG-4 files using &lt;a href="http://www.nero.com/enu/technologies-aac-codec.html"&gt;neroAacTag&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Encoding interlaced PAL DV to H.264&lt;/h3&gt;
&lt;p&gt;If you want to archive interlaced 4:3 PAL DV material without wasting
too much disk-space or losing too much quality, try encoding it to
interlaced H.264. Use a recent version of x264, e.g. from
&lt;a href="https://launchpad.net/~jon-severinsson/+archive/ffmpeg"&gt;ppa:jon-severinsson/ffmpeg&lt;/a&gt; or &lt;a href="https://launchpad.net/~motumedia/+archive/mplayer-daily"&gt;ppa:motumedia/mplayer-daily&lt;/a&gt;. If
quality is important, try the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;x264 --bff --sar 12:11 --threads auto --preset veryslow --crf 20 -o output.mp4 input.avi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Increase the CRF to 23-25 for smaller but slightly lower-quality files,
and change the &lt;a href="http://dev.gentoo.org/~beandog/x264_preset_reference.html"&gt;preset&lt;/a&gt; to &lt;code&gt;slower&lt;/code&gt;, &lt;code&gt;slow&lt;/code&gt; or &lt;code&gt;medium&lt;/code&gt; to increase
the encoding speed at the cost of some quality and/or size.&lt;/p&gt;
&lt;p&gt;x264 does not encode audio, so you&amp;rsquo;ll need to encode it separately (e.g.
&lt;code&gt;ffmpeg -i input.avi -vn output.flac&lt;/code&gt;)&lt;br&gt;
and then multiplex. For audio encoding, you could also use an external
encoder, such as the &lt;a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=44310"&gt;Nero AAC encoder&lt;/a&gt; or LAME (for mp3).&lt;/p&gt;
&lt;p&gt;Multiplexing with ffmpeg is easy, for example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ffmpeg -i video.mp4 -i audio.m4a/mp3/flac/wav -vcodec copy -acodec copy output.mp4&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll probably want to combine the entire operation into a
shell-script. Something like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;#!/bin/bash

in=$1
out=$2
subdir=

if [ -z &amp;quot;$1&amp;quot; ]; then
  echo &amp;quot;Usage: $0 infile [outfile]&amp;quot;
  exit
fi

if [ -z &amp;quot;$out&amp;quot; ]; then
  out=&amp;quot;${in%avi}mp4&amp;quot;
fi

if [ &amp;quot;$subdir&amp;quot; ]; then
  if [ ! -d $subdir ] 
    then mkdir -p $subdir
  fi

  out=$subdir/$out
fi

if [ -e $out ]; then
  echo &amp;quot;Error: outfile $out already exists (or is same as infile)&amp;quot;
  exit
fi

echo Encoding $in to $out

x264 --bff --sar 12:11 --threads auto --preset slow --crf 21 -o tmp-video.m4v $in
ffmpeg -i $in -vn tmp-audio.wav
neroAacEnc -q 0.75 -if tmp-audio.wav -of tmp-audio.m4a
ffmpeg -i tmp-video.m4v -i tmp-audio.m4a -acodec copy -vcodec copy $out

rm tmp-video.m4v tmp-audio.wav tmp-audio.m4a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Generating black video to match an audio track&lt;/h3&gt;
&lt;p&gt;FFMpeg is capable of &lt;a href="http://stackoverflow.com/questions/12368151/adding-silent-audio-to-mov-in-ffmpeg"&gt;adding a silent audio track to a video&lt;/a&gt;, or if
you provide an audio track that is shorter than the video, FFMpeg allows
you to pad the audio with silence to match the video length (using
&lt;code&gt;-apad -shortest&lt;/code&gt;). Sometimes however, you may need to do it the other
way around: generate blank video to match a longer audio track.
Unfortunately this can not be easily accomplished with FFMpeg. So far,
the only method I&amp;rsquo;ve found is to manually split the audio track into two
parts, generate a blank video sequence for the additional audio, and
concatenate the two. This is far from ideal. Nonetheless, this is how
you can generate a blank video sequence to match an audio track:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ffmpeg -i audio.m4a -f lavfi -i color=black:1280x720 -r 30 -vcodec libx264 -preset slow -crf 24 -acodec copy -shortest output.mp4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The above example will generate a 30fps 1280x720 black video sequence,
encode it as H.264 and multiplex it with the audio.&lt;/p&gt;
&lt;h3&gt;Concatenating video files&lt;/h3&gt;
&lt;p&gt;This is another operation that is easy with MEncoder but quite hard with
FFMpeg (depending on the version you&amp;rsquo;re using). As of FFMpeg 1.1, there
are &lt;a href="http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files"&gt;several official ways to concatenate videos&lt;/a&gt;. To concatenate
MPEG4-files (or any MPEG-format) on Linux, you can also use &lt;code&gt;cat&lt;/code&gt;, as
long as you convert the files to MPEG Transport Streams before
concatenating. This example works for H.264 video with AAC audio in an
MPEG4-container:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ffmpeg -i video1.mp4 -acodec copy -vcodec copy -vbsf h264_mp4toannexb video1.ts
ffmpeg -i video2.mp4 -acodec copy -vcodec copy -vbsf h264_mp4toannexb video2.ts
cat video1.ts video2.ts &amp;gt;videofull.ts
ffmpeg -i videofull.ts -isync -acodec copy -vcodec copy -absf aac_adtstoasc videofull.mp4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Encoding PAL DV to MPEG-4 video&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The below is a bit outdated, it needs to be updated&amp;hellip;&lt;/p&gt;
&lt;p&gt;I use Kino to capture DV video from my camcorder over FireWire. As I
have a rather cheap camcorder, the result tends to be somewhat noisy. I
compress it using MEncoder, and I usually set it co constant quality
(vqscale=4, use a value of 3 or 2 for better quality), switch on noise
reduction (nr=600) and some high-quality options
(mbd=2:trell=yes:v4mv=yes), and I apply a deinterlacing filter to the
source (-vf-add kerndeint). I force the fourcc identifier to MP4V,
because not all players recognise the default FMP4 identifier. Also, you
have to explicitly provide the aspect ratio (4:3 for PAL) for it to be
stored in the AVI output header.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mencoder -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell=yes:v4mv=yes:nr=600:vqscale=4:aspect=4/3 -oac mp3lame -lameopts vbr=3 -vf-add kerndeint -ffourcc MP4V -o mpeg4-output.avi dv-input.avi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Kino usually splits the DV stream into multiple files, so after
compression I join them together again using:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mencoder -oac copy -ovc copy -of avi -force-avi-aspect 4/3 -o merged-output.avi fragment1.avi fragment2.avi fragment3.avi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note that of course you can already join multiple fragments during the
encoding step. Also, use of variable bitrate (VBR or ABR) in the MP3
audio stream may sometimes cause your audio and video to go out of sync.
To prevent that you can use something like &lt;code&gt;-lameopts cbr:br=160:mode=0&lt;/code&gt;
to force stereo audio with a constant bitrate (128, 160 or 192 kbps
should be fine) instead of a variable one.&lt;/p&gt;
&lt;p&gt;To get a smaller file, you could consider using either multipass
encoding or encoding with a more advanced codec such as H.264. For
multipass encoding, leave out the vqscale option and run mencoder
several times, providing the options vpass=1:turbo, vpass=2, etc. for
each pass.&lt;/p&gt;
&lt;p&gt;To &lt;a href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html"&gt;encode as an H.264 AVI file&lt;/a&gt; with AAC audio, you should be able to
use something like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mencoder -ovc x264 -x264encopts threads=auto:subq=5:8x8dct:frameref=2:bframes=3:weight_b:crf=24 -force-avi-aspect 4/3 -vf hqdn3d,kerndeint,scale -oac faac -o output-h264.avi input-dv.avi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Increase the crf value to get a smaller file, or decrease it for higher
quality. It&amp;rsquo;s probably a good idea to convert the AVI file to an
IsoMedia (MPEG-4 part 14) stream afterwards, e.g. using MP4Box from the
Ubuntu gpac package.:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mplayer -dumpvideo -dumpfile output-h264.h264 output-h264.avi
mplayer -dumpaudio -dumpfile output-h264.aac output-h264.avi
MP4Box -add output-h264.avi -new output-h264.mp4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Unfortunately MP4Box complains about the video stream (Cannot find H264
start code), I&amp;rsquo;m not sure why.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update (2012-09-08):&lt;/strong&gt; &lt;br&gt;
Recent versions of &lt;code&gt;ffmpeg&lt;/code&gt; can also be used to
convert (or encode directly to) mp4.&lt;/p&gt;
&lt;p&gt;If it does work, the result should play fine using something like
MPlayer or VLC, but unfortunately not with Quicktime 7. To make the file
playable by Quicktime 7, reduce the encoding options in the mplayer
commandline to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;-x264encopts threads=auto:subq=5:frameref=2:crf=24
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;hr&gt;
&lt;h3&gt;See also&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.mplayerhq.hu/DOCS/HTML/en/encoding-guide.html"&gt;The MPlayer encoding guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ffmpeg.org/ffmpeg-doc.html"&gt;FFmpeg documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://howto-pages.org/ffmpeg/"&gt;FFmpeg audio/video manipulation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.varesano.net/blog/fabio/ffmpeg%20some%20useful%20tricks"&gt;ffmpeg: some useful tricks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="misc"></category><category term="technical"></category><category term="howto"></category><category term="video"></category></entry><entry><title>Replacing the volume knob on a Kenwood amplifier</title><link href="//gnuritas.org/kenwoodvolumeknob.html" rel="alternate"></link><published>2013-08-21T11:38:00+02:00</published><updated>2019-05-02T19:14:23+02:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2013-08-21:/kenwoodvolumeknob.html</id><summary type="html">&lt;p&gt;For some reason, repairing broken equipment is one of these tasks that I
tend to put off for months, if not years, because it feels like it&amp;rsquo;s
going to be a lot of hassle.&lt;/p&gt;
&lt;p&gt;About a year ago the volume knob broke off my &lt;a href="http://www.kenwood.de/products/home/kompo/avcc/KRF-V5090D-S/details/"&gt;Kenwood KRF-V5090D audio
video surround receiver&lt;/a&gt; during transport. For a while I was able to
make it work again by gluing the parts back together, using a matchstick
and some polyurethane resin. In the end, this didn&amp;rsquo;t hold though, and it
became increasingly difficult to set the volume. Given that I bought the
thing quite cheaply in a second-hand store and the remote control was
missing, I decided to try and replace the volume knob myself. The
amplifier is a member of the Kenwood KRF-V and VR …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For some reason, repairing broken equipment is one of these tasks that I
tend to put off for months, if not years, because it feels like it&amp;rsquo;s
going to be a lot of hassle.&lt;/p&gt;
&lt;p&gt;About a year ago the volume knob broke off my &lt;a href="http://www.kenwood.de/products/home/kompo/avcc/KRF-V5090D-S/details/"&gt;Kenwood KRF-V5090D audio
video surround receiver&lt;/a&gt; during transport. For a while I was able to
make it work again by gluing the parts back together, using a matchstick
and some polyurethane resin. In the end, this didn&amp;rsquo;t hold though, and it
became increasingly difficult to set the volume. Given that I bought the
thing quite cheaply in a second-hand store and the remote control was
missing, I decided to try and replace the volume knob myself. The
amplifier is a member of the Kenwood KRF-V and VR series, which all seem
to be similar (and mostly share the same remote control unit). The
&lt;a href="http://manual.kenwood.com/files/B60-5529-00.pdf"&gt;manual&lt;/a&gt; can be found on the Kenwood site.  &lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://www.hifi-review.com/images/archive/Kenwood_KRF-V6090D_550.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Being a &amp;ldquo;digital&amp;rdquo; amplifier, the design doesn&amp;rsquo;t use a good old
potentiometer for setting the volume. Instead, the volume knob is
connected to an &lt;a href="http://en.wikipedia.org/wiki/Rotary_encoder#Incremental_rotary_encoder"&gt;incremental rotary encoder&lt;/a&gt;. Unfortunately the ALPS
encoder used by Kenwood is rather cheaply fitted with a hollow plastic
shaft, which can quite easily break off at the base if sideways pressure
is applied, which is exactly what happened. Annoyingly the encoder in
question also doesn&amp;rsquo;t state a parts number, so it&amp;rsquo;s hard to determine
what type it is. Some measuring and searching revealed that it must be
either a 24-pulse &lt;a href="http://www.alps.com/WebObjects/catalog.woa/E/HTML/Encoder/Incremental/EC12E/EC12E2430803.html"&gt;EC12E2430803&lt;/a&gt; or a 12-pulse &lt;a href="http://www.alps.com/WebObjects/catalog.woa/E/HTML/Encoder/Incremental/EC12E/EC12E1220813.html"&gt;EC12E1220813&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://www.alps.com/WebObjects/catalog.woa/E/image/Switch/Encoder/EC12E/EC12E_D_41.GIF"&gt;&lt;/p&gt;
&lt;p&gt;I went with the EC12E2430803 (a correct guess as it turned out), which
can be cheaply ordered from &lt;a href="http://nl.farnell.com/alps/ec12e2430803/encoder-vertical-12mm-24det-24ppr/dp/2065072"&gt;Farnell&lt;/a&gt;, among others. Opening the
amplifier case is easy, but removing the front print and desoldering the
controller does require a bit of work and patience. Be sure to have a
good look at how the pins are connected before you desolder them, as all
three pins need to be connected (and after desoldering this can be a bit
hard to see, especially if you somewhat damage the print while
soldering, as I tend to do). All in all the entire procedure of taking
the amplifier apart, replacing the controller and putting everything
back together took about twenty minutes, which makes one wonder why I
put it off for so long. Of course, looking up the controller type and
ordering it took a lot more time, which is why I wrote this page. I hope
it will be of use to someone in the future. :-)&lt;/p&gt;</content><category term="misc"></category><category term="technical"></category><category term="howto"></category></entry><entry><title>Tips on designing, writing and debugging individual based simulations</title><link href="//gnuritas.org/simulationadvice.html" rel="alternate"></link><published>2012-03-08T18:01:25+01:00</published><updated>2019-05-02T19:16:54+02:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2012-03-08:/simulationadvice.html</id><summary type="html">&lt;p&gt;&lt;em&gt;This post was originally written in 2012, and was slightly updated in 2017.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When I first started writing
stochastic, individual-based computer simulations in 2005, I
thought it would be a pretty straightforward job. Although I&amp;rsquo;m
technically a biologist, I already had quite some (self-taught)
experience in C-programming and knew about Object Orient programming.
Also, my history of hand-optimising assembly code for the Atari Falcon
had taught me a thing or two about writing fast code. Or so I thought.
Of course I then proceeded to walk into just about every trap that a
naive non-professional software developer can walk into&amp;hellip; Here are some
of the things I learned over the past years, quite a few of these by trial
and error&amp;hellip;&lt;/p&gt;
&lt;h3&gt;Debugging&lt;/h3&gt;
&lt;p&gt;It is often said that a software developer spends 50 …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;This post was originally written in 2012, and was slightly updated in 2017.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When I first started writing
stochastic, individual-based computer simulations in 2005, I
thought it would be a pretty straightforward job. Although I&amp;rsquo;m
technically a biologist, I already had quite some (self-taught)
experience in C-programming and knew about Object Orient programming.
Also, my history of hand-optimising assembly code for the Atari Falcon
had taught me a thing or two about writing fast code. Or so I thought.
Of course I then proceeded to walk into just about every trap that a
naive non-professional software developer can walk into&amp;hellip; Here are some
of the things I learned over the past years, quite a few of these by trial
and error&amp;hellip;&lt;/p&gt;
&lt;h3&gt;Debugging&lt;/h3&gt;
&lt;p&gt;It is often said that a software developer spends 50% of his time
designing code, 50% of his time implementing it and 400% of his time on
debugging*. This is probably an understatement. Moreover, bugs are
especially problematic in scientific software, as they may invalidate
all your results&amp;hellip; (*: Thanks Bastiaan, for that quote! ;) Here are
some points that may significantly help you reduce both the risk of
serious bugs, and the time spent debugging:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Test your code frequently in the design-phase. Write dedicated
    testing code for the different parts of the simulation, if needed
    (unit-testing).&lt;/li&gt;
&lt;li&gt;Compile with all warnings enabled (e.g. -Wall in GCC), and read the
    warnings!&lt;/li&gt;
&lt;li&gt;Insert plenty of debugging code and sanity checks. More is better!
    Use #ifdef to enable/disable such code-blocks if needed (for
    speed).&lt;/li&gt;
&lt;li&gt;Use a family of status/error logging functions or macros, so you can
    specify verbosity.&lt;/li&gt;
&lt;li&gt;Always compile test-runs with debugging information (-g and -ggdb on
    GCC) and perform your test-runs in &lt;a href="http://www.gnu.org/software/gdb/"&gt;GDB
    or&lt;/a&gt;&lt;a href="http://www.gnu.org/software/ddd/"&gt;DDD&lt;/a&gt;.
    Disable optimisation if needed.&lt;/li&gt;
&lt;li&gt;Learn &lt;a href="http://www.unknownroad.com/rtfm/gdbtut/gdbtoc.html"&gt;the basics of how to use the GDB/DDD
    debugger&lt;/a&gt;:
    &lt;code&gt;backtrace&lt;/code&gt;, &lt;code&gt;frame&lt;/code&gt; and &lt;code&gt;print&lt;/code&gt; are your friends. Use watchpoints
    for hard-to-catch bugs (e.g. dangling and uninitialised pointers).
    Don&amp;rsquo;t be afraid to insert breakpoints or throw exceptions in your
    debugging code.&lt;/li&gt;
&lt;li&gt;Regularly use
    &lt;a href="http://valgrind.org/" title="http://valgrind.org/"&gt;Valgrind&lt;/a&gt; to check
    your program for memory leaks and corruptions. Really.&lt;/li&gt;
&lt;li&gt;Consider using safe pointers and other proxy-constructs that can aid
    debugging, but can also be disabled for speed. In C++, consider
    using std::safe_ptr / std::tr1::shared_ptr (or go with the boost
    variants), in combination with #define macros.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;KISS, design and maintenance&lt;/h3&gt;
&lt;p&gt;As any professional software developer knows, design is important.
However, most scientists have had neither training nor have experience
in software design. This is a problem. A bad design will generally get
you into trouble further down the road. No design will mostly result in
one big mess. Spend some time on reading about software design and on
designing your program before you start to code. Also, Keep It Simple,
Stupid.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Design your class-structure beforehand, try to use established
    &lt;a href="http://www.oodesign.com/"&gt;design patterns&lt;/a&gt; such as
    &lt;a href="http://www.oodesign.com/strategy-pattern.html"&gt;encapsulation&lt;/a&gt;, but
    don&amp;rsquo;t over-design things. Realise that your program will evolve,
    which means that your design *will* get messed up sooner or later.
    Don&amp;rsquo;t be afraid to re-factor your code when needed, and don&amp;rsquo;t wait
    too long with that.&lt;/li&gt;
&lt;li&gt;Start by implementing data-dump (and restore) functionality. This
    will not only allow you to save/restore simulations, it also greatly
    helps data analysis and debuging.&lt;/li&gt;
&lt;li&gt;Limit the simulation code to performing the actual simulation. Read
    input, perform simulation and dump output. Try to do as much as
    possible (e.g. data preparation and analysis) in higher level
    languages, like Python, Perl/PDL, R or Matlab. This also allows you
    to re-analyse the output without having to re-run the entire
    simulation.&lt;/li&gt;
&lt;li&gt;Keep the simulation code simple. &lt;a href="https://www.facebook.com/notes/kent-beck/competence-1-complexity/362494960450041"&gt;Don&amp;rsquo;t make functions any more
    complicated than they need to
    be.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Use a version-management system! My life has become much easier
    since I started using &lt;a href="http://git-scm.com/"&gt;git&lt;/a&gt;. Regularly commit
    changes, and document your commits. Also, make regular backups of
    your code, notes, git repository and input data. You&amp;rsquo;d be surprised
    at how many people have lost months, if not years of work by
    harddisk-crashes, power-surges or even accidentally typing &lt;code&gt;rm -R *&lt;/code&gt;
    in the wrong terminal&amp;hellip;&lt;/li&gt;
&lt;li&gt;Provide embedded documentation of functions and data structures in
    your source-files, using something like
    &lt;a href="http://www.stack.nl/~dimitri/doxygen/"&gt;Doxygen&lt;/a&gt;, 
    &lt;a href="http://www.naturaldocs.org/"&gt;Naturaldocs&lt;/a&gt; or
    &lt;a href="http://rfsber.home.xs4all.nl/Robo/robodoc.html"&gt;RoboDOC&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Provide a framework to store (at the very least) the parameters of
    all your runs, so you can reproduce earlier results. Also keep notes
    on your simulation-runs and important code developments, a
    lab-journal if you will. Make regular backups of both. I use small
    shell-scripts for launching runs, archiving output and parameters
    and making backups of everything. I also use
    &lt;a href="http://evernote.com/"&gt;Evernote&lt;/a&gt; for at least part of my notes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Performance&lt;/h3&gt;
&lt;p&gt;If your program only runs for a few minutes, speed is not that
important. If on the other hand you have a simulation that needs to run
for several days, every cycle may count. A good design helps: keeping
performance in mind from the start saves you having to redesign the
entire thing to squeeze out some extra speed. However, the bottlenecks
are not always where you think they will be during design, so profiling
your code is essential.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you mostly know Java, consider learning C++. The speed difference
    is immense.&lt;/li&gt;
&lt;li&gt;Use the compiler optimisations that are available! (e.g. &lt;a href="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html"&gt;-O3 on
    GCC&lt;/a&gt;) This
    can easily speed up things by a factor 2 or more. Also provide the
    &lt;a href="http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html"&gt;target-architecture&lt;/a&gt;
    if possible (e.g. &lt;code&gt;-march=core-avx-i&lt;/code&gt; on GCC for newer Intel Core processors, 
    &lt;code&gt;-march=bdver2&lt;/code&gt; for newer AMD processors, &lt;code&gt;-march=amdfam10&lt;/code&gt; for older AMD processors 
    such as the Phenom I, etc.), 
    to make maximum use of processor-specific optimisations.&lt;/li&gt;
&lt;li&gt;Profile your code, from the beginning! A good starting-point is
    Valgrind/Callgrind (&lt;code&gt;valgrind --tool=callgrind ./&lt;/code&gt;[Your binary])
    together with &lt;a href="http://kcachegrind.sourceforge.net/"&gt;kcachegrind&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Make your code modular (to ease maintenance and debugging), but
    consider inlining functions you call very often. Note that the
    compiler can do this for you, have a look at the &lt;a href="http://gcc.gnu.org/onlinedocs/gcc/Inline.html"&gt;GCC
    documentation&lt;/a&gt; and
    the &lt;code&gt;inline&lt;/code&gt; keyword in C++.&lt;/li&gt;
&lt;li&gt;Use a decent pseudo Random Number Generator (e.g. the &lt;a href="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/" title="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/"&gt;SFMT
    RNG&lt;/a&gt;),
    and implement buffering of random numbers if needed (I can provide
    an example of that).&lt;/li&gt;
&lt;li&gt;Some mathematical operations are expensive (e.g. exp() and log()).
    Consider using a processor-optimised implementation (e.g.
    &lt;a href="http://gruntthepeon.free.fr/ssemath/"&gt;sse_mathfun&lt;/a&gt; for SSE capable
    CPUs), a lookup-table (e.g. &lt;a href="http://groups.google.com/group/sci.math.num-analysis/msg/caa76683b2899c55?pli=1"&gt;for
    exponentiation&lt;/a&gt;)
    or an appoximation (e.g.
    &lt;a href="http://cbloomrants.blogspot.com/2009/06/06-21-09-fast-exp-log.html"&gt;fastexp()&lt;/a&gt;) if
    this is a bottleneck, especially if precision is not that important.&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t try to gain performance by saving on debugging code, just use
    compile-time macro&amp;rsquo;s to enable/disable code blocks when needed!&lt;/li&gt;
&lt;li&gt;Consider implementing paralellisation, but try to avoid locking. In
    other words, independent parts of your program can run in parallel,
    but when threads need to write in each other&amp;rsquo;s data structures, the
    locking overhead will significantly reduce the speed benefits of
    multithreading. Again, a good design is important, as is profiling
    to figure out where the performance bottlenecks are. Note that
    &lt;a href="http://openmp.org/"&gt;OpenMP&lt;/a&gt; is really useful for incorporating
    multithreading into existing programs, as it uses compiler
    #pragma&amp;rsquo;s.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Acknowledgements&lt;/h3&gt;
&lt;p&gt;Thanks to &lt;a href="http://www.linkedin.com/pub/patrick-van-der-willik/9/ab5/10"&gt;Patrick van der
Willik&lt;/a&gt; for
providing me with advice on decent programming techniques, Ben Gras for
many a fruitful discussion and for introducing me to git and -many years
ago- C, Max Baak for -among other things- insisting I try C++, Daniel
Weise for yet more fruitful discussions and getting me to look into
multithreading, Nobuto Takeuchi for showing me How Things Should Be Done
and introducing me to SFMT, and Paulien Hogeweg and Rob de Boer for
supervising and teaching me, and for introducing me to this entire
subject in the first place&amp;hellip;&lt;/p&gt;</content><category term="misc"></category><category term="science"></category><category term="technical"></category><category term="biology"></category></entry><entry><title>PDF Tips &amp; Tricks</title><link href="//gnuritas.org/pdftips.html" rel="alternate"></link><published>2011-07-18T00:21:00+02:00</published><updated>2019-08-27T01:25:51+02:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2011-07-18:/pdftips.html</id><summary type="html">&lt;h3&gt;Repairing a damaged PDF-file&lt;/h3&gt;
&lt;p&gt;Ghostscript can &amp;ldquo;repair&amp;rdquo; some damaged or buggy PDF-files, by
regenerating them. Try something like: &lt;/p&gt;
&lt;p&gt;&lt;code&gt;ps2pdf damaged.pdf fixed.pdf&lt;/code&gt;  &lt;/p&gt;
&lt;p&gt;Believe it or not but ps2pdf will happily accept PDF as input, and from
it create a new PDF&amp;hellip; You can use &lt;a href="http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm"&gt;all the usual Ghostscript options&lt;/a&gt;. 
If you don&amp;rsquo;t specify any, default values will be used to
generate the output PDF. But for instance, if you&amp;rsquo;re generating a
high-quality PDF for printing, try:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ps2pdf -dPDFSETTINGS=/prepress damaged.pdf fixed.pdf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is needed to fix PDF files generated by OpenOffice.org 3.2.1, which
have invalid xref entries (&lt;a href="https://bugzilla.novell.com/show_bug.cgi?id=615812"&gt;bug #615812&lt;/a&gt;). 
These PDF files can be viewed in Ubuntu and MacOS X, but cannot be printed in the Windows
version of Adobe Reader.&lt;/p&gt;
&lt;p&gt;Alternatively, you can use …&lt;/p&gt;</summary><content type="html">&lt;h3&gt;Repairing a damaged PDF-file&lt;/h3&gt;
&lt;p&gt;Ghostscript can &amp;ldquo;repair&amp;rdquo; some damaged or buggy PDF-files, by
regenerating them. Try something like: &lt;/p&gt;
&lt;p&gt;&lt;code&gt;ps2pdf damaged.pdf fixed.pdf&lt;/code&gt;  &lt;/p&gt;
&lt;p&gt;Believe it or not but ps2pdf will happily accept PDF as input, and from
it create a new PDF&amp;hellip; You can use &lt;a href="http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm"&gt;all the usual Ghostscript options&lt;/a&gt;. 
If you don&amp;rsquo;t specify any, default values will be used to
generate the output PDF. But for instance, if you&amp;rsquo;re generating a
high-quality PDF for printing, try:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ps2pdf -dPDFSETTINGS=/prepress damaged.pdf fixed.pdf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is needed to fix PDF files generated by OpenOffice.org 3.2.1, which
have invalid xref entries (&lt;a href="https://bugzilla.novell.com/show_bug.cgi?id=615812"&gt;bug #615812&lt;/a&gt;). 
These PDF files can be viewed in Ubuntu and MacOS X, but cannot be printed in the Windows
version of Adobe Reader.&lt;/p&gt;
&lt;p&gt;Alternatively, you can use &lt;code&gt;pdfopt&lt;/code&gt;, which uses Ghostscript to linearise
a PDF file, and should also repair any damage it encounters (where
possible).&lt;/p&gt;
&lt;p&gt;Another method of regenerating a PDF-file is by running it through
&lt;a href="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/"&gt;pdftk&lt;/a&gt;: &lt;/p&gt;
&lt;p&gt;&lt;code&gt;pdftk in.pdf output out.pdf&lt;/code&gt;  &lt;/p&gt;
&lt;p&gt;This should fix any problems in the input PDF-file (where possible), and
produce a linearised output PDF. It may also be required to work around
a bug in the 1.0.1 version of &lt;a href="http://extensions.services.openoffice.org/project/pdfimport"&gt;OpenOffice.org PDF import extension&lt;/a&gt;,
which makes that it only accepts linearised PDF files as input. All
other PDF files produce the rather useless message &amp;ldquo;General Error.
General input/output error&amp;rdquo;. Running them through pdftk should fix this.&lt;/p&gt;
&lt;h3&gt;Printing multiple PDF pages per page&lt;/h3&gt;
&lt;p&gt;To save paper (and weight in my bag), I usually prefer to print PDF
files double-sided, with two PDF pages on each side of the paper. This
is also called 2-up (or generally N-up) printing. Some programs and
printer drivers have a setting for this (e.g. Windows-drivers for many
laserprinters, and Evince in Linux, although this does not always work).
Outside of printing-support,there are (at least) two ways of doing this
on a Linux machine. The easiest is to install the package &lt;a href="http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/firth/software/pdfjam/"&gt;pdfjam&lt;/a&gt; and
use the command &lt;code&gt;pdfnup&lt;/code&gt;, e.g. to combine two portrait pages on one
landscape A4 page:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pdfnup --nup 2 --orient landscape --outfile output2up.pdf input.pdf&lt;/code&gt;  &lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s even a nice Qt GUI for it: &lt;a href="http://qt-apps.org/content/show.php/pdfnup-gui?content=134874."&gt;pdfnup-gui&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Making folded (e.g. A5 or A4) booklets from a PDF-file&lt;/h3&gt;
&lt;p&gt;Either follow this guide, which requires converting to Postscript and
using psbook and psnup: &lt;a href="http://www.peppertop.com/blog/?p=35"&gt;http://www.peppertop.com/blog/?p=35&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or download and compile this little program:
&lt;a href="http://www.ctan.org/tex-archive/support/pdfbook/"&gt;http://www.ctan.org/tex-archive/support/pdfbook/&lt;/a&gt;  &lt;/p&gt;
&lt;p&gt;In Ubuntu, it depends on the following packages:
texlive-latex-recommended (for pdfpages) and poppler-utils or xpdf-utils
(for pdfinfo)  &lt;/p&gt;
&lt;p&gt;It works like a charm, e.g. to create an A5-booklet try something like:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pdfbook -p a4 -2 input.pdf booklet.pdf&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Converting PDF to PNG&lt;/h3&gt;
&lt;p&gt;Sometimes you need to convert a vector image in PDF or PostScript
(PS/EPS) into a bitmap image. For instance, if an application doesn&amp;rsquo;t
support vector images, has trouble rendering them correctly, or when an
image is just too complex to render rapidly (e.g. huge graphs). There
are many ways to perform this conversion, and almost all use
&lt;a href="http://pages.cs.wisc.edu/~ghost/"&gt;Ghostscript&lt;/a&gt; internally.&lt;/p&gt;
&lt;p&gt;For maximum control you can call Ghostscript directly, e.g. to render a
PDF file into a 600 dpi colour PNG:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=png16m -r600 -sOutputFile=output.png input.pdf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However, you can also let &lt;a href="http://imagemagick.org"&gt;ImageMagick&lt;/a&gt; do the dirty work for you:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;convert -density 600x600 -unit PixelsPerInch input.pdf output.png&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Or even:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;convert -density 600 input.pdf output.png&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;More PDF Tips &amp;amp; Tricks&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/replacepdftext.html"&gt;How to search &amp;amp; replace text in a batch of PDF files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/pdf-recompress.html"&gt;Recompressing (optimising) PDF-files&lt;/a&gt; without Adobe software&lt;/li&gt;
&lt;li&gt;&lt;a href="/pdf-fontembedding.html"&gt;Embedding fonts in PDF-files&lt;/a&gt; for third-party printing&lt;/li&gt;
&lt;/ul&gt;</content><category term="misc"></category><category term="howto"></category><category term="technical"></category></entry><entry><title>Useful tricks with spatial data</title><link href="//gnuritas.org/spatialtricks.html" rel="alternate"></link><published>2011-06-25T13:18:00+02:00</published><updated>2018-01-09T22:48:35+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2011-06-25:/spatialtricks.html</id><summary type="html">&lt;p&gt;For my research on Avian Influenza in waterbirds, I recently needed data
on lakes and marsh-areas in Europe. I ended up compiling a spatial
dataset from a number of different sources, including the EU &lt;a href="http://www.eea.europa.eu/data-and-maps/data/corine-land-cover-2000-clc2000-seamless-vector-database-2"&gt;Corine Land Cover database (CLC2000v13)&lt;/a&gt;, 
the &lt;a href="http://www.flake.igb-berlin.de/ep-data.shtml"&gt;lake depth dataset compiled by Ekaterina Kourzeneva for the FLake model&lt;/a&gt; and 
&lt;a href="http://wwwp2.ymparisto.fi/scripts/oiva.asp"&gt;data from the Finnish national lake register&lt;/a&gt;. In order for this to be usable I had to
relate the lakes and marshes in the different datasets to each other. In
other words, I needed to find out which coordinates or polygons in the
different datasets represented the same lakes, and I needed to know
which marsh areas were close to which lakes.&lt;/p&gt;
&lt;p&gt;After searching around a bit and considering several options, I decided
(for several reasons) not to use a full-blown …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For my research on Avian Influenza in waterbirds, I recently needed data
on lakes and marsh-areas in Europe. I ended up compiling a spatial
dataset from a number of different sources, including the EU &lt;a href="http://www.eea.europa.eu/data-and-maps/data/corine-land-cover-2000-clc2000-seamless-vector-database-2"&gt;Corine Land Cover database (CLC2000v13)&lt;/a&gt;, 
the &lt;a href="http://www.flake.igb-berlin.de/ep-data.shtml"&gt;lake depth dataset compiled by Ekaterina Kourzeneva for the FLake model&lt;/a&gt; and 
&lt;a href="http://wwwp2.ymparisto.fi/scripts/oiva.asp"&gt;data from the Finnish national lake register&lt;/a&gt;. In order for this to be usable I had to
relate the lakes and marshes in the different datasets to each other. In
other words, I needed to find out which coordinates or polygons in the
different datasets represented the same lakes, and I needed to know
which marsh areas were close to which lakes.&lt;/p&gt;
&lt;p&gt;After searching around a bit and considering several options, I decided
(for several reasons) not to use a full-blown GIS system or a generic
data-analysis environment such as R. Instead I found that I could easily
do what I needed using a stand-alone spatial database called
&lt;a href="http://www.gaia-gis.it/spatialite/"&gt;Spatialite&lt;/a&gt; (which in turn is basically the well-known &lt;a href="http://www.sqlite.org/"&gt;SQLite&lt;/a&gt;
package with spatial data extensions) and a few lines of &lt;a href="http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html"&gt;Spatial SQL&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After cleaning I should probably publish my dataset online, but here I&amp;rsquo;ll
just give some examples of how I coupled the spatial entities in the
different datasets.&lt;/p&gt;
&lt;p&gt;First, you&amp;rsquo;ll need to download and install Spatialite. Unless you prefer
using just the command-line, you&amp;rsquo;ll probably want the Spatialite GUI as
well. For Mac or Windows, just &lt;a href="http://www.gaia-gis.it/spatialite/binaries.html"&gt;download the binaries from the site&lt;/a&gt;.
If you&amp;rsquo;re on an Ubuntu Linux system, you can install spatialite from the
repositories. However, spatialite-gui isn&amp;rsquo;t in there yet at the time of
writing, so you&amp;rsquo;ll either need to compile from source or install the
newer &lt;a href="http://packages.debian.org/search?keywords=spatialite&amp;amp;searchon=names&amp;amp;suite=unstable&amp;amp;section=all"&gt;Debian sid packages for spatialite-gui&lt;/a&gt; and the required
dependencies (to make life easier, I&amp;rsquo;ll put those up in my Ubuntu PPA as
soon as I have time).&lt;/p&gt;
&lt;p&gt;To complicate things a little bit, the EU Corine Land Use Classification
dataset does not use &amp;ldquo;standard&amp;rdquo; WGS84 latitude/longitude coordinates.
Instead, it uses a &amp;ldquo;Europe-centric&amp;rdquo; ETRS89-LAEA projection with SRID
3035 (see also
&lt;a href="http://grass.fbk.eu/pipermail/grass5/2006-November/027177.html"&gt;http://grass.fbk.eu/pipermail/grass5/2006-November/027177.html&lt;/a&gt;). The
Finnish lake data uses the national KKJ / Finland Uniform Coordinate
System (in Finnish &amp;ldquo;Yhtenäiskoordinaatisto&amp;rdquo; or YKJ), with SRID 2393.
Luckily both do use metre as the spatial unit.&lt;/p&gt;
&lt;p&gt;I used the Corine shapefiles for waterbodies (class ID 512) and marshes
(class ID 411).  &lt;/p&gt;
&lt;p&gt;To avoid problems later on, it&amp;rsquo;s best to &lt;a href="http://levien.zonnetjes.net/?q=shapefiles"&gt;reproject&lt;/a&gt; the CLC
shapefiles to WGS84 (SRID 4326). You can do this using the &lt;a href="http://gdal.org/"&gt;GDAL&lt;/a&gt;
utility &lt;a href="http://www.gdal.org/ogr2ogr.html"&gt;ogr2ogr&lt;/a&gt; (in Ubuntu, just install the package &lt;code&gt;gdal-bin&lt;/code&gt;).
For instance, to reproject the waterbody-data use the following command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ogr2ogr -t_srs EPSG:4326 clc00_waterbodies_wgs84.shp clc00_c512.shp&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The Finnish data consisted of the output from lots of separate
database-queries. As different files were formatted in different ways, I
wrote some Perl-code to filter and combine query-results. And as I was
using Perl anyway, I used the &lt;a href="http://search.cpan.org/~quelcom/Geo-Coordinates-KKJ-0.01/lib/Geo/Coordinates/KKJ.pm"&gt;Geo::Coordinates::KKJ&lt;/a&gt; module to
convert lake-coordinates into WGS84.&lt;/p&gt;
&lt;p&gt;The lake-depth dataset was also pre-processed a bit in Perl, but
(presumably) its coordinates were already in WGS84.&lt;/p&gt;
&lt;p&gt;The next step was to load the data into a Spatialite database. I used
the Spatialite GUI to create a new database-file, to import the CLC
waterbody and marsh shapefiles and to import the CSV-files containing
the Finnish lake data and the European portion of the lake-depth
dataset. If you can&amp;rsquo;t or don&amp;rsquo;t want to use the GUI, you can do the same
with the &lt;a href="http://www.gaia-gis.it/spatialite/spatialite-tutorial-2.3.1.html#t3.2"&gt;.loadshp&lt;/a&gt; and &lt;a href="http://www.sqlite.org/cvstrac/wiki?p=ImportingFiles"&gt;.import&lt;/a&gt; commands in the Spatialite
shell.&lt;/p&gt;
&lt;p&gt;The polygons in the CLC shapefiles represent waterbodies and marsh
areas, and will be imported into database tables as spatial polygon
objects. That is to say, the database will automagically treat the
imported shapefile as a table of spatial objects. This is unfortunately
not the case with the imported CSV-files, you&amp;rsquo;ll need to &lt;a href="http://lugerpitt.blogspot.com/2010/09/loading-latlong-data-into-spatialite.html"&gt;tell the database that the latitude and longitude columns represent spatial coordinates&lt;/a&gt;. The way to do this is a bit convoluted: essentially
you&amp;rsquo;ll need to add a geometry-column with point-objects, and then fill
it with coordinates from the latitude and longitude columns. Say your
table is called &amp;ldquo;finnish_lake_table&amp;rdquo;, and your WGS84 coordinate
columns are called &amp;ldquo;lat&amp;rdquo; and &amp;ldquo;lon&amp;rdquo;, you can do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;SELECT AddGeometryColumn(&amp;#39;finnish_lake_table&amp;#39;, &amp;#39;geometry_column&amp;#39;, 4326, &amp;#39;POINT&amp;#39;, 2);
UPDATE &amp;#39;finnish_lake_table&amp;#39; SET geometry_column = GeomFromText(&amp;#39;POINT(&amp;#39;||lon||&amp;#39; &amp;#39;||lat||&amp;#39;)&amp;#39;, 4326);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The details of how this works are not so important (it creates a
WKT-description of each point, which is then inserted into the table as
a spatial object). After executing this, you&amp;rsquo;ll have a new column called
&amp;ldquo;geometry_column&amp;rdquo; and your rows will be treated by the database as
spatial point objects. Note that now you can also export the table as a
shapefile, using either the GUI or the &lt;a href="http://www.gaia-gis.it/spatialite/spatialite-tutorial-2.3.1.html#t3.1"&gt;.dumpshp command&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After you&amp;rsquo;ve imported the shapefiles and created geometry columns for
any imported CSV-files, you&amp;rsquo;ll also want to &lt;a href="http://www.gaia-gis.it/spatialite/spatialite-tutorial-2.3.1.html#t8"&gt;generate a spatial index&lt;/a&gt;
for all geometry columns. I&amp;rsquo;ll explain why later on. In the GUI, you can
simply right-click on the geometry columns in the database tree-view,
and generate an R-tree spatial index. In the shell you can do it using a
command such as:
&lt;code&gt;SELECT CreateSpatialIndex('finnish_lake_table', 'geometry_column');&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;My next step was to map the point-coordinates representing the Finnish
lakes and the lake-depth data to CLC waterbody IDs. In this example the
columns were called &amp;ldquo;lake_id&amp;rdquo; (Finnish lake ID) and &amp;ldquo;ID&amp;rdquo; (CLC object
ID), and I exported the mapping tables to tab-separated text-files (but
you can equally well store the result as a new table in the database).
In this case I used the spatialite command-shell to execute the
following commands (but you can execute the same query in the GUI):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;.mode&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;list.separator&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="no"&gt;t&lt;/span&gt;
&lt;span class="na"&gt;.output&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;fi_clc_idmap.dat&amp;quot;&lt;/span&gt;
&lt;span class="nf"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;FI.lake_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;CLC.ID&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;finnish_lake_table&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;FI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;clc00_waterbodies_wgs84&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;CLC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;Within&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;FI.geometry_column&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;CLC.Geometry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;CLC.ROWID&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;IN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;pkid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;idx_clc00_waterbodies_wgs84_Geometry&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="no"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;xmin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;FI.geometry_column&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;xmax&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;FI.geometry_column&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;ymin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;FI.geometry_column&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;ymax&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;FI.geometry_column&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="na"&gt;.exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This query looks rather intimidating, but it basically does the
following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set the output to a tab-seperated text-file called
    fi_clc_idmap.dat&lt;/li&gt;
&lt;li&gt;Select the Finnish lake_id and CLC ID columns on which we will
    operate&lt;/li&gt;
&lt;li&gt;Designate FI and CLC as shortcut-names for the two data tables&lt;/li&gt;
&lt;li&gt;If a Finnish lake-coordinate falls inside a CLC waterbody-polygon,
    output both the Finnish lake ID and the CLC object ID&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The part between parentheses at the end of the query is needed to speed
things up a bit. If omitted, the query would work, but would take a very
long time to execute. The reason is that the database would have to
check every point in one table against every polygon in the other table,
which is computationally very costly. The last part of the query uses a
trick based on the R-tree spatial index we created earlier. It first
selects CLC waterbody-polygons for which the Finnish lake-coordinate
falls within the bounding-box of the polygon. This operation is very
fast because it uses the spatial index (here called
idx_clc00_waterbodies_wgs84_Geometry). It subsequently uses the much
slower &lt;code&gt;Within()&lt;/code&gt; function to check if the point is really within any of
those polygons. This way, it takes only a few seconds or minutes to
create the mapping table, instead of the several hours or even days that
would be required to execute the simple &amp;ldquo;brute-force&amp;rdquo; query.&lt;/p&gt;
&lt;p&gt;I used a similar method to create a table of distances between
waterbodies and all marsh-areas with an edge that is within 5 km of the
nearest waterbody-edge:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;.mode&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;list.separator&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="no"&gt;t&lt;/span&gt;
&lt;span class="na"&gt;.output&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;marsh_wetland_distance.dat&amp;quot;&lt;/span&gt;
&lt;span class="nf"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;marsh.ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;lake.ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;Distance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;lake.Geometry&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;marsh.Geometry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;clc00_marshes_wgs84&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;marsh&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;clc00_waterbodies_wgs84&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;lake&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;Distance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;marsh.Geometry&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;lake.Geometry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="no"&gt;.0&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="no"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;lake.ROWID&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;IN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;pkid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;idx_clc00_waterbodies_wgs84_Geometry&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="no"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;xmin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;MbrMaxX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;marsh.Geometry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;xmax&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;MbrMinX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;marsh.Geometry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;ymin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;MbrMaxY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;marsh.Geometry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;ymax&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;MbrMinY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;marsh.Geometry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="na"&gt;.exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As I have rather limited knowledge of &lt;a href="http://www.sqlite.org/lang.html"&gt;SQL&lt;/a&gt; and &lt;a href="http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html"&gt;Spatial SQL&lt;/a&gt;, I
constructed both queries based on the examples mentioned in &lt;a href="http://groups.google.com/group/spatialite-users/browse_thread/thread/34609c7a711ac92d/7688ced3f909039c?lnk=gst&amp;amp;q=index&amp;amp;fwc=1&amp;amp;pli=1"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, for my purpose I didn&amp;rsquo;t need the full set of
waterbody-polygons, as I based my further analyses on tables of lakes
with their associated properties (area, depth, volume, etc.). For
example, I used the following query to export a tab-seperated table of
CLC waterbodies containing object ID, centroid-coordinates of the
polygons (WGS84 latitude and longitude), lake area (in hectares) and
shoreline length (in m):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;.mode&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;list.separator&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="no"&gt;t&lt;/span&gt;
&lt;span class="na"&gt;.output&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;clc_waterbodies_wgs84.dat&amp;quot;&lt;/span&gt;
&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;lake.ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Centroid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;lake.Geometry&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Centroid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;lake.Geometry&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;lake.Area_ha&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;lake.Shape_Leng&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;clc00_waterbodies_wgs84&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;lake&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="na"&gt;.exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Of course apart from the fancy indexing-tricks to speed things up, the
examples I showed here are quite basic. As you can see I immediately
export all query results, rather than keeping them in the database,
because I did all further processing and analysis in external packages
such as Python/Pandas, &lt;a href="http://pdl.perl.org/"&gt;Perl/PDL&lt;/a&gt; and &lt;a href="http://www.r-project.org/"&gt;GNU R&lt;/a&gt;. This approach somewhat reduces the
database to a data-handing tool, which doesn&amp;rsquo;t really do it justice.
Have a look at the &lt;a href="http://www.gaia-gis.it/spatialite/docs.html"&gt;Spatialite documentation and tutorials&lt;/a&gt; to see
what else is possible with Spatialite. For instance, instead of using
text-files as intermediate storage, you can (and probably should)
directly use a spatialite-database as data-store for packages like
&lt;a href="http://www.r-project.org/"&gt;R&lt;/a&gt; and &lt;a href="http://qgis.org/"&gt;QGIS&lt;/a&gt;, as well as any custom code you write in Perl,
Python, C, Java etc. Here are some further resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;a href="http://cran.r-project.org/web/packages/SQLiteMap/index.html"&gt;SQLiteMap&lt;/a&gt; package for R allows you to execute Spatialite
    queries directly from R.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Recent versions of the GDAL library have a &lt;a href="http://www.gdal.org/ogr/drv_sqlite.html"&gt;driver to access Spatialite databases&lt;/a&gt;. This way, you can directly access data in a
    Spatialite database with any application based on GDAL (e.g. the
    &lt;code&gt;ogr2ogr&lt;/code&gt; tool, the &lt;a href="http://cran.r-project.org/web/packages/rgdal/index.html"&gt;rgdal package for R&lt;/a&gt;, &lt;a href="http://pypi.python.org/pypi/GDAL/"&gt;GDAL for Python&lt;/a&gt;,
    the &lt;a href="http://search.cpan.org/search?query=geo-gdal&amp;amp;mode=all"&gt;Geo::GDAL module for Perl&lt;/a&gt;, etc.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;a href="http://code.google.com/p/pyspatialite/"&gt;pyspatialite connector&lt;/a&gt; allows Python-programs to directly
    connect to a Spatialite database. There&amp;rsquo;s apparently also a
    DBD-connector for Perl, but it has &lt;a href="http://osgeo-org.1803224.n2.nabble.com/new-Python-connector-for-SpatiaLite-td4831726.html"&gt;not been released&lt;/a&gt; (yet).&lt;/li&gt;
&lt;/ul&gt;</content><category term="misc"></category><category term="science"></category><category term="technical"></category><category term="biology"></category><category term="gis"></category></entry><entry><title>Fun With Shapefiles</title><link href="//gnuritas.org/shapefiles.html" rel="alternate"></link><published>2011-03-09T19:35:00+01:00</published><updated>2017-12-12T21:41:24+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2011-03-09:/shapefiles.html</id><summary type="html">&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Shapefile"&gt;Shapefiles&lt;/a&gt; are a format developed by &lt;a href="http://www.esri.com/"&gt;ESRI&lt;/a&gt; (the makers of ArcGIS)
to store and share geospatial data. Many interesting datasets are freely
available in shapefile format. Shapefiles can be viewed with a number of
freely available applications, such as &lt;a href="http://www.esri.com/software/arcgis/explorer/index.html"&gt;ArcGIS Explorer&lt;/a&gt; (which
requires the .NET framework or Silverlight) or &lt;a href="http://www.esri.com/software/arcgis/arcreader"&gt;ArcReader&lt;/a&gt; (which is
multi-platform but closed-source). Open-source GIS packages such as
&lt;a href="http://www.qgis.org/"&gt;Quantum GIS&lt;/a&gt; and &lt;a href="http://grass.fbk.eu/"&gt;GRASS&lt;/a&gt; can also view and edit shapefiles, and
recent versions can be installed from the &lt;a href="https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable"&gt;UbuntuGis PPA&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However GIS applications can be tricky to use without training.
Moreover, sometimes you may want to use shapefile-data for some other
purpose, outside of traditional GIS applications. Here are a few useful
tricks you can do with shapefiles, and ways to get data out of a
shapefile and into another application.&lt;/p&gt;
&lt;h2&gt;Reprojecting a …&lt;/h2&gt;</summary><content type="html">&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Shapefile"&gt;Shapefiles&lt;/a&gt; are a format developed by &lt;a href="http://www.esri.com/"&gt;ESRI&lt;/a&gt; (the makers of ArcGIS)
to store and share geospatial data. Many interesting datasets are freely
available in shapefile format. Shapefiles can be viewed with a number of
freely available applications, such as &lt;a href="http://www.esri.com/software/arcgis/explorer/index.html"&gt;ArcGIS Explorer&lt;/a&gt; (which
requires the .NET framework or Silverlight) or &lt;a href="http://www.esri.com/software/arcgis/arcreader"&gt;ArcReader&lt;/a&gt; (which is
multi-platform but closed-source). Open-source GIS packages such as
&lt;a href="http://www.qgis.org/"&gt;Quantum GIS&lt;/a&gt; and &lt;a href="http://grass.fbk.eu/"&gt;GRASS&lt;/a&gt; can also view and edit shapefiles, and
recent versions can be installed from the &lt;a href="https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable"&gt;UbuntuGis PPA&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However GIS applications can be tricky to use without training.
Moreover, sometimes you may want to use shapefile-data for some other
purpose, outside of traditional GIS applications. Here are a few useful
tricks you can do with shapefiles, and ways to get data out of a
shapefile and into another application.&lt;/p&gt;
&lt;h2&gt;Reprojecting a shapefile&lt;/h2&gt;
&lt;p&gt;If you want to combine data from different sources, you&amp;rsquo;ll have to make
sure that they use the same &lt;a href="http://en.wikipedia.org/wiki/Coordinate_system"&gt;coordinate system&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Datum_%28geodesy%29"&gt;reference point
(datum)&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Map_projection"&gt;geographic projection&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Geoid"&gt;representation of the Earth&amp;rsquo;s
surface (geoid)&lt;/a&gt;.  &lt;/p&gt;
&lt;p&gt;These days, it is common to convert everything to &lt;a href="http://en.wikipedia.org/wiki/WGS84"&gt;WGS84&lt;/a&gt;
latitude/longitude coordinates. To convert a given shapefile to WGS84
coordinates, you can use the &lt;a href="http://gdal.org/"&gt;GDAL&lt;/a&gt; utility &lt;a href="http://www.gdal.org/ogr2ogr.html"&gt;ogr2ogr&lt;/a&gt;. In Ubuntu,
first install the package &lt;code&gt;gdal-bin&lt;/code&gt; and then execute the following
command: &lt;/p&gt;
&lt;p&gt;&lt;code&gt;ogr2ogr -t_srs EPSG:4326 output_wgs84.shp input.shp&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The parameter &lt;code&gt;-t_srs&lt;/code&gt; specifies the &lt;a href="http://en.wikipedia.org/wiki/Spatial_reference_system"&gt;spatial reference system&lt;/a&gt; of
the output file, which is usually specified through an &lt;a href="http://www.epsg-registry.org/"&gt;EPSG code&lt;/a&gt;. In
this case, it tells the program to convert all coordinates in the
shapefile to &lt;a href="http://spatialreference.org/ref/epsg/4326/"&gt;geographic 2D WGS84 coordinates&lt;/a&gt; (EPSG:4326). Use
&lt;a href="http://spatialreference.org/ref/epsg/4979/"&gt;EPSG:4979&lt;/a&gt; for 3D coordinates.&lt;/p&gt;
&lt;h2&gt;Converting a shapefile to KML (Google Earth/Maps)&lt;/h2&gt;
&lt;p&gt;One of the more interesting ways to visualise data stored in a shapefile
is to convert it into a KML file (Keyhole Markup Language), which can
then be used in e.g. Google Earth (or with Google Maps). To do this in
Ubuntu, first install the package &lt;code&gt;gdal-bin&lt;/code&gt; and then execute the
following command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ogr2ogr -f "KML" -t_srs EPSG:4326 output.kml input.shp&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Converting a shapefile to KMZ (compressed Google Earth)&lt;/h2&gt;
&lt;p&gt;The problem with XML-based formats such as KML is that they can get
rather big if you have a large shapefile with lots of data. To save some
disk-space, you can compress the KML file into a KMZ file. A KMZ file is
simply a ZIP-file that contains a KML-document (doc.kml) and optional
directories with other files that are referenced from the KML-file. To
directly convert a shapefile into KMZ, you can use &lt;a href="http://levien.zonnetjes.net/files/shp2kmz"&gt;this shell-script
(shp2kmz)&lt;/a&gt;. Just copy it to your home-directory or to &lt;code&gt;/usr/local/bin&lt;/code&gt;
and make it executable (e.g. &lt;code&gt;chmod a+x shp2kmz&lt;/code&gt;. It uses &lt;code&gt;ogr2ogr&lt;/code&gt; and
zip, so in Ubuntu it requires that the &lt;code&gt;gdal-bin&lt;/code&gt; package is installed.&lt;/p&gt;
&lt;p&gt;Usage: &lt;code&gt;shp2kmz input.shp output.kmz&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Merging shapefiles&lt;/h2&gt;
&lt;p&gt;Merging two or more shapefiles &lt;a href="http://www.gdal.org/ogr/drv_shapefile.html"&gt;is easy with ogr2ogr&lt;/a&gt;. A merge of two
shapefiles &amp;lsquo;file1.shp&amp;rsquo; and &amp;lsquo;file2.shp&amp;rsquo; into a new file
&amp;lsquo;file_merged.shp&amp;rsquo; is performed like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ogr2ogr file_merged.shp file1.shp
ogr2ogr -update -append file_merged.shp file2.shp -nln file_merged
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The first command just copies the first shapefile to a new file
(file_merged.shp).The second command opens file_merged.shp in update
mode, tries to find existing layers and appends the features being
copied. The -nln option sets the name of the layer to be copied to.&lt;/p&gt;
&lt;h2&gt;Converting a shapefile to a spreadsheet&lt;/h2&gt;
&lt;p&gt;You may be able to load some of the shapefile attributes into a
spreadsheet, by opening the associated DBF file in a
spreadsheet-application that supports dBASE-files, such as &lt;a href="http://projects.gnome.org/gnumeric/"&gt;Gnumeric&lt;/a&gt;.
However, often this will exclude interesting data, such as coordinates
and some types of attributes. A better way is to load the shapefile into
Quantum GIS, open the attribute table, select all the rows and copy the
data to the clipboard. You can then paste everything into a spreadsheet.
It may get big and messy though&amp;hellip;&lt;/p&gt;
&lt;h2&gt;Converting a shapefile to CSV (textfile)&lt;/h2&gt;
&lt;p&gt;If your shapefile contains points rather than polygons, you can export
the data as a CSV file using ogr2ogr and the &lt;a href="http://www.gdal.org/ogr/drv_csv.html"&gt;GDAL CSV-driver&lt;/a&gt;, e.g:
&lt;code&gt;ogr2ogr -f "CSV" -t_srs EPSG:4979 -lco GEOMETRY=AS_XYZ output input.shp&lt;/code&gt;
This will create a directory containing one or more CSV-files containing
attributes and X/Y/Z coordinates (use
&lt;code&gt;ogr2ogr -f "CSV" -t_srs EPSG:4326 -lco GEOMETRY=AS_XY&lt;/code&gt; if you need only
latitude and longitude). Add &lt;code&gt;SEPARATOR=TAB&lt;/code&gt; if you prefer a
tab-separated file rather than commas.&lt;/p&gt;
&lt;p&gt;However this won&amp;rsquo;t export coordinates if your shapefile contains
polygons. In that case you can export the entire geometry using:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ogr2ogr -f "CSV" -t_srs EPSG:4326 -lco GEOMETRY=AS_WKT output input.shp&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately if you just want latitude and longitude of the polygon
centroids, you&amp;rsquo;ll need to compute them yourself. The polygons will be in
stored in a &lt;a href="http://en.wikipedia.org/wiki/Well-known_text"&gt;WKT-representation&lt;/a&gt;. If they are small, you can
approximate the centroid by simply averaging the longitude and latitude
coordinates. Rather than parsing everything yourself, you can for
instance use Python and the &lt;a href="http://gispython.org/shapely/docs/1.0/manual.html"&gt;shapely&lt;/a&gt; module, e.g.:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;from shapely.wkt import loads
polygon = loads(&amp;#39;POLYGON ((-8.254538773542281 54.511112320794687,-8.25368883970682 54.510785254030836,-8.25331620402474 54.510641858248889))&amp;#39;)
centroid = polygon.centroid
lat = centroid.y
lon = centroid.x
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For Perl take a look at the &lt;a href="http://perl.overmeer.net/geo/html/"&gt;Geo-Point&lt;/a&gt; modules. If your polygons are
big or accuracy is important, it&amp;rsquo;s probably best to use R and the
maptools package (see below), or load the data into a &lt;a href="http://www.gaia-gis.it/spatialite/"&gt;spatialite&lt;/a&gt;
database and use the &lt;a href="http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html#p8"&gt;CENTROID SQL-function&lt;/a&gt;. I might try to put together
an example at some point.&lt;/p&gt;
&lt;p&gt;An alternative way to convert shapefiles to text is by using &lt;a href="http://www.obviously.com/gis/shp2text/"&gt;the
shp2text utility&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Working with shapefiles in Python&lt;/h2&gt;
&lt;p&gt;Rather than first exporting to CSV, you can easily load shapefiles into
Python directly using the &lt;a href="http://www.gdal.org/ogr/ogr_apitut.html"&gt;ogr&lt;/a&gt; module, and then process them with
&lt;a href="http://gispython.org/shapely/docs/1.0/manual.html"&gt;shapely&lt;/a&gt; or &lt;a href="http://michalisavraam.org/2010/04/the-essential-python-modules-for-gis/"&gt;other modules&lt;/a&gt;. For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;from osgeo import ogr
from shapely.wkb import loads
source = ogr.Open(“testpoly.shp”)
couche = source.GetLayerByName(“testpoly”)
for element in couche:
    geom = loads(element.GetGeometryRef().ExportToWkb())
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Working with shapefiles in Perl&lt;/h2&gt;
&lt;p&gt;Of course you can also read shapefiles directly in Perl, have a look at
the &lt;a href="http://search.cpan.org/~jasonk/Geo-ShapeFile-2.51/ShapeFile.pm"&gt;Geo::ShapeFile&lt;/a&gt; module.&lt;/p&gt;
&lt;h2&gt;Working with shapefiles in R&lt;/h2&gt;
&lt;p&gt;The &lt;a href="http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=maptools:readShapePoly"&gt;readShapePoly&lt;/a&gt; function from the &lt;a href="http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/maptools/html/00Index.html"&gt;maptools&lt;/a&gt; package will read a
shapefile and create a spatialPolygonsDataFrame object.&lt;/p&gt;
&lt;p&gt;The rest I still need to figure out&amp;hellip;&lt;/p&gt;
&lt;p&gt;Some potentially useful resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://science.nature.nps.gov/im/monitor/stats/R/"&gt;http://science.nature.nps.gov/im/monitor/stats/R/&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://:cran.r-project.org/web/packages/spatstat/vignettes/shapefiles.pdf"&gt;http://:cran.r-project.org/web/packages/spatstat/vignettes/shapefiles.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/hadley/ggplot2/wiki/plotting-polygon-shapefiles"&gt;https://github.com/hadley/ggplot2/wiki/plotting-polygon-shapefiles&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://help.nceas.ucsb.edu/R:_Spatial"&gt;http://help.nceas.ucsb.edu/R:_Spatial&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://spatialanalysis.co.uk/files/2011/01/intro_to_spatial_data.txt"&gt;http://spatialanalysis.co.uk/files/2011/01/intro_to_spatial_data.txt&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.statistik.uni-muenchen.de/~hoehle/teaching/stepi2010/visualization_4.pdf"&gt;http://www.statistik.uni-muenchen.de/~hoehle/teaching/stepi2010/visualization_4.pdf&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://pvanb.wordpress.com/2010/02/27/a-map-of-deforestation-in-africa-using-r-2/"&gt;http://pvanb.wordpress.com/2010/02/27/a-map-of-deforestation-in-africa-using-r-2/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stackoverflow.com/questions/5130860/access-spatial-objects-in-spatial-polygons-data-frames"&gt;http://stackoverflow.com/questions/5130860/access-spatial-objects-in-spatial-polygons-data-frames&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.people.fas.harvard.edu/~zhukov/spatial.R"&gt;http://www.people.fas.harvard.edu/~zhukov/spatial.R&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.nceas.ucsb.edu/files/scicomp/GISSeminar/UseCases/CreateKMLFiles/ConvertShapefileToKML.html"&gt;http://www.nceas.ucsb.edu/files/scicomp/GISSeminar/UseCases/CreateKMLFiles/ConvertShapefileToKML.html&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.est.ufpr.br/aRT/docs/aRTsp.pdf"&gt;http://www.est.ufpr.br/aRT/docs/aRTsp.pdf&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.nceas.ucsb.edu/scicomp/usecases/computepolygoncentroids"&gt;http://www.nceas.ucsb.edu/scicomp/usecases/computepolygoncentroids&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="misc"></category><category term="science"></category><category term="technical"></category><category term="biology"></category><category term="gis"></category></entry><entry><title>Changing the evolutionary dynamics of Influenza?</title><link href="//gnuritas.org/fluvaccine.html" rel="alternate"></link><published>2011-02-08T02:52:00+01:00</published><updated>2017-12-12T21:18:06+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2011-02-08:/fluvaccine.html</id><summary type="html">&lt;p&gt;An interesting news-article appeared today, claiming a 
&lt;a href="http://news.yahoo.com/s/afp/20110207/hl_afp/britainhealthfluvaccine_20110207093136"&gt;possible breakthrough in the development of a universal influenza vaccine&lt;/a&gt;. 
It describes the &lt;a href="http://www.jenner.ac.uk/vaccine_prog_humaninfluenza.html"&gt;development of a new influenza vaccine at the Jenner
Institute&lt;/a&gt;. Traditional influenza vaccines prime the adaptive immune
system against the hemagglutinin (HA) and neuraminidase (NA) proteins
(the H and N used to characterise influenza subtypes) that are on the
outside of the &lt;a href="http://www.virology.ws/2009/04/30/structure-of-influenza-virus/"&gt;virus particles&lt;/a&gt;. The problem with this approach is
that these HA and NA proteins mutate rapidly in order to to escape
immunity, making that a new vaccine has to be developed for each new
strain that evolves. The new vaccine however targets two proteins that
are on the inside of the virus particle, the matrix protein (M1) and the
nucleoprotein (NP). According to the AFP news article (e.g. on Yahoo …&lt;/p&gt;</summary><content type="html">&lt;p&gt;An interesting news-article appeared today, claiming a 
&lt;a href="http://news.yahoo.com/s/afp/20110207/hl_afp/britainhealthfluvaccine_20110207093136"&gt;possible breakthrough in the development of a universal influenza vaccine&lt;/a&gt;. 
It describes the &lt;a href="http://www.jenner.ac.uk/vaccine_prog_humaninfluenza.html"&gt;development of a new influenza vaccine at the Jenner
Institute&lt;/a&gt;. Traditional influenza vaccines prime the adaptive immune
system against the hemagglutinin (HA) and neuraminidase (NA) proteins
(the H and N used to characterise influenza subtypes) that are on the
outside of the &lt;a href="http://www.virology.ws/2009/04/30/structure-of-influenza-virus/"&gt;virus particles&lt;/a&gt;. The problem with this approach is
that these HA and NA proteins mutate rapidly in order to to escape
immunity, making that a new vaccine has to be developed for each new
strain that evolves. The new vaccine however targets two proteins that
are on the inside of the virus particle, the matrix protein (M1) and the
nucleoprotein (NP). According to the AFP news article (e.g. on Yahoo)
&amp;ldquo;the two proteins within the virus are similar across strains and less
likely to mutate, meaning new vaccines would not have to be developed
for each new strain of the illness.&amp;rdquo; &lt;a href="http://www.allheadlinenews.com/articles/7022792370?Oxford%20University%20tests%20universal%20flu%20vaccine#ixzz1DHwvI6ZN"&gt;Another article&lt;/a&gt; goes on to
explain that &amp;ldquo;the immunization could provide protection against all
known strains of the flu, which will protect billions more against the
flu virus. The vaccine hits a different part of the flu virus and does
away with costly yearly reformulations to match vaccines to the
prevalent virus during the time of epidemic. It takes approximately four
months to develop a seasonal flu vaccine.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;That sounds like a great step forward, but to be honest I doubt whether
it will be very effective in the long run. The problem is already
apparent in the first quote. It is true that the internal proteins of
influenza do not change much over time and do not differ much between
strains. In evolutionary terms, we would say that these proteins are
fairly well conserved, making them excellent targets for vaccination.
However, this high degree of conservation is not because these proteins
&lt;em&gt;cannot&lt;/em&gt; mutate. Rather, there is not much pressure for the internal
proteins to mutate, as the immune system of the host mainly (and rather
effectively) targets the external virus proteins HA and NA. In the case
of influenza it does this primarily by producing &lt;a href="http://www.virology.ws/2009/07/22/adaptive-immune-defenses-antibodies/"&gt;antibodies&lt;/a&gt; that
bind to free virus particles in the body and disables them before they
can infect new cells.&lt;/p&gt;
&lt;p&gt;Human influenza mainly infects the upper &lt;a href="http://www.virology.ws/2009/05/21/viruses-and-the-respiratory-tract/"&gt;respiratory tract&lt;/a&gt;, and
humans are therefore mostly &lt;a href="http://www.virology.ws/2009/04/29/influenza-virus-transmission/"&gt;infected&lt;/a&gt; by inhaling tiny droplets
(aerosols) containing virus particles. Within about six hours after
infection, these virus particles (virions) start replicating in the
layer of cells (epithelium) that lines your throat. The first time that
a new virus strain is encountered, it takes your &lt;a href="http://www.virology.ws/2009/07/03/adaptive-immune-defenses/"&gt;adaptive immune
system&lt;/a&gt; a few days to start producing sufficient antibodies to
effectively &lt;a href="http://www.virology.ws/2009/07/24/virus-neutralization-by-antibodies/"&gt;combat the virus&lt;/a&gt;. This response lag gives the virus
ample time to infect as many cells as it can. Your body does respond to
this by producing signal-chemicals (cytokines) that switch the tissue
around the infection to a kind of &lt;a href="http://www.virology.ws/2009/07/01/the-inflammatory-response/"&gt;alert-state&lt;/a&gt;, making the cells more
difficult to infect. This so-called &lt;a href="http://www.virology.ws/2009/06/03/innate-immune-defenses/"&gt;&lt;em&gt;innate&lt;/em&gt; immune-response&lt;/a&gt; is also
what causes fever, by raising the &amp;ldquo;thermostat&amp;rdquo; that controls your body
temperature. Both the rapid spread of the infection and the alert-state
induced by the innate response cause the virus to run out of fresh cells
to infect within about two or three days. During the infection your body
will try to remove as many infected cells and free virus particles as it
can, among other ways by producing a lot of &lt;a href="http://en.wikipedia.org/wiki/Mucus"&gt;mucus&lt;/a&gt;. This is actually
convenient for the virus, as it means that you will continually be
spreading free virions into your environment, which in turn are capable
of infecting others around you.&lt;/p&gt;
&lt;p&gt;As virus-growth is quickly limited by the number of infectable cells,
the amount of virus in your body will slowly decline over the course of
a week or so. By that time, your adaptive immune system will have
started producing loads of antibodies, which aid in getting rid of the
last bits of virus. The adaptive immune-system is equipped with a kind
of &amp;ldquo;memory&amp;rdquo;, so that it can quickly start producing large amounts of
antibody the next time the same virus is encountered. Generally this
will prevent a second viral infection from expanding in an early stage,
so that you won&amp;rsquo;t get sick a second time.&lt;/p&gt;
&lt;p&gt;The trick with immunisation is to inject &amp;ldquo;disabled&amp;rdquo; virus particles (or
proteins), which will trigger the production of antibodies and
immune-&amp;ldquo;memory&amp;rdquo;, so that you&amp;rsquo;ll be protected by adaptive immunity
without having to go through a full-blown infection. But unfortunately
the influenza-virus has a few tricks up its sleeve as well. One of its
internal proteins called NS1 is capable of partially suppressing innate
immune response of the host. Moreover, &lt;a href="http://www.virology.ws/2009/05/10/the-error-prone-ways-of-rna-synthesis/"&gt;rapid mutation&lt;/a&gt; of the
external HA and NA proteins makes that after a while (which can be in
the order of just a few months), the virus has changed so much that it
is no longer recognised by the adaptive immune system. Finally,
influenza is a segmented virus, which means that its &amp;ldquo;genome&amp;rdquo; (the RNA
molecules that code for viral proteins) consists of &lt;a href="http://www.virology.ws/2009/05/01/influenza-virus-rna-genome/"&gt;separate
RNA-fragments&lt;/a&gt;. These fragments can be exchanged between different
virus strains if they infect the same host. This exchange is called
&lt;a href="http://www.virology.ws/2009/06/29/reassortment-of-the-influenza-virus-genome/"&gt;&lt;em&gt;reassortment&lt;/em&gt;&lt;/a&gt;, and together with mutation it is responsible for a
constant stream of new virus variants.&lt;/p&gt;
&lt;p&gt;Now as was already mentioned in the news articles, the nice thing about
the new vaccine is that it &amp;ldquo;teaches&amp;rdquo; the adaptive immune system to
recognise the two well-conserved proteins M1 and NP that are inside the
virus particles. The antibodies generated by the adaptive immune system
form the &lt;em&gt;humoral response&lt;/em&gt;, which can only react to external virus
proteins. However the so-called &lt;em&gt;cell mediated response&lt;/em&gt; can also
respond to internal virus proteins. A complex process called the antigen
presentation pathway enables the T-cells (T-lymphocytes) of the immune
system to look &amp;ldquo;inside&amp;rdquo; infected cells, and kill them if needed. The new
vaccine seems capable of boosting the T-cell response to the M1 and NP
proteins, which is good news as it means that the adaptive immune system
may stop infection in an early stage, regardless of the influenza-strain
involved.&lt;/p&gt;
&lt;p&gt;However, there is no reason why M1 and NP could not mutate as well.
Mutation of viral proteins is an undirected process, caused by errors in
the translation from viral RNA to viral proteins. Usually a mutation in
one of the internal virus proteins will lead to a decrease in virus
production, causing the mutated viruses to be outcompeted by non-mutated
ones. A mutation in the external HA or NA proteins on the other hand may
confer an advantage. Although it may reduce the efficiency with which
these proteins function, it also reduces the chance that the virus
particles are neutralised by antibodies. Therefore viruses that acquire
mutations in their HA or NA proteins may quickly outcompete the original
virus. This causes the rapid mutation of the HA and NA proteins, which
in turn enables influenza viruses to bypass the adaptive immune response
and reinfect people that had been infected (or vaccinated) before.&lt;/p&gt;
&lt;p&gt;Now it is to be expected that if one would start vaccinating against M1
and NP on a large scale, a mutation in these proteins would also begin
to confer a benefit to the virus. This benefit may outweigh the slight
reduction in replication efficiency that normally accompanies such a
mutation. No doubt the vaccine will be effective at first. But within
months it should be possible for new influenza strains to evolve, with
slightly modified M1 and NP proteins that render the original vaccine
useless.&lt;/p&gt;
&lt;p&gt;Unless it would succeed in eradicating human influenza completely (which
is highly unlikely), a universal vaccine against influenza would
presumably lead to the emergence of new influenza strains with an
increased diversity and mutation rate of M1 and NP (in addition to HA
and NA). Does this mean it is pointless to develop such a vaccine?
Actually, I don&amp;rsquo;t think so. Although in the end this new vaccine alone
probably won&amp;rsquo;t do much to improve public health, it will certainly be
very interesting to see what happens. A change in the evolutionary
dynamics of the virus would be an interesting result in itself, at least
scientifically speaking. Moreover, vaccinating against more virus
proteins at once may enable us to more effectively combat future
pandemic strains of influenza. For the reasons outlined above, I very
much doubt that it is possible to attain the holy grail of &amp;ldquo;lasting&amp;rdquo;
vaccines against highly adaptable RNA-viruses such as influenza and HIV.
But especially when combined with viral protein inhibitors, it should
certainly be possible to give the little buggers a hard time, and
prevent a lot of unnecessary deaths in the process.&lt;/p&gt;
&lt;p&gt;Bring on the vaccine. Perhaps I&amp;rsquo;ll be proven wrong, after all my
expectation is &amp;ldquo;merely&amp;rdquo; based on theory. But I for one am curious to see
what will happen. And I guess in the end, that&amp;rsquo;s what science is all
about&amp;hellip;&lt;/p&gt;
&lt;p&gt;Further reading:  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.virology.ws/influenza-101"&gt;http://www.virology.ws/influenza-101&lt;/a&gt;  &lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Influenza"&gt;http://en.wikipedia.org/wiki/Influenza&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="misc"></category><category term="blog"></category><category term="science"></category><category term="biology"></category></entry><entry><title>Food for Thought on Food</title><link href="//gnuritas.org/foodforthought.html" rel="alternate"></link><published>2010-05-22T14:44:00+02:00</published><updated>2017-12-12T22:34:07+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2010-05-22:/foodforthought.html</id><summary type="html">&lt;p&gt;&lt;em&gt;This blog entry was originally written in June 2008.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Although it has hardly received any media attention here amongst the
hype of the European Soccer Championships, just over a week ago the
&lt;a href="http://www.fao.org/" title="UN Food and Agriculture Organisation"&gt;FAO&lt;/a&gt; organised a big &lt;a href="http://www.fao.org/foodclimate/hlc-home/en/" title="World Food Summit"&gt;conference on World Food Security&lt;/a&gt;. As I had
some trouble concentrating on my research report last Friday, I went
clicking through the FAO press releases. And unfortunately, what I read
didn&amp;rsquo;t make me very hopeful that the food crisis is going to be solved
any time soon.&lt;/p&gt;
&lt;p&gt;In the past I never gave it much thought that food may actually become a
problem at some point. A quick look in my local Dirk van den Broek
supermarket would seem to indicate that there is plenty of cheap food
around these days. And forgetting for a moment …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;This blog entry was originally written in June 2008.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Although it has hardly received any media attention here amongst the
hype of the European Soccer Championships, just over a week ago the
&lt;a href="http://www.fao.org/" title="UN Food and Agriculture Organisation"&gt;FAO&lt;/a&gt; organised a big &lt;a href="http://www.fao.org/foodclimate/hlc-home/en/" title="World Food Summit"&gt;conference on World Food Security&lt;/a&gt;. As I had
some trouble concentrating on my research report last Friday, I went
clicking through the FAO press releases. And unfortunately, what I read
didn&amp;rsquo;t make me very hopeful that the food crisis is going to be solved
any time soon.&lt;/p&gt;
&lt;p&gt;In the past I never gave it much thought that food may actually become a
problem at some point. A quick look in my local Dirk van den Broek
supermarket would seem to indicate that there is plenty of cheap food
around these days. And forgetting for a moment the dry regions of
Africa, also the markets in most developing countries still look pretty
well stocked. But what most people don&amp;rsquo;t realise is that food security
is often not a matter of availability, but more of accessibility. In
other words, there is indeed plenty of food around to feed everyone, but
the majority of people just can&amp;rsquo;t afford it. So what I&amp;rsquo;d like to know
is: how the hell did that happen?&lt;/p&gt;
&lt;p&gt;Some of the issues surrounding food security were first brought to my
attention at the end of 2006. I was part of a group of students that was
asked to do some &lt;a href="http://environmental.scum.org/biofuel/jatropha/" title="Research Report on Biofuel Cultivation and Food Security"&gt;research into the relationship between biofuel
production in developing countries and food security&lt;/a&gt;. At the time,
the consensus among most policy makers and scientists seemed to be that
biofuels would be a good sustainable alternative to fossil fuels. The
high price of biofuels was regarded as their main drawback, but it was
not thought that biofuels would pose a great threat world food security.&lt;/p&gt;
&lt;p&gt;Two months later however, public opinion started to change, as the
prices for maize in Mexico suddenly went through the roof. This was
largely due to the US starting to use their surplus corn production for
the production of bio-ethanol, instead of dumping it on the Mexican
market. This example already illustrates some of the causes and
paradoxes of the current food crisis, as well as its relationship with
the global energy crisis and rising environmental concerns. But
unfortunately it gets yet more complicated.&lt;/p&gt;
&lt;p&gt;An interesting way to look at the global agricultural production system
is in terms of nutrient and energy flows. The Netherlands is apparently
one of the few countries in the world with an organic nutrient surplus.
The reason is that we import a lot of plant material from countries like
Brazil, which is mostly used as fodder for cows, pigs and chickens. The
rest-product of this intensive livestock production is of course a large
pile (or rather pool) of manure, which is considered a toxic pollutant
here. This is interesting, because for instance in the tropics
agricultural production is often limited by a shortage of soil
nutrients, and manure is considered a valuable fertiliser. &lt;br&gt;
Moreover, to compensate for the lack of nutrients, artificial
fertilisers are applied. These are mostly produced by big companies in
Europe, the US and South-East Asia, through the rather energy-intensive
&lt;a href="http://en.wikipedia.org/wiki/Haber_process" title="Haber-Bosch process on Wikipedia"&gt;Haber-Bosch process&lt;/a&gt;. This industrial process uses fossil fuels
(currently over 5% of global natural gas consumption) to fix nitrogen
from the air into ammonia. &lt;br&gt;
In other words, there is a global net flow of organic nutrients from
&amp;ldquo;developing&amp;rdquo; countries to &amp;ldquo;developed&amp;rdquo; countries (and from agricultural
regions to urbanised regions), which is compensated in part by a
&lt;a href="http://www.fertilizer.org/ifa/statistics/indicators/ind_cn_dvp.asp" title="Statistics on trade and use of artificial fertilisers"&gt;flow&lt;/a&gt; of fossil-fuel based industrial fertilisers from developed
countries to developing countries. Additionally, much energy is used in
long-distance transport of agricultural products and fertilisers, as
well as for irrigation to compensate for water losses. This means that
basically the global agricultural production system is driven by cheap
energy from fossil fuels. So of course you can expect problems in the
form of rising prices when energy stops being cheap.&lt;/p&gt;
&lt;p&gt;Second, it is interesting to look at how agricultural production is
distributed around the world. Almost all of Asia, Africa, the Middle
East, Central America and the Western edge of South-America are
partially &lt;a href="http://www.fao.org/es/ESS/chartroom/chart.asp?image=img/charts/gfap/map12.gif" title="map of food import dependency"&gt;dependent on food imports&lt;/a&gt;. However, many of these
countries, especially in Sub-Saharan Africa and South-East Asia also
&lt;a href="http://www.fao.org/es/ESS/chartroom/chart.asp?image=img/charts/gfap/map10.gif" title="Map of agriculture contribution to GDP "&gt;depend on agricultural export products&lt;/a&gt; for a large part of their
income. So both &lt;a href="http://www.fao.org/es/ESS/chartroom/chart.asp?image=img/charts/gfap/map14.gif" title="Map showing percentage of agricultural products in imports"&gt;import&lt;/a&gt; and &lt;a href="http://www.fao.org/es/ESS/chartroom/chart.asp?image=img/charts/gfap/map15.gif" title="Map showing percentage of agricultural products in exports"&gt;export&lt;/a&gt; of agricultural products form
an important percentage of total trade for Africa, Latin America and
much of Asia. The agricultural exports &lt;a href="http://www.worldmapper.org/display.php?selected=53" title="Map showing export of raw material and luxury products derived from agriculture"&gt;mostly constitute&lt;/a&gt; &amp;ldquo;luxury&amp;rdquo;
products such as coffee beans, tea, fruit and spices, as well as raw
materials such as cotton, sugar, vegetable oils, cocoa and fodder for
livestock, which are processed into luxury products elsewhere. &lt;br&gt;
This export role is of course in part due to the tropical climate in
such countries, but the availability of cheap land and labour, the
effective absence of environmental regulations, the colonial past and
IMF and World Bank policy are probably at least as important. On the
other hand, staple food crops such as cereals are mostly &lt;a href="http://www.worldmapper.org/display.php?selected=47" title="Map showing exports of cereal crops"&gt;exported&lt;/a&gt;
from countries such as the US, Canada, France, Australia and Argentina
and &lt;a href="http://www.worldmapper.org/display.php?selected=48" title="Map showing imports of cereal crops"&gt;imported&lt;/a&gt; into Africa, the Middle East, Latin America and Asia. &lt;br&gt;
You can probably see where this is going. Bluntly stated there seems to
be a global dependence relationship whereby developed countries depend
on developing countries as a cheap source for agricultural luxury
products and raw industrial inputs, and developing countries depend on
developed countries for income and basic food products. It seems
therefore not surprising that, even before the food crisis, most poor
and undernourished people &lt;a href="http://www.fao.org/es/ESS/chartroom/chart.asp?image=img/charts/gfap/map01.gif" title="Map showing undernutrition"&gt;were already found in the areas&lt;/a&gt; that
depend to a large extent on non-food agricultural exports for income and
on imports for food. And they are the first to suffer further when
global food prices go up.&lt;/p&gt;
&lt;p&gt;Finally, while increased oil prices and droughts have been partially
responsible for the increase in food prices, rising demand for
agricultural products also plays an important role. As recent as 2006
there was actually such an over-production of dairy products and staple
foods in Europe and North America, that most countries had quotas in
place to limit production. Terms such as the Grain Mountain, the Butter
Mountain and the Milk Pool were commonly used to refer to this
situation, and it resulted in large-scale &amp;ldquo;dumping&amp;rdquo; of cheap cereal and
dairy products on the world market, as well as widespread market
protectionism. This is also one of the reasons why many developing
countries disregarded their own food production systems, focussed more
on growing non-food export products (&amp;ldquo;cash-crops&amp;rdquo;) and became more and
more dependent on cheap food imports. &lt;br&gt;
However, the successful development in areas like South-East Asia, and
with it the increased demand for meat and dairy products has recently
turned this production surplus into a deficit. And because livestock has
to live off something, this is also driving up prices for cereals, soy
beans and other products increasingly used to feed not just people but
also the rapidly increasing number of chickens, pigs and cattle. Add to
this the growing demand for starch (from cereals and soy), sugar and
vegetable oils for the production of biofuels, and suddenly the world&amp;rsquo;s
main agricultural products have gone from being a cheap surplus to
becoming a valued resource. And the world&amp;rsquo;s poor are, quite literally,
paying the price.&lt;/p&gt;
&lt;p&gt;In my mind, the current food crisis is not a singular event, caused by
one or two easily identifiable factors. Rather, it is the result of a
structurally imbalanced and unsustainable global system of agricultural
production. This, in turn is the result of the global balance of power,
of history, of overconsumption and overuse of resources, of short-term
economic thinking, and of no-one wanting to take responsibility for the
long-term consequences. Why else do we still have widespread poverty and
hunger, after more than 50 years of institutional &amp;ldquo;development
programmes&amp;rdquo;? &lt;br&gt;
Yet, it is easy and tempting in any kind of crisis to start pointing
fingers. Of course many developing countries are blaming the West, for
their economic policies, their consumption patterns and their obsession
with biofuels. And last month, &lt;a href="http://www.washingtonpost.com/wp-dyn/content/article/2008/05/07/AR2008050703405.html" title="Newspaper article on the controversy surrounding Bush's remarks on the food crisis"&gt;Mr. Bush and Ms. Rice were quoted&lt;/a&gt; as
effectively blaming the Indians and the Chinese for doing what we&amp;rsquo;ve
been rather forcibly been telling them to do for the last 50 years or
so, namely &amp;ldquo;developing&amp;rdquo;. &lt;br&gt;
And of course I am also part of the problem, as consumer, as citizen of
an ex-colonial power, and as as just another individual trying to get
along in the world, perpetuating the unequal society into which I was
born. So if it&amp;rsquo;s all so incredibly complex and everyone&amp;rsquo;s to blame, what
can we do about it?&lt;/p&gt;
&lt;p&gt;I definitely think that many of the outcomes of the FAO World Food
Summit last week are a step in the right direction. For instance the
investments suggested to restore local food production systems in
developing countries, and providing more support for small-scale farming
and self-reliance. Such measures will certainly be more constructive in
the long term than just sending more food aid. Sure, food aid has its
importance in alleviating immediate suffering, but in the long term it
destroys local markets and is therefore hardly a structural solution.&lt;/p&gt;
&lt;p&gt;Setting aside my concerns over hunger for a second, it will certainly be
interesting to see whether increasing energy and water prices, climate
change and the increased risk of large-scale infectious diseases such as
Avian Influenza will play a role in reforming current global production
and trade systems the coming years. As I see it, centralised large-scale
intensive agricultural production systems are unsustainable,
structurally unstable, and not able to cope with the large economic,
social and/or environmental changes that are periodically bound to
happen in the real world. I think that smaller-scale sustainable and
decentralised production, more food sovereignty, and more diversity are
the way to go. Further intensification and yet another &amp;ldquo;green
revolution&amp;rdquo; are only going to make things worse in the end. &lt;br&gt;
Also, large-scale production of biofuels is a Bad Idea. Surely there
must be more efficient and sustainable ways of using the energy from
sunlight, that do not involve wasting this planet&amp;rsquo;s &lt;a href="http://en.wikipedia.org/wiki/Arable_land" title="Wikipedia article on arable land"&gt;preciously small&lt;/a&gt;
surface of arable land.&lt;/p&gt;
&lt;p&gt;Finally, if we are all part of the problem, I believe that we can also
all be part of a solution. If you want do something about world hunger,
you can start by taking a few minutes to consider your own consumption
patterns. I&amp;rsquo;m not saying that we should all become vegetarians and start
growing our own vegetables. In fact, I&amp;rsquo;m not a vegetarian myself. But
that doesn&amp;rsquo;t mean that I should eat half a dead chicken every day. Or
indeed, that I should eat meat &lt;em&gt;every&lt;/em&gt; day. &lt;br&gt;
If everyone would reduce their &lt;a href="http://www.worldmapper.org/display.php?selected=126" title="Map of global meat consumption"&gt;meat consumption&lt;/a&gt; by a mere 10%, this
could reduce greenhouse gas emissions by roughly half a billion tonnes
per year. That&amp;rsquo;s about a sixth of the world&amp;rsquo;s total road-traffic
emissions! It could also reduce global water use by about 30 thousand
billion litres per year, and free around 47 million hectares of land for
other uses, such as more sustainable forms of agriculture. And as an
added bonus, you may even live a few years longer. If you ask me, I&amp;rsquo;d
say that&amp;rsquo;s a win-win situation.&lt;/p&gt;
&lt;p&gt;And if you want to do a bit more, consider buying a few eco- and/or
fair-trade products every once in a while, instead of just going for the
cheapest brands (or the ones with the most advertising). Many products
we buy are actually under-priced, including daily things like coffee,
cotton clothing, chocolate, fruit and meat. Sure, some of these may
still seem expensive, but most of what you pay for them goes to
suppliers higher up in the chain, not to the producers. The producers
often earn so little that they cannot even buy proper food for their
families. Moreover production is often unsustainable, because measures
to limit degradation of land and water resources would increase the
price of a product, making it less attractive to consumers like
ourselves. &lt;br&gt;
At some point we will have to start paying a more realistic price for
the constituents of daily Western life. We might as well start now,
instead of just continuing to rely on cheap but unsustainable
consumption of natural resources and on cheap labour in developing
countries.&lt;/p&gt;
&lt;p&gt;In the end, solving the world&amp;rsquo;s food and environmental problems is not
just about economic and agricultural policy. It&amp;rsquo;s also about people
taking responsibility, if even a little. Think about it.&lt;/p&gt;
&lt;h3&gt;References and further reading:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The FAO Food Summit website: &lt;a href="http://www.fao.org/foodclimate/hlc-home/en/"&gt;http://www.fao.org/foodclimate/hlc-home/en/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Our research report on biofuel cultivation in developing countries in relation to food security:
     &lt;a href="http://environmental.scum.org/biofuel/jatropha"&gt;http://environmental.scum.org/biofuel/jatropha&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Statistics on fertilizer use and production, from the industry itself:
     &lt;a href="http://www.fertilizer.org/ifa/statistics/indicators/ind_cn_dvp.asp"&gt;http://www.fertilizer.org/ifa/statistics/indicators/ind_cn_dvp.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;FAO maps on agriculture and food:
     &lt;a href="http://www.fao.org/es/ESS/chartroom/gfap.asp"&gt;http://www.fao.org/es/ESS/chartroom/gfap.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;More maps on food and trade:
     &lt;a href="http://www.worldmapper.org/textindex/text_food.html"&gt;http://www.worldmapper.org/textindex/text_food.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Reuters blog posting on Bush&amp;rsquo;s food crisis remarks:
     &lt;a href="http://blogs.reuters.com/criticaleye/2008/05/06/a-chance-to-bash-mr-bush/"&gt;http://blogs.reuters.com/criticaleye/2008/05/06/a-chance-to-bash-mr-bush/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Articles on the Food Summit from the STEPS centre blog:
     &lt;a href="http://stepscentre-thecrossing.blogspot.com/2008/06/fiddling-in-rome-while-world-burns.html"&gt;http://stepscentre-thecrossing.blogspot.com/2008/06/fiddling-in-rome-while-world-burns.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Some recent scientific articles on the sustainability of biofuels:
     &lt;a href="http://www.sciencemag.org/cgi/content/summary/319/5859/43"&gt;How Green Are Biofuels?&lt;/a&gt; Jörn P. W. Scharlemann and William F. Laurance (Science Vol. 319. no. 5859, pp. 43 - 44, DOI: &lt;a href="http://dx.doi.org/10.1126/science.1153103"&gt;10.1126/science.1153103&lt;/a&gt;) and 
     &lt;a href="http://dancingflames.org/dancingflames/EnvSci/Articles/EnvScipdffiles/BiofuelsLandClearing7Feb08.pdf"&gt;Land Clearing and the Biofuel Carbon Debt&lt;/a&gt; Fargione J. et al. (Science Vol. 319. no. 5867, pp. 1235 - 1238, DOI: &lt;a href="http://dx.doi.org/10.1126/science.1152747"&gt;10.1126/science.1152747&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Livestock&amp;rsquo;s Long Shadow, an extensive analysis of the impacts of the
     global livestock production system:
     &lt;a href="http://www.fao.org/docrep/010/a0701e/a0701e00.htm"&gt;http://www.fao.org/docrep/010/a0701e/a0701e00.htm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Another interesting article on the food crisis and meat consumption:
     &lt;a href="http://www.monbiot.com/archives/2008/04/15/the-pleasures-of-the-flesh/"&gt;http://www.monbiot.com/archives/2008/04/15/the-pleasures-of-the-flesh/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Fair Food, a Dutch NGO promoting a more fair and sustainable
     consumerism: &lt;a href="http://www.fairfood.org/en/"&gt;http://www.fairfood.org/en/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Updates:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;An interesting article in The Guardian (2008-07-04) suggests that
     biofuels may play a bigger role in the food crisis than previously
     thought:
     &lt;a href="http://www.guardian.co.uk/environment/2008/jul/03/biofuels.renewableenergy"&gt;http://www.guardian.co.uk/environment/2008/jul/03/biofuels.renewableenergy&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="misc"></category><category term="blog"></category><category term="sustainability"></category></entry><entry><title>Recompressing (optimising) PDF files</title><link href="//gnuritas.org/pdf-recompress.html" rel="alternate"></link><published>2009-08-17T17:22:00+02:00</published><updated>2017-12-12T23:01:51+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2009-08-17:/pdf-recompress.html</id><summary type="html">&lt;p&gt;There are at least three ways to do this in Ubuntu. You will need the
packages ghostscript (for all methods, but installed by default) and
pdftk (for method 2), and optionally a Java Runtime Environment (for
method 3).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Method 1: ps2pdf&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The ps2pdf script that comes with Ghostscript is meant to convert
PostScript to PDF, but it will happily take PDF-files as input. Just
try: ps2pdf input.pdf output.pdf&lt;/p&gt;
&lt;p&gt;You can add GhostScript options to control the PDF-output. To get
smaller files you can try adding one of the preset-options:
&lt;code&gt;-dPDFSETTINGS=/ebook&lt;/code&gt; or &lt;code&gt;-dPDFSETTINGS=/screen&lt;/code&gt;  &lt;/p&gt;
&lt;p&gt;For more advanced settings:
&lt;a href="http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm"&gt;http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that the screen preset converts all images to sRGB and converts to
PDF 1.3 which does not support all types of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;There are at least three ways to do this in Ubuntu. You will need the
packages ghostscript (for all methods, but installed by default) and
pdftk (for method 2), and optionally a Java Runtime Environment (for
method 3).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Method 1: ps2pdf&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The ps2pdf script that comes with Ghostscript is meant to convert
PostScript to PDF, but it will happily take PDF-files as input. Just
try: ps2pdf input.pdf output.pdf&lt;/p&gt;
&lt;p&gt;You can add GhostScript options to control the PDF-output. To get
smaller files you can try adding one of the preset-options:
&lt;code&gt;-dPDFSETTINGS=/ebook&lt;/code&gt; or &lt;code&gt;-dPDFSETTINGS=/screen&lt;/code&gt;  &lt;/p&gt;
&lt;p&gt;For more advanced settings:
&lt;a href="http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm"&gt;http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that the screen preset converts all images to sRGB and converts to
PDF 1.3 which does not support all types of gradients and transparency.
In some cases this may cause text to be converted into an image. Also,
GhostScript does not seem to do a great job at converting CYMK colours
to sRGB, so if your colours come out looking all weird after conversion
your original document probably used CYMK colours. In such cases I first
convert to a PDF-file with device-independent colours (where possible,
and otherwise they should be kept as CYMK), and then run a second pass
in which I compress the file but keep it as PDF 1.4 (or a higher
version, which you should specify with a switch such as
&lt;code&gt;-dCompatibilityLevel=1.5&lt;/code&gt;):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ps2pdf -dColorConversionStrategy=/UseDeviceIndependentColor -dUseCIEColor input.pdf input-ciecolor.pdf

ps2pdf -dColorConversionStrategy=/UseDeviceIndependentColor -dUseCIEColor -dColorImageDownsampleType=/Bicubic -dColorImageResolution=72 -dGrayImageResolution=72 -dMonoImageResolution=300 -dDownsampleColorImages=true -dDownsampleGrayImages=true -dDownsampleMonoImages=true -dOptimize=true -dProcessColorModel=/DeviceCMYK input-ciecolor.pdf output-screen.pdf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;At least this shouldn&amp;rsquo;t make things worse with regard to colour, and it
also retains your text as text.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Method 2: The compress-newsletter script&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The above methods works well, but you will probably lose any metadata in
the document, including bookmarks, author information, etc.&lt;/p&gt;
&lt;p&gt;If you need to keep metadata, you can try the following perl-script. It
was especially written to recompress Scribus PDF output without losing
metadata:  &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.capca.ucalgary.ca/~wdobler/utils/compress-newsletter.html"&gt;http://www.capca.ucalgary.ca/~wdobler/utils/compress-newsletter.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Method 3: Multivalent&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A Java-based browser and toolbox for digital documents:
&lt;a href="http://multivalent.sourceforge.net/"&gt;http://multivalent.sourceforge.net/&lt;/a&gt;  &lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll need to download the jar-file. It has a recompression class that
you can run from the commandline. For example:  &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;CLASSPATH=&amp;quot;:/usr/local/lib/Multivalent20060102.jar&amp;quot; java tool.pdf.Compress -jpeg input.pdf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(This assumes of course that you&amp;rsquo;ve copied the jar-file to
/usr/local/lib first, e.g.
&lt;code&gt;sudo mv ~/Desktop/Multivalent20060102.jar /usr/local/lib&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;This method is easy, but may or may not work well depending on the input
file so be sure to always check your output!&lt;/p&gt;</content><category term="misc"></category><category term="ubuntu"></category><category term="technical"></category><category term="howto"></category></entry><entry><title>Installing and using fonts in Ubuntu</title><link href="//gnuritas.org/ubuntufonts.html" rel="alternate"></link><published>2009-01-25T17:34:00+01:00</published><updated>2017-12-13T00:24:02+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2009-01-25:/ubuntufonts.html</id><summary type="html">&lt;p&gt;Older versions of Ubuntu (before 8.04) used to have a built-in
font-manager that could be reached by browsing font:/// in the
file-manager. However, when Gnome upgraded to their new gvfs in 2008,
their font manager and viewer both stopped working. In current
Ubuntu-versions, at least the built-in font viewer (gnome-font-viewer)
does work again. However the lack of a Gnome font-manager still leaves
Ubuntu without proper font management out of the box, which is kind of
annoying. Luckily in recent Ubuntu versions you can install the
&lt;code&gt;fontmatrix&lt;/code&gt; package, which gives you the excellent &lt;a href="http://fontmatrix.net/"&gt;Fontmatrix&lt;/a&gt; font
manager.&lt;/p&gt;
&lt;p&gt;But even without Fontmatrix, it&amp;rsquo;s really not that hard to install fonts
in Ubuntu. All the hard work is handled behind the scenes by &lt;a href="http://mintaka.sdsu.edu/GF/bibliog/latex/debian/defoma.html"&gt;Defoma&lt;/a&gt;,
the somewhat invisible Debian Font Manager.&lt;/p&gt;
&lt;p&gt;Of course Ubuntu comes with …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Older versions of Ubuntu (before 8.04) used to have a built-in
font-manager that could be reached by browsing font:/// in the
file-manager. However, when Gnome upgraded to their new gvfs in 2008,
their font manager and viewer both stopped working. In current
Ubuntu-versions, at least the built-in font viewer (gnome-font-viewer)
does work again. However the lack of a Gnome font-manager still leaves
Ubuntu without proper font management out of the box, which is kind of
annoying. Luckily in recent Ubuntu versions you can install the
&lt;code&gt;fontmatrix&lt;/code&gt; package, which gives you the excellent &lt;a href="http://fontmatrix.net/"&gt;Fontmatrix&lt;/a&gt; font
manager.&lt;/p&gt;
&lt;p&gt;But even without Fontmatrix, it&amp;rsquo;s really not that hard to install fonts
in Ubuntu. All the hard work is handled behind the scenes by &lt;a href="http://mintaka.sdsu.edu/GF/bibliog/latex/debian/defoma.html"&gt;Defoma&lt;/a&gt;,
the somewhat invisible Debian Font Manager.&lt;/p&gt;
&lt;p&gt;Of course Ubuntu comes with lots of free typefaces, many of which are
quite good. And you can get the usual boring Windows fonts (Arial, Times
New Roman, etc.) by installing the &lt;code&gt;msttcorefonts&lt;/code&gt; package. But quite
often you do really need to install additional typefaces (PostScript
Type 1, TrueType or OpenType) to get some work done.&lt;/p&gt;
&lt;p&gt;If you only have one user on your system, the easiest way to install
fonts is by opening the font in the file manager and clicking the
Install button. This will copy the font to the &lt;strong&gt;.font&lt;/strong&gt; folder in your
home directory and register it with Defoma. If you need to install many
fonts, simply create a .font folder in your home directory (and if
you&amp;rsquo;re using the file manager, don&amp;rsquo;t forget to switch on View-&amp;gt;Show
Hidden Files, or you won&amp;rsquo;t see the folder) and copy the font files
there. To make Defoma aware of your new fonts, run &lt;code&gt;fc-cache -f -v&lt;/code&gt; in a
terminal. This will update the font-cache, so you&amp;rsquo;re ready to go.&lt;/p&gt;
&lt;p&gt;I usually prefer to install fonts system-wide, so all users can see
them. To keep my custom fonts separated from the standard Ubuntu ones, I
create directories in /usr/local/share/fonts and copy the font files
there. Note that you need to be root to do that, so you must either do
it using a file-manager instance with root privileges (&lt;code&gt;gksu nautilus&lt;/code&gt;),
or by changing the ownership of the fonts directory using
&lt;code&gt;sudo chown insert-username-here /usr/local/share/fonts&lt;/code&gt;. I find the
latter option to be somewhat safer and more practical. :-) After you&amp;rsquo;re
done, don&amp;rsquo;t forget to update the font-cache again using
&lt;code&gt;fc-cache -f -v&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Oddly, also the Gnome font-viewer &lt;code&gt;gfontview&lt;/code&gt; isn&amp;rsquo;t available in the
repositories for some older Ubuntu versions (8.04 and 8.10). For
previewing fonts that aren&amp;rsquo;t installed, you can also use the &lt;code&gt;fontforge&lt;/code&gt;
font editor. For viewing installed fonts you can use &lt;code&gt;gnome-specimen&lt;/code&gt;.
You can install both through &lt;code&gt;apt-get&lt;/code&gt; or Synaptic.&lt;/p&gt;
&lt;p&gt;As of version 3.2, OpenOffice.org has support for OpenType fonts. This
works fairly well, although there may be problems with some fonts that
use obsolete Type 1 SEAC operators for accents or that have GPOS kerning
tables (Issues &lt;a href="http://qa.openoffice.org/issues/show_bug.cgi?id=107831"&gt;#107831&lt;/a&gt; 
and &lt;a href="http://qa.openoffice.org/issues/show_bug.cgi?id=107739"&gt;#107739&lt;/a&gt; in OOo QA). Other
applications such as Abiword, Koffice, Scribus, Inkscape and The Gimp
should work just fine with OpenType fonts.&lt;/p&gt;
&lt;p&gt;Interestingly, LaTeX (or rather &lt;a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;amp;id=xetex"&gt;XeLaTeX&lt;/a&gt;) can also use OpenType fonts
without problems. Just install the package &lt;code&gt;texlive-xetex&lt;/code&gt;. Now if I
want use one of my favourite fonts (Futura Book), all I need to do is
include the commands &lt;code&gt;\usepackage{fontspec}&lt;/code&gt; and
&lt;code&gt;\setromanfont{Futura Std Book}&lt;/code&gt; (note that the font name is case
sensitive!) in my .tex file, and run it through &lt;code&gt;xelatex&lt;/code&gt; instead of the
usual &lt;code&gt;pdflatex&lt;/code&gt;. Read &lt;a href="http://existentialtype.net/2008/07/12/fonts-in-latex-part-one-xelatex/"&gt;this guide&lt;/a&gt; for more information. If you
really do need pdflatex, that&amp;rsquo;s also possible but things become somewhat
more complicated, &lt;a href="http://existentialtype.net/2008/07/12/fonts-in-latex-part-two-pdftex-and-opentype/"&gt;as is explained here for PostScript OpenType&lt;/a&gt; and
&lt;a href="http://existentialtype.net/2008/07/19/fonts-in-latex-part-three-pdftex-and-truetype/"&gt;here for TrueType&lt;/a&gt;. Unfortunately the wonderful LaTeX editor &lt;a href="http://kile.sourceforge.net/"&gt;Kile&lt;/a&gt;
&lt;a href="http://bugs.kde.org/show_bug.cgi?id=156993"&gt;does not yet support XeLaTeX out-of-the-box&lt;/a&gt;, but this is easily
fixed for now by &lt;a href="http://www.tug.org/pipermail/xetex/2008-March/thread.html#9120"&gt;adding a tool&lt;/a&gt; and &lt;a href="http://sourceforge.net/forum/message.php?msg_id=5254409"&gt;altering the QuickPreview
settings&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, a word about the default screen-rendering of user-interface
fonts in Ubuntu. Perhaps I&amp;rsquo;m old-fashioned, but I prefer to turn off
antialiasing for small font sizes, mostly because the &amp;ldquo;fuzz&amp;rdquo; introduced
by antialiasing also makes my head go fuzzy. ;-) If you agree, visit
&lt;a href="http://www.sharpfonts.com/"&gt;http://www.sharpfonts.com/&lt;/a&gt; and follow the instructions. On this site
you can also download the &lt;a href="http://www.sharpfonts.com/fonts/tahoma32.exe"&gt;MS Tahoma font&lt;/a&gt;, which is the one Windows
uses (or used up to XP) for its user-interface. Although that in itself
is definitely not a good reason for using it, it does render superbly
without antialiasing. For that reason I usually set an 8-point Tahoma as
application font, desktop font and window title font in
System-&amp;gt;Preferences-&amp;gt;Appearance-&amp;gt;Fonts.&lt;/p&gt;</content><category term="misc"></category><category term="ubuntu"></category><category term="technical"></category><category term="howto"></category></entry><entry><title>Data Clustering</title><link href="//gnuritas.org/clustering.html" rel="alternate"></link><published>2008-07-10T15:06:10+02:00</published><updated>2018-01-09T21:07:37+01:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2008-07-10:/clustering.html</id><summary type="html">&lt;p&gt;I&amp;rsquo;ve written a fast
perl/PDL implementation of UPGMA &lt;a href="http://en.wikipedia.org/wiki/Data_clustering"&gt;data clustering&lt;/a&gt; for very large datasets. The problem is that existing clustering packages have
difficulty handling datasets with more than a few thousand data points.
Especially the distance matrices tend to become a problem. For example,
clustering the outcome of a 300x300 grid-based simulation (90,000 data
points) would require a (non-sparse) distance matrix of 8.1 billion
entries. This would use over 30 Gb of memory when stored as 4-byte
floating point values. &lt;/p&gt;
&lt;p&gt;I needed to cluster a lot of such datasets, so to
make this manageable I implemented a simple but fast UPGMA clustering
algorithm in &lt;a href="http://pdl.sourceforge.net/"&gt;PDL&lt;/a&gt; (the Perl Data
Language). To conserve memory, it doesn&amp;rsquo;t store a full hierarchical
clustering tree, but rather partitions the data into clusters based …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I&amp;rsquo;ve written a fast
perl/PDL implementation of UPGMA &lt;a href="http://en.wikipedia.org/wiki/Data_clustering"&gt;data clustering&lt;/a&gt; for very large datasets. The problem is that existing clustering packages have
difficulty handling datasets with more than a few thousand data points.
Especially the distance matrices tend to become a problem. For example,
clustering the outcome of a 300x300 grid-based simulation (90,000 data
points) would require a (non-sparse) distance matrix of 8.1 billion
entries. This would use over 30 Gb of memory when stored as 4-byte
floating point values. &lt;/p&gt;
&lt;p&gt;I needed to cluster a lot of such datasets, so to
make this manageable I implemented a simple but fast UPGMA clustering
algorithm in &lt;a href="http://pdl.sourceforge.net/"&gt;PDL&lt;/a&gt; (the Perl Data
Language). To conserve memory, it doesn&amp;rsquo;t store a full hierarchical
clustering tree, but rather partitions the data into clusters based on a
pre-defined minimum distance between the cluster centroids. Moreover, to
handle large data sets it can compute the clusters based on a random
sample of the data points, and then assign all other points to the
nearest cluster. I&amp;rsquo;m not sure if this procedure is statistically sound,
but it&amp;rsquo;s fast and seems to work very well in practice. &lt;/p&gt;
&lt;p&gt;The Perl-code is available under an LGPL-license from my &lt;a href="https://github.com/lvzon/clusterlots"&gt;github repository&lt;/a&gt;. 
It should really be cleaned up and modified a bit to make it more readable for others, 
or better, be rewritten in Python with Pandas&amp;hellip; 
See the README in the git-repository for more details on the implementation and its problems.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;If you want to cluster smaller datasets (up to a few thousand points), you&amp;rsquo;re probably better off using more established packages such as &lt;a href="http://www.r-project.org/"&gt;Gnu R&lt;/a&gt;, Matlab or the &lt;a href="http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/"&gt;open-source C Clustering Library by Michiel de Hoon et al.&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://levien.zonnetjes.net/?q=clustering-r"&gt;Clustering in R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cluster 3.0 and the C clustering library:
    http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/&lt;/li&gt;
&lt;li&gt;The Algorithm::Cluster module for Perl:
    http://search.cpan.org/~mdehoon/Algorithm-Cluster-1.39/perl/Cluster.pm&lt;/li&gt;
&lt;li&gt;Pycluster for Python:
    http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/software.htm#pycluster&lt;/li&gt;
&lt;/ul&gt;</content><category term="misc"></category><category term="science"></category><category term="technical"></category></entry><entry><title>LaTeX formulas in ODF and Word documents</title><link href="//gnuritas.org/latexodf.html" rel="alternate"></link><published>2007-10-19T16:59:40+02:00</published><updated>2019-05-02T19:18:43+02:00</updated><author><name>levien</name></author><id>tag:gnuritas.org,2007-10-19:/latexodf.html</id><summary type="html">&lt;p&gt;&lt;strong&gt;UPDATE (2012-10-01)&lt;/strong&gt;&lt;br&gt;
OOoLatex is no longer being updated by Geoffroy Piroux. Roland Baudin
has created an up-to-date fork for LibreOffice called
&lt;a href="http://roland65.free.fr/texmaths/"&gt;TexMaths&lt;/a&gt;. To install that on a
recent version of Ubuntu, first get the required packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo add-apt-repository ppa:martin-gieseking/ppa
sudo apt-get update
sudo apt-get install texlive dvipng dvisvgm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then &lt;a href="http://sourceforge.net/projects/texmaths/files/"&gt;download the TexMaths extension&lt;/a&gt; and install
it in LibreOffice using the extension manager (which you will find under
the Tools menu).&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;A few weeks ago, I wrote a &lt;a href="http://levien.zonnetjes.net/?q=biochemistry"&gt;chapter on Enzyme Kinetics&lt;/a&gt; for a first-year
Biochemistry reader. Because the text contains a lot of formulas, I
would normally have used LaTeX. But the problem is that the Structural
Biology group who organise the Biochemistry course have to be able to
edit the document, and they only use Microsoft Word for Mac. I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;UPDATE (2012-10-01)&lt;/strong&gt;&lt;br&gt;
OOoLatex is no longer being updated by Geoffroy Piroux. Roland Baudin
has created an up-to-date fork for LibreOffice called
&lt;a href="http://roland65.free.fr/texmaths/"&gt;TexMaths&lt;/a&gt;. To install that on a
recent version of Ubuntu, first get the required packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo add-apt-repository ppa:martin-gieseking/ppa
sudo apt-get update
sudo apt-get install texlive dvipng dvisvgm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then &lt;a href="http://sourceforge.net/projects/texmaths/files/"&gt;download the TexMaths extension&lt;/a&gt; and install
it in LibreOffice using the extension manager (which you will find under
the Tools menu).&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;A few weeks ago, I wrote a &lt;a href="http://levien.zonnetjes.net/?q=biochemistry"&gt;chapter on Enzyme Kinetics&lt;/a&gt; for a first-year
Biochemistry reader. Because the text contains a lot of formulas, I
would normally have used LaTeX. But the problem is that the Structural
Biology group who organise the Biochemistry course have to be able to
edit the document, and they only use Microsoft Word for Mac. I work
mostly on Ubuntu Linux these days, and although I still have a laptop
that can run Windows, I neither use nor have a running version of MS
Word. And besides that, anyone who has ever tried to use the formula
editor of MS Office will have noticed that it, well, sucks. :) 
I tried
using &lt;a href="http://www.openoffice.org/product/math.html"&gt;the OpenOffice.org Math editor&lt;/a&gt;, but found the
version in Ubuntu Feisty to be very unstable and therefore unusable.
(Note: The stability problems were with version 2.2. Version 2.3 of the
Math editor, which is in Ubuntu Gutsy, seems to be quite usable.
However, formulas do not display correctly with Word for Mac.) &lt;/p&gt;
&lt;p&gt;So I investigated the possibility of using &lt;a href="http://www.openoffice.org"&gt;OpenOffice.org Writer&lt;/a&gt; in combination with
&lt;a href="http://ooolatex.sourceforge.net/"&gt;OOoLatex&lt;/a&gt; to create a Word document
with LaTeX formulas. &lt;/p&gt;
&lt;p&gt;OOoLatex was &lt;a href="http://ubuntuforums.org/showthread.php?t=334218"&gt;very easy to install on Ubuntu&lt;/a&gt;, and it works
like a charm. However, getting MS Word to display the formulas proved
not as easy. &lt;/p&gt;
&lt;p&gt;First of all, you have to choose the right format for the
formula pictures in OOoLatex. WMF gives the best results, but requires
the &lt;a href="http://ooolatex.sourceforge.net/BakomaFonts_v2.tar.gz"&gt;Bakoma TTF fonts&lt;/a&gt; to be
installed on the machine running OpenOffice.org or Word. As I cannot
count on other people having these fonts installed, I chose to create
the formula pictures as transparant PNG images. The PNG antialiasing did
create some rastering artifacts when printing, but these were minor. &lt;/p&gt;
&lt;p&gt;A second problem is that the MS Word .doc format is not quite as flexible
as OpenOffice.org ODF (Open Document Format) when it comes to
positioning pictures relative to the text baseline. Basically, your only
choice for inline pictures in .doc files is to align them top, bottom or
centre, relative to the baseline. The result is that inline formulas
will tend to float either above or below the rest of the line a little
bit. Changing the picture type from inline to floating will give you the
positioning flexibility to fix this, but requires a lot of manual work
repositioning the formulas. &lt;/p&gt;
&lt;p&gt;Finally, the various versions of MS Word are
very picky as to what they&amp;rsquo;ll accept as pictures. Word 2003 for Windows
would not accept the formula pictures in Word documents saved directly
from OpenOffice.org Writer 2.2. The documents have to first be reloaded
in OpenOffice.org Writer, and then saved again as Word document. Word
for Windows then loads these files correctly. Word for Mac however will
still stubbornly refuse to display the pictures. Apparently there are
several interoperability problems between various Word versions, and
this seems to be one of them. However, after some experimenting I found
out that the pictures are there, but they have transparency set to 100%.
It turns out that Word for Mac does not support partly-transparent
objects, it simply makes them fully transparent. Setting transparency to
0% manually is a bit of a drag, but does at least &amp;ldquo;fix&amp;rdquo; the problem
(double-click on the picture to open the options dialog). If you have
inserted any special characters, be sure to check those as well, as MS
Word for Mac also seems to have rather limited Unicode-support. &lt;/p&gt;
&lt;p&gt;Last week I upgraded my Unbuntu to 7.10 (&amp;ldquo;Gutsy Gibbon&amp;rdquo;), which has a newer
version of OpenOffice.org (2.3.0). I saved some ODF documents with
OOoLatex formulas as Word documents from this version of OpenOffice.org.
And guess what, the formulas were accepted without problems on MS Word,
both on Windows and on the Mac. Go figure. Of course the baseline offset
and Unicode problems are still there though. To wrap things up, some
tips for for people who want to create a Word document with LaTeX
formulas using OpenOffice.org and OOoLatex:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always keep an ODF version of the document for reference, as you&amp;rsquo;ll
    loose the correct baseline offset for the formula&amp;rsquo;s when converting
    to MS Word .doc.&lt;/li&gt;
&lt;li&gt;Distribute a PDF version of the ODF document for printing, if
    editing by third parties is not required.&lt;/li&gt;
&lt;li&gt;If editing (of the text, not the fomulas) by third parties is
    required, make sure your formulas are created as PNG files, or
    include the
    &lt;a href="http://ooolatex.sourceforge.net/BakomaFonts_v2.tar.gz"&gt;Bakoma&lt;/a&gt; TTF
    fonts with your document.&lt;/li&gt;
&lt;li&gt;If you are using an OpenOffice.org version before 2.3.0: Before you
    distribute your Word document, open it in OpenOffice.org Writer, and
    save it again.&lt;/li&gt;
&lt;li&gt;If the doument is intended for MS Word users running Windows,
    consider reccomending the &lt;a href="http://www.sun.com/software/star/odf_plugin/"&gt;Sun ODF plugin for MS Office&lt;/a&gt;, which will
    enable users of MS Word 2000 and up to work directly with ODF
    documents. Users of MS Office 2007 can use &lt;a href="http://odf-converter.sourceforge.net/"&gt;the open-source
    OpenXML/ODF translator add-in&lt;/a&gt; (or Microsoft&amp;rsquo;s own
    ODF plugin if it becomes available).&lt;/li&gt;
&lt;li&gt;If you are using an OpenOffice.org version before 2.3.0 and the
    document is intended for Word on a Mac, don&amp;rsquo;t create your formulas
    with a transparent background. If you already have, you&amp;rsquo;ll probably
    have to manually set the transparency of all the formula pictures to
    0% in MS Word for Mac. Alternatively, recommend the Mac user to
    install &lt;a href="http://www.neooffice.org/neojava/en/index.php"&gt;NeoOffice&lt;/a&gt;,
    which is a free MacOS X version of OpenOffice.org. This will allow
    them to work directly with ODF files, handles unicode characters and
    transparency in a proper way and generally seems to provide better
    compatibility with MS Word than MS Word for Mac does. ;-)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have a Word document with transparent pictures which won&amp;rsquo;t
display on Word for Mac, try saving it as RTF and remove all instances
of the following RTF-tag from the file (using a text editor or a bit of
Perl magic):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;{\sp{\sn fillOpacity}{\sv 0}}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I haven&amp;rsquo;t tried it yet, but a comparison of several RTF files produced
by Word for Mac and Word for Windows suggests that it might work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE 2010-08-05:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Removing the ooolatex package on Ubuntu Hardy 8.04 proved to be a bit
of a challenge, as the post-removal script turned out to be broken. The
solution was to manually remove the package info and then deinstall the
package:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo mkdir /tmp/ooolatex
sudo mv ooolatex.* /tmp/ooolatex
sudo dpkg --purge --force-remove-reinstreq ooolatex
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If that works, you can delete the temporary directory using
&lt;code&gt;sudo rm -r /tmp/ooolatex&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;See also:&lt;br&gt;
&lt;a href="https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/378545"&gt;https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/378545&lt;/a&gt;&lt;/p&gt;</content><category term="misc"></category><category term="howto"></category><category term="technical"></category></entry></feed>