UKCA Chemistry and Aerosol Tutorials: Things to know before you start the vn11.8 practicals

Revision as of 11:25, 20 January 2021 by Nla27 (talk | contribs) (Additional Requirements when using a personal Virtual Machine)

UKCA Chemistry and Aerosol Tutorials at vn11.8

You will need to have the details of your MOSRS account and VM connection details to hand.

Before you begin the UKCA Tutorials

You should be comfortable using a GNU/Linux operating system, including using and navigating around using a terminal. You should also be familiar with programming, ideally Fortran.

These tutorials assume that you are familiar with FCM, and training on this can be found here:

The UM FCM tutorial that is linked from this page uses the old user interface (the "UMUI"), so will be less relevant here.

You should also familiarise yourself with Rose & Cylc, and more information on these can be found here:

The Met Office provide some on-line UM specific Rose training here: (MOSRS password required)


To run these tutorials you will need

which will then allow you to run the tutorials in a Virtual Machine.

Developing code for the UM

During this tutorial you will be creating tickets on the Met Office Science Repository Service, and making code changes to UM branches. Please note that this is a live system, used by scientists all over the world to develop their code. However, please don't worry about breaking anything, as there are practices in place to prevent this.

For more information about developing for the UM, please see the Working Practices for UM Development with Rose, FCM and trac.

UKCA Training Suite

Machine UM Version/Configuration Suite ID Owner Comments
vm vn11.8 N48L38 GNU Compiler u-ca021 lukeabraham 1x2 decomposition

These suites are based on the um_n48_ukca_eg app, which is available in the MetUM trunk (in rose-stem/app/). A ticket giving more details on these (and the code changes) can be found at: um:#3578.

Additional Requirements when using a personal Virtual Machine


You will be using a version of the Met Office provided Virtual Machine to run the VM, provided here:

It will have been set-up for you, but if you are making your own VM you should follow the instructions in UMDP X10. There is also some (possibly out of date) information that can be found here. These tutorials have been documented on the VM in Abraham et al. (2018)[1].

To to run a simple UKCA suite in the VM you need at least 6GB of RAM to work successfully.


  1. Abraham, N. L., Archibald, A. T., Cresswell, P., Cusworth, S., Dalvi, M., Matthews, D., Wardle, S., and Whitehouse, S.: Using a virtual machine environment for developing, testing, and training for the UM-UKCA composition-climate model, using Unified Model version 10.9 and above, Geosci. Model Dev., 11, 3647–3657,, 2018.

Tutorial Data

To be able to do Tutorials 5 and 10 you will need emissions data and python scripts. These files, as well as worked solutions for all the Rose and code changes can be obtained by running the following command from the home/ directory of your VM:

wget -q --show-progress

There is 915MB to download, so it might take some time.

Once the download has finished, you can extract the archive by running

tar -xzvf UKCA_Tutorial_vn118.tgz

This will make a directory called Tutorials/ containing 1.5GB of files. If you cd into this you can check that the files have not been corrupted by running the following command:

md5sum --status -c vn118.md5


You will need to download Xconv (xconv1.94) from here:

You can download this by


Download it to your $HOME/bin on the VM, cd into this directory, tar -zxvf the tar-ball, and then

ln -s xconv1.94 xconv
ln -s xconv1.94 convsh


There is an install-iris script provided, but you will need to set-up modules yourself to be able to use it properly. The anaconda install breaks Rose if put in your PATH, however, there is now an alias


which will open a new terminal with all the anaconda python packages in its $PATH. This will allow you to use Rose in one terminal and Iris in another. You should edit the install-iris to have the line

conda install -y -c conda-forge python=3.6 iris=1.13 ipython mo_pack numpy=1.15

instead of the existing line, otherwise the scripts will not work correctly.

I have found a handy way to use python is to use ipython with the following arguments

ipython --pylab --logfile=ipython-`date +\"%Y%m%d-%H%M%S\"`.py"

I have aliased this to


in my .bashrc. The


sets-up a MatLab-type environment (numpy, scipy, matplotlib all loaded using standard shortcuts), and

--logfile=ipython-`date +\"%Y%m%d-%H%M%S\"`.py

means that all commands are saved to a file of the format


There are a number of scripts provided for these tutorials. These can be found on GitHub here:

Written by Luke Abraham 2020.