The Many Speak Of Computer

Knowing multiple languages can be hard. As any polyglot will tell you, there are many difficulties that can come from mixing and matching languages; losing vocabulary in both, only being able to think and speak in one at a time, having to remember to apply the correct spelling and pronunciation conventions in the correct contexts.

Humans aren’t the only ones who experience these types of multiple-language issues, however. Computers can also suffer from linguistic problems pertaining to the “programming languages” humans use to communicate with them, as well as the more hidden, arcane languages they use to speak to one another. This can cause untold frustration to their users. Dealing with seemingly arbitrary computing issues while doing science, we humans, especially if we aren’t computing experts, can get stuck in a mire with no conceivable way out.

photo-1526374965328-7f61d4dc18c5
Caught in the Matrix…

Problems with programming languages are the easiest problems of this nature to solve. Often the mistake is the human in question lacking the necessary vocabulary, or syntax, and the problem can be solved with a quick peruse of google or stack exchange to find someone with a solution. Humans are much better at communicating and expressing ideas in native human languages than computational ones. They often encounter the same problems as one another and describe them in similar ways. It is not uncommon to overhear a programmer lamenting: “But I know what I mean!” So looking for another human to act as a ‘translator’ can be very effective.

Otherwise, it’s a problem with the programming language itself; the language’s syntax is poorly defined, or doesn’t include provision for certain concepts or ideas to be expressed. Imagine trying to describe the taste of a lemon in a language which doesn’t possess words for ‘bitter’ or ‘sour’. At best these problems can be solved by installing some kind of library, or package, where someone else has written a work-around and you can piggy-back off of that effort. Like learning vocabulary from a new dialect. At worst you have to write these things yourself, and if you’re kind, and write good code, you will share them with the community; you’re telling the people down the pub that you’ve decided that the taste of lemons, fizzy colas, and Flanders red is “sour”.

photo-1531618548726-b21ac4df8121
Describe a lemon without using “bitter” or “sour”

There is, however, a more insidious and undermining class of problems, pertaining to the aforementioned arcane computer-only languages. These languages, more aptly called “machine code”, are the incomprehensible languages computers and different parts of a computer use to communicate with one another.

For many programming languages known as “compiled languages”, the computer must ‘compile’ the code written by a human into machine code which it then executes, running the program. This is generally a good thing; it helps debug errors before potentially disastrous code is run on a machine, it significantly improves performance as computers don’t need to translate code on the fly line-by-line. But there is a catch.

There is no one single machine code. And unless a computer both knows the language an executable is written in, and is able to speak it, then tough tomatoes, it can’t run that code.

This is fine for code you have written and compiled yourself, but when importing code from elsewhere it can cause tough to diagnose problems. Especially on the large computational infrastructures used in scientific computing, with many computers that might not all speak the same languages. In a discipline like meteorology, with a large legacy codebase, and where use of certain libraries is assumed, not knowing how to execute pre-compiled code will leave the hopeful researcher in a rut. Especially in cases where access to the source code of a library is restricted due to it being a commercial product. You know there’s a dialect that has the words the computer needs to express itself, and you have a set of dictionaries, but you don’t know any of the languages and they’re all completely unintelligible; which dictionary do you use?

photo-1532522750741-628fde798c73
All unintelligible?

So what can you do? Attempt to find alternative codebases. Write them yourself. Often, however, we stand on the shoulders of giants, and having to do so would be prohibitive. Ask your institution’s computing team for help – but they don’t always know the answers.

There are solutions we can employ in our day to day coding practices that can help. Clear documentation when writing code, as well as maintaining clear style guides can make a world of difference in attempting to diagnose problems that are machine-related as opposed to code-related. Keeping a repository of functions and procedures for oneself, even if it is not shared with the community, can also be a boon. You can’t see that a language doesn’t have a word for a concept unless you own a dictionary. Sometimes, pulling apart the ‘black box’-like libraries and packages we acquire from the internet, or our supervisors, or other scientists, is important in verifying that code does what we expect it to.

At the end of the day, you are not expected to be an expert in machine architecture. This is one of the many reasons why it is important to be nice to your academic computing team. If you experience issues of compilers not working on your institution’s computers, or executables of libraries not running it isn’t your job to fix it and you shouldn’t feel bad if it holds your project up. Read some papers, concentrate on some other work, work on your lit-review if you’re committed to continuing to do work. Personally, I took a holiday.

