Rotation

With a time lapse video in the winter and in the summer, I could cover the whole northern sky: When it’s getting bright in one of the videos, it starts to get dark in the other one. Probably best to watch fullscreen:

Winter night sky time lapse. For full screen: https://youtu.be/SqYlLvelal8 (unfortunately, dew on the lens made the stars less visible)
Summer night sky time lapse. For full screen: https://youtu.be/qDIjs-YaC5Q

The reason behind is between the two videos, the earth has done half a round around the sun and so at midnight, when looking at Polaris, one looks from opposite directions.

Programming improvements 3

A few things of the many things I learned last months in Python.

For and while loops have an else option

I used to write code like this:

helper = False
for something in some_list:
    if condition:
       helper = True
       break
if helper == False:
   do_something()

That can be done so much easier:

for something in some_list:
    if condition:
       break
else:    # break wasn't called in the loop
    do_something

A similar option exist for while loops.

Few other little things were:

if helper == False:          ->            if not helper:

def method(somevar=""):      ->            def method(somevar=None):
    if somevar != "":                          if somevar:

List comprehensions were also a revelation. Instead of using:

newlist = []
for entry in some_list:
    if condition:
        newlist.append(entry)

condition could be something like “entry > 0”. Using a list comprehension, that can be a one liner and is also faster in the execution:

newlist = [entry for entry in some_list if condition]

While I still feel, it would have been nice, if I’d have learned these little things before (which comes from the thought I would be liked more, and from the expectation of perfectionism by me and because of that I also think others expect perfectionism from me – which is just not achievable), it is nice to pick new things up now. While I thought in my 20s that in many areas of life I can stop learning at some point, in the last years I learned that learning will never end in any part of life, and that is good! Because if I stop being willing to learn, I will go backwards.

Low sun in winter

During frosty days, just before the winter solstice, I came along this place.

Frosty meadow in England. The parts in the shade from the hedge have three days of frost to them, the other parts just one day.
Frosty meadow in England. The parts in the shade from the hedge have three days of frost to them, the other parts just one day.

The sun was shining the days before, and cleared the frost where it reached.

I was surprised, how wide the shady area was. My instinct would have been, that the shadow would just have been a bit wider than the height of the hedge. But it is much wider. In the picture I measured the width of the frosty area and the height of the hedge at a few places and calculated the angle of the suns maximum elevation using

alpha = arctan(height/width)
Height [pixel]Width [pixel]Angle alpha [degree]
344112017.1
656208017.5
1012361215.7
Measured values and calculated angle of the sun

In the table above one has to take into account that it’s impossible to measure with one pixel precision for a hedge on uneven ground. Another person might measure the heights 30 pixel higher, or lower, and widths 80 pixel wider or narrower (for the second row), which could vary the angle by about 1.5 degrees. That was the reason, why I did three measurements of different areas in the picture.

So I get about 16 to 18 degrees, which corresponds with the real value of 90 – 51 – 23.4 = 15.6 degrees. The values in the formula are:
90: mid day height of the sun over the equator
51: my geographical latitude
23.4: angle between equator and ecliptic.
At the winter solstice the latter value needs to be subtracted, at the summer solstice it has to be added, giving a height of 62 degrees for the sun during mid day

Climate crisis at home (update)

Five and a half weeks after me writing about the dry weather in the UK we finally got some substantial rain (about 25 mm over 8 hours). After the rain I took another picture of the same hole as before:

Deep cracks in the soil in the garden on 25 August 2022. The remaining green grass is less green, trees are getting rid of their leaves due to drought. The hole has slightly filled up with soil falling of the cliffs.
Deep cracks in the soil in the garden on 25 August 2022. The remaining green grass is less green, trees are getting rid of their leaves due to drought. The hole has slightly filled up with soil falling of the cliffs.

The old picture:

Deep cracks in the soil in the garden, less than 10 cm of the 30 cm ruler stick out. At least some grass is still green, and we hope for rain before all died back.
Deep cracks in the soil in the garden on 17 July 2022. Less than 10 cm of the 30 cm ruler stick out of the crack. At least some grass is still green, and we hope for rain before all dies back.

I thought that the cracks got bigger, however, the pictures don’t show a clear widening of the crack. It’s not completely clear due to the different angles of the pictures. But still a good example why we shouldn’t rely on feelings or opinions when making decisions, but on measurable facts.

