Practical 2: Running the LFRic Apps Standard Suite#
In Practical 1: Run the model from command line you ran the LFRic atmosphere model from the command line, this second practical will introduce how to run it as part of a workflow. We will be using the LFRic Apps Standard Suite.
Aims: You will learn how to:
Run the model in a simple Cylc workflow.
Locate model outputs and logs.
Make configuration changes.
Step 1: Check Out the Standard Suite#
mkdir ${HOME}/cylc-src
cd cylc-src
git clone \
git@github.com:MetOffice/momentum_user_training.example_lfric_workflow.git \
lfric_apps_standard_suite
Consult your site’s documentation for cloning git repositories, then clone:
MetOffice/momentum_user_training.example_lfric_workflow.git
Step 2: Explore the workflow#
Navigate to the workflow development (source) directory:
cd ${HOME}/cylc-src/lfric_apps_standard_suite
Open the workflow files in a text editor and explore its structure:
Examine the workflow’s graph and the rose application.
The standard suite performs the following tasks:
Extracts the model code
Builds the executable
Runs a global model simulation
Builds the mesh generator
Creates a low-resolution C12 mesh as input for the model
Task
Can you match each task description above with a folder in the
appdirectory?![digraph {
graph [fontname="sans" fontsize="25"]
node [fontname="sans"]
rankdir="LR"
"build_lfric_atm" -> "lfric_atm"
"build_mesh" -> "generate_mesh"
"extract" -> "build_lfric_atm"
"extract" -> "build_mesh"
"generate_mesh" -> "lfric_atm"
}](../_images/graphviz-24d0c4a6e01caaaebc6e4788ae0cab75d0c70840.png)
Fig. 19 Graph of the LFRic Apps Standard Suite.#
Step 3: Run the workflow#
Start the workflow with:
cylc vip
While the workflow is running, open the Cylc interface to explore the model output:
Running graphical applications over SSH
If you are connected to a remote system over SSH, graphical applications need X11 forwarding to display on your computer. Start an X server on your computer first (for example, XQuartz on macOS), then connect from a terminal using generic host details supplied by your service:
$ ssh -AY <remote-host>
Repeat the options for every additional SSH hop. The -Y option enables
trusted X11 forwarding. The -A option forwards your SSH authentication
agent and should only be used with systems you trust. A terminal integrated
into an editor such as VS Code works in the same way as any other terminal.
On the system where you will start the graphical application, run
echo "$DISPLAY". It should return a value. If it is blank, disconnect
and reconnect with X11 forwarding enabled at every hop before continuing.
Navigate to Cylc Hub and open the workflow there.
Use the Cylc interface supported by your site:
cylc gui
If a graphical interface is not available, use the terminal interface:
cylc tui
Step 4: View the workflow running, logs and outputs#
View your logs:
Navigate to or open the Cylc GUI, and click on each task to view logs.
On the command line cylc gui will open either a new gui or a
window on your site’s Cylc Hub.
Task logs can be found by clicking on task icons.
On the command line type cylc tui.
Task logs can be found by clicking on task icons.
At the Met Office navigate to Cylc Review
Navigate to your site’s Cylc Review instance.
Start Cylc Review with
cylc review start
For each task in the workflow:
cat ~/cylc-run/lfric_apps_standard_suite/runN/log/job/1/<task_name>/job.out
Task
From the logs find out how many time steps were executed and locate the output files in NetCDF format.
Step 5: Modify the configuration#
To gain more experience with the LFRic Apps Standard Suite, make the following configuration changes:
Reduce the number of iterated time steps in the workflow by 50%.
Reduce the length of the time step by 50%.
Then, re-run the workflow for each change (or combine them) and compare:
The number of produced NetCDF files
The forecast duration
Hint
In the workflow directory ~/roses/lfric_apps_standard_suite
navigate to app/lfric_atm and edit the configuration
rose-app.conf.
You need to modify the variables timestep_end and dt.
The NetCDF files can be found under the path
~/cylc-run/lfric_apps_standard_suite/runN/work/1/lfric_atm/*nc.