I have struggled with these problems and the solution has been to go to my PhD’s partner institution where we know the code works! Perhaps this is a sign that these problems can be extremely non-trivial, and are not to be underestimated.

Ahh well. It’s better than being a monoglot, at least.

Evidence week, or why I chatted to politicians about evidence.

Email: a.w.bateson@pgr.reading.ac.uk

Twitter: @a_w_bateson

On a sunny Tuesday morning at 8.30 am I found myself passing through security to enter the Palace of Westminster. The home of the MPs and peers is not obvious territory for a PhD student. However, I was here as a Voice of Young Science (VoYS) volunteer for the Sense about Science Evidence WeekSense about Science in an independent charity that aims to scrutinise the use of evidence in the public domain and to challenge misleading or misrepresented science. I have written previously here about attending one of their workshops about peer review, and also here about contributing to a campaign aiming to assess the transparency of evidence used in government policy documents.

The purpose of evidence week was to bring together MPs, peers, parliamentary services and people from all walks of life to generate a conversation about why evidence in policy-making matters. The week was held in collaboration with the House of Commons Library, Parliamentary Office of Science and Technology and House of Commons Science and Technology Committee, in partnership with SAGE Publishing. Individual events and briefings were contributed to by further organisations including the Royal Statistical Society, Alliance for Useful Evidence and UCL. Each day had a different theme to focus on including ‘questioning quality’ and ‘wicked problems’ i.e. superficially simple problems which turn out to be complex and multifaceted.

DgiC0YjX4AEtZeH
Throughout the week both MPs, parliamentary staff and the public were welcomed to a stand in the Upper Waiting Hall to have conversations about why evidence is important to them. Photo credit to Sense about Science.

Throughout the parliamentary week, which lasts from Monday to Thursday, Sense about Science had a stand in the Upper Waiting Hall of Parliament. This location is right outside committee rooms where members of the public will give evidence to one of the many select committees. These are collections of MPs from multiple parties whose role it is to oversee the work of government departments and agencies, though their role in gathering evidence and scrutiny can sometimes have significance beyond just UK policy-making (for example this story documenting one committee’s role in investigating the relationship between Facebook, Cambridge Analytica and the propagation of ‘fake news’). The aim of this stand was to catch the attention of both the public, parliamentary staff, and MPs, and to engage them in conversations about the importance of evidence. Alongside the stand, a series of events and briefings were held within Parliament on the topic of evidence. Titles included ‘making informed decisions about health care’ and ‘it ain’t necessarily so… simple stories can go wrong’.

Each day brought a new set of VoYS volunteers to the campaign, both to attend to the stand and to document and help out with the various events during the week. Hence I found myself abandoning my own research for a day to contribute to Day 2 of the campaign, focusing on navigating data and statistics. I had a busy day; beyond chatting to people at the stand I also took over the VoYS Twitter account to document some of the day’s key events, attended a briefing about the 2021 census, and provided a video roundup for the day (which can be viewed here!). For conversations that we had at the stand we were asked to particularly focus on questions in line with the theme of the day including ‘if a statistic is the answer, what was the question?’ and ‘where does this data come from?’

DgoFUzoXkAAVW8m
MP for Bath, Wera Hobhouse, had a particular interest in the pollution data for her constituency and the evidence for the most effective methods to improve air quality.  Photo credit to Sense about Science.

Trying to engage people at the stand proved to be challenging; the location of the stand meant people passing by were often in a rush to committee meetings. Occasionally the division bells, announcing a parliamentary vote, would also ring and a rush of MPs would flock by, great for trying to spot the more well-known MPs but less good for convincing them to stop to talk about data and statistics. In practice this meant I and other VoYS members had to adopt a very assertive approach in talking to people, a style that is generally not within the comfort zone of most scientists! However this did lead to some very interesting conversations, including with a paediatric surgeon who was advocating to the health select committee for increasing the investment in research to treat tumours in children. He posed a very interesting question: given a finite amount of funding for tumour research, how much of this should be specifically directed towards improving the survival outcomes of younger patients and how much to older patients? We also asked MPs and members of the public to add any evidence questions they had to the stand. A member of the public wondered, ‘are there incentives to show what doesn’t work?’ and Layla Moran, MP for Oxford West and Abingdon, asked ‘how can politicians better understand uncertainty in data?’