After the rain I also wanted to see how deep the moisture penetrated the soil, 6 hours after the end of the rain I dug a tiny hole. I was surprised how quickly the spade stopped, due to hitting dry soil:

The 25 mm of rain penetrated about 50 mm of soil, below the soil is still bone dry.
The 25 mm of rain penetrated about 50 mm of soil, below the soil is still bone dry.

It will take a lot more rainy days before the moisture will reach depths of over a meter and even longer to fill up the aquifers. With the measurement from our garden today, I think we would need this amount of rain every day for at least a month to counteract the drought. Forecast predicts no rain for the next 7 days, so I guess the top layer of the soil will be again completely dry by the time the next rain will be here.

Below I copied the text from my original article. And I actually feel I was quite good with my actions. I kept cycling most local journeys and reduced my meat and milk consumption and just bought the train tickets to go to Germany in a month (which is not the easiest travel, but luckily there is help: https://www.seat61.com/Germany.htm#london-to-leipzig-and-dresden-by-train)

In future these droughts are likely to occur more often, the last IPCC report is very clear about this. And there are things we can do. Like planting some trees in the garden (and maybe on fields?). From my experience in Germany and the UK, people don’t like trees in the garden (all this work with the leaves, …) but in our garden there is a clear difference in the number and size of the cracks in the shade of the tree and in the grass area. And huge difference in grass colour. I hope we can convince our landlord, to get the approval for a few more trees.

The reason for the climate crisis now, is however the behaviour of the generations from the 1960 up to mine. An economy was build on cheap oil and gas, without paying the true costs (and now people complain, when they have to pay prices closer to the real costs). All the work that needs to go in moving cities away from the coast, to repair infrastructure after it was hit by a heat wave (or much heavier/frequent storms/floods), all the lives lost in heat waves and other severe weather. We are paying now for the living standard of our grandparents (And poor countries for the wealth of rich countries, the colonialism still continues). And a further problem is the inflexibility for change in these generations (don’t take away my petrol car or the 200 km/h on a German motorway, I want to drive everywhere, why do I need to see wind farms or solar parks in my neighbourhood, one day a week without meat? – How dare you!). Unfortunately, these are the people that make politics and decisions. And they (and me) will be dead when we reach the 4°C average warming by the end of the century (that is the scenario our current goals announced by the politics head to), and future generations will have to deal with that. Parents usually say they love their children, but somehow their actions feel different.

So what can I do:

  • do I need to use a car, or can I spent a few minutes longer on the public transport (less stress) or use an (electric) bicycle (saves the gym visit)?
  • can I eat more plant based products? (lentil burger/bolognese, oat milk, bean based spread instead of salami)
  • do I need to take the plane, or can I spent a bit longer, but use the train? (challenging)

Programming improvements 2

A few things of the many things I learned last weeks in Python.

This is what I used to do to conditionally set settings:

class MyClass:
    def method(self, args**):
        <some code block>
        if some_arg == "condition":
            self.option = "this setting"
            <run some code>
            <call a method>
        else:
            self.option = "another setting"
            <run some other code>
            <call a different method>
        <some more code block>

myclass = MyClass()
myclass.method(args)

And it could be much more complicated.

Using an object oriented approach, can be so much nicer.

class MyBaseClass:
    def method(self, args**):
        <some code block>
        self._submethod(subargs**)
        <some more code block>
    @abstractmethod
    def _submethod():
        pass

The private submethod would then be defined in the child classes. First for “condition”

class MyClass_condiontion(MyBaseClass):
    def _submethod()::
        self.option = "this setting"
        <run some code>
        <call a method>     # can be in this or the parent class

Second for the else:

class MyClass_else_condiontion(MyBaseClass):
    def _submethod()::
        self.option = "another setting"
        <run some other code>
        <call a different method>     # can be in this or the parent class

To call the classes one could use the condition:

if some_arg == "condition":
    myclass = MyClass_condiontion()
else:
    myclass = MyClass_else_condiontion()
myclass.method(args)

With this approach the coding is so much neater. Each method knows what it has to do and there is no fuss about the settings.

While I still feel, it would have been nice, if I’d have learned these little things before (which comes from the thought I would be liked more, and from the expectation of perfectionism by me and because of that I also think others expect perfectionism from me – which is just not achievable), it is nice to pick new things up now. While I thought in my 20s that in many areas of life I can stop learning at some point, in the last years I learned that learning will never end in any part of life, and that is good! Because if I stop being willing to learn, I will go backwards.

Climate crisis at home

Before I moved to the UK, I heard of the rainy, foggy weather here. Typical English weather. But I have to say, that is not at all my experience. During the cycle commutes to and from work I got wet rarely and only at the a similar rate as in Germany. Although, these cycles are slightly biased, as I check the rain radar and have stayed half an hour longer to let rain pass, or left work a bit earlier to get home before the rain clouds arrived.

Deep cracks in the soil in the garden, less than 10 cm of the 30 cm ruler stick out. At least some grass is still green, and we hope for rain before all died back.
Deep cracks in the soil in the garden on 17 July 2022. Less than 10 cm of the 30 cm ruler stick out of the crack. At least some grass is still green, and we hope for rain before all dies back.

Now it has been a very long time since I last was out in the rain. And that’s not because I haven’t been out. While most of June was relatively cool with many days below 20°C, it didn’t rain much. So far July was very dry as well, at higher temperatures. The really hot days, however, are still ahead.

The dry weather is definitely visible now. On my recent cycles I saw so many brown meadows or village greens. And the cracks in the soil in our garden get bigger and bigger. I never have seen such deep cracks in soil with vegetation on it.

In future these droughts are likely to occur more often, the last IPCC report is very clear about this. And there are things we can do. Like planting some trees in the garden (and maybe on fields?). From my experience in Germany and the UK, people don’t like trees in the garden (all this work with the leaves, …) but in our garden there is a clear difference in the number and size of the cracks in the shade of the tree and in the grass area. And huge difference in grass colour. I hope we can convince our landlord, to get the approval for a few more trees.

The reason for the climate crisis now, is however the behaviour of the generations from the 1960 up to mine. An economy was build on cheap oil and gas, without paying the true costs (and now people complain, when they have to pay prices closer to the real costs). All the work that needs to go in moving cities away from the coast, to repair infrastructure after it was hit by a heat wave (or much heavier/frequent storms/floods), all the lives lost in heat waves and other severe weather. We are paying now for the living standard of our grandparents (And poor countries for the wealth of rich countries, the colonialism still continues). And a further problem is the inflexibility for change in these generations (don’t take away my petrol car or the 200 km/h on a German motorway, I want to drive everywhere, why do I need to see wind farms or solar parks in my neighbourhood, one day a week without meat? – How dare you!). Unfortunately, these are the people that make politics and decisions. And they (and me) will be dead when we reach the 4°C average warming by the end of the century (that is the scenario our current goals announced by the politics head to), and future generations will have to deal with that. Parents usually say they love their children, but somehow their actions feel different.

So what can I do:

  • do I need to use a car, or can I spent a few minutes longer on the public transport (less stress) or use an (electric) bicycle (saves the gym visit)?
  • can I eat more plant based products? (lentil burger/bolognese, oat milk, bean based spread instead of salami)
  • do I need to take the plane, or can I spent a bit longer, but use the train? (challenging)

Programming improvements

A few things of the many things I learned last week in Python.

My draft when a new optional dictionary was added to the method:

def method(self, arg1, options={}):

However, a better version was suggested to me:

def method(self, arg1, options=None):
options = (options or {})

And the other big learning through code review was, when constructing a string from a dictionary. My complicated code:

for key1, value1 in options.items():
    if key1 == "searchString":
        for key, value in value1.items():
            result_string = f"someString.{key}.{value}"

The suggested version is so much neater:

for key, value in options.get("searchString", {}).items():
    result_string += f"someString.{key}.{value}"

While I still feel, it would have been nice, if I’d have learned these little things before (which comes from the thought I would be liked more, and from the expectation of perfectionism by me and because of that I also think others expect perfectionism from me – which is just not achievable), it is nice to pick new things up now. While I thought in my 20s that in many areas of life I can stop learning at some point, in the last years I learned that learning will never end in any part of life, and that is good! Because if I stop being willing to learn, I will go backwards.

Moon halo (22° halo)

The moons 22° halo, as seen in a March night. This photo was taken by Ronny Errmann in his garden.
The moons 22° halo, as seen in a March night.

Recently I was made aware about an impressive moon halo, also know as moon dog. I have seen light versions of it before, but not as clear.

It happens when a layer of ice crystals forms high in the atmosphere. Each of the crystals then acts as a prism, refracting the light into a certain way. It’s a similar (and yet not) effect like when a rainbow forms. And actually a moon halo also has a colour gradient, the inner bit is red, the outer bit is blue. However, in my image that is not visible, a longer exposure time would have been good. Next time 🙂

Instead, what I did was recording a time lapse for 30 minutes:

30 Minute time lapse of a moon halo

While some clouds move very quickly, the only apparent change of the halo is caused by earth’s rotation (the moon and halo moving along the image). This also made clear, what are stars and what are optical effects/defects from the lens. Right to the moon are Castor and Pollux of constellation Gemini, and below the moon, next to the tree, is Procyon. All stars fainter than magnitude 2 are invisible due to the scattered moon light (which itself is just reflected sun light).

More information can be found on the Wikipedia article about moon halos: https://en.wikipedia.org/wiki/22%C2%B0_halo

Two and a half years earlier a got a glimpse of a sun halo:

Shitty sun halo (see small area below)
Shitty sun halo (see small area below)
Sun halo, seen from a moving train, which is just not ideal
Sun halo, seen from a moving train, which is just not ideal

Nicer examples of sun halos can be found on Wikipedia: https://en.wikipedia.org/wiki/Halo_(optical_phenomenon)

Create a time lapse from individual images: https://ronnyerrmann.wordpress.com/2022/02/12/commands-to-create-time-lapse-videos-from-individual-frames/

Carbon responsible travel

After the pandemic situation became better again, I started looking into travelling from the UK to Germany. Preferably by train, as flying is just not good in a climate crisis. And I travelled by train before several times a year. With the German DB “Super Sparpreis EU” one could book a ticket from London St Pancras to, lets say Dresden or return. Depending on how busy the trains were, I spent something between 70€ and 120€ per direction, maybe a bit more during Christmas. That was 2018.

When I checked this year to travel a month in advance, no public holidays, Prices ware around £75 for the leg London to Brussels and then another £60 to £80 from Brussels to Dresden. I don’t know if that is expensive, it’s definitely over 50% more expensive than 4 years ago.

And then I made the mistake and checked flights. It was shocking to see that they started at £7 for each way. And that was only 2.5 weeks in advance. Luggage adds another £21, and I would need another 17€ for the local train to my final destination. But that is still cheaper than any of the two parts of the train trip for the whole distance.

I understand that these plane ticket prices are not the real costs, the airline will make the money with the people who by tickets at a later stage (although, even for the flight tomorrow the price is still only £18, so probably they need to subsidise from other flights). And yet, I find it astonishing that the climate damaging travel is still cheaper than the more responsible travel.

Don’t look up (my personal thoughts)

(by Ronny Errmann)

I finally watched the movie “Don’t look up”. First thought I had at the beginning was how nice that the research environment was shown quite realistic. Not in everything (calculations on a white board instead of using computer programs and knowing it will hit earth with just few hours of position data), but hey, it’s a movie. And second thought was, why is everyone reacting so crazy to the threat.

I really could connect with the feelings of the main characters to get the public and politics react to the threat. In that sense it was quite a stressful movie for me, getting too much involved.

In terms of the climate crisis I feel the same situation as shown in the movie is happening in our real lifes and I wonder if scientists from that field feel like that for years or decades. The impact of humans on the climate is know for over 70 years, and we see the rising temperatures clearly for 40 years. And yet, only slow action is being taken and the things decided are not enough for a 1.5 C limit. If we, the world, keep creating the same amount of CO2, that we created in each of the previous years, then in 8 years will have used up all the budget to keep within the global average of 1.5 C temperature increase. If we use produce more, than we will raise the temperature more than 1.5 C, which will create much more severe effects. And I can’t see any chance that the global emissions will decrease, on the contrary, every year we produce more CO2 than the year before.

Links:

https://en.wikipedia.org/wiki/Climate_change
https://theconversation.com/the-1-5-global-warming-limit-is-not-impossible-but-without-political-action-it-soon-will-be-159297
https://www.statista.com/chart/26102/emission-reduction-goal-and-projected-achievements-by-country/
https://theconversation.com/new-research-suggests-1-5c-climate-target-will-be-out-of-reach-without-greener-covid-19-recovery-plans-151527
https://www.bbc.com/news/science-environment-45678338
https://www.nature.com/articles/d41586-021-03036-x