UKCA Chemistry and Aerosol UMvn13.0 Tutorial 1

From UKCA

UKCA Chemistry and Aerosol Tutorials at UMvn13.0

Difficulty EASY
Time to Complete Under 1 hour
Video instructions

Remember to run mosrs-cache-password in your Rose suite and UM branch terminals.

Copying and Running an Existing Rose Suite

Machine UM Version/Configuration Suite ID
vm UMvn13.0 UKCA Box Model u-cq774

If you are using your own Met Office Virtual Machine, you will need to login to the VM, e.g.

vagrant ssh

If you are using a VM provided for you, you should connect via X2Go or via a Terminal.

You should then be asked for your Met Office Science Repository Service (MOSRS) password. Once you enter this, if this is the first time you are logging in, you will also be asked for your MOSRS username. This will likely be your name in lower case, and is not your username on the VM.

Then copy the rose suite by:

rosie copy u-cq774
UKCA Box Model opened with Rose and GCylc running on the VM via X2Go.

This will open an editor containing text similar to this:

description=Copy of u-cq774/trunk@236265
owner=lukeabraham
project=ukca
title=UMvn13.0 UKCA Box Model for UKCA Tutorials

# Make changes ABOVE these lines.
# The "owner", "project" and "title" fields are compulsory.
# Any KEY=VALUE pairs can be added. Known fields include:
# "access-list", "description" and "sub-project".

You can edit the title to make it more descriptive if you like. Then save (e.g. Ctrl-s) and close the file (e.g. Ctrl-q). The press y on the keyboard when prompted and press return.

The suite will now copy and checkout to your /home/$USER/roses directory, into a sub-directory that is the same as the SUITE-ID. You should change into this directory now using cd, e.g.

cd roses/u-ab123

then open the suite by typing

rose edit &

and pressing return. You can either run the suite by pressing the play button that looks like a triangle to the top right of the options bar, or by typing

rose suite-run

in the terminal.

If you are using your own VM, times will vary depending on the specifications of the host. It may take 2 or 3 minutes to compile the code (fcm_make) for the first time (and a few seconds when recompiling), followed by another few seconds to run UKCA itself (ukca). Any unsuccessful jobs will be highlighted in red and have a status of "failed".

When the suite has finished successfully it will then become blank with the message stopped with 'succeeded' in the bottom-left corner.

Version Control

Rose suites are all held under version control, using fcm. When making changes to a suite, you will need to save it before you can run the suite. Once you are happy with the settings, you can also commit these changes back to the repository - to do this change directory to the

/home/$USER/roses/[SUITE-ID]

and then type

fcm commit

a text editor will then open, and you should type a short message describing what the changes you have made do. You should then close the editor and type y in the terminal. It is recommended that you commit frequently (even on configurations that aren't working) as this protects you against mistakes and accidental deletions etc.

These suites can be viewed on the SRS here: https://code.metoffice.gov.uk/trac/roses-u (password required)

It is recommended that you commit your suites regularly.

Output Directory Structure

The output directory structure of rose suites are rather complex. The schematic gives a broad overview of the general structure. Everything can be found within the [SUITE-ID] (e.g. u-cq782 etc.) directory, which can be found within your $HOME/cylc-run directory.

Within this directory there are several directories, including:

  • log: a symbolic link to a directory called something like log.20220914T092709Z, which contains all the job.out (containing output from UM WRITE statements from the umPrint subroutine) and job.err files etc., as well as the script used to run the job.
  • work: this contains the directories used when the job actually runs. Real-time output will be sent to files here (held in a pe_output directory. Sometimes model output will also be here.


Within these directories there will be many sub-directories. Some of these will be named from the cycle-point (labelled [CYCLE] in the graphic. For the UKCA Training Suite this will be 1. The sub-directories will (eventually) be named after the app (labelled by [JOB NAME] in the table below) that the output is from, e.g. fcm_make, ukca etc.

Files General Path Example
Most recent job.out files vm: /home/vagrant/cylc-run/[SUITE-ID]/log/job/1/[JOB NAME]/NN /home/vagrant/cylc-run/u-cq782/log/job/1/ukca/NN
Processor output (while running) vm: /home/vagrant/cylc-run/[SUITE-ID]/work/1/[JOB NAME]/pe_output /home/vagrant/cylc-run/u-cq782/work/1/ukca/pe_output
UKCA Box Model output text files in ASCII format
e.g. tracer_out.csv and flux_out.csv
vm: /home/vagrant/cylc-run/[SUITE-ID]/work/1/ukca /home/vagrant/cylc-run/u-cq782/work/1/ukca

Notes

  • The job.out files can also be viewed through the Gcylc GUI right-click menu from each job.
  • UKCA Box Model output file will be tracer_out.csv for tracers and flux_out.csv for chemical reaction fluxes. These can be renamed in Rose in the ukca Model Input and Output panel.

Viewing Output

UKCA Box Model

Met Office Unified Model

Example output from the UKCA training suite.

For more detailed plotting, tools such as the Iris and cf-python libraries can be used to view UM file formats directly. However, for quick viewing, Xconv is a very useful tool. Information on how to install Xconv on the VM can be found here.

To view these files, do

xconv atmosa.pa19810901_00

As well as viewing files, you can use Xconv to convert these files to netCDF, by filling in the Output file name: box (e.g. foo.nc), and then clicking convert. If no path is defined, this will save the file in the same directory that you opened Xconv from.

Example output from the UKCA training suite can be found at

Checklist

List suites using rosie go
Copy suites using the right-click menu
Run suites using the play button


Tutorial 2


Written by Luke Abraham 2022