DgitoU7W4AEvohS
Visitors to the stand, including MPs and Peers, were asked to add any burning questions they had about evidence to the stand. Photo credit to Sense about Science.

The week proved to be a success. Over 60 MPs from across parliamentary parties, including government ministers, interacted with some aspect of evidence week, accounting for around 10% of the total number of MPs. Also, a wider audience who engaged with the stand included parliamentary staff and members of the public. Sense about Science highlighted two outcomes after the event: one was the opening event where members of various community groups met with over 40 MPs and peers and had the opportunity to explain why evidence was important to them, whether their interest was in beekeeping, safe standing at football matches or IVF treatment; the second was the concluding round-table event regarding what people require from evidence gathering. SAGE will publish an overview of this round-table as a discussion paper in Autumn.

On a personal level, I had a very valuable experience. Firstly, it was great opportunity to visit somewhere as imposing and important as the Houses of Parliament and to contribute to such an exciting and innovate week. I was able to have some very interesting conversations with both MPs and members of the public. I found that generally everybody was enthusiastic about the need for increased use and transparency of evidence in policy-making. The challenge, instead, is to ensure that both policy-makers and the general public have the tools they need to collect, assess and apply evidence.

How the Earth ‘breathes’ on a daily timescale

Email: J.Gristey@pgr.reading.ac.uk
Web: http://www.met.reading.ac.uk/~fn008822/

As the Earth rotates, each location on its surface is periodically exposed to incoming sunlight. For example, over London at the beginning of September, the intensity of incoming sunlight ranges from zero overnight, when the sun is below the horizon, to almost 1000 W m–2 at noon, when the sun is highest in the sky (Fig. 1).

Slide2
Fig. 1. Top-of-atmosphere incoming sunlight over London (51.5° N, 0° E) for the first three days in September 2010. Data is from the Met Office numerical weather prediction model.

Earth’s atmosphere and surface respond to this repeating daily cycle of incoming sunlight in ways that can change the amount of energy that is emitted or reflected back to space. For example, the increased amount of sunlight in the afternoon can heat up the surface and cause more thermal energy to be emitted to space. Meanwhile, the surface heating can also cause the air near the surface to warm up and rise to form clouds that will, in turn, reflect sunlight back to space. The resulting daily cycle of the top-of-atmosphere outgoing energy flows is therefore intricate and represents one of the most fundamental cycles of our weather and climate. It is essential that we can properly represent the physical processes controlling this daily variability to obtain accurate weather and climate forecasts. However, the daily variability in Earth’s outgoing energy flows is not currently well observed across the entire globe, and current weather and climate models can struggle to reproduce realistic daily variability, highlighting a lack of understanding.

To improve understanding, dominant patterns of the daily cycle in outgoing energy flows are extracted from Met Office model output using a mathematical technique known as “principal component analysis”.

The daily cycle of reflected sunlight is found to be dominated by the height of the sun in the sky, or the “solar zenith” angle, because the atmosphere and surface are more reflective when the sun is low in the sky. There is a lesser importance from low-level clouds over the ocean, known as “marine stratocumulus” clouds, which burn off during the afternoon, reducing the amount of reflected sunlight, and tall and thick clouds, known as “deep convective” clouds, which develop later in the afternoon over land and increase the amount of reflected sunlight. On the other hand, the daily cycle of emitted thermal energy is dominated by surface heating, which increases the emitted energy at noon, but also by deep convective clouds that have very high and cold tops, reducing the emitted energy later in the afternoon. These dominant processes controlling the daily cycle of Earth’s outgoing energy flows and their relative importance (summarised in Fig. 2) have not been revealed previously at the global scale.

Slide1
Fig. 2. A schematic diagram showing the first (top) and second (bottom) most important processes controlling the daily cycle in emitted thermal energy (left) and reflected sunlight (right).

The physical processes discussed above are consistent with the daily cycle in other relevant model variables such as the surface temperature and cloud amount, further supporting the findings. Interestingly, a time lag is identified in the response of the emitted thermal energy to cloud variations, which is thought to be related to changes in the humidity of the upper atmosphere once the clouds evaporate.

The new results highlight an important gap in the current observing system, which can be utilized to evaluate and improve deficiencies in weather and climate models.

Gristey, J. J., Chiu, J. C., Gurney, R. J., Morcrette, C. J., Hill, P. G., Russell, J. E., and Brindley, H. E.: Insights into the diurnal cycle of global Earth outgoing radiation using a numerical weather prediction model, Atmos. Chem. Phys., 18, 5129-5145, https://doi.org/10.5194/acp-18-5129-2018, 2018.

Estimating the Effects of Vertical Wind Shear on Orographic Gravity Wave Drag

Orographic gravity waves occur when air flows over mountains in stably stratified conditions. The flow of air creates a pressure imbalance across the mountain, so a force is exerted on the mountain in the same direction as the flow. An equal and opposite force is exerted back on the atmosphere, and this is gravity wave drag (GWD).

GWD must be parametrized in Global Circulation Models (GCMs), as it is important for large-scale flow. The first parametrization was formulated by Palmer et al. (1986) to reduce a systematic westerly bias. The current parametrization was formulated by Lott and Miller (1997) and partitions the calculation into 2 parts (see figure 1):

  1. The mountain waves. This is calculated by averaging the wind, Brunt-Väisälä frequency and fluid density in a layer between 1 and 2 standard deviations of the subgrid-scale orography above the mean orography.
  2. The blocked flow. This is based on an interpretation of the non-dimensional mountain height.
Fig 1
Figure from Lott and Miller (1997).

The parametrization does not include the effects of wind shear. Wind shear is a change in the wind with height and it alters the vertical wave length of gravity waves and so alters the drag. It has been shown (Teixeira et al., 2004; Teixeira and Miranda, 2006) that a uniform shear profile (i.e. a change in the magnitude of the wind with height) decreases the drag whereas a profile in which the wind turns with height increases the drag. This effect was seen by Miranda et al. (2009) to have the greatest impact over Antarctica, where drag enhancement was seen to occur all year with a peak of ~50% during JJA. Figure 2 shows this.

Fig 2
Figure 2: Annual mean linear GWD stress (1992-2001). Vectors show the surface stress with shear. Shading indicates the anomaly of the modulus of the surface stress due to shear. Computed from ERA-40 data. Taken from Miranda et al. (2009).

The aim of this work is to test the impact of the inclusion of shear effects on the parametrization. The first stage of this is to test the sensitivity of the shear correction to the height in the atmosphere at which the necessary derivatives are approximated. We carry out calculations using 2 different reference heights:

  1. The top of the boundary layer (BLH). This allows us to avoid the effects of boundary layer turbulence, which are not important in this case as they are unrelated to the dynamics of mountain waves.
  2. The middle of the layer between 1 and 2 standard deviations of the sub-grid scale orography (SDH). This is the nominal height used in previous studies and in the parametrization.

All figures shown below focus on Antarctica and are averaged over all JJAs for the decade 2006-2015. We are interested in Antarctica and the JJA season for the reasons highlighted above. All calculations are carried out using ERA-Interim reanalysis data.

We first consider the enhancement assuming axisymmetric orography. The advantage of this is that it considerably simplifies the correction due to terms related to the anisotropy becoming constant (see Teixeira et al, 2004). Figure 3 shows this correction calculated using both reference heights. We can see that the enhancement is greater when the SDH is used.

Fig 3
Figure 3: Drag enhancement over Antarctica with shear corrections computed at the BLH (left) and SDH (right), during JJAs for the decade 2006-2015, using axisymmetric orography.

We now consider the enhancement using mountains with an elliptical horizontal cross-section. This is how the real orography is represented in the parametrization. Again, we see that the enhancement is greater when the SDH is used (figure 4).

Fig 4
Figure 4: Drag enhancement (left) and enhancement of drag stress (in Pa) (right) over Antarctica with shear corrections calculated at the BLH (top) and SDH (bottom), during JJAs for the decade 2006-2015, using orography with an elliptical horizontal cross-section.

It is interesting to note that at both heights the enhancement is greater when axisymmetric orography is used. This occurs because, in the case of elliptical mountains, the shear vector is predominantly aligned along the orography, resulting is weaker enhancement (see figure 5).

Fig 5
Figure 5: Histograms of the orientation of the shear vector relative to the short axis of the orography over Antarctica for JJAs during the decade 2006-2015, using the BLH (left) and SDH (right).

We also investigate the fraction of times at which the terms related to wind profile curvature (i.e. those containing second derivatives) dominate the drag correction. This tells us the fraction of time for which curvature matters for the drag. We see that second derivatives dominate over much of Antarctica for a high proportion of the time (see figure 6).

Fig 6
Figure 6: Fraction of the time at which terms with second derivatives dominate the drag correction relative to terms with first derivatives over orography with an elliptical horizontal cross-section, for JJAs during the decade 2006-2015, calculated using the BLH (left) and SDH (right).

In summary, the main findings are as follows:

  • The drag is quantitatively robust to changes in calculation height, with the geographical distribution, seasonality and sign essentially the same.
  • The drag is considerably enhanced when the SDH is used rather than the BLH.
  • Investigation of the relative magnitudes of terms containing first and second derivatives in the drag correction indicates that second derivatives (i.e. curvature terms) dominate in a large proportion of Antarctica for a large fraction of time. This leads to an average enhancement of the drag which is larger over shorter time intervals.
  • Use of an axisymmetric orography profile causes considerable overestimation of the shear effects. This is due to the shear vector being predominantly aligned along the mountains in the case of the orography with an elliptical horizontal cross-section.

These results highlight the need to ‘tune’ the calculation by identifying the optimum height in the atmosphere at which to approximate the derivatives. This work is ongoing. We expect the optimum height to be that at which the shear has the greatest impact on the surface drag.

References:

Lott F. and Miller M., 1997, A new subgrid-scale orographic drag parametrization: Its formulation and testing, Quart. J. Roy. Meteor. Soc., 123: 101–127.

Miranda P., Martins J. and Teixeira M., 2009, Assessing wind profile effects on the global atmospheric torque, Quart. J. Roy. Meteor. Soc., 135: 807–814.

Teixeira M. and Miranda P., 2006, A linear model of gravity wave drag for hydrostatic sheared flow over elliptical mountains, Quart. J. Roy. Meteor. Soc., 132: 2439–2458.

Teixeira M., Miranda P. and Valente M., 2004, An analytical model of mountain wave drag for wind profiles with shear and curvature, J. Atmos. Sci., 61: 1040–1054.

Visiting Scientist 2018

With thanks to Kaja Milczewska

Every year the PhD students in the Meteorology Department invite a distinguished scientist to spend a few days with us. This year, the students voted for the Visiting Scientist to be Prof. Olivia Romppainnen-Martius, who came to the Department from 4th-7th June 2018.

Prof. Romppainen-Martius is based at the University of Bern, in Switzerland, as an Associate Professor researching climate impacts.

Olivia’s research interests broadly covers mid-latitude atmospheric dynamics, with topics from how blocking events are precursors Sudden Stratospheric Warming events, to more impact based work on heavy Alpine precipitation and extreme hail in and around Switzerland. Her main research areas can be summarised as dynamics of short-term climate variation, forecasting and statistics of high-impact weather events and mid-latitude weather systems. More about her research and publications can be found here.

As is usual for the start of our distinguished visitor’s stay, Prof. Romppainen-Martius’s visit began with an introduction from Prof. Sue Gray during the coffee reception. This was immediately followed by a special seminar, titled “Recent hail research in Switzerland – the challenges and delights of complex orography and crowd-sourced data”. Her talk covered various probabilistic measures for predicting hail in the mountainous region that is Switzerland and how the climatology of these identified events is strongly linked with these mountainous areas. Verification of these predictions has recently been achieved through observer reports via the MeteoSwiss app, where observers record the time, location, and size of the hail they have observed.

The day was rounded off with a social at Zero Degrees, with Olivia and many PhD students engaging in fruitful conversation over pizza and beer.

After a busy first day, the second day of her visit included individual meetings with both research staff and students, and attending the Mesoscale and HHH (Hoskins-Half-Hour) research groups. On Wednesday 5th July, some PhD students presented their research to Olivia to showcase the breadth of topics covered in the Meteorology department. Interestingly, one of the talks ‘reliably’ informed us that Arctic sea-ice melting meant it was now possible to go on holiday cruises to see penguins. Clearly these penguins are on holiday too…

Slide1

At the weekly PhD Group meeting, Prof. Romppainen-Martius gave some useful advice on careers in academic research and the pathway to her current position – which of course includes lots of skiing. Additionally, she advertised some post-doctoral funding opportunities in Switzerland and Germany, which was sure to encourage the keen skiers in the crowd. This was an engaging open discussion about the realities of research life, and attendance was made all the better by biscuits from the group leaders Beth and Liam.

On the last day of her visit (Thursday 8th June), Olivia gave her second departmental seminar titled “Periods of recurrent synoptic-scale Rossby waves and associated persistent moderate temperature extremes”. The seminar was followed by a well-attended leaving reception, which concluded Olivia’s visit to our department. The students prepared a photo frame and other England themed items as a gift, to thank our distinguished scientist for accepting the invitation to spend an inspiring week with us.  Unfortunately, Olivia could not stay for the ‘world-renowned’ annual Met BBQ and Barn Dance on the Friday, but nonetheless we hope that she enjoyed her visit as much as we did!

Olivia

Top websites for weather enthusiasts!

If you’re searching for some weather-related procrastination, then look no further – we’ve got just what you need! Here’s our top picks for your coffee break-browsing:

  • Want a cool animated globe that shows you wind, temperature and aerosols, amongst other things? Null School is for you!

nullschool

  • Severe Weather Europe has photos and videos of awesome hailstorms, supercells and more.
  • If you’re wanting wind maps – then Windy.com is the place to go.

windy

  • Space weather more your thing? Then help with some research and find Solar Storms. Read more about the science in Shannon’s blog.
  • If you’ve been following all the recent thunderstorms, then check out the locations of all the lightning, updated in near real-time at Blitzortung.

lightning

  • The Met Office website has forecasts and pollen counts, but also cool things like podcasts about the weather.
  • Real-time satellite imagery is available at sat24 for the UK and Europe.

Sat24

WXChartspic.PNG

  • For articles on climate change and environmental science, Carbon Brief  is the answer.

 

Polar Prediction School 2018

From 17th-27th April three Reading students trekked to the to the far north to attend the APECS Polar Prediction School at the Abisko Research Station. The aims of this course were to provide a general education in the Polar climates, from ocean and ice to atmosphere to help the participants understand the issues of prediction in polar regions and contribute to the current academic push to improve our understanding and forecasting skill of these regions.

 

 

 

Abisko research station is situated 68°N on the banks of lake Torneträsk, the sixth longest lake in Sweden. Frozen from approximately December to June the lake provided a great base for experiencing taking observations of the poles. On the first full day we put up a met mast which we then used data from to explore boundary layer turbulence. Drilling the holes for the guy ropes to find the ice was still a metre thick was rather reassuring after people had stripped down to t-shirts in the sun.

Throughout the week we also launched multiple radiosondes which was another excellent excuse to spend some time drinking in the scenery. This caused a stir when there was an ice-fishing competition on the lake, so several local school children ended up assisting with the launch.

 

 

 

 

After a week packed full of lectures, from sea-ice dynamics to observations from an ice breaker, on the Sunday in the middle of the school we had the day off. Most people took this as a chance to explore a bit further afield. A few of us rented snowshoes which turned out to be an excellent idea as there were plenty of places where the snow was still a meter thick. However difficult the terrain the scenery was 100% worth it, and the kanelbullar in our packed lunches certainly helped keep us going.

 

 

This was followed by another week of lectures, covering boundary layers, clouds and much more. We also spent time working on our science communication, both to other scientists and the general public. This culminated with everyone giving a 1 minute “Frostbyte” presentation of their work.

The course was a great chance to learn about the polar climate more broadly which has been helpful in putting my PhD work in context. It’s also great to be able to say I have been to the Arctic when people ask in the future!

PPS2018_group

A big thank you to APECS, APPLICATE and the Polar Prediction Project for supporting the course as well as all the staff who gave their time to speak. More details about the course can be found